/* ══════════════════════════════════════════════════════════════════
   chronicle.css — extends landing.css for the chronicle (blog) page.
   Layout-only. Reuses every token from landing.css: ember backdrop,
   nav, footer, .lp-eyebrow, .lp-btn-primary, .lp-btn-ghost.
   Inherits the Living Grimoire register: codex chrome, Cinzel
   ceremony, parchment body, gilt-rule dividers, gold drop-caps.
   ══════════════════════════════════════════════════════════════════ */

/* Page-level: dark vault background, lifted parchment surface above */
body.chronicle-page {
  background: var(--bg-deep, #0b0a10);
  color: var(--codex-parchment, #e8e4dc);
}

/* ─── HERO ─────────────────────────────────────────────────────── */
.chr-hero {
  position: relative;
  min-height: 60vh;
  padding: 140px 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.chr-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(232,197,114,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(157,78,255,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(255,106,44,0.08) 0%, transparent 70%),
    var(--bg-deep, #0b0a10);
}
.chr-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='300' height='300' filter='url(%23n)' opacity='0.05'/></svg>");
  pointer-events: none;
  opacity: 0.7;
}
.chr-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.chr-hero-title {
  font-family: var(--font-display, Cinzel, serif);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  margin: 0.6rem 0 1.2rem;
  background: linear-gradient(180deg, #f5d98a 0%, #e8c572 55%, #c9922a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 32px rgba(11,10,16,0.55),
    0 4px 14px rgba(232,197,114,0.15);
}
.chr-hero-sub {
  color: rgba(232,228,220,0.9);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 2rem;
}

/* Hero table-of-contents — 4 ceremonial chip links */
.chr-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 0.9rem;
  margin-top: 1.4rem;
}
.chr-toc-link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold-lit, #f5d98a);
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border: 1px solid rgba(232,197,114,0.4);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 28%, rgba(245,217,138,0.10) 0%, transparent 55%),
    linear-gradient(155deg, rgba(20,16,24,0.85) 0%, rgba(11,10,16,0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.16),
    0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1)),
              border-color 0.3s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1)),
              box-shadow 0.3s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1));
}
.chr-toc-link:hover {
  transform: translateY(-2px);
  border-color: rgba(232,197,114,0.85);
  color: #fff0bc;
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.3),
    0 8px 20px rgba(0,0,0,0.5),
    0 0 22px rgba(232,197,114,0.30);
}

/* ─── SECTIONS ─────────────────────────────────────────────────── */
.chr-section {
  position: relative;
  padding: 5rem 1.5rem;
}
.chr-section + .chr-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(160px, 28%, 320px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,197,114,0.55), transparent);
}
.chr-container {
  max-width: 1080px;
  margin: 0 auto;
}
.chr-section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.chr-section-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232,228,220,0.62);
  margin-bottom: 0.6rem;
}
.chr-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold, #e8c572);
  margin: 0.4rem 0 0.6rem;
  text-transform: uppercase;
  position: relative;
  padding-top: 28px;
}
.chr-section-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  width: clamp(220px, 36vw, 360px);
  height: 22px;
  background-image:
    radial-gradient(ellipse 8px 8px at center, rgba(245,217,138,0.95) 0%, rgba(232,197,114,0.7) 45%, transparent 60%),
    linear-gradient(90deg, transparent 0%, rgba(232,197,114,0) 8%, rgba(232,197,114,0.78) 35%, rgba(232,197,114,0.92) 45%, transparent 50%),
    linear-gradient(270deg, transparent 0%, rgba(232,197,114,0) 8%, rgba(232,197,114,0.78) 35%, rgba(232,197,114,0.92) 45%, transparent 50%);
  background-size: 20px 20px, 100% 1.5px, 100% 1.5px;
  background-position: center, center, center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 8px rgba(232,197,114,0.45));
}
.chr-section-sub {
  color: rgba(232,228,220,0.78);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── ENTRIES (cards) ───────────────────────────────────────────── */
.chr-entry {
  position: relative;
  background: linear-gradient(180deg, rgba(20,16,24,0.96) 0%, rgba(11,10,16,0.95) 100%);
  border: 1px solid rgba(232,197,114,0.22);
  border-radius: 14px;
  padding: 1.8rem 2rem 1.6rem;
  margin-bottom: 1.6rem;
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.08),
    0 8px 22px rgba(0,0,0,0.45);
  transition: border-color 0.4s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1)),
              box-shadow 0.4s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1)),
              transform 0.4s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1));
}
.chr-entry:hover {
  border-color: rgba(232,197,114,0.52);
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.16),
    0 14px 32px rgba(0,0,0,0.55),
    0 0 28px rgba(232,197,114,0.18);
  transform: translateY(-3px);
}
.chr-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,197,114,0.7), transparent);
}

.chr-entry-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(232,197,114,0.18);
}

.chr-entry-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-lit, #f5d98a);
  background: rgba(11,10,16,0.6);
  border: 1px solid rgba(232,197,114,0.45);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  text-shadow: 0 0 6px rgba(232,197,114,0.35);
}
.chr-tag-lore {
  color: color-mix(in srgb, var(--fc, #e8c572) 90%, #fff 10%);
  border-color: color-mix(in srgb, var(--fc, #e8c572) 60%, transparent 40%);
  background: color-mix(in srgb, var(--fc, #e8c572) 10%, rgba(11,10,16,0.85) 90%);
  text-shadow: 0 0 8px color-mix(in srgb, var(--fc, #e8c572) 50%, transparent 50%);
}
.chr-tag-baseline {
  color: rgba(184,197,214,0.95);
  border-color: rgba(184,197,214,0.45);
}

.chr-entry-date {
  font-family: var(--font-body, Inter, system-ui, sans-serif);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,228,220,0.62);
  font-style: italic;
  margin-left: auto;
}

.chr-entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold, #e8c572);
  margin: 0 0 0.9rem;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(232,197,114,0.18);
}
.chr-entry-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  margin-top: 1.4rem;
}

.chr-entry-body {
  color: rgba(232,228,220,0.92);
  line-height: 1.75;
  font-size: 1rem;
  margin: 0 0 1rem;
}
.chr-entry-body strong {
  color: var(--gold-lit, #f5d98a);
  font-weight: 600;
}
.chr-entry-body em {
  color: rgba(255,176,122,0.88);
  font-style: italic;
}
.chr-entry-body code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.88em;
  background: rgba(11,10,16,0.7);
  border: 1px solid rgba(232,197,114,0.25);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--gold-lit, #f5d98a);
}
.chr-entry-meta {
  font-size: 0.86rem;
  color: rgba(232,228,220,0.55);
  font-style: italic;
  border-top: 1px dashed rgba(232,197,114,0.18);
  padding-top: 0.8rem;
  margin-top: 1rem;
}

/* First news entry gets a drop-cap on its body — every section's
   leading article is an illuminated chapter opening. */
#news .chr-entry:first-of-type .chr-entry-body:first-of-type::first-letter,
#lore .chr-entry:first-of-type .chr-entry-body:first-of-type::first-letter,
.chr-raid .chr-entry-body:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 2.4em;
  font-weight: 700;
  color: var(--gold-lit, #f5d98a);
  float: left;
  line-height: 1;
  padding: 3px 8px 0 0;
  text-shadow: 0 0 14px rgba(232,197,114,0.5);
}

/* ─── PATCH-SPECIFIC ────────────────────────────────────────────── */
.chr-version-pill {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-lit, #f5d98a);
  background:
    radial-gradient(circle at 30% 28%, rgba(245,217,138,0.22) 0%, transparent 55%),
    linear-gradient(155deg, #2a2028 0%, #100e16 100%);
  border: 1px solid rgba(232,197,114,0.6);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.25),
    0 3px 8px rgba(0,0,0,0.5),
    0 0 14px rgba(232,197,114,0.3);
  text-shadow: 0 0 8px rgba(232,197,114,0.45);
}
.chr-patch-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.chr-patch-list li {
  position: relative;
  padding: 0.7rem 0.8rem 0.7rem 2.2rem;
  background: rgba(11,10,16,0.5);
  border: 1px solid rgba(232,197,114,0.10);
  border-radius: 8px;
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(232,228,220,0.92);
}
.chr-patch-list li::before {
  content: '◆';
  position: absolute;
  left: 0.8rem;
  top: 0.85rem;
  color: var(--gold-lit, #f5d98a);
  font-size: 0.8em;
  text-shadow: 0 0 8px rgba(232,197,114,0.55);
}
.chr-patch-list li strong {
  color: var(--gold-lit, #f5d98a);
}

/* ─── LORE-SPECIFIC ─────────────────────────────────────────────── */
.chr-lore {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
}
.chr-lore-banner {
  display: flex;
  justify-content: center;
}
.chr-lore-banner img {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 320 / 780;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  filter:
    drop-shadow(0 6px 18px rgba(0,0,0,0.6))
    drop-shadow(0 0 22px color-mix(in srgb, var(--fc, #e8c572) 28%, transparent 72%));
  transition: transform 0.5s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1)),
              filter 0.5s var(--ease-out, cubic-bezier(0.2,0.65,0.25,1));
}
.chr-lore:hover .chr-lore-banner img {
  transform: translateY(-4px) scale(1.03);
  filter:
    drop-shadow(0 10px 24px rgba(0,0,0,0.7))
    drop-shadow(0 0 32px color-mix(in srgb, var(--fc, #e8c572) 55%, transparent 45%));
}
.chr-lore-motto {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fc, #e8c572) 80%, #fff 20%);
  text-shadow: 0 0 12px color-mix(in srgb, var(--fc, #e8c572) 50%, transparent 50%);
}
.chr-lore-quote {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-style: italic;
  color: rgba(232,228,220,0.85);
  margin: 0 0 1.2rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid color-mix(in srgb, var(--fc, #e8c572) 60%, transparent 40%);
  background: rgba(11,10,16,0.4);
}

@media (max-width: 768px) {
  .chr-lore {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .chr-lore-banner { margin-bottom: 0.5rem; }
  .chr-lore-quote { text-align: left; }
}

/* ─── RAID-SPECIFIC ─────────────────────────────────────────────── */
.chr-section-raid {
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(157,78,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(110,200,150,0.06) 0%, transparent 70%),
    var(--bg-deeper, #0a0810);
}
.chr-section-raid .chr-section-title {
  color: var(--gold-lit, #f5d98a);
  text-shadow:
    0 0 18px rgba(232,197,114,0.4),
    0 0 36px rgba(157,78,255,0.4);
}
.chr-raid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: 2.4rem;
  align-items: start;
  padding: 2rem 2rem 2.4rem;
  border-color: rgba(157,78,255,0.32);
  box-shadow:
    inset 0 1px 0 rgba(245,217,138,0.10),
    0 12px 32px rgba(0,0,0,0.6),
    0 0 28px rgba(157,78,255,0.18);
}
.chr-raid-titlecard {
  position: sticky;
  top: 100px;
}
.chr-raid-titlecard img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter:
    drop-shadow(0 12px 28px rgba(0,0,0,0.8))
    drop-shadow(0 0 36px rgba(157,78,255,0.55));
}
.chr-raid-quote {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  text-align: center;
  border-left: none;
  border-top: 1px solid rgba(157,78,255,0.5);
  border-bottom: 1px solid rgba(157,78,255,0.5);
  padding: 1rem;
  margin: 0 0 1.6rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(157,78,255,0.12) 0%, transparent 70%),
    rgba(11,10,16,0.6);
}
.chr-raid-stats {
  list-style: none;
  padding: 1.2rem 1.4rem;
  margin: 1.2rem 0;
  background: rgba(11,10,16,0.65);
  border: 1px solid rgba(157,78,255,0.35);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.4rem;
  box-shadow:
    inset 0 0 24px rgba(157,78,255,0.10),
    0 6px 18px rgba(0,0,0,0.4);
}
.chr-raid-stats li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.92rem;
}
.chr-raid-stats li:last-child { border-bottom: none; }
.chr-raid-stats li span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232,228,220,0.62);
}
.chr-raid-stats li strong {
  color: var(--gold-lit, #f5d98a);
  text-shadow: 0 0 8px rgba(232,197,114,0.35);
}
.chr-phase-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  counter-reset: phase;
}
.chr-phase-list li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3.2rem;
  margin-bottom: 0.6rem;
  background: rgba(11,10,16,0.55);
  border: 1px solid rgba(157,78,255,0.25);
  border-radius: 8px;
  line-height: 1.6;
  font-size: 0.95rem;
  counter-increment: phase;
}
.chr-phase-list li::before {
  content: counter(phase, upper-roman);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(245,217,138,0.18) 0%, transparent 55%),
    linear-gradient(155deg, #2a2028 0%, #100e16 100%);
  border: 1px solid rgba(157,78,255,0.55);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-lit, #f5d98a);
  box-shadow: 0 0 12px rgba(157,78,255,0.4);
}
.chr-raid-cta { margin-top: 1rem; display: inline-block; }

@media (max-width: 900px) {
  .chr-raid { grid-template-columns: 1fr; }
  .chr-raid-titlecard { position: static; }
}

/* ─── CLOSING CTA ───────────────────────────────────────────────── */
.chr-section-cta {
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(232,197,114,0.10) 0%, transparent 70%),
    var(--bg-deep, #0b0a10);
}
.chr-cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.chr-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold, #e8c572);
  margin: 0;
}
.chr-cta-btns {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── REDUCED MOTION ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .chr-entry, .chr-toc-link, .chr-lore-banner img { transition: none !important; }
  .chr-entry:hover, .chr-toc-link:hover, .chr-lore:hover .chr-lore-banner img { transform: none !important; }
}

/* ─── MOBILE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .chr-hero { padding: 100px 1rem 2.4rem; }
  .chr-section { padding: 3rem 1rem; }
  .chr-entry { padding: 1.4rem 1.2rem 1.2rem; }
  .chr-entry-head { gap: 0.5rem; }
  .chr-entry-date { width: 100%; text-align: left; margin-left: 0; }
}

/* Indithar — single italic subtitle in the chronicle hero.
   Tier-1 universe reference only. Sits below the main subtitle
   as a quiet attribution line. */
.chr-hero-indithar {
  font-family: var(--font-display, Cinzel, serif);
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.20em;
  color: rgba(232, 197, 114, 0.65);
  text-shadow: 0 0 14px rgba(232, 197, 114, 0.25);
  margin: -0.6rem 0 1.6rem;
  text-align: center;
}
.chr-hero-indithar em { font-style: italic; }
/* ════════════════════════ THE TOME — a floating 3D codex (js/chronicle.js) ════════════════════════
   Progressive enhancement. BASE (no .cdx-live) = a readable vertical manuscript
   (every face is a parchment card, in reading order via `.cdx-leaf{display:contents}`).
   js adds `.cdx-live` to #chronicle -> the leaves lift into a 3D flip-book.
   v2 (2026): real parchment grain, tooled-leather cover with gold filigree,
   illuminated drop caps, gold flourishes, page thickness, candle-glow. */
.chr-codex {
  --ph: clamp(440px, 72vh, 680px);
  --pw: calc(var(--ph) * 0.71);
  --thick: clamp(14px, 1.5vw, 26px);
  --parch: #efe4c8; --parch-lo: #e2d2ac; --ink: #2a2014; --ink-soft: #5a4a30;
  --gild: #e8c572; --gild-hi: #f8e6ad; --gild-lo: #a8761f;
  --leather: #20140f;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --fil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23e8c572' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 60 L4 22 Q4 4 22 4 L60 4'/%3E%3Cpath d='M13 55 Q13 13 55 13' stroke-width='1.3' opacity='0.8'/%3E%3Cpath d='M4 22 Q18 26 22 40 M22 4 Q26 18 40 22' stroke-width='1.1' opacity='0.7'/%3E%3C/g%3E%3Ccircle cx='4' cy='4' r='3.2' fill='%23f8e6ad'/%3E%3C/svg%3E");
  position: relative; padding: clamp(2rem, 5vw, 4rem) 1rem 2.5rem; z-index: 1;
}
.chr-sr-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chr-stage-hint {
  text-align: center; max-width: 42ch; margin: 0 auto 1.4rem; color: var(--gild);
  font-size: 0.95rem; letter-spacing: 0.03em; opacity: 0.92; transition: opacity 0.5s; font-style: italic;
}
.chr-stage-hint b { color: var(--gild-hi); font-style: normal; }
.cdx-stage { position: relative; }

/* ── BASE / FLAT (readable manuscript) ─────────────────────────────────── */
.cdx-ambient { display: none; }
.cdx-book { display: flex; flex-direction: column; gap: 1.1rem; max-width: 720px; margin: 0 auto; }
.cdx-leaf { display: contents; }
.cdx-corner { display: none; }
.cdx-face {
  position: relative; display: block; border-radius: 6px; overflow: hidden; color: var(--ink);
  padding: clamp(1.5rem, 3.6vw, 2.3rem);
  background: var(--grain), radial-gradient(120% 80% at 0% 0%, rgba(120,90,40,0.10), transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(110,80,30,0.12), transparent 55%),
    linear-gradient(158deg, var(--parch) 0%, var(--parch-lo) 100%);
  background-size: 200px, auto, auto, auto; background-blend-mode: multiply, normal, normal, normal;
  box-shadow: 0 14px 34px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(150,120,55,0.4),
    inset 0 0 0 5px rgba(232,197,114,0.12), inset 0 0 70px rgba(150,115,55,0.16);
}
.cdx-cover {
  color: #f3e7c5; text-align: center;
  background: var(--grain), radial-gradient(130% 90% at 50% 14%, rgba(90,52,34,0.55), transparent 60%),
    linear-gradient(155deg, #34231b 0%, var(--leather) 52%, #0c0706 100%);
  background-size: 220px, auto, auto; background-blend-mode: overlay, normal, normal;
  box-shadow: 0 20px 44px rgba(0,0,0,0.65), inset 0 0 0 2px rgba(232,197,114,0.55),
    inset 0 0 0 4px rgba(0,0,0,0.5), inset 0 0 0 7px rgba(232,197,114,0.22), inset 0 0 90px rgba(0,0,0,0.6);
}
.cdx-pg { position: relative; z-index: 2; }

/* ── 3D BOOK (.cdx-live) ───────────────────────────────────────────────── */
.chr-codex.cdx-live .cdx-stage {
  perspective: 2700px; perspective-origin: 50% 40%;
  display: flex; justify-content: center; align-items: center;
  min-height: clamp(560px, 86vh, 840px); margin-top: -0.5rem;
}
.chr-codex.cdx-live .cdx-ambient {
  display: block; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 34% at 50% 38%, rgba(255,196,96,0.16), transparent 70%),
    radial-gradient(60% 26% at 50% 92%, rgba(0,0,0,0.6), transparent 72%);
}
.chr-codex.cdx-live .cdx-ambient::after {  /* warm candle flicker */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(26% 22% at 50% 40%, rgba(255,180,80,0.12), transparent 70%);
  animation: cdxFlicker 4.5s ease-in-out infinite;
}
.chr-codex.cdx-live .cdx-floater {
  transform-style: preserve-3d; animation: cdxFloat 8.5s ease-in-out infinite;
  transform: rotateX(var(--cdx-tx, 0deg)) rotateY(var(--cdx-ty, 0deg));
}
.chr-codex.cdx-live .cdx-book {
  display: block; position: relative; width: var(--pw); height: var(--ph); margin: 0;
  transform-style: preserve-3d; transition: transform 1s var(--ease-out, cubic-bezier(.2,.65,.25,1));
}
.chr-codex.cdx-live .cdx-book.is-closed { transform: translateX(0) rotateY(-27deg) rotateX(8deg); }
.chr-codex.cdx-live .cdx-book.is-open   { transform: translateX(50%) rotateX(6deg); }
/* page-block fore-edge (right) — real thickness when closed */
.chr-codex.cdx-live .cdx-book::after {
  content: ''; position: absolute; top: 1.4%; right: 0; height: 97.2%; width: var(--thick);
  transform-origin: right center; transform: rotateY(90deg) translateX(calc(var(--thick) / 2));
  background: repeating-linear-gradient(180deg, #efe4c8 0 2px, #c9b888 2px 3px, #d8c79a 3px 4px);
  box-shadow: inset 0 0 8px rgba(60,40,15,0.55); border-radius: 1px;
}
/* spine block (left) — leather with raised bands */
.chr-codex.cdx-live .cdx-book::before {
  content: ''; position: absolute; top: 1.4%; left: 0; height: 97.2%; width: var(--thick); z-index: -1;
  transform-origin: left center; transform: rotateY(-90deg) translateX(calc(var(--thick) / -2));
  background: repeating-linear-gradient(180deg, #2a1c14 0 13%, #120b08 13% 16%);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,197,114,0.2);
}
.chr-codex.cdx-live .cdx-book.is-open::after,
.chr-codex.cdx-live .cdx-book.is-open::before { opacity: 0; transition: opacity 0.4s; }

.chr-codex.cdx-live .cdx-leaf {
  display: block; position: absolute; top: 0; left: 0; width: var(--pw); height: var(--ph);
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1s var(--ease-out, cubic-bezier(.2,.65,.25,1)); will-change: transform;
}
.chr-codex.cdx-live .cdx-leaf.turned { transform: rotateY(-180deg); }
.chr-codex.cdx-live .cdx-face {
  position: absolute; inset: 0; margin: 0; border-radius: 3px 5px 5px 3px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; overflow: hidden;
}
.chr-codex.cdx-live .cdx-front { transform: translateZ(0.6px); }
.chr-codex.cdx-live .cdx-back  { transform: rotateY(180deg) translateZ(0.6px); }
/* gutter shadow + a faint sheen sweep on each parchment page */
.chr-codex.cdx-live .cdx-page::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 16%; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(55,38,14,0.4), rgba(55,38,14,0.08) 60%, transparent);
}
.chr-codex.cdx-live .cdx-pg {
  height: 100%; overflow: auto; padding-right: 4px; scrollbar-width: thin;
  scrollbar-color: rgba(150,120,60,0.5) transparent;
}
.chr-codex.cdx-live .cdx-pg::-webkit-scrollbar { width: 6px; }
.chr-codex.cdx-live .cdx-pg::-webkit-scrollbar-thumb { background: rgba(150,120,60,0.45); border-radius: 3px; }

@keyframes cdxFloat {
  0%   { transform: translateY(-10px) rotateX(2.2deg) rotateY(-3deg) rotateZ(-0.5deg); }
  30%  { transform: translateY(3px)  rotateX(-1.2deg) rotateY(2.4deg) rotateZ(0.5deg); }
  62%  { transform: translateY(12px) rotateX(1.6deg) rotateY(-1.4deg) rotateZ(-0.3deg); }
  100% { transform: translateY(-10px) rotateX(2.2deg) rotateY(-3deg) rotateZ(-0.5deg); }
}
@keyframes cdxFlicker { 0%,100% { opacity: 0.7; } 45% { opacity: 1; } 70% { opacity: 0.82; } }

/* ── PAGE TYPOGRAPHY ───────────────────────────────────────────────────── */
.cdx-folio { display: block; font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.55rem; }
.cdx-folio::after { content: ''; display: block; width: 38px; height: 2px; margin-top: 0.4rem;
  background: linear-gradient(90deg, var(--gild-lo), var(--gild), transparent); }
.cdx-h { font-family: var(--font-display, 'Cinzel', serif); font-weight: 700; line-height: 1.08; margin: 0 0 0.7rem;
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  background: linear-gradient(176deg, #5a3d12 0%, #3a2c14 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255,250,235,0.4); }
.cdx-sub-h { font-size: clamp(1.05rem, 2vw, 1.4rem); }
.cdx-faction-h { background: linear-gradient(176deg, color-mix(in srgb, var(--fc, #6a5020) 72%, #2a2012), #2a2012);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cdx-lede { font-size: 0.97rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 1rem; }
.cdx-p { font-size: 0.92rem; line-height: 1.66; color: var(--ink); margin: 0 0 0.85rem; }
.cdx-p b, .cdx-p strong { color: #6a4310; font-weight: 700; }
.cdx-meta { font-size: 0.8rem; line-height: 1.52; color: var(--ink-soft); font-style: italic;
  border-top: 1px solid rgba(150,120,55,0.3); padding-top: 0.65rem; margin: 0.7rem 0 0; }
.cdx-motto { font-family: var(--font-display, 'Cinzel', serif); font-size: 0.92rem; margin: 0 0 0.55rem; letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--fc, #8a6a20) 72%, #2a2012 28%); }
.cdx-motto i { color: var(--ink-soft); font-weight: 400; }
.cdx-quote { font-style: italic; font-size: 0.98rem; color: #5a3d12; margin: 0 0 0.95rem; padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 3px solid color-mix(in srgb, var(--fc, #c9922a) 65%, transparent); }
/* illuminated drop cap */
.cdx-drop { float: left; font-family: var(--font-display, 'Cinzel', serif); font-weight: 700;
  font-size: 3.1rem; line-height: 0.72; margin: 0.06em 0.5rem 0 0; padding: 0.12em 0.16em 0.06em;
  color: var(--gild-lo);
  background: linear-gradient(160deg, var(--gild-hi), var(--gild) 50%, var(--gild-lo)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  border: 1px solid rgba(180,140,50,0.5); border-radius: 4px;
  box-shadow: inset 0 0 14px rgba(232,197,114,0.22); text-shadow: 0 1px 1px rgba(90,60,20,0.4); }
.cdx-banner { float: right; width: clamp(78px, 19%, 128px); height: auto; margin: 0.2rem 0 0.5rem 0.9rem; border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,197,114,0.4); }
.cdx-map img, .cdx-titlecard img { width: 100%; height: auto; border-radius: 5px; display: block; margin: 0 auto 0.85rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,197,114,0.45), 0 0 0 5px rgba(20,14,9,0.5); }
.cdx-map { max-width: 60%; margin: 0 auto 0.7rem; }
.cdx-titlecard { margin: 0 0 0.85rem; }
.cdx-forces { list-style: none; padding: 0; margin: 0 0 0.9rem; }
.cdx-forces li { font-size: 0.88rem; line-height: 1.55; color: var(--ink); padding: 0.45rem 0 0.45rem 0.9rem; position: relative;
  border-bottom: 1px dotted rgba(150,120,55,0.32); }
.cdx-forces li::before { content: '◆'; position: absolute; left: 0; top: 0.5rem; color: var(--gild-lo); font-size: 0.7rem; }
.cdx-forces b { color: #6a4310; }
.cdx-contents { list-style: none; padding: 0; margin: 0 0 1rem; }
.cdx-contents li { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.32rem 0; border-bottom: 1px dotted rgba(150,120,55,0.34); font-size: 0.93rem; color: var(--ink); }
.cdx-contents li span { font-family: var(--font-display, 'Cinzel', serif); color: var(--gild-lo); min-width: 1.6em; }
.cdx-stats { list-style: none; padding: 0; margin: 0 0 0.9rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.cdx-stats li { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; border-bottom: 1px solid rgba(150,120,55,0.3); padding-bottom: 0.25rem; }
.cdx-stats span { color: var(--ink-soft); } .cdx-stats strong { color: #5a3d12; text-align: right; }
.cdx-phases { margin: 0 0 1rem; padding-left: 1.15rem; }
.cdx-phases li { font-size: 0.84rem; line-height: 1.5; margin-bottom: 0.42rem; color: var(--ink); }
.cdx-phases b { color: #6a4310; }
.cdx-record-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.cdx-record-list li { font-size: 0.86rem; padding: 0.34rem 0; border-bottom: 1px dotted rgba(150,120,55,0.34); color: var(--ink); }
.cdx-record-list b { color: var(--gild-lo); font-family: var(--font-display, 'Cinzel', serif); }
.cdx-turnhint { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; margin: 0.7rem 0 0; text-align: right; }
.cdx-jump { color: #8a5a14; text-decoration: underline; }
.cdx-cta.lp-btn-primary { margin-top: 0.7rem; display: inline-block; font-size: 0.86rem; padding: 0.5rem 1.1rem; }

/* ── ORNATE COVER ──────────────────────────────────────────────────────── */
.cdx-cover-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 0.5rem; padding: 1.2rem; }
.cdx-cover-kicker { font-size: 0.6rem; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(232,197,114,0.72); }
.cdx-cover-seal { width: clamp(120px, 36%, 210px); height: auto; filter: drop-shadow(0 0 26px rgba(232,197,114,0.5)); animation: cdxSealGlow 5s ease-in-out infinite; }
.cdx-cover-title { font-family: var(--font-display, 'Cinzel', serif); font-weight: 700; font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.0; margin: 0.4rem 0 0; letter-spacing: 0.05em;
  background: linear-gradient(180deg, var(--gild-hi), var(--gild) 45%, var(--gild-lo)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 3px rgba(0,0,0,0.6); filter: drop-shadow(0 0 12px rgba(232,197,114,0.35)); }
.cdx-cover-sub { font-family: var(--font-display, 'Cinzel', serif); font-style: italic; color: var(--gild); font-size: 1.05rem; letter-spacing: 0.1em; }
.cdx-cover-open { margin-top: 1rem; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(248,230,173,0.9); animation: cdxPulse 2.4s ease-in-out infinite; }
.cdx-backcover .cdx-cover-sub { font-size: 1.5rem; }
.cdx-backseal { width: 110px; opacity: 0.78; }
/* gold filigree corner ornaments on the covers */
.cdx-live .cdx-cover .cdx-corner { display: block; position: absolute; width: clamp(34px, 9%, 56px); aspect-ratio: 1; z-index: 3;
  background: var(--fil) center/contain no-repeat; filter: drop-shadow(0 0 5px rgba(232,197,114,0.4)); }
.cdx-live .cdx-cover .cdx-corner.tl { top: 5%; left: 5%; }
.cdx-live .cdx-cover .cdx-corner.tr { top: 5%; right: 5%; transform: scaleX(-1); }
.cdx-live .cdx-cover .cdx-corner.bl { bottom: 5%; left: 5%; transform: scaleY(-1); }
.cdx-live .cdx-cover .cdx-corner.br { bottom: 5%; right: 5%; transform: scale(-1); }
@keyframes cdxPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes cdxSealGlow { 0%,100% { filter: drop-shadow(0 0 20px rgba(232,197,114,0.4)); } 50% { filter: drop-shadow(0 0 34px rgba(248,230,173,0.6)); } }
.chr-codex.cdx-live .cdx-cover { cursor: pointer; }
.chr-codex:not(.cdx-live) .cdx-cover-open { display: none; }

/* ── CONTROLS ──────────────────────────────────────────────────────────── */
.cdx-controls { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin: 1.5rem auto 0; }
.cdx-controls[hidden] { display: none; }
.cdx-btn { font-family: var(--font-display, 'Cinzel', serif); cursor: pointer; color: #f3e7c5;
  background: linear-gradient(180deg, #2a2330, #181320); border: 1px solid rgba(232,197,114,0.5);
  border-radius: 8px; padding: 0.5rem 0.95rem; font-size: 1.1rem; line-height: 1; transition: all 0.2s var(--ease-out); }
.cdx-btn:hover:not(:disabled) { background: linear-gradient(180deg, #4a3a22, #2c2110); border-color: var(--gild); box-shadow: 0 0 16px rgba(232,197,114,0.4); }
.cdx-btn:disabled { opacity: 0.32; cursor: default; }
.cdx-close { font-size: 0.78rem; }
.cdx-progress { font-family: var(--font-display, 'Cinzel', serif); color: var(--gild-hi); font-size: 0.84rem; min-width: 10ch; text-align: center; letter-spacing: 0.05em; }

/* ── THE RECORD (below the tome) ───────────────────────────────────────── */
.chr-record-section { padding-top: 1rem; }
.chr-record-band { font-family: var(--font-display, 'Cinzel', serif); color: var(--gild); font-size: 1.15rem; letter-spacing: 0.08em; margin: 2rem 0 1rem; text-align: center; }

/* ── RESPONSIVE + REDUCED MOTION ───────────────────────────────────────── */
@media (max-width: 760px) { .chr-codex { --ph: clamp(400px, 66vh, 560px); } }
@media (prefers-reduced-motion: reduce) {
  .chr-codex.cdx-live .cdx-floater, .cdx-cover-open, .cdx-cover-seal, .chr-codex.cdx-live .cdx-ambient::after { animation: none; }
}

/* ── floating runes + ancient scripture: drift INWARD on a ring and vanish into the tome ── */
.cdx-runes, .cdx-sigil { display: none; }
.chr-codex.cdx-live .cdx-runes {
  display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.cdx-rune {
  position: absolute; left: 50%; top: 46%; font-family: 'Cinzel', 'Segoe UI Symbol', 'Noto Sans Runic', serif; font-weight: 700;
  line-height: 1; letter-spacing: 0.08em; user-select: none; opacity: 0; will-change: transform, opacity;
  background: linear-gradient(160deg, var(--gild-hi, #f8e6ad), var(--gild, #e8c572) 55%, var(--gild-lo, #a8761f));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(232,197,114,0.6));
  animation: cdxRuneInward var(--d, 14s) ease-in var(--delay, 0s) infinite;
}
/* placed on a ring (angle --a, radius --r0) and pulled to the centre (--r1≈0) while
   shrinking + fading — the ancient scripture is absorbed into the book. */
@keyframes cdxRuneInward {
  0%   { opacity: 0; transform: translate(-50%,-50%) rotate(var(--a)) translateX(var(--r0)) rotate(calc(-1 * var(--a))) scale(1); }
  16%  { opacity: var(--o, 0.5); }
  74%  { opacity: var(--o, 0.5); }
  100% { opacity: 0; transform: translate(-50%,-50%) rotate(var(--a)) translateX(var(--r1)) rotate(calc(-1 * var(--a))) scale(0.18); }
}
/* two large arcane sigils hung behind the book — bigger, glowing, counter-spinning + breathing */
.chr-codex.cdx-live .cdx-sigil {
  display: block; position: absolute; left: 50%; top: 45%; aspect-ratio: 1;
  z-index: 0; pointer-events: none; image-rendering: pixelated; mix-blend-mode: screen;
  filter: drop-shadow(0 0 28px rgba(255,180,80,0.5)) drop-shadow(0 0 64px rgba(232,150,70,0.3));
  -webkit-mask-image: radial-gradient(closest-side, #000 64%, transparent);
          mask-image: radial-gradient(closest-side, #000 64%, transparent);
}
.chr-codex.cdx-live .cdx-sigil-1 { width: clamp(520px, 64vw, 1040px); animation: cdxSigilA 120s linear infinite, cdxSigilBreath 9s ease-in-out infinite; }
.chr-codex.cdx-live .cdx-sigil-2 { width: clamp(300px, 38vw, 600px); animation: cdxSigilB 78s linear infinite, cdxSigilBreath 7s ease-in-out infinite reverse; }
@keyframes cdxSigilA { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes cdxSigilB { from { transform: translate(-50%,-50%) rotate(360deg); } to { transform: translate(-50%,-50%) rotate(0deg); } }
@keyframes cdxSigilBreath { 0%,100% { opacity: 0.14; } 50% { opacity: 0.34; } }
/* soft golden ambience pooled behind the tome */
.chr-codex.cdx-live .cdx-ambient::before {
  content: ''; position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%);
  width: clamp(440px, 54vw, 860px); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,182,84,0.18), rgba(232,150,70,0.06) 46%, transparent 70%);
  animation: cdxSigilBreath 6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .cdx-rune { animation: none; opacity: 0.4; transform: translate(-50%,-50%) rotate(var(--a)) translateX(calc(var(--r0) * 0.55)) rotate(calc(-1 * var(--a))); }
  .chr-codex.cdx-live .cdx-sigil, .chr-codex.cdx-live .cdx-ambient::before { animation: none; }
}

/* ── the FRONT cover is a painted grimoire relic (Higgsfield) — the art carries
   the emblem + filigree; only the title overlays, at the foot, over a scrim ── */
.cdx-front.cdx-cover {
  background: #18100e url("../assets/landing/chronicle-cover.webp?v=5.54-ec5ce051") center/cover no-repeat;
  background-blend-mode: normal;
  box-shadow: 0 22px 48px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(232,197,114,0.22), inset 0 0 90px rgba(0,0,0,0.42);
}
.cdx-front.cdx-cover .cdx-corner,
.cdx-front.cdx-cover .cdx-cover-seal,
.cdx-front.cdx-cover .cdx-cover-kicker { display: none; }
.cdx-front.cdx-cover .cdx-cover-inner { justify-content: flex-end; gap: 0.3rem; position: relative; padding-bottom: 1.4rem; }
.cdx-front.cdx-cover .cdx-cover-inner::after {
  content: ''; position: absolute; left: -12%; right: -12%; bottom: -10%; height: 54%; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 92% at 50% 100%, rgba(8,5,3,0.94), rgba(8,5,3,0.45) 52%, transparent 80%);
}
.cdx-front.cdx-cover .cdx-cover-title,
.cdx-front.cdx-cover .cdx-cover-sub,
.cdx-front.cdx-cover .cdx-cover-open { position: relative; z-index: 1; }
.cdx-front.cdx-cover .cdx-cover-title { font-size: clamp(1.45rem, 3.3vw, 2.15rem); margin: 0; text-shadow: 0 2px 6px #000, 0 0 20px rgba(0,0,0,0.85); }
.cdx-front.cdx-cover .cdx-cover-sub { margin-bottom: 0.25rem; text-shadow: 0 1px 4px #000; }
.cdx-front.cdx-cover .cdx-cover-open { color: #fff0bc; text-shadow: 0 1px 6px #000; }
/* the BACK cover is the same painted relic — "Mystvale" + colophon at the foot */
.cdx-backcover {
  background: #18100e url("../assets/landing/chronicle-cover.webp?v=5.54-ec5ce051") center/cover no-repeat !important;
  box-shadow: 0 22px 48px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(232,197,114,0.22), inset 0 0 90px rgba(0,0,0,0.5) !important;
}
.cdx-backcover .cdx-corner, .cdx-backcover .cdx-backseal { display: none !important; }
.cdx-backcover .cdx-cover-inner { justify-content: flex-end !important; position: relative; padding-bottom: 1.6rem; }
.cdx-backcover .cdx-cover-inner::after {
  content: ''; position: absolute; left: -12%; right: -12%; bottom: -10%; height: 58%; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 92% at 50% 100%, rgba(8,5,3,0.94), rgba(8,5,3,0.45) 52%, transparent 80%);
}
.cdx-backcover .cdx-cover-sub, .cdx-backcover .cdx-cover-kicker { position: relative; z-index: 1; text-shadow: 0 1px 5px #000; }

/* ════════ MOBILE ONE-PAGE READER (phone) ════════
   Set by js/chronicle.js on narrow viewports: instead of stacking all ~24
   parchment faces (≈30 screens of scroll), show ONE face at a time with a
   sticky prev/next bar + swipe. No-JS still flows every page (SEO/a11y). */
.cdx-mobile #cdxBook { perspective: none; }
.cdx-mobile .cdx-leaf { display: contents; }
.cdx-mobile .cdx-face { display: none !important; }
.cdx-mobile .cdx-face.cdx-mpage-on {
  display: block !important; transform: none !important; backface-visibility: visible !important;
  position: relative !important; opacity: 1 !important; animation: cdxMFade 0.35s ease both;
}
@keyframes cdxMFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cdx-mnav {
  position: sticky; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  margin: 1.4rem -1rem 0; padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(11,10,16,0.4), rgba(11,10,16,0.96)); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border-top: 1px solid rgba(232,197,114,0.32);
}
.cdx-mbtn {
  font-family: var(--font-display, 'Cinzel', serif); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.07em; color: #0b0a10;
  background: linear-gradient(180deg, #f8e6ad, #e8c572); border: none; border-radius: 9px; padding: 0.65rem 1.05rem; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.35); min-width: 92px;
}
.cdx-mbtn:disabled { opacity: 0.35; }
.cdx-mbtn:active { transform: translateY(1px); }
.cdx-mcount { font-family: var(--font-display, 'Cinzel', serif); font-size: 0.76rem; letter-spacing: 0.12em; color: var(--gold, #e8c572); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cdx-mobile .cdx-face.cdx-mpage-on { animation: none; } }

/* mobile: collapse the long Record changelog behind a toggle.
   (#record is a SIBLING of #chronicle, so no .cdx-mobile ancestor — the
   .chr-rec-collapsed class is only added by JS on phones, so it's the gate.) */
#record .chr-container.chr-rec-collapsed:not(.chr-rec-open) {
  max-height: 150vh; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.chr-rec-toggle {
  display: block; margin: -2.4rem auto 2rem; position: relative; z-index: 5;
  font-family: var(--font-display, 'Cinzel', serif); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em;
  color: #0b0a10; background: linear-gradient(180deg, #f8e6ad, #e8c572); border: none; border-radius: 9px;
  padding: 0.7rem 1.4rem; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.35);
}
.chr-rec-toggle:active { transform: translateY(1px); }
