:root {
  --ink: #1a1208;
  --parchment: #f2e8d5;
  --aged: #d4b896;
  --leather: #6b3a1f;
  --deep-leather: #3d1f0a;
  --gold: #c9a84c;
  --gold-light: #e8cc7a;
  --shelf-wood: #2c1810;
  --shelf-light: #4a2c1a;
}

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

body.island-religious-knowledge-page {
  background-color: #0d0905;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(100,60,20,0.4) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  min-height: 100vh;
  font-family: 'Cormorant Garamond', serif;
  color: var(--parchment);
  overflow-x: hidden;
}

body.island-religious-knowledge-page .dashboard-main {
  padding-top: 72px;
  margin: 0;
  overflow-x: hidden;
}

.religious-knowledge-back {
  position: fixed;
  top: calc(72px + 1.15rem + env(safe-area-inset-top, 0px));
  left: max(1rem, env(safe-area-inset-left, 0px));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.25s ease, filter 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.religious-knowledge-back:hover,
.religious-knowledge-back:focus-visible {
  color: var(--gold-light);
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(201, 168, 76, 0.42));
  outline: none;
}

.religious-knowledge-back:focus-visible {
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.35);
}

/* ── LIBRARY HEADER ── */
.library-header {
  text-align: center;
  padding: 3.5rem 2rem 1.5rem;
  position: relative;
}
.library-header::after {
  content: '';
  display: block;
  width: 60%;
  margin: 1.2rem auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.library-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.05rem, 3.8vw, 3.2rem);
  letter-spacing: clamp(0.04em, 0.65vw, 0.25em);
  color: var(--gold);
  text-shadow: 0 0 40px rgba(201,168,76,0.4);
  font-weight: 400;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
  overflow-wrap: break-word;
}
.library-subtitle {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--aged);
  font-size: clamp(0.82rem, 2.4vw, 1rem);
  letter-spacing: 0.12em;
  margin-top: 0.4rem;
  opacity: 0.8;
  max-width: min(100%, 40rem);
  margin-left: auto;
  margin-right: auto;
  padding: 0 0.5rem;
  line-height: 1.45;
}

/* ── ROOM ── */
.room {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.35rem 2rem 4rem;
  position: relative;
}

/* ── BOOKSHELF ── */
.bookshelf {
  background: linear-gradient(180deg, #1a0e08 0%, #120b05 100%);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 4px;
  position: relative;
  overflow: visible;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,0.8),
    0 20px 60px rgba(0,0,0,0.9),
    0 0 0 1px rgba(201,168,76,0.08);
}
.bookshelf::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 55%);
  pointer-events: none;
}
.shelf-row {
  position: relative;
  padding: 2rem 3rem 0;
}
.books-container {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 200px;
  flex-wrap: wrap;
}
.shelf-plank {
  height: 18px;
  background: linear-gradient(180deg, var(--shelf-light) 0%, var(--shelf-wood) 60%, #1a0a04 100%);
  border-top: 2px solid rgba(201,168,76,0.35);
  box-shadow: 0 4px 16px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,220,120,0.15);
  position: relative;
  z-index: 2;
}
.shelf-plank::before {
  content: '';
  position: absolute;
  inset: 3px 0 0;
  background: repeating-linear-gradient(90deg, transparent 0px, transparent 120px, rgba(0,0,0,0.15) 120px, rgba(0,0,0,0.15) 122px);
}

/* ── BOOK SPINE ── */
.book {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transform-origin: bottom center;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), filter 0.25s ease;
  filter: brightness(0.82);
}
.book:hover {
  transform: translateY(-14px) scale(1.04);
  filter: brightness(1.05);
  z-index: 10;
}
.book-spine {
  width: var(--w);
  height: var(--h);
  background: var(--color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset -4px 0 8px rgba(0,0,0,0.5),
    inset 2px 0 4px rgba(255,255,255,0.07),
    2px 0 6px rgba(0,0,0,0.6);
  border-radius: 1px 0 0 1px;
  overflow: hidden;
}
.book-spine::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.12), transparent);
}
.book-spine::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: rgba(0,0,0,0.4);
}
.spine-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.46rem, 1.05vw, 0.66rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--label);
  text-align: center;
  padding: 0.5rem 0;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 88%;
  user-select: none;
}
html[lang="en"] .book--placeholder .spine-title {
  font-size: clamp(0.38rem, 0.88vw, 0.54rem);
  letter-spacing: 0.08em;
}
html[lang="ru"] .book--placeholder .spine-title {
  font-size: clamp(0.48rem, 1.12vw, 0.70rem);
  letter-spacing: 0.10em;
}
.spine-band {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--band);
  opacity: 0.6;
}
.spine-band.top { top: 12px; }
.spine-band.bot { bottom: 12px; }

/* ── COVER-IMAGE TEST BOOK ── */
.book--cover-image {
  align-self: flex-end;
}
.book--cover-image .book-spine--cover-image {
  width: auto;
  min-width: var(--w);
  height: var(--h);
  background: transparent;
  box-shadow: 2px 0 6px rgba(0,0,0,0.6);
  overflow: visible;
}
.book--cover-image .book-spine--cover-image::before,
.book--cover-image .book-spine--cover-image::after {
  display: none;
}
.book-cover-image {
  height: var(--h);
  width: auto;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* ── SHELF SPINE LABEL (children Q&A PNG book only) ── */
.book--gold-shimmer.book--cover-image .book-spine--cover-image {
  position: relative;
}
.book--gold-shimmer.book--cover-image .shelf-spine-title {
  position: absolute;
  left: 12%;
  right: 49%;
  top: 10%;
  bottom: 10%;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
.book--gold-shimmer.book--cover-image .shelf-spine-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32em;
  transform: rotate(-90deg);
  transform-origin: center center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.55rem, 1.26vw, 0.77rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #d4b86a;
  text-align: center;
  text-shadow: 0 0 6px rgba(201, 168, 76, 0.16), 0 1px 4px rgba(0, 0, 0, 0.52);
  transition: color 0.25s ease, text-shadow 0.25s ease, filter 0.25s ease;
  animation: obscureCoverGoldShimmer 13s ease-in-out infinite;
}
.book--gold-shimmer.book--cover-image .shelf-spine-line {
  display: block;
  white-space: nowrap;
  line-height: 1.1;
}
.book--gold-shimmer.book--cover-image:hover .shelf-spine-lines {
  color: #e2cc82;
  text-shadow: 0 0 12px rgba(212, 184, 106, 0.32), 0 1px 5px rgba(0, 0, 0, 0.42);
  filter: brightness(1.07);
}
@media (min-width: 701px) {
  html[lang="en"] .book--gold-shimmer.book--cover-image .shelf-spine-lines {
    font-size: clamp(0.50rem, 1.10vw, 0.68rem);
    letter-spacing: 0.05em;
    gap: 0.26em;
  }

  html[lang="en"] .book--gold-shimmer.book--cover-image .shelf-spine-title {
    top: 12%;
    bottom: 9%;
  }
}

/* ── SHELF DECOR: no select / drag / iOS long-press menu ── */
body.island-religious-knowledge-page .library-header,
body.island-religious-knowledge-page .library-header *,
body.island-religious-knowledge-page .room,
body.island-religious-knowledge-page .room .bookshelf,
body.island-religious-knowledge-page .room .shelf-row,
body.island-religious-knowledge-page .room .shelf-plank,
body.island-religious-knowledge-page .room .books-container,
body.island-religious-knowledge-page .room .book,
body.island-religious-knowledge-page .room .book-spine,
body.island-religious-knowledge-page .room .spine-title,
body.island-religious-knowledge-page .room .spine-band,
body.island-religious-knowledge-page .room .shelf-spine-title,
body.island-religious-knowledge-page .room .shelf-spine-lines,
body.island-religious-knowledge-page .room .candle {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.island-religious-knowledge-page .room .shelf-plank,
body.island-religious-knowledge-page .room .spine-band,
body.island-religious-knowledge-page .room .candle,
body.island-religious-knowledge-page .bookshelf::before {
  pointer-events: none;
}

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,3,2,0.88);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 4rem 1rem 2rem;
  overflow-y: auto;
}
.overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ── BOOK MODAL ── */
.book-modal {
  width: min(760px, 94vw);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ── BOOK STAGE ── */
.book-stage {
  position: relative;
}

/* ── SPREAD ── */
.spread-wrap {
  position: relative;
  margin-bottom: 0;
}

/* ── STPAGEFLIP HOST ── */
.stpageflip-host {
  width: 100%;
  min-height: 480px;
  min-width: 0;
}
.stpageflip-host.stf__parent {
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: 0 10px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(201,168,76,0.15);
  border-radius: 2px 8px 8px 2px;
  overflow: hidden;
}
.stpageflip-host .stf__wrapper,
.stpageflip-host .stf__block {
  width: 100%;
  height: 100%;
}
.stpageflip-host .stf__block {
  border-radius: 2px 8px 8px 2px;
}

/* Closed cover on desktop: left half invisible, right cover unchanged */
@media (min-width: 701px) {
  .book-stage.book-stage--at-cover .stpageflip-host.stf__parent {
    position: relative;
    background: transparent;
    border: none;
    outline: none;
    border-radius: 2px 8px 8px 2px;
    -webkit-mask-image: linear-gradient(to right, transparent 0 50%, #000 50% 100%);
    mask-image: linear-gradient(to right, transparent 0 50%, #000 50% 100%);
  }
  .book-stage.book-stage--at-cover .stpageflip-host .stf__block {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 2px 8px 8px 2px;
  }
  .book-stage.book-stage--at-cover .stpageflip-host .stf__outerShadow,
  .book-stage.book-stage--at-cover .stpageflip-host .stf__innerShadow,
  .book-stage.book-stage--at-cover .stpageflip-host .stf__hardShadow,
  .book-stage.book-stage--at-cover .stpageflip-host .stf__hardInnerShadow {
    border: none;
    outline: none;
    box-shadow: none;
  }
}

/* ── STPAGEFLIP PAGES ── */
.obscure-page {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Premium paper: texture, spine, gold frame, corner ornaments */
.obscure-page--content {
  --page-paper: #f3ead8;
  --page-gold: rgba(201, 168, 76, 0.82);
  --page-gold-soft: rgba(201, 168, 76, 0.38);
  background-color: var(--page-paper);
  background-image:
    radial-gradient(ellipse 120% 80% at 18% 12%, rgba(255, 250, 238, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse 90% 70% at 88% 92%, rgba(196, 168, 120, 0.07) 0%, transparent 48%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
  background-size: auto, auto, 256px 256px;
  color: #1a1208;
  padding: 2.4rem 2rem 3rem;
  position: relative;
  isolation: isolate;
}
.obscure-page--content.--left {
  background-image:
    linear-gradient(to right, rgba(62, 38, 18, 0.14) 0%, rgba(62, 38, 18, 0.05) 6%, transparent 16%),
    radial-gradient(ellipse 120% 80% at 18% 12%, rgba(255, 250, 238, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse 90% 70% at 88% 92%, rgba(196, 168, 120, 0.07) 0%, transparent 48%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
}
.obscure-page--content.--right {
  background-image:
    linear-gradient(to left, rgba(62, 38, 18, 0.14) 0%, rgba(62, 38, 18, 0.05) 6%, transparent 16%),
    radial-gradient(ellipse 120% 80% at 18% 12%, rgba(255, 250, 238, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse 90% 70% at 88% 92%, rgba(196, 168, 120, 0.07) 0%, transparent 48%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
}
.obscure-page--content::before {
  content: '';
  position: absolute;
  inset: 11px;
  pointer-events: none;
  z-index: 0;
  border: 1px solid var(--page-gold-soft);
  outline: 1px solid rgba(201, 168, 76, 0.14);
  outline-offset: -5px;
  box-shadow:
    inset 0 0 26px rgba(201, 168, 76, 0.08),
    inset 0 0 6px rgba(201, 168, 76, 0.05),
    inset 0 1px 0 rgba(255, 248, 230, 0.35);
  animation: obscureFrameGlow 14s ease-in-out infinite;
}
.obscure-page--content::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.4'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(-1,1) translate(-40,0)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.4' transform='scale(-1,1) translate(-40,0)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(1,-1) translate(0,-40)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.4' transform='scale(1,-1) translate(0,-40)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(-1,-1) translate(-40,-40)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.4' transform='scale(-1,-1) translate(-40,-40)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 36px 36px;
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px);
  animation: obscureGoldShimmer 13s ease-in-out infinite;
}
.obscure-page--content .page-chapter,
.obscure-page--content .page-heading,
.obscure-page--content .page-body {
  position: relative;
  z-index: 1;
}
html:not(.book-layout-mode-fixed) .obscure-page--content .page-number {
  position: absolute;
  z-index: 2;
  bottom: clamp(0.85rem, 1.5vw, 1.15rem);
  top: auto;
  right: clamp(1rem, 2vw, 2.25rem);
  left: auto;
  font-size: 0.78rem;
}
html:not(.book-layout-mode-fixed) .obscure-page--content.--left .page-number {
  left: clamp(1rem, 2vw, 2.25rem);
  right: auto;
}
html:not(.book-layout-mode-fixed) .obscure-page--content.--right .page-number {
  right: clamp(1rem, 2vw, 2.25rem);
  left: auto;
}
@media (min-width: 954px) {
  html:not(.book-layout-mode-fixed) .obscure-page--content.--left .page-number {
    left: clamp(1rem, 2vw, 2.25rem);
    right: auto;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content.--right .page-number {
    right: clamp(1rem, 2vw, 2.25rem);
    left: auto;
  }
}
@keyframes obscureFrameGlow {
  0%, 86%, 100% {
    border-color: rgba(201, 168, 76, 0.34);
    box-shadow: inset 0 0 20px rgba(201, 168, 76, 0.05), inset 0 0 3px rgba(201, 168, 76, 0.03);
  }
  92% {
    border-color: rgba(212, 182, 98, 0.48);
    box-shadow: inset 0 0 28px rgba(201, 168, 76, 0.09), inset 0 0 6px rgba(228, 198, 110, 0.07);
  }
}
@keyframes obscureGoldShimmer {
  0%, 88%, 100% { opacity: 0.68; filter: brightness(1) saturate(1); }
  93% { opacity: 0.82; filter: brightness(1.1) saturate(1.08); }
}
@property --cover-glint-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes obscureCoverFrameGlintSpin {
  to { --cover-glint-angle: -360deg; }
}
@keyframes obscureCoverCornerGlint {
  0%, 3%, 22%, 25%, 47%, 50%, 72%, 75%, 97%, 100% {
    filter: brightness(1);
    opacity: 0.72;
  }
  5% { filter: brightness(1.05); opacity: 0.76; }
  28% { filter: brightness(1.05); opacity: 0.76; }
  53% { filter: brightness(1.05); opacity: 0.76; }
  78% { filter: brightness(1.05); opacity: 0.76; }
}
@keyframes obscureCoverCornerGlintMobile {
  0%, 3%, 22%, 25%, 47%, 50%, 72%, 75%, 97%, 100% {
    filter: brightness(1);
    opacity: 0.58;
  }
  5% { filter: brightness(1.025); opacity: 0.62; }
  28% { filter: brightness(1.025); opacity: 0.62; }
  53% { filter: brightness(1.025); opacity: 0.62; }
  78% { filter: brightness(1.025); opacity: 0.62; }
}
.book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::before {
  background-image: conic-gradient(
    from var(--cover-glint-angle) at 50% 50%,
    transparent 0deg 324deg,
    rgba(220, 198, 130, 0.07) 330deg,
    rgba(240, 220, 152, 0.24) 336deg,
    rgba(220, 198, 130, 0.07) 342deg,
    transparent 348deg 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: obscureCoverFrameGlintSpin 9s linear infinite;
}
.book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::after {
  animation: obscureCoverCornerGlint 9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .obscure-page--content::before,
  .obscure-page--content::after {
    animation: none;
  }
}
.obscure-page--cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1rem, 3vw, 1.8rem);
  position: relative;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}
.obscure-cover-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-sizing: border-box;
  border-left: clamp(10px, 3vw, 16px) solid var(--book-spine-color, #2a1408);
  border-radius: 2px 0 0 2px;
  box-shadow: inset -8px 0 20px rgba(0, 0, 0, 0.35), 3px 0 14px rgba(0, 0, 0, 0.6);
}
.obscure-page--cover .obscure-cover-inner:not(.obscure-cover--leather)::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--book-gold, rgba(201,168,76,0.5));
  border-radius: 1px;
  pointer-events: none;
}
.obscure-page--cover.obscure-cover--gold-shimmer {
  --obscure-cover-spine-width: 17px;
  background-color: #110704 !important;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, transparent 9%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, transparent 8%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24) 0%, transparent 7%),
    linear-gradient(270deg, rgba(0, 0, 0, 0.16) 0%, transparent 6%),
    radial-gradient(ellipse 52% 42% at 70% 26%, rgba(98, 58, 24, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 68% 52% at 16% 82%, rgba(0, 0, 0, 0.3) 0%, transparent 54%),
    radial-gradient(ellipse 90% 70% at 22% 18%, rgba(72, 42, 18, 0.28) 0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 88% 92%, rgba(0, 0, 0, 0.44) 0%, transparent 48%),
    radial-gradient(ellipse 22% 16% at 10% 12%, rgba(22, 10, 4, 0.32) 0%, transparent 100%),
    radial-gradient(ellipse 18% 14% at 94% 90%, rgba(14, 6, 2, 0.22) 0%, transparent 100%),
    linear-gradient(152deg, rgba(255, 244, 210, 0.028) 0%, transparent 36%),
    linear-gradient(168deg, rgba(42, 22, 10, 0.2) 0%, transparent 44%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.065'/%3E%3C/svg%3E");
  background-size: auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, 220px 220px;
  box-shadow:
    inset 0 0 52px rgba(0, 0, 0, 0.3),
    inset 3px 0 16px rgba(0, 0, 0, 0.26),
    inset -2px 0 14px rgba(118, 74, 30, 0.07),
    inset 0 1px 0 rgba(186, 148, 82, 0.05),
    0 0 0 1px rgba(168, 126, 58, 0.09),
    0 0 20px rgba(158, 112, 42, 0.07),
    0 0 48px rgba(108, 72, 28, 0.045);
}
.obscure-page--cover.obscure-cover--gold-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--obscure-cover-spine-width);
  pointer-events: none;
  z-index: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='256'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.25' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='64' height='256' filter='url(%23s)' opacity='0.14'/%3E%3C/svg%3E"),
    linear-gradient(90deg,
      #010101 0%,
      #0a0603 12%,
      #181008 28%,
      #24160b 44%,
      #1c1108 56%,
      #2a1a0e 64%,
      #1a1007 76%,
      #100904 88%,
      #0a0604 100%),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.45) 0%,
      transparent 3%,
      transparent 97%,
      rgba(0, 0, 0, 0.4) 100%),
    linear-gradient(90deg,
      rgba(0, 0, 0, 0.35) 0%,
      rgba(148, 92, 42, 0.08) 62%,
      rgba(98, 58, 26, 0.05) 84%,
      transparent 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: left top, left top, left top, left top;
  opacity: 0.9;
  box-shadow:
    inset 1px 0 0 rgba(48, 28, 12, 0.55),
    inset 3px 0 5px rgba(0, 0, 0, 0.82),
    inset 7px 0 12px rgba(0, 0, 0, 0.58),
    1px 0 0 rgba(10, 5, 2, 0.95),
    2px 0 8px rgba(0, 0, 0, 0.62),
    4px 0 14px rgba(0, 0, 0, 0.42);
}
.obscure-page--cover.obscure-cover--gold-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent calc(100% - 5px), rgba(196, 154, 78, 0.13) calc(100% - 3px), rgba(108, 76, 34, 0.08) 100%),
    linear-gradient(180deg, rgba(210, 172, 98, 0.05) 0%, transparent 4px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0%, transparent 5px);
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.05);
}
.obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather {
  border-left: 0;
  background-image: none;
  background-color: transparent;
  border-radius: 1px 0 0 1px;
  box-shadow:
    inset var(--obscure-cover-spine-width) 0 14px rgba(0, 0, 0, 0.22),
    inset calc(var(--obscure-cover-spine-width) + 3px) 0 8px rgba(72, 44, 18, 0.08);
}
.obscure-page--cover .obscure-cover-inner:not(.obscure-cover--leather)::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--book-gold, rgba(201,168,76,0.2));
  border-radius: 1px;
  pointer-events: none;
}
.obscure-page--cover .obscure-cover-inner.obscure-cover--leather::before {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 12px;
  border: 1px solid rgba(201, 168, 76, 0.42);
  outline: 1px solid rgba(201, 168, 76, 0.16);
  outline-offset: -5px;
  border-radius: 1px;
  box-shadow:
    inset 0 0 26px rgba(201, 168, 76, 0.09),
    inset 0 0 6px rgba(201, 168, 76, 0.05);
}
.obscure-page--cover .obscure-cover-inner.obscure-cover--leather::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 0;
  border: none;
  border-radius: 0;
  opacity: 0.72;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.38'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(-1,1) translate(-40,0)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.38' transform='scale(-1,1) translate(-40,0)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(1,-1) translate(0,-40)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.38' transform='scale(1,-1) translate(0,-40)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.48' opacity='0.86' transform='scale(-1,-1) translate(-40,-40)'%3E%3Cpath d='M1.5 38.5V14.5Q1.5 1.5 14.5 1.5'/%3E%3Cpath d='M5.5 34.5V19Q5.5 5.5 19 5.5'/%3E%3Cpath d='M1.5 26.5L18.5 9.5'/%3E%3Cpath d='M1.5 20.5L13.5 8.5'/%3E%3Cpath d='M8.5 1.5L1.5 8.5'/%3E%3Cpath d='M14.5 1.5L1.5 14.5' stroke-width='0.32' opacity='0.55'/%3E%3C/g%3E%3Cg fill='%23c9a84c' stroke='none' opacity='0.38' transform='scale(-1,-1) translate(-40,-40)'%3E%3Cpath d='M10 10.5l1.2 2.3 2.5 1.2-2.5 1.2-1.2 2.5-1.2-2.5-2.5-1.2z'/%3E%3Ccircle cx='17' cy='4.5' r='0.65'/%3E%3Ccircle cx='4.5' cy='17' r='0.65'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 32px 32px;
  background-position: 8px 8px, calc(100% - 8px) 8px, 8px calc(100% - 8px), calc(100% - 8px) calc(100% - 8px);
}

.book-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  box-shadow: 0 10px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(201,168,76,0.15);
  border-radius: 2px 8px 8px 2px;
  overflow: hidden;
  position: relative;
}

/* ── COVER STAGE ──
   Floats over the left half of the spread.
   Hinged at its RIGHT edge (the spine) via transform-origin.
   Perspective set here so the rotateY foreshortens correctly.        ── */
.cover-stage {
  position: absolute;
  top: 0; left: 0;
  width: 50%;
  height: 100%;
  perspective: 2000px;
  perspective-origin: right center;
  z-index: 1;
  pointer-events: none;
  cursor: default;
}
.cover-stage.cover-opened-rest .cover-face {
  transform: none;
}
.cover-stage.opening .cover-face {
  transform: rotateY(-180deg);
  pointer-events: none;
}
.cover-face {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.4rem,4vw,2.2rem) clamp(1rem,3vw,1.8rem);
  position: relative;
  border-left: clamp(10px,3vw,16px) solid var(--book-spine-color, #2a1408);
  border-radius: 2px 0 0 2px;
  transform-origin: right center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.85s cubic-bezier(0.45, 0, 0.2, 1),
              box-shadow 0.15s ease;
  box-shadow: inset -8px 0 20px rgba(0,0,0,0.35), 3px 0 14px rgba(0,0,0,0.6);
}
.cover-face::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--book-gold, rgba(201,168,76,0.5));
  border-radius: 1px;
  pointer-events: none;
}
.cover-face::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid var(--book-gold, rgba(201,168,76,0.2));
  border-radius: 1px;
  pointer-events: none;
}
.cover-ornament {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--book-gold, #c9a84c);
  text-shadow: 0 0 20px rgba(201,168,76,0.5);
  line-height: 1;
}
.cover-title-text {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.85rem, 2vw, 1.4rem);
  text-align: center;
  color: var(--book-gold, #e8cc7a);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  line-height: 1.35;
  white-space: pre-line;
}
.cover-author-text {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--book-gold, #c9a84c);
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  opacity: 0.85;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 0.5rem;
}
.cover-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.72rem;
  color: var(--aged);
  opacity: 0.55;
  letter-spacing: 0.05em;
}

/* ── CHILDREN Q&A BOOK: gold spine + cover typography ── */
.book--gold-shimmer .spine-title {
  color: #d4b86a;
  font-size: clamp(0.42rem, 1vw, 0.6rem);
  letter-spacing: 0.06em;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  max-height: 86%;
  line-height: 1.15;
  animation: obscureCoverGoldShimmer 13s ease-in-out infinite;
}
.obscure-cover--gold-shimmer .cover-title-block {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: 0.35rem 0.55rem;
  position: relative;
  z-index: 1;
}
.obscure-cover--gold-shimmer .cover-title-text--long {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.58rem, 1.45vw, 0.9rem);
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-align: center;
  color: #d4b86a;
  white-space: pre-line;
  max-width: 94%;
  margin: 0 auto;
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.22), 0 2px 6px rgba(0, 0, 0, 0.55);
  animation: obscureCoverGoldShimmer 13s ease-in-out infinite;
}
.obscure-cover--gold-shimmer .cover-author-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(0.82rem, 1.65vw, 1rem);
  color: #c9a84c;
  opacity: 0.95;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 0 0.5rem 0.15rem;
  line-height: 1.35;
  text-shadow: 0 0 6px rgba(201, 168, 76, 0.18), 0 1px 4px rgba(0, 0, 0, 0.5);
  animation: obscureCoverGoldShimmer 14s ease-in-out infinite;
}
.obscure-cover--gold-shimmer .cover-footer {
  width: 100%;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  padding: 0 0.75rem 0.9rem;
}
@media (min-width: 701px) {
  .obscure-page--cover.obscure-cover--gold-shimmer {
    padding: 0;
  }
  .book-stage.book-stage--at-cover .stpageflip-host.stf__parent {
    box-shadow: none;
  }
  .obscure-page--cover .obscure-cover-inner.obscure-cover--leather::before {
    inset: 56px;
  }
  .obscure-page--cover .obscure-cover-inner.obscure-cover--leather::after {
    background-position: 56px 56px, calc(100% - 56px) 56px, 56px calc(100% - 56px), calc(100% - 56px) calc(100% - 56px);
    background-size: 28px 28px;
  }
  .obscure-cover--gold-shimmer .cover-title-block {
    padding: 66px 50px;
  }
  .obscure-cover--gold-shimmer .cover-footer {
    padding: 0 50px 4.5rem;
  }
  .obscure-cover--gold-shimmer .cover-author-text {
    padding: 0 0.5rem 0.25rem;
    font-size: clamp(0.74rem, 1.3vw, 0.88rem);
    line-height: 1.3;
  }
  .obscure-cover--gold-shimmer .cover-title-text--long {
    font-size: clamp(0.68rem, 1.25vw, 0.88rem);
    line-height: 1.28;
  }
}
@keyframes obscureCoverGoldShimmer {
  0%, 88%, 100% {
    color: #c9a84c;
    text-shadow: 0 0 6px rgba(201, 168, 76, 0.16), 0 1px 4px rgba(0, 0, 0, 0.52);
    filter: brightness(1);
  }
  93% {
    color: #e2cc82;
    text-shadow: 0 0 12px rgba(212, 184, 106, 0.32), 0 1px 5px rgba(0, 0, 0, 0.42);
    filter: brightness(1.07);
  }
}
@media (prefers-reduced-motion: reduce) {
  .book--gold-shimmer .spine-title,
  .book--gold-shimmer.book--cover-image .shelf-spine-lines,
  .obscure-cover--gold-shimmer .cover-title-text--long,
  .obscure-cover--gold-shimmer .cover-author-text,
  .book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::before,
  .book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::after,
  .book-preface-divider__line,
  .book-preface-divider__gem,
  .qa-page-layout--decorated .page-allah-icon__img {
    animation: none;
  }
  .qa-answer-list__marker,
  .qa-answer-list__marker::after,
  .qa-gold-shimmer-text {
    animation: none;
  }
  .qa-page-layout--decorated .page-allah-icon {
    transform: none;
    animation: none;
    transition: none;
  }
  .qa-page-layout--decorated .page-allah-icon__img {
    filter:
      drop-shadow(0 5px 7px rgba(70, 42, 12, 0.24))
      drop-shadow(0 0 10px rgba(204, 162, 49, 0.16));
  }
}

/* page-left slides in from the right after cover opens */
.page-left.sliding-in {
  animation: slideFromRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes slideFromRight {
  from { opacity: 0.4; transform: translateX(40px); }
  to   { opacity: 1;   transform: translateX(0); }
}

/* ── PAGE FLIP ── */
.page-flip-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  perspective: 2200px;
  display: none;
}
.page-flip-leaf {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.page-flip-leaf.from-right {
  left: 50%;
  transform-origin: left center;
}
.page-flip-leaf.from-left {
  left: 0;
  transform-origin: right center;
}
.page-flip-leaf.from-right-mobile,
.page-flip-leaf.from-left-mobile {
  left: 0;
  width: 100%;
}
.page-flip-leaf.from-right-mobile {
  transform-origin: left center;
}
.page-flip-leaf.from-left-mobile {
  transform-origin: right center;
}
.page-flip-front,
.page-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow-y: auto;
  background: var(--parchment);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  color: #1a1208;
  padding: 2.4rem 2rem 3rem;
}
.page-flip-front {
  z-index: 2;
}
.page-flip-back {
  transform: rotateY(180deg);
  z-index: 1;
}
.book-stage.cover-visible .page-left {
  background: transparent;
  background-image: none;
  box-shadow: none;
  border-right: 0;
  pointer-events: none;
}
.book-stage.cover-visible .page-left::before {
  display: none;
}
.book-stage.opened .page-left,
.book-stage.opened .page-right {
  position: relative;
  z-index: 3;
  cursor: pointer;
}
.book-stage.cover-visible .page-right {
  cursor: pointer;
}

/* ── PAGES ── */
.page-left, .page-right {
  background: var(--parchment);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  color: #1a1208;
  padding: 2.4rem 2rem 3rem;
  position: relative;
  overflow-y: auto;
}
.page-left {
  border-right: 2px solid rgba(100,60,20,0.35);
  box-shadow: inset -8px 0 16px rgba(0,0,0,0.12);
}
.page-right {
  box-shadow: inset 8px 0 16px rgba(0,0,0,0.06);
}
.page-left::before, .page-right::before {
  content: '';
  position: absolute;
  inset: 3.5rem 1.5rem 1.5rem;
  background: repeating-linear-gradient(180deg, transparent 0px, transparent 27px, rgba(139,100,60,0.13) 27px, rgba(139,100,60,0.13) 28px);
  pointer-events: none;
}
.page-chapter {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--leather);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.page-heading {
  font-family: 'IM Fell English', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  color: var(--deep-leather);
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.page-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  line-height: 1.85;
  color: #2a1c0e;
  text-align: justify;
  hyphens: auto;
  position: relative;
  z-index: 1;
}
.page-body p + p { margin-top: 0.9em; text-indent: 1.5em; }

/* ── QA religious book content pages ── */
.obscure-page--content.obscure-page--qa {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.obscure-page--qa .qa-page-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-text-content {
  flex: 0 0 auto;
  width: 100%;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated {
  height: 100%;
  min-height: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated:not(.qa-page-layout--sky):not(.qa-page-layout--mechet) .page-allah-zone {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5%;
  padding-bottom: clamp(1.85rem, 4.8vw, 2.55rem);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated .page-allah-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  pointer-events: auto;
  perspective: 480px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
.book-stage--layout-fixed [class*="page-design-root--"] .page-allah-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  pointer-events: auto;
  perspective: 480px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
@keyframes religiousIconFloat {
  0%, 100% {
    transform: translateY(5px) scale(1) rotateX(0deg) rotateY(0deg);
    filter:
      drop-shadow(0 5px 7px rgba(70, 42, 12, 0.24))
      drop-shadow(0 0 10px rgba(204, 162, 49, 0.16));
  }
  50% {
    transform: translateY(-9px) scale(1.025) rotateX(0.75deg) rotateY(-0.75deg);
    filter:
      drop-shadow(0 10px 12px rgba(70, 42, 12, 0.28))
      drop-shadow(0 0 25px rgba(214, 174, 57, 0.34));
  }
}
@keyframes religiousIconTap {
  0% { transform: scale(1); }
  25% { transform: scale(0.98); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes religiousIconTapGlow {
  0%, 100% {
    filter:
      drop-shadow(0 5px 7px rgba(70, 42, 12, 0.24))
      drop-shadow(0 0 10px rgba(204, 162, 49, 0.16));
  }
  45% {
    filter:
      drop-shadow(0 8px 11px rgba(70, 42, 12, 0.3))
      drop-shadow(0 0 24px rgba(214, 174, 57, 0.38));
  }
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated .page-allah-icon__img {
  display: block;
  width: clamp(6rem, 13vw, 9rem);
  height: auto;
  max-width: 72%;
  object-fit: contain;
  visibility: visible;
  opacity: 1;
  flex-shrink: 0;
  filter:
    drop-shadow(0 5px 7px rgba(70, 42, 12, 0.24))
    drop-shadow(0 0 10px rgba(204, 162, 49, 0.16));
}
.obscure-page--animation-active[data-page-animation="allah-float"] .page-allah-icon__img {
  animation: religiousIconFloat 5s ease-in-out infinite;
}
@media (hover: hover) and (pointer: fine) {
  .qa-page-layout--decorated .page-allah-icon:hover {
    transform: scale(1.03);
  }
  .obscure-page--animation-active[data-page-animation="allah-float"] .page-allah-icon:hover .page-allah-icon__img {
    filter:
      drop-shadow(0 8px 10px rgba(70, 42, 12, 0.28))
      drop-shadow(0 0 22px rgba(214, 174, 57, 0.32));
  }
}
.qa-page-layout--decorated .page-allah-icon--tap {
  animation: religiousIconTap 650ms ease-out;
}
.obscure-page--animation-active[data-page-animation="allah-float"] .page-allah-icon--tap .page-allah-icon__img {
  animation:
    religiousIconFloat 5s ease-in-out infinite,
    religiousIconTapGlow 650ms ease-out;
}
.qa-page-layout--sky {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  justify-content: flex-start;
}
.qa-page-layout--sky .qa-text-content {
  flex: 0 0 auto;
}
.qa-page-layout--sky .qa-sky-zone {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-height: clamp(5.5rem, 36%, 12.5rem);
  max-height: 50%;
  align-self: stretch;
  width: calc(100% - clamp(0.4rem, 1.6vw, 0.8rem) * 2);
  max-width: 100%;
  margin-top: clamp(0.75rem, 2.5%, 1.35rem);
  margin-bottom: clamp(1.2rem, 3.5%, 2rem);
  margin-left: auto;
  margin-right: auto;
  border-radius: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.qa-sky-zone .qa-sky-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet .qa-text-content {
  flex: 0 0 auto;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet .answer-block {
  margin-top: clamp(0.5rem, 1.8vw, 0.8rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated.qa-page-layout--mechet .qa-mechet-zone {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  align-self: stretch;
  width: 100%;
  margin-top: clamp(0.2rem, 0.6%, 0.4rem);
  padding:
    0
    clamp(0.2rem, 0.8vw, 0.45rem)
    clamp(0.7rem, 1.8%, 1rem);
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.qa-page-layout--mechet .qa-mechet-image {
  display: block;
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}
/* page 2: center in open area below text */
.qa-mechet-zone--page2 {
  justify-content: center;
  padding-bottom: clamp(0.65rem, 1.6%, 0.95rem);
}
/* page 3: proportional scale, stay centered in zone */
.qa-mechet-zone--page3 {
  justify-content: center;
  padding-bottom: clamp(0.65rem, 1.6%, 0.95rem);
}
/* page 5: illustration fills free space below sura reference */
.qa-mechet-zone--page5 {
  justify-content: flex-start;
  align-items: stretch;
  margin-top: clamp(0.12rem, 0.35vw, 0.25rem);
  padding-top: 0;
  padding-bottom: clamp(0.7rem, 1.75%, 1.05rem);
}
/* page 6: illustration fills all free space below Q&A text */
.qa-mechet-zone--page6 {
  justify-content: flex-start;
  align-items: stretch;
  margin-top: clamp(0.15rem, 0.45vw, 0.3rem);
  padding-top: 0;
  padding-bottom: clamp(0.75rem, 1.85%, 1.1rem);
}
.qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page6 .qa-mechet-image {
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
/* page 7: illustration fills all free space below Q&A list */
.qa-mechet-zone--page7 {
  justify-content: flex-start;
  align-items: stretch;
  margin-top: clamp(0.15rem, 0.45vw, 0.3rem);
  padding-top: 0;
  padding-bottom: clamp(0.75rem, 1.85%, 1.1rem);
}
.qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page7 .qa-mechet-image {
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
/* page 8: illustration fills all free space below Q&A text */
.qa-mechet-zone--page8 {
  justify-content: flex-start;
  align-items: stretch;
  margin-top: clamp(0.15rem, 0.45vw, 0.3rem);
  padding-top: 0;
  padding-bottom: clamp(0.75rem, 1.85%, 1.1rem);
}
.qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page8 .qa-mechet-image {
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-quran-answer {
  gap: clamp(0.18rem, 0.55vw, 0.32rem);
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-quran-ayah {
  margin-top: clamp(0.08rem, 0.3vw, 0.18rem);
  padding: clamp(0.18rem, 0.55vw, 0.32rem) 0;
  font-size: clamp(1.02rem, 1.72vw, 1.26rem);
  line-height: 1.78;
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-quran-source {
  align-self: flex-end;
  margin-top: clamp(0.12rem, 0.45vw, 0.22rem);
  margin-right: clamp(0.45rem, 1.15vw, 0.8rem);
  margin-left: auto;
  padding-top: 0;
  border-top: none;
  max-width: calc(100% - clamp(0.45rem, 1.15vw, 0.8rem));
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-quran-source__text {
  flex: 0 1 auto;
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-mechet-zone--page5 .qa-mechet-image {
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--mechet .question-text {
  font-size: clamp(0.92rem, 2.2vw, 1.22rem);
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--mechet .answer-label {
  font-size: clamp(0.72rem, 1.55vw, 0.88rem);
}

/* QA010: question + answer + illustration */
html:not(.book-layout-mode-fixed) .qa-page-layout--page10 {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page10 .qa-text-content {
  flex: 0 0 auto;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page10 .answer-block {
  margin-top: clamp(0.5rem, 1.8vw, 0.8rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--decorated.qa-page-layout--page10 .qa-page10-illustration-zone {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  width: 100%;
  margin-top: clamp(0.15rem, 0.45vw, 0.3rem);
  padding:
    0
    clamp(0.2rem, 0.8vw, 0.45rem)
    clamp(0.75rem, 1.85%, 1.1rem);
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page10 .qa-page10-illustration {
  display: block;
  flex: 1 1 0;
  width: 100%;
  height: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--page10 .question-text {
  font-size: clamp(0.92rem, 2.2vw, 1.22rem);
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--page10 .answer-label {
  font-size: clamp(0.72rem, 1.55vw, 0.88rem);
}

html:not(.book-layout-mode-fixed) .obscure-page--qa .question-text {
  font-family: 'IM Fell English', serif;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 500;
  color: var(--deep-leather);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-block {
  margin-top: clamp(1rem, 3.5vw, 1.35rem);
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.76rem, 1.55vw, 0.88rem);
  font-weight: 600;
  color: rgba(201, 168, 76, 0.72);
  line-height: 1.45;
  margin-bottom: clamp(0.35rem, 1.5vw, 0.55rem);
  -webkit-text-stroke: 0.2px rgba(35, 22, 10, 0.75);
  text-shadow:
    0.25px 0 rgba(35, 22, 10, 0.65),
    -0.25px 0 rgba(35, 22, 10, 0.65),
    0 0.25px rgba(35, 22, 10, 0.65),
    0 -0.25px rgba(35, 22, 10, 0.65);
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: #2a1c0e;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── QA005 quran ayah page ── */
html:not(.book-layout-mode-fixed) .qa-page-layout--quran {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran .qa-text-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran .question-block {
  flex: 0 0 auto;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran .answer-block {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: clamp(0.45rem, 1.2vw, 0.75rem);
}
html:not(.book-layout-mode-fixed) .qa-quran-answer {
  display: flex;
  flex-direction: column;
  gap: clamp(0.3rem, 0.85vw, 0.5rem);
}
html:not(.book-layout-mode-fixed) .qa-quran-answer-intro {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: #2a1c0e;
}
html:not(.book-layout-mode-fixed) .qa-quran-ayah {
  margin: clamp(0.15rem, 0.45vw, 0.28rem) 0 0;
  padding: clamp(0.3rem, 0.85vw, 0.5rem) clamp(0.2rem, 0.65vw, 0.4rem);
  font-family: "Amiri", "Noto Naskh Arabic", serif;
  font-size: clamp(1.02rem, 1.72vw, 1.26rem);
  line-height: 1.78;
  font-weight: 600;
  color: #2a1a0a;
  text-align: center;
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: normal;
  text-transform: none;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
  max-width: 100%;
  overflow-x: hidden;
}
html:not(.book-layout-mode-fixed) .qa-quran-ayah-translation {
  margin: 0;
  font-size: clamp(0.94rem, 1.32vw, 1.08rem);
  line-height: 1.52;
  font-style: italic;
  font-weight: 500;
  color: #2a1c0e;
  text-align: center;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran .qa-quran-ayah-translation {
  position: relative;
  padding-bottom: clamp(0.3rem, 0.7vw, 0.46rem);
  margin-bottom: clamp(0.1rem, 0.3vw, 0.18rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran .qa-quran-ayah-translation::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.14) 14%,
    rgba(201, 168, 76, 0.36) 50%,
    rgba(201, 168, 76, 0.14) 86%,
    transparent 100%
  );
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-quran-source {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 0.9vw, 0.5rem);
  margin-top: clamp(0.25rem, 0.75vw, 0.45rem);
  padding-top: 0;
  border-top: none;
}
html:not(.book-layout-mode-fixed) .qa-quran-source__icon {
  flex: 0 0 auto;
  display: block;
  width: clamp(0.95rem, 2.35vw, 1.2rem);
  height: clamp(0.95rem, 2.35vw, 1.2rem);
  object-fit: contain;
  object-position: center;
}
html:not(.book-layout-mode-fixed) .qa-quran-source__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(0.78rem, 1.08vw, 0.9rem);
  line-height: 1.45;
  color: rgba(42, 28, 14, 0.88);
}

/* QA013: distribute free vertical space between semantic blocks (no illustration) */
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran.qa-page-layout--mechet {
  height: 100%;
  min-height: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-text-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .answer-block,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .answer-text,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-answer {
  display: contents;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .question-block,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .answer-label,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-answer-intro,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-ayah,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-ayah-translation,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-source {
  flex-shrink: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .answer-label,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-answer-intro,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-ayah,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-ayah-translation,
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-quran-source {
  margin-top: auto;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .answer-block {
  margin-top: 0;
}

/* ── QA007 answer list ── */
html:not(.book-layout-mode-fixed) .qa-answer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(0.42rem, 1.15vw, 0.68rem);
}
html:not(.book-layout-mode-fixed) .qa-answer-list__item {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.38rem, 0.95vw, 0.52rem);
  min-width: 0;
}
html:not(.book-layout-mode-fixed) .qa-answer-list__marker {
  position: relative;
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.44em;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    #f2e2ad 0%,
    #e8cc7a 20%,
    #c9a84c 52%,
    #9a7830 80%,
    #6f5522 100%
  );
  box-shadow:
    inset -1px -2px 3px rgba(48, 30, 8, 0.58),
    inset 1px 1px 2px rgba(255, 238, 188, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 0 5px rgba(201, 168, 76, 0.34);
  animation: qaAnswerMarkerGoldShimmer 4.8s ease-in-out infinite;
}
html:not(.book-layout-mode-fixed) .qa-answer-list__marker::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 22%, rgba(255, 250, 228, 0.82) 0%, transparent 46%);
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-answer-list__marker::after {
  content: '';
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: conic-gradient(
    from var(--qa-marker-glint-angle, 0deg) at 50% 50%,
    transparent 0deg 302deg,
    rgba(228, 205, 138, 0.22) 312deg,
    rgba(255, 244, 205, 0.58) 324deg,
    rgba(228, 205, 138, 0.22) 336deg,
    transparent 346deg 360deg
  );
  opacity: 0.72;
  mix-blend-mode: screen;
  animation: qaAnswerMarkerGlintSpin 5.6s linear infinite;
  pointer-events: none;
}
@property --qa-marker-glint-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes qaAnswerMarkerGoldShimmer {
  0%, 84%, 100% {
    filter: brightness(1) saturate(1);
    box-shadow:
      inset -1px -2px 3px rgba(48, 30, 8, 0.58),
      inset 1px 1px 2px rgba(255, 238, 188, 0.5),
      0 1px 2px rgba(0, 0, 0, 0.3),
      0 0 5px rgba(201, 168, 76, 0.34);
  }
  91% {
    filter: brightness(1.2) saturate(1.14);
    box-shadow:
      inset -1px -2px 3px rgba(48, 30, 8, 0.46),
      inset 1px 1px 3px rgba(255, 244, 200, 0.68),
      0 1px 2px rgba(0, 0, 0, 0.22),
      0 0 10px rgba(228, 198, 110, 0.55);
  }
}
@keyframes qaAnswerMarkerGlintSpin {
  to { --qa-marker-glint-angle: 360deg; }
}
html:not(.book-layout-mode-fixed) .qa-answer-list__text {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

html:not(.book-layout-mode-fixed) .stpageflip-host .stf__item.obscure-page--content.obscure-page--qa:has(.qa-page-layout--answer-list) {
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
html:not(.book-layout-mode-fixed) .obscure-page--content.obscure-page--qa:has(.qa-page-layout--answer-list) {
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

/* QA007: list + illustration — keep text inside frame, preserve image on narrow widths */
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(clamp(4.25rem, 34%, 7.5rem), 38%);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .qa-text-content {
  grid-row: 1;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .qa-mechet-zone {
  grid-row: 2;
  min-height: 0;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .question-block {
  flex: 0 0 auto;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .answer-block {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: clamp(0.55rem, 2vw, 0.85rem);
  padding-bottom: 0.2rem;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-answer-list-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.35rem, 1.2vw, 0.6rem);
  margin-bottom: clamp(0.12rem, 0.5vw, 0.22rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-answer-list-heading .answer-label {
  flex: 0 0 auto;
  margin-bottom: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-hadith-scroll-indicator[hidden] {
  display: none !important;
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .question-text,
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .answer-text {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-tawheed-term-link {
  display: inline-block;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: baseline;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-answer-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--answer-list .qa-answer-list-scroll::-webkit-scrollbar {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .qa-mechet-zone--page7 {
  flex: none;
  min-height: 0;
  margin-top: clamp(0.1rem, 0.35vw, 0.25rem);
  padding-bottom: clamp(0.85rem, 2.2%, 1.15rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .qa-mechet-zone--page7 .qa-mechet-image {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: clamp(3.5rem, 100%, 100%);
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
html:not(.book-layout-mode-fixed) .qa-gold-shimmer-text {
  display: inline;
  font-weight: 600;
  color: #b8923a;
  animation: qaGoldTextShimmer 4.8s ease-in-out infinite;
}
@keyframes qaGoldTextShimmer {
  0%, 84%, 100% {
    color: #b8923a;
    text-shadow: 0 0 4px rgba(201, 168, 76, 0.22);
  }
  91% {
    color: #e8cc7a;
    text-shadow:
      0 0 10px rgba(228, 198, 110, 0.55),
      0 0 3px rgba(255, 244, 200, 0.4);
  }
}

html:not(.book-layout-mode-fixed) .qa-tawheed-term-link {
  display: inline;
  margin: 0;
  padding: 0 0.02em;
  border: none;
  background: none;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  vertical-align: baseline;
  border-radius: 2px;
  transition: color 0.2s ease, text-shadow 0.2s ease, box-shadow 0.2s ease;
}
html:not(.book-layout-mode-fixed) .qa-tawheed-term-link:hover,
html:not(.book-layout-mode-fixed) .qa-tawheed-term-link:focus-visible {
  color: #e8cc7a;
  text-shadow:
    0 0 10px rgba(228, 198, 110, 0.55),
    0 0 3px rgba(255, 244, 200, 0.35);
  outline: none;
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.28);
}
html:not(.book-layout-mode-fixed) .qa-tawheed-term-link:active {
  color: #d4b86a;
  transform: scale(0.985);
}

html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .qa-text-content {
  flex: 0 1 auto;
  min-height: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .answer-block {
  flex: 0 1 auto;
  min-height: 0;
}
.qa-page-layout--quran.qa-page-layout--mechet .qa-mechet-zone {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
}

/* ── QA004 hadith completion exercise ── */
html:not(.book-layout-mode-fixed) .stpageflip-host .stf__item.obscure-page--content.obscure-page--qa:has(.qa-page-layout--hadith) {
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
html:not(.book-layout-mode-fixed) .obscure-page--content.obscure-page--qa:has(.qa-page-layout--hadith) {
  container-type: inline-size;
  container-name: qa-hadith-page;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}
html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--hadith,
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith {
  display: grid;
  grid-template-rows: 46% 10% 44%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-hadith-exercise-zone {
  grid-row: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-hadith-exercise-zone .qa-hadith-completion {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
html:not(.book-layout-mode-fixed) .qa-hadith-spacer {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-spacer .book-preface-divider {
  margin: 0;
  width: min(220px, 74%);
}
html:not(.book-layout-mode-fixed) .qa-hadith-answer-zone {
  grid-row: 3;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html:not(.book-layout-mode-fixed) .qa-hadith-answer-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.35rem, 1.2vw, 0.6rem);
  margin-bottom: clamp(0.12rem, 0.5vw, 0.22rem);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-zone .answer-label {
  flex: 0 0 auto;
  margin-bottom: 0;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-zone .answer-text {
  font-size: inherit;
  line-height: inherit;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-scroll::-webkit-scrollbar {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completion__title {
  font-family: 'IM Fell English', serif;
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  font-weight: 500;
  color: var(--deep-leather);
  line-height: 1.35;
  margin-bottom: clamp(0.35rem, 1.5vw, 0.55rem);
  word-break: break-word;
  overflow-wrap: break-word;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion[data-state="filled"] .qa-hadith-completion__stage {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completion__result-view {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion[data-state="filled"] .qa-hadith-completion__result-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: visible;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion[data-state="editing"] .qa-hadith-completion__result-view {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion__edit-view {
  display: block;
  pointer-events: auto;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: visible;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-frame {
  width: 100%;
  box-sizing: border-box;
  flex: 0 1 auto;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-frame__scroll-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  margin: 0 0 clamp(0.06rem, 0.25vw, 0.12rem);
  padding: 0 clamp(0.05rem, 0.2vw, 0.12rem);
  box-sizing: border-box;
  pointer-events: auto;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-scroll-indicator[hidden] {
  display: none !important;
  pointer-events: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-scroll {
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.15rem;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-scroll::-webkit-scrollbar {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.82;
  background-repeat: no-repeat;
  background-size: 24px 24px;
}
html:not(.book-layout-mode-fixed) .qa-hadith-corner--tl {
  top: 3px;
  left: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E");
}
html:not(.book-layout-mode-fixed) .qa-hadith-corner--tr {
  top: 3px;
  right: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(-1,1) translate(-28,0)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(-1,1) translate(-28,0)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E");
}
html:not(.book-layout-mode-fixed) .qa-hadith-corner--bl {
  bottom: 3px;
  left: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(1,-1) translate(0,-28)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(1,-1) translate(0,-28)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E");
}
html:not(.book-layout-mode-fixed) .qa-hadith-corner--br {
  bottom: 3px;
  right: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(-1,-1) translate(-28,-28)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(-1,-1) translate(-28,-28)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E");
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.35rem;
  flex: 0 0 auto;
  overflow: visible;
  position: static;
  z-index: 5;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion__actions--below {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  flex: 0 0 auto;
  overflow: visible;
  position: static;
}
html:not(.book-layout-mode-fixed) .qa-hadith-input::placeholder {
  font-size: 0.72em;
  font-weight: 400;
  color: rgba(42, 28, 14, 0.42);
  opacity: 1;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-body {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-intro {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: #2a1c0e;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-quote {
  margin: 0.18em 0 0;
  padding: 0.4em 0.5em;
  padding-left: 0.65em;
  border: none;
  border-left: 2px solid rgba(201, 168, 76, 0.84);
  box-shadow: inset 2px 0 10px rgba(201, 168, 76, 0.12);
  background: rgba(255, 250, 238, 0.42);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.94em;
  line-height: 1.52;
  font-weight: 500;
  font-style: normal;
  color: #24180c;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-source {
  display: flex;
  align-items: flex-start;
  gap: 0.4em;
  margin-top: 0.15em;
  padding: 0.35em 0.4em;
  border-top: 1px solid rgba(201, 168, 76, 0.22);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-source__icon {
  flex: 0 0 auto;
  display: block;
  width: 0.95em;
  height: 0.95em;
  margin-top: 0.12em;
  position: relative;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-source__icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 168, 76, 0.72);
  border-left-width: 2px;
  border-radius: 1px 2px 2px 1px;
  background:
    linear-gradient(90deg, rgba(201, 168, 76, 0.28) 0 18%, transparent 18%),
    linear-gradient(rgba(201, 168, 76, 0.18) 0 0);
  box-shadow: 0 0 4px rgba(201, 168, 76, 0.18);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-source__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82em;
  line-height: 1.45;
  color: rgba(42, 28, 14, 0.86);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-source__label {
  font-weight: 600;
  color: rgba(122, 88, 28, 0.92);
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion {
  display: block;
  box-sizing: border-box;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion__title {
  display: block;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-prompt-text {
  display: inline;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.92rem, 3.8cqw, 1.22rem);
  line-height: 1.6;
  font-weight: 400;
  color: #2a1c0e;
  word-break: break-word;
  overflow-wrap: break-word;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion__prompt {
  display: inline;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completion__frame {
  position: relative;
  display: block;
  padding: 0.55em 0.65em;
  border: 1px solid rgba(201, 168, 76, 0.72);
  border-radius: 0;
  background: rgba(255, 248, 232, 0.92);
  box-shadow:
    0 0 10px rgba(201, 168, 76, 0.16),
    inset 0 0 0 1px rgba(255, 252, 240, 0.55),
    inset 0 0 18px rgba(201, 168, 76, 0.06);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.92rem, 3.8cqw, 1.22rem);
  line-height: 1.6;
  font-weight: 400;
  color: #2a1c0e;
  word-break: break-word;
  overflow-wrap: break-word;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completed-frame.qa-hadith-completion__frame {
  padding: 0;
  font-size: clamp(0.92rem, 3.8cqw, 1.22rem);
  line-height: 1.6;
  font-weight: 400;
  color: #2a1c0e;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completed-frame.qa-hadith-completion__frame::before {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-completion__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.82;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(-1,1) translate(-28,0)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(-1,1) translate(-28,0)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(1,-1) translate(0,-28)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(1,-1) translate(0,-28)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.55' opacity='0.9' transform='scale(-1,-1) translate(-28,-28)'%3E%3Cpath d='M1 26V10Q1 1 10 1'/%3E%3Cpath d='M4 23V14Q4 4 14 4'/%3E%3Cpath d='M1 18L16 3'/%3E%3Cpath d='M7 1L1 7'/%3E%3C/g%3E%3Cg fill='%23c9a84c' opacity='0.45' transform='scale(-1,-1) translate(-28,-28)'%3E%3Cpath d='M7 7l0.8 1.6 1.7 0.8-1.7 0.8-0.8 1.7-0.8-1.7-1.7-0.8z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 24px 24px;
  background-position: 3px 3px, calc(100% - 3px) 3px, 3px calc(100% - 3px), calc(100% - 3px) calc(100% - 3px);
}
html:not(.book-layout-mode-fixed) .qa-hadith-frame__prompt,
html:not(.book-layout-mode-fixed) .qa-hadith-frame__user,
html:not(.book-layout-mode-fixed) .qa-hadith-frame__suffix {
  display: inline;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-input {
  display: inline-block;
  vertical-align: baseline;
  width: clamp(6.5em, 42cqw, 9.5em);
  min-width: clamp(6.5em, 42cqw, 9.5em);
  max-width: clamp(6.5em, 42cqw, 9.5em);
  height: 2.15em;
  margin: 0;
  padding: 0 0.35em;
  box-sizing: border-box;
  border: 1px solid rgba(201, 168, 76, 0.42);
  border-radius: 4px;
  background: rgba(255, 248, 232, 0.72);
  color: #1a1208;
  font-family: inherit;
  font-size: 1em;
  font-weight: inherit;
  line-height: normal;
  flex: 0 0 auto;
  resize: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-input:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.72);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.14);
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completion__actions {
  display: flex;
  align-items: center;
  gap: 0.12em;
}
html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-completion__actions--inline {
  display: none;
}
html:not(.book-layout-mode-fixed) .qa-hadith-scroll-indicator {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: filter 0.2s ease;
}
.qa-hadith-scroll-indicator:hover,
.qa-hadith-scroll-indicator:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 5px rgba(120, 210, 255, 0.65))
          drop-shadow(0 0 10px rgba(90, 180, 255, 0.35))
          drop-shadow(0 0 4px rgba(201, 168, 76, 0.28));
}
.qa-hadith-scroll-indicator span {
  position: relative;
  display: block;
  width: 6px;
  height: 6px;
  border: none;
  background: transparent;
  transform: rotate(45deg);
  filter: drop-shadow(0 0 3px rgba(120, 210, 255, 0.55))
          drop-shadow(0 0 6px rgba(80, 170, 255, 0.28));
  animation: qaHadithChevronPulse 1.8s ease-in-out infinite;
}
.qa-hadith-scroll-indicator span::before {
  content: '';
  position: absolute;
  inset: -0.5px;
  border-right: 1.5px solid rgba(201, 168, 76, 0.95);
  border-bottom: 1.5px solid rgba(201, 168, 76, 0.95);
  box-shadow:
    0 0 0 0.35px rgba(228, 198, 140, 0.72),
    0 0 2px rgba(201, 168, 76, 0.28);
  pointer-events: none;
}
.qa-hadith-scroll-indicator span::after {
  content: '';
  position: absolute;
  inset: 0.35px 0.35px 0 0;
  border-right: 1.5px solid rgba(110, 200, 245, 0.95);
  border-bottom: 1.5px solid rgba(110, 200, 245, 0.95);
  pointer-events: none;
}
.qa-hadith-scroll-indicator.direction-up span {
  transform: rotate(-135deg);
}
.qa-hadith-scroll-indicator span:nth-child(1) {
  animation-delay: 0s;
}
.qa-hadith-scroll-indicator span:nth-child(2) {
  animation-delay: 0.22s;
}
.qa-hadith-scroll-indicator span:nth-child(3) {
  animation-delay: 0.44s;
}
@keyframes qaHadithChevronPulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 1; }
}
.qa-hadith-edit__icon,
.qa-hadith-confirm__icon {
  pointer-events: none;
}
.qa-hadith-frame__user {
  cursor: text;
}
.qa-page-layout--hadith .qa-hadith-confirm,
.qa-page-layout--hadith .qa-hadith-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  margin: 0;
  padding: 0;
  border-radius: 2px;
  font-size: 0.72em;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.qa-hadith-confirm {
  border: 1px solid rgba(72, 140, 90, 0.52);
  background: rgba(238, 250, 242, 0.94);
  color: rgba(48, 112, 64, 0.92);
}
.qa-hadith-edit {
  border: 1px solid rgba(201, 168, 76, 0.55);
  background: rgba(255, 246, 220, 0.88);
  color: rgba(168, 132, 36, 0.95);
}
.qa-hadith-confirm:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: none;
}
.qa-hadith-confirm:not(:disabled):hover,
.qa-hadith-confirm:not(:disabled):focus-visible {
  outline: none;
  box-shadow:
    0 0 6px rgba(72, 160, 96, 0.38),
    0 0 12px rgba(72, 160, 96, 0.22);
}
.qa-hadith-edit:hover,
.qa-hadith-edit:focus-visible {
  outline: none;
  box-shadow:
    0 0 6px rgba(201, 168, 76, 0.35),
    0 0 12px rgba(201, 168, 76, 0.22);
}
.qa-hadith-edit__icon,
.qa-hadith-confirm__icon {
  font-size: 0.88em;
  line-height: 1;
}
.page-audio-bar--unavailable {
  opacity: 0.42;
  pointer-events: none;
}
.page-audio-bar--unavailable .page-audio-btn {
  cursor: default;
}

html:not(.book-layout-mode-fixed) .page-number {
  position: absolute;
  bottom: 0.9rem;
  top: auto;
  right: 2rem;
  left: auto;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  color: var(--leather);
  opacity: 0.6;
}
.page-drop-cap::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.8;
  font-family: 'Cinzel', serif;
  color: var(--leather);
  margin-right: 0.08em;
  margin-top: 0.05em;
}

/* ── EXTERNAL PAGE AUDIO + BOTTOM CONTROLS PANEL ── */
.page-audio-bar--external {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 0.9vw, 0.5rem);
  min-height: 2rem;
  padding: 0.2rem 0.35rem;
  border: none;
  border-radius: 2px;
  background: rgba(12, 8, 4, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 228, 168, 0.04);
  pointer-events: auto;
  touch-action: manipulation;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.page-audio-bar--external.page-audio-bar--playing {
  background: rgba(18, 12, 7, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 168, 0.07),
    0 0 8px rgba(201, 168, 76, 0.12);
}
.book-audio-dock--dual {
  display: none;
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0.35rem, 1.25rem) minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  align-items: center;
}
.book-audio-dock--dual:not([hidden]) {
  display: grid;
}
.book-audio-slot {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.book-audio-slot--left {
  justify-content: flex-start;
  grid-column: 1;
}
.book-audio-slot--right {
  justify-content: flex-end;
  grid-column: 3;
}
.book-audio-slot .page-audio-bar--external {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.page-audio-btn {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(42, 28, 14, 0.72);
  outline: 1px solid rgba(201, 168, 76, 0.22);
  outline-offset: -2px;
  border-radius: 2px;
  background: rgba(24, 14, 8, 0.38);
  color: #c9a84c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.25s ease;
}
.page-audio-btn:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(42, 28, 14, 0.82);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.12);
}
.page-audio-bar--playing .page-audio-btn {
  border-color: rgba(42, 28, 14, 0.82);
  box-shadow:
    0 0 6px rgba(201, 168, 76, 0.2),
    0 0 12px rgba(201, 168, 76, 0.1);
}
.page-audio-btn__icon {
  display: block;
  width: auto;
  height: auto;
  border: none;
  margin: 0;
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: -0.08em;
}
.page-audio-btn__icon::before {
  content: '▶';
}
.page-audio-bar--playing .page-audio-btn__icon::before {
  content: '❚❚';
}
.page-audio-track {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}
.page-audio-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 168, 76, 0.62) 0%, rgba(201, 168, 76, 0.62) var(--audio-progress, 0%), rgba(201, 168, 76, 0.16) var(--audio-progress, 0%), rgba(201, 168, 76, 0.16) 100%);
  outline: none;
  cursor: pointer;
  margin: 0;
  transition: filter 0.25s ease;
}
.page-audio-bar--playing .page-audio-range {
  filter: drop-shadow(0 0 3px rgba(201, 168, 76, 0.22));
}
.page-audio-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(42, 28, 14, 0.55);
  background: #e8cc7a;
  box-shadow: 0 0 4px rgba(201, 168, 76, 0.22);
}
.page-audio-bar--playing .page-audio-range::-webkit-slider-thumb {
  box-shadow: 0 0 5px rgba(201, 168, 76, 0.32);
}
.page-audio-range::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(42, 28, 14, 0.55);
  background: #e8cc7a;
  box-shadow: 0 0 4px rgba(201, 168, 76, 0.22);
}
.page-audio-bar--playing .page-audio-range::-moz-range-thumb {
  box-shadow: 0 0 5px rgba(201, 168, 76, 0.32);
}
.page-audio-range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.16);
}
.page-audio-time {
  flex-shrink: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.58rem, 1.15vw, 0.68rem);
  line-height: 1;
  color: rgba(228, 198, 140, 0.88);
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-width: 4.1rem;
  text-align: right;
}
.page-audio-time__sep {
  opacity: 0.55;
  margin: 0 0.12rem;
}

/* Panel mode exclusivity — JS class on spread-wrap, not viewport breakpoints */
.spread-wrap--controls-dual .page-audio-bar--single,
.spread-wrap--controls-single .book-audio-dock--dual,
.spread-wrap--controls-single .book-audio-slot--left,
.spread-wrap--controls-single .book-audio-slot--right {
  display: none !important;
}
.book-audio-dock--dual[hidden],
.page-audio-bar--external[hidden] {
  display: none !important;
}
.overlay.open .spread-wrap--controls-dual .nav-prev,
.overlay.open .spread-wrap--controls-dual .nav-next,
.overlay.open .spread-wrap--controls-single .nav-prev,
.overlay.open .spread-wrap--controls-single .nav-next,
.overlay.open .spread-wrap--controls-none .nav-prev,
.overlay.open .spread-wrap--controls-none .nav-next {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
}

/* ── BOTTOM CONTROLS PANEL (grid, arrows below book) ── */
@media (min-width: 701px) {
  .spread-wrap {
    display: grid;
    width: 100%;
    grid-template-rows: auto auto auto auto;
    row-gap: 0.5rem;
    column-gap: 0.65rem;
    align-content: start;
  }

  .spread-wrap .stpageflip-host,
  .spread-wrap #pageFlipBook {
    grid-row: 1;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .spread-wrap .close-btn {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: end;
    align-self: start;
    position: relative;
    margin-top: 0.65rem;
    margin-bottom: 0.85rem;
  }

  .spread-wrap .page-progress {
    display: none;
  }

  .spread-wrap--controls-dual::before,
  .spread-wrap--controls-single::before,
  .spread-wrap--controls-none::before {
    content: '';
    grid-row: 4;
    grid-column: 1 / -1;
    align-self: stretch;
    min-height: clamp(2.65rem, 4.2vw, 3.35rem);
    border-radius: 3px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: linear-gradient(180deg, rgba(62, 40, 20, 0.52) 0%, rgba(28, 18, 9, 0.82) 48%, rgba(16, 10, 5, 0.92) 100%);
    box-shadow:
      inset 0 1px 0 rgba(228, 198, 140, 0.09),
      inset 0 -2px 5px rgba(0, 0, 0, 0.38),
      0 3px 8px rgba(0, 0, 0, 0.42),
      0 0 16px rgba(201, 168, 76, 0.07);
    pointer-events: none;
    z-index: 0;
  }

  .spread-wrap--controls-dual {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
    column-gap: 0.45rem;
  }

  .spread-wrap--controls-dual .nav-prev {
    grid-row: 4;
    grid-column: 1;
    justify-self: start;
  }

  .spread-wrap--controls-dual .book-audio-dock--dual:not([hidden]) {
    display: contents;
  }

  .spread-wrap--controls-dual .book-audio-slot--left {
    grid-row: 4;
    grid-column: 2;
    min-width: 0;
  }

  .spread-wrap--controls-dual .book-audio-slot--right {
    grid-row: 4;
    grid-column: 3;
    min-width: 0;
  }

  .spread-wrap--controls-dual .nav-next {
    grid-row: 4;
    grid-column: 4;
    justify-self: end;
  }

  .spread-wrap--controls-dual .page-audio-bar--single {
    display: none !important;
  }

  .spread-wrap--controls-none {
    grid-template-columns: 1fr auto;
    column-gap: 0.5rem;
  }

  .spread-wrap--controls-none .nav-prev {
    display: none !important;
  }

  .spread-wrap--controls-none .nav-next {
    grid-row: 4;
    grid-column: 2;
    display: flex;
    justify-self: end;
  }

  .spread-wrap--controls-none .book-audio-dock--dual,
  .spread-wrap--controls-none .page-audio-bar--single {
    display: none !important;
  }

  .spread-wrap .nav-prev,
  .spread-wrap .nav-next {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }

  .spread-wrap--controls-dual .nav-prev,
  .spread-wrap--controls-single .nav-prev {
    justify-self: start;
  }

  .spread-wrap--controls-dual .nav-next,
  .spread-wrap--controls-single .nav-next {
    justify-self: end;
  }

  .spread-wrap--controls-single {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0.45rem;
  }

  .spread-wrap--controls-single .nav-prev {
    grid-row: 4;
    grid-column: 1;
  }

  .spread-wrap--controls-single .page-audio-bar--single:not([hidden]) {
    display: flex !important;
    grid-row: 4;
    grid-column: 2;
    justify-self: stretch;
    align-self: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 2rem;
  }

  .spread-wrap--controls-single .nav-next {
    grid-row: 4;
    grid-column: 3;
  }

  .spread-wrap--controls-dual .book-audio-slot .page-audio-bar--external,
  .spread-wrap--controls-single .page-audio-bar--single {
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 954px) and (max-width: 1280px) {
  .book-audio-slot .page-audio-bar--external {
    max-width: 100%;
    padding: 0.15rem 0.28rem;
    gap: 0.28rem;
  }
  .page-audio-btn {
    width: 1.4rem;
    height: 1.4rem;
  }
  .page-audio-btn__icon {
    font-size: 0.56rem;
  }
  .page-audio-time {
    min-width: 3.6rem;
    font-size: 0.66rem;
  }
  .spread-wrap--controls-dual::before,
  .spread-wrap--controls-single::before {
    min-height: clamp(2.45rem, 3.8vw, 2.95rem);
  }
}

@media (min-width: 954px) and (max-width: 1100px) {
  .spread-wrap--controls-dual {
    column-gap: 0.35rem;
  }

  .spread-wrap--controls-dual .book-audio-slot .page-audio-bar--external {
    padding: 0.12rem 0.2rem;
    gap: 0.2rem;
  }

  .spread-wrap--controls-dual .page-audio-btn {
    width: 1.28rem;
    height: 1.28rem;
  }

  .spread-wrap--controls-dual .page-audio-btn__icon {
    font-size: 0.52rem;
  }

  .spread-wrap--controls-dual .page-audio-time {
    min-width: 3.1rem;
    font-size: 0.62rem;
  }
}

@media (min-width: 981px) {
  .page-progress {
    display: none;
  }
}

/* ── NAV ARROWS ── */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13,9,5,0.75);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  font-size: 1.15rem;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 20;
  user-select: none;
  padding: 0;
}
.nav-arrow:hover {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201,168,76,0.2);
}
.nav-arrow.disabled { opacity: 0.2; pointer-events: none; }
.nav-prev { left: -56px; }
.nav-next { right: -56px; }

.page-progress {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  right: 0;
  text-align: center;
  margin-top: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--aged);
  opacity: 0.7;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

@media (min-width: 981px) {
  .page-progress {
    display: none;
  }
}

/* ── CLOSE / PREFACE BTNS ── */
.preface-btn,
.close-btn {
  background: none;
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.preface-btn:hover,
.close-btn:hover {
  background: rgba(201,168,76,0.15);
  box-shadow: 0 0 12px rgba(201,168,76,0.2);
}
.preface-btn {
  position: absolute;
  top: -44px;
  right: 0;
  z-index: 5;
}
.close-btn {
  position: relative;
  top: auto;
  right: auto;
  display: flex;
  margin-top: 2.5rem;
  margin-left: auto;
  margin-bottom: 0.75rem;
  width: max-content;
  max-width: 100%;
}
.close-btn__icon {
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.9;
}

.cover-title-main,
.cover-title-sub {
  display: block;
  white-space: pre-line;
}
.cover-title-sub {
  margin-top: 0.55em;
}
html[lang="en"] .obscure-cover--gold-shimmer .cover-title-text--long {
  font-size: clamp(0.52rem, 1.15vw, 0.78rem);
  line-height: 1.26;
  letter-spacing: 0.04em;
}
html[lang="en"] .obscure-cover--gold-shimmer .cover-author-text {
  font-size: clamp(0.68rem, 1.2vw, 0.82rem);
}

/* ── PREFACE POP-UP ── */
.book-preface-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(4, 2, 1, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  overflow: hidden;
}
.book-preface-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.overlay.open:has(.book-preface-overlay.open) .book-modal {
  pointer-events: none;
}
.overlay.open:has(.book-preface-overlay.open) .book-preface-overlay.open {
  pointer-events: auto;
}
.book-preface-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(840px, 96vw);
  max-height: none;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(ellipse 88% 62% at 22% 8%, rgba(92, 58, 24, 0.28) 0%, transparent 54%),
    radial-gradient(ellipse 70% 48% at 82% 92%, rgba(48, 28, 12, 0.34) 0%, transparent 58%),
    linear-gradient(168deg, rgba(34, 20, 11, 0.99) 0%, rgba(16, 9, 5, 1) 52%, rgba(10, 6, 3, 1) 100%);
  border: 1px solid rgba(201, 168, 76, 0.42);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 168, 0.14),
    inset 0 -2px 6px rgba(0, 0, 0, 0.42),
    inset 2px 0 8px rgba(0, 0, 0, 0.18),
    inset -2px 0 8px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(201, 168, 76, 0.08),
    0 2px 0 rgba(201, 168, 76, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.38),
    0 18px 42px rgba(0, 0, 0, 0.48),
    0 32px 72px rgba(0, 0, 0, 0.34);
  transform: perspective(1200px) translateZ(0);
}
.book-preface-modal::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 2px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(201, 168, 76, 0.1),
    inset 0 12px 24px rgba(255, 220, 150, 0.03),
    inset 0 -16px 28px rgba(0, 0, 0, 0.28);
}
.book-preface-modal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 220, 150, 0.05) 0%, transparent 28%, transparent 72%, rgba(0, 0, 0, 0.12) 100%);
}
.book-preface-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  min-height: 2.65rem;
  padding: 0.45rem 0.75rem 0.4rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.22);
  background:
    linear-gradient(180deg, rgba(201, 168, 76, 0.1) 0%, rgba(201, 168, 76, 0.03) 58%, rgba(0, 0, 0, 0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 228, 168, 0.08);
}
.book-preface-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  overflow: visible;
  padding: 1.25rem 2.15rem 1.55rem;
}
@property --preface-divider-glint {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes bookPrefaceDividerGlint {
  to { --preface-divider-glint: 360deg; }
}
.book-preface-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(240px, 78%);
  margin: 0 auto;
}
.book-preface-divider--top {
  margin-bottom: 0.95rem;
}
.book-preface-divider--bottom {
  margin-top: 1rem;
}
.book-preface-divider__line {
  flex: 1;
  height: 1px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(168, 126, 58, 0.22) 18%, rgba(212, 184, 106, 0.62) 50%, rgba(168, 126, 58, 0.22) 82%, transparent 100%),
    conic-gradient(
      from var(--preface-divider-glint) at 50% 50%,
      rgba(201, 168, 76, 0.08) 0deg,
      rgba(232, 210, 148, 0.38) 40deg,
      rgba(201, 168, 76, 0.08) 80deg,
      rgba(201, 168, 76, 0.08) 360deg
    );
  opacity: 0.82;
  animation: bookPrefaceDividerGlint 9s linear infinite, obscureCoverGoldShimmer 9s ease-in-out infinite;
}
.book-preface-divider__gem {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(201, 168, 76, 0.48);
  transform: rotate(45deg);
  background: rgba(201, 168, 76, 0.12);
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.18);
  animation: obscureCoverGoldShimmer 9s ease-in-out infinite;
}
.book-preface-heading {
  margin: 0 0 0.9rem;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.88rem, 1.55vw, 1.02rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.38;
  color: #d4b86a;
  text-align: center;
  text-shadow: 0 0 8px rgba(201, 168, 76, 0.14);
}
.book-preface-body {
  margin: 0 auto 0.95rem;
  max-width: 96%;
  padding: 0 0.1rem;
}
.book-preface-paragraph {
  margin: 0 0 0.68rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.92rem, 1.35vw, 1.02rem);
  line-height: 1.5;
  color: rgba(232, 214, 176, 0.9);
  text-align: left;
}
.book-preface-paragraph:last-child {
  margin-bottom: 0;
}
.book-preface-term {
  color: rgba(102, 198, 186, 0.9);
  text-shadow: 0 0 6px rgba(72, 168, 158, 0.18);
}
.book-preface-signature {
  margin: 0.2rem 0 0 auto;
  max-width: 96%;
  padding-right: 0.1rem;
  text-align: right;
}
.book-preface-signature__line {
  margin: 0 0 0.18rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(0.86rem, 1.25vw, 0.96rem);
  line-height: 1.38;
  color: rgba(212, 184, 106, 0.82);
}
.book-preface-close {
  position: static;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(201, 168, 76, 0.38);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.1) 0%, rgba(0, 0, 0, 0.22) 100%);
  color: #c9a84c;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 168, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.28);
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.book-preface-close:hover {
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.18) 0%, rgba(0, 0, 0, 0.18) 100%);
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 168, 0.14),
    0 0 12px rgba(201, 168, 76, 0.16),
    0 3px 8px rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}
.book-preface-signature__line:last-child {
  margin-bottom: 0;
}
body.book-preface-open {
  overflow: hidden;
}

/* QA007 tawheed term pop-ups — reuse preface shell, size to content */
#bookTawheedTermOverlay .book-tawheed-term-modal {
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: center;
  width: min(680px, calc(100vw - 2.5rem));
  max-width: 680px;
  height: auto;
  max-height: min(88vh, 90dvh);
}
#bookTawheedTermOverlay .book-tawheed-term-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0.85rem 1.35rem 1rem;
}
#bookTawheedTermOverlay .book-preface-divider--top {
  margin-bottom: 0.65rem;
}
#bookTawheedTermOverlay .book-preface-divider--bottom {
  margin-top: 0.7rem;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.45rem 0.2rem 0.3rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.38) rgba(0, 0, 0, 0.18);
}
#bookTawheedTermOverlay .book-tawheed-term-scroll .book-preface-body {
  max-width: 100%;
  margin: 0;
  padding: 0;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll .book-preface-paragraph {
  font-size: clamp(1rem, 0.35vw + 0.94rem, 1.06rem);
  line-height: 1.6;
  margin: 0;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll .book-preface-paragraph + .book-preface-paragraph {
  margin-top: 1rem;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll::-webkit-scrollbar {
  width: 6px;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 3px;
}
#bookTawheedTermOverlay .book-tawheed-term-scroll::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.38);
  border-radius: 3px;
}
#bookTawheedTermOverlay .book-tawheed-term-panel .book-preface-body {
  margin-bottom: 0;
}

/* ── CANDLE ── */
.candle {
  position: absolute;
  top: 2.35rem;
  right: 2rem;
  transform: translateY(calc(-100% + 5px));
  font-size: 2.2rem;
  animation: flicker 2.5s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(255,180,50,0.6));
  z-index: 7;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.island-religious-knowledge-page:has(.overlay.open) .candle {
  visibility: hidden;
  opacity: 0;
}
@keyframes flicker {
  0%,100% { opacity: 0.9; filter: drop-shadow(0 0 12px rgba(255,180,50,0.6)); }
  25%      { opacity: 1; filter: drop-shadow(0 0 16px rgba(255,180,50,0.75)); }
  50%      { opacity: 0.85; filter: drop-shadow(0 0 10px rgba(255,180,50,0.5)); }
  75%      { opacity: 0.95; filter: drop-shadow(0 0 14px rgba(255,180,50,0.65)); }
}
body.island-religious-knowledge-page::after {
  content: '';
  position: fixed;
  bottom: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle at 80% 90%, rgba(201,140,30,0.08), transparent 60%);
  pointer-events: none;
  z-index: 4;
}

/* ── RESPONSIVE ── */
@media (max-width: 829px) {
  body.island-religious-knowledge-page .dashboard-main {
    padding-top: 48px;
  }

  .religious-knowledge-back {
    top: calc(48px + 0.95rem + env(safe-area-inset-top, 0px));
    left: max(0.65rem, env(safe-area-inset-left, 0px));
    width: 36px;
    height: 36px;
  }

  .religious-knowledge-back svg {
    width: 20px;
    height: 20px;
  }
}

/* Compact tablet / narrow desktop: arrows below book, tight vertical stack */
@media (max-width: 980px) and (min-width: 954px) {
  .overlay {
    padding: 1.25rem 1rem;
    align-items: center;
    justify-content: center;
  }

  .book-modal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(760px, 94vw);
    margin: 0;
  }

  .book-stage {
    width: 100%;
    flex: 0 0 auto;
  }

  .spread-wrap {
    margin-bottom: 0;
    width: 100%;
    display: grid;
    grid-template-rows: auto auto auto auto;
    row-gap: 0.625rem;
    column-gap: 0.75rem;
    align-content: start;
  }

  .stpageflip-host {
    grid-row: 1;
    grid-column: 1 / -1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .close-btn {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: end;
    align-self: start;
    margin: 0.75rem 0 0.75rem;
  }

  .page-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    grid-row: 3;
    grid-column: 1 / -1;
    min-height: 1.25rem;
    margin: 0;
    padding: 0;
    line-height: 1.2;
  }
}

@media (max-width: 700px) {
  body.island-religious-knowledge-page .dashboard-main {
    padding-top: 44px;
  }

  .library-header { padding: 1.65rem 1rem 0.55rem; }
  .library-header::after { width: 80%; }
  .library-title { letter-spacing: clamp(0.03em, 0.5vw, 0.14em); }
  .library-subtitle { font-size: clamp(0.78rem, 2.2vw, 0.9rem); }
  .room {
    padding: 1.55rem 0.75rem 0.35rem;
    overflow: visible;
  }
  .bookshelf {
    overflow: visible;
  }
  .candle {
    top: 1.55rem;
    right: 0.75rem;
    transform: translateY(calc(-100% + 4px));
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .shelf-row { padding: 1rem 0.85rem 0; }
  .books-container { min-height: 158px; gap: 3px; }
}

@media (max-width: 953px) {
  /* ── mobile book overlay: fixed single-screen layout ── */
  body.island-religious-knowledge-page:has(.overlay.open),
  html:has(body.island-religious-knowledge-page .overlay.open) {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
    overscroll-behavior: none;
  }

  .overlay {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
    box-sizing: border-box;
    padding:
      max(0.45rem, env(safe-area-inset-top))
      max(0.4rem, env(safe-area-inset-right))
      max(0.45rem, env(safe-area-inset-bottom))
      max(0.4rem, env(safe-area-inset-left));
  }
  .overlay.open {
    overflow: hidden;
  }
  .overlay.open .book-modal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: min(96vw, 100%);
    max-width: 100%;
    height: auto;
    max-height: 100%;
    flex: 0 1 auto;
    justify-self: center;
    align-self: center;
    min-height: 0;
    min-width: 0;
    margin: 0;
    overflow: visible;
    padding-top: 2.75rem;
    touch-action: manipulation;
  }
  .close-btn {
    position: relative;
    top: auto;
    right: auto;
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: end;
    align-self: start;
    width: auto;
    max-width: max-content;
    flex-shrink: 0;
    margin: 0.5rem 0 0.75rem;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .preface-btn {
    top: 0;
    right: 0;
    z-index: 15;
    font-size: clamp(0.62rem, 2.8vw, 0.72rem);
    padding: 0.35rem 0.75rem;
    letter-spacing: 0.14em;
  }
  .book-preface-overlay {
    padding:
      max(0.15rem, env(safe-area-inset-top))
      max(0.15rem, env(safe-area-inset-right))
      max(0.15rem, env(safe-area-inset-bottom))
      max(0.15rem, env(safe-area-inset-left));
  }
  .book-preface-modal {
    width: min(98vw, 100%);
    max-height: none;
  }
  .book-preface-header {
    min-height: 2.15rem;
    padding: 0.32rem 0.5rem 0.28rem;
  }
  .book-preface-content {
    overflow: visible;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: auto;
    padding: 0.78rem 0.72rem 0.82rem;
  }
  .book-preface-divider {
    width: min(86%, 13rem);
    margin-bottom: 0.5rem;
  }
  .book-preface-divider--bottom {
    margin-top: 0.55rem;
  }
  .book-preface-heading {
    font-size: clamp(0.68rem, 3.1vw, 0.84rem);
    margin-bottom: 0.58rem;
    line-height: 1.32;
    padding: 0;
  }
  .book-preface-body {
    margin-bottom: 0.58rem;
    max-width: 100%;
  }
  .book-preface-paragraph {
    font-size: clamp(0.58rem, 2.55vw, 0.7rem);
    line-height: 1.42;
    margin-bottom: 0.46rem;
  }
  .book-preface-signature {
    font-size: clamp(0.54rem, 2.35vw, 0.64rem);
    margin-top: 0.48rem;
    line-height: 1.32;
  }
  .book-preface-signature__line {
    margin-bottom: 0.1rem;
  }
  .book-preface-close {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.05rem;
  }
  .book-preface-close:hover {
    transform: none;
  }
  #bookTawheedTermOverlay .book-tawheed-term-modal {
    width: min(calc(100vw - 1.5rem), 100%);
    max-width: none;
    max-height: min(90dvh, 92vh);
  }
  #bookTawheedTermOverlay .book-tawheed-term-content {
    padding: 0.8rem 1rem 0.9rem;
  }
  #bookTawheedTermOverlay .book-tawheed-term-scroll {
    padding: 0.1rem 0.35rem 0.15rem 0.25rem;
  }
  #bookTawheedTermOverlay .book-tawheed-term-scroll .book-preface-paragraph {
    font-size: clamp(1rem, 2.8vw, 1.05rem);
    line-height: 1.58;
  }
  #bookTawheedTermOverlay .book-tawheed-term-scroll .book-preface-paragraph + .book-preface-paragraph {
    margin-top: 0.85rem;
  }
  .overlay .close-btn:hover,
  .overlay .close-btn:active {
    transform: none;
  }
  .book-stage {
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 7.5rem);
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .spread-wrap {
    flex: 0 1 auto;
    min-height: 0;
    min-width: 0;
    height: auto;
    width: 100%;
    padding: 0;
    margin-bottom: 0;
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
    overflow: hidden;
  }

  .spread-wrap--controls-dual::before,
  .spread-wrap--controls-single::before,
  .spread-wrap--controls-none::before {
    content: '';
    grid-row: 4;
    grid-column: 1 / -1;
    align-self: stretch;
    min-height: 3.1rem;
    border-radius: 3px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: linear-gradient(180deg, rgba(62, 40, 20, 0.52) 0%, rgba(28, 18, 9, 0.82) 48%, rgba(16, 10, 5, 0.92) 100%);
    box-shadow:
      inset 0 1px 0 rgba(228, 198, 140, 0.09),
      inset 0 -2px 5px rgba(0, 0, 0, 0.38),
      0 3px 8px rgba(0, 0, 0, 0.42),
      0 0 16px rgba(201, 168, 76, 0.07);
    pointer-events: none;
    z-index: 0;
  }

  .spread-wrap--controls-dual {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
    column-gap: 0.4rem;
  }

  .spread-wrap--controls-dual .nav-prev {
    grid-row: 4;
    grid-column: 1;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    justify-self: start;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }

  .spread-wrap--controls-dual .book-audio-dock--dual:not([hidden]) {
    display: contents;
  }

  .spread-wrap--controls-dual .book-audio-slot--left {
    grid-row: 4;
    grid-column: 2;
    min-width: 0;
  }

  .spread-wrap--controls-dual .book-audio-slot--right {
    grid-row: 4;
    grid-column: 3;
    min-width: 0;
  }

  .spread-wrap--controls-dual .book-audio-slot .page-audio-bar--external {
    max-width: none;
  }

  .spread-wrap--controls-dual .nav-next {
    grid-row: 4;
    grid-column: 4;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    justify-self: end;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }

  .spread-wrap--controls-dual .page-audio-bar--single {
    display: none !important;
  }

  .spread-wrap--controls-single {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 0.4rem;
  }

  .spread-wrap--controls-single .book-audio-dock--dual {
    display: none !important;
  }

  .spread-wrap--controls-single .nav-prev {
    grid-row: 4;
    grid-column: 1;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    justify-self: start;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }

  .spread-wrap--controls-single .page-audio-bar--single:not([hidden]) {
    display: flex !important;
    grid-row: 4;
    grid-column: 2;
    position: relative;
    z-index: 1;
    justify-self: stretch;
    align-self: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 2rem;
  }

  .spread-wrap--controls-single .nav-next {
    grid-row: 4;
    grid-column: 3;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    justify-self: end;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }

  .spread-wrap--controls-none {
    grid-template-columns: 1fr auto;
    column-gap: 0.5rem;
  }

  .spread-wrap--controls-none .book-audio-dock--dual,
  .spread-wrap--controls-none .page-audio-bar--single {
    display: none !important;
  }

  .spread-wrap--controls-none .nav-prev {
    display: none !important;
  }

  .spread-wrap--controls-none .nav-next {
    grid-row: 4;
    grid-column: 2;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    z-index: 1;
    align-self: center;
    justify-self: end;
    display: flex;
    background: rgba(18, 12, 7, 0.55);
    border-color: rgba(201, 168, 76, 0.35);
    box-shadow: inset 0 1px 0 rgba(228, 198, 140, 0.06);
  }
  .book-spread,
  .stpageflip-host {
    grid-row: 1;
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    transition: none;
  }
  .stpageflip-host.stf__parent {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    box-shadow: 0 10px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(201,168,76,0.15);
  }
  /* StPageFlip 3D flip: isolation on pages flattens transforms on iOS */
  .stpageflip-host .obscure-page--content {
    isolation: auto;
  }
  .stpageflip-host {
    overflow: visible;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content {
    padding:
      clamp(0.55rem, 1.8vw, 0.9rem)
      clamp(1.1rem, 3.4vw, 1.4rem)
      clamp(1.2rem, 3vw, 1.5rem)
      clamp(1.4rem, 4.2vw, 1.7rem);
    overflow: hidden;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content.obscure-page--qa {
    padding-top: clamp(1.5rem, 5vw, 2rem);
    padding-left: clamp(1.7rem, 5.2vw, 2.1rem);
    padding-right: clamp(1.25rem, 4vw, 1.6rem);
    padding-bottom: clamp(1.2rem, 3vw, 1.5rem);
  }
  html:not(.book-layout-mode-fixed) .obscure-page--qa .qa-page-layout--sky {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content .page-chapter,
  html:not(.book-layout-mode-fixed) .obscure-page--content .page-heading,
  html:not(.book-layout-mode-fixed) .obscure-page--content .page-body,
  html:not(.book-layout-mode-fixed) .obscure-page--content .qa-page-layout,
  html:not(.book-layout-mode-fixed) .obscure-page--content .qa-text-content,
  html:not(.book-layout-mode-fixed) .obscure-page--content .question-block,
  html:not(.book-layout-mode-fixed) .obscure-page--content .answer-block,
  html:not(.book-layout-mode-fixed) .obscure-page--content .question-text,
  html:not(.book-layout-mode-fixed) .obscure-page--content .answer-label,
  html:not(.book-layout-mode-fixed) .obscure-page--content .answer-text {
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--qa .question-text {
    font-size: clamp(1.05rem, 4vw, 1.25rem);
    line-height: 1.35;
    font-weight: 500;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-block {
    margin-top: clamp(1rem, 3.5vw, 1.35rem);
  }
  html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-label {
    font-size: clamp(0.82rem, 3vw, 0.96rem);
    margin-bottom: clamp(0.35rem, 1.5vw, 0.55rem);
  }
  html:not(.book-layout-mode-fixed) .obscure-page--qa .answer-text {
    font-size: clamp(1rem, 3.8vw, 1.2rem);
    line-height: 1.55;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--hadith .qa-hadith-answer-zone .qa-hadith-answer-scroll {
    font-size: clamp(1rem, 1.5vw, 1.05rem);
    line-height: 1.55;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--decorated:not(.qa-page-layout--sky):not(.qa-page-layout--mechet) .page-allah-zone {
    padding-bottom: clamp(1.7rem, 4.5vw, 2.35rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--decorated .page-allah-icon__img {
    width: clamp(7rem, 30vw, 10rem);
    max-width: 68%;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--sky .qa-sky-zone {
    width: calc(100% - clamp(0.55rem, 2.6vw, 0.95rem) * 2);
    min-height: clamp(4.75rem, 32%, 10.5rem);
    max-height: 46%;
    margin-top: clamp(0.65rem, 2%, 1.1rem);
    margin-bottom: clamp(1.1rem, 3%, 1.85rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet .answer-block {
    margin-top: clamp(0.4rem, 1.4vw, 0.65rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--decorated.qa-page-layout--mechet .qa-mechet-zone {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    margin-top: clamp(0.15rem, 0.5%, 0.3rem);
    padding-left: clamp(0.15rem, 0.6vw, 0.35rem);
    padding-right: clamp(0.15rem, 0.6vw, 0.35rem);
    padding-bottom: clamp(0.55rem, 1.5%, 0.85rem);
  }
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page2,
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page3 {
    padding-bottom: clamp(0.5rem, 1.4%, 0.8rem);
  }
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page5 {
    margin-top: clamp(0.1rem, 0.3vw, 0.2rem);
    padding-top: 0;
    padding-bottom: clamp(0.55rem, 1.45%, 0.9rem);
  }
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page6 {
    margin-top: clamp(0.12rem, 0.35vw, 0.25rem);
    padding-top: 0;
    padding-bottom: clamp(0.6rem, 1.55%, 0.95rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page6 .qa-mechet-image {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page7 {
    margin-top: clamp(0.12rem, 0.35vw, 0.25rem);
    padding-top: 0;
    padding-bottom: clamp(0.6rem, 1.55%, 0.95rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list {
    grid-template-rows: minmax(0, 1fr) minmax(clamp(3.75rem, 30%, 6.5rem), 36%);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .answer-block {
    margin-top: clamp(0.45rem, 1.6vw, 0.7rem);
    padding-bottom: 0.25rem;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet.qa-page-layout--answer-list .qa-mechet-zone--page7 {
    padding-bottom: clamp(0.75rem, 2%, 1rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page7 .qa-mechet-image {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  html:not(.book-layout-mode-fixed) .qa-mechet-zone--page8 {
    margin-top: clamp(0.12rem, 0.35vw, 0.25rem);
    padding-top: 0;
    padding-bottom: clamp(0.6rem, 1.55%, 0.95rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet:not(.qa-page-layout--quran) .qa-mechet-zone--page8 .qa-mechet-image {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--page10 .answer-block {
    margin-top: clamp(0.4rem, 1.4vw, 0.65rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--decorated.qa-page-layout--page10 .qa-page10-illustration-zone {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    margin-top: clamp(0.12rem, 0.35vw, 0.25rem);
    padding-left: clamp(0.15rem, 0.6vw, 0.35rem);
    padding-right: clamp(0.15rem, 0.6vw, 0.35rem);
    padding-bottom: clamp(0.6rem, 1.55%, 0.95rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--page10 .qa-page10-illustration {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .qa-mechet-zone--page5 .qa-mechet-image {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--mechet .qa-mechet-image {
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .qa-quran-answer {
    gap: clamp(0.14rem, 0.45vw, 0.26rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--quran .answer-block {
    margin-top: clamp(0.35rem, 1.2vw, 0.6rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .qa-quran-ayah {
    font-size: clamp(0.9rem, 3.15vw, 1.08rem);
    line-height: 1.72;
  }
  html:not(.book-layout-mode-fixed) .qa-quran-ayah {
    font-size: clamp(0.9rem, 3.15vw, 1.08rem);
    line-height: 1.72;
    padding-left: 0;
    padding-right: 0;
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--quran.qa-page-layout--mechet .qa-quran-source {
    margin-right: clamp(0.35rem, 1vw, 0.65rem);
    max-width: calc(100% - clamp(0.35rem, 1vw, 0.65rem));
  }
  html:not(.book-layout-mode-fixed) .qa-quran-ayah-translation {
    font-size: clamp(0.88rem, 3.1vw, 1.02rem);
  }
  html:not(.book-layout-mode-fixed) .qa-answer-list {
    gap: clamp(0.34rem, 1vw, 0.52rem);
  }
  html:not(.book-layout-mode-fixed) .qa-answer-list__marker {
    width: clamp(0.42rem, 1.15vw, 0.5rem);
    height: clamp(0.42rem, 1.15vw, 0.5rem);
    margin-top: 0.4em;
  }
  html:not(.book-layout-mode-fixed) .qa-quran-source__icon {
    width: clamp(0.88rem, 3vw, 1.05rem);
    height: clamp(0.88rem, 3vw, 1.05rem);
  }
  html:not(.book-layout-mode-fixed) .qa-quran-source__text {
    font-size: clamp(0.72rem, 2.6vw, 0.84rem);
  }
  html:not(.book-layout-mode-fixed) .qa-page-layout--page13.qa-page-layout--quran .qa-text-content {
    flex: 1 1 auto;
    min-height: 0;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content .page-number {
    bottom: clamp(0.9rem, 2.4vw, 1.1rem);
    top: auto;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content.--left .page-number {
    left: clamp(0.85rem, 2.4vw, 1.1rem);
    right: auto;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content.--right .page-number {
    right: clamp(0.85rem, 2.4vw, 1.1rem);
    left: auto;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content::before {
    inset: 6px;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content::after {
    background-size: 22px 22px;
    background-position: 4px 4px, calc(100% - 4px) 4px, 4px calc(100% - 4px), calc(100% - 4px) calc(100% - 4px);
    opacity: 0.58;
    animation: none;
  }
  .obscure-page--cover {
    padding: clamp(0.55rem, 1.8vw, 0.9rem) clamp(0.45rem, 1.5vw, 0.7rem) clamp(1.2rem, 3vw, 1.5rem);
  }
  .obscure-page--cover.obscure-cover--gold-shimmer {
    padding: 0;
    box-shadow:
      inset 0 0 44px rgba(0, 0, 0, 0.28),
      inset 3px 0 16px rgba(0, 0, 0, 0.26),
      inset -2px 0 12px rgba(118, 74, 30, 0.06),
      inset 0 1px 0 rgba(186, 148, 82, 0.04),
      0 0 0 1px rgba(168, 126, 58, 0.07),
      0 0 14px rgba(158, 112, 42, 0.05),
      0 0 32px rgba(108, 72, 28, 0.03);
  }
  .obscure-cover--gold-shimmer .cover-title-text--long {
    font-size: clamp(0.56rem, 3.1vw, 0.76rem);
    line-height: 1.28;
    letter-spacing: 0.04em;
    max-width: 88%;
  }
  .obscure-cover--gold-shimmer .cover-author-text {
    font-size: clamp(0.72rem, 3vw, 0.88rem);
    padding: 0 0.35rem 0.65rem;
  }
  .obscure-cover--gold-shimmer .cover-footer {
    padding: 0 50px 4.25rem;
  }
  .obscure-page--cover .obscure-cover-inner.obscure-cover--leather::before {
    inset: 56px;
  }
  .obscure-page--cover .obscure-cover-inner.obscure-cover--leather::after {
    background-size: 24px 24px;
    background-position: 56px 56px, calc(100% - 56px) 56px, 56px calc(100% - 56px), calc(100% - 56px) calc(100% - 56px);
    opacity: 0.58;
  }
  .book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::before {
    background-image: conic-gradient(
      from var(--cover-glint-angle) at 50% 50%,
      transparent 0deg 327deg,
      rgba(220, 198, 130, 0.04) 332deg,
      rgba(238, 218, 148, 0.13) 336deg,
      rgba(220, 198, 130, 0.04) 340deg,
      transparent 345deg 360deg
    );
  }
  .book-stage.book-stage--at-cover .obscure-page--cover.obscure-cover--gold-shimmer .obscure-cover-inner.obscure-cover--leather::after {
    animation: obscureCoverCornerGlintMobile 9s linear infinite;
  }
  .stpageflip-host .stf__item .page-number {
    display: none;
  }
  .stpageflip-host .stf__item[style*="display: block"] .page-number,
  .stpageflip-host .stf__item[style*="display:block"] .page-number {
    display: inline;
  }
  html:not(.book-layout-mode-fixed) .obscure-page--content .page-number {
    bottom: clamp(0.9rem, 2.4vw, 1.1rem);
    top: auto;
  }
  .obscure-cover--gold-shimmer .cover-title-block {
    padding: 64px 46px;
  }
  .book--gold-shimmer .spine-title {
    font-size: clamp(0.36rem, 2.4vw, 0.5rem);
    max-height: 84%;
  }
  .book--gold-shimmer.book--cover-image .shelf-spine-lines {
    font-size: clamp(0.52rem, 2.88vw, 0.64rem);
  }
  html[lang="en"] .book--gold-shimmer.book--cover-image .shelf-spine-lines {
    font-size: clamp(0.48rem, 2.65vw, 0.60rem);
  }
  html[lang="en"] .book--gold-shimmer.book--cover-image .shelf-spine-title {
    top: 11%;
    bottom: 8%;
  }
  html[lang="en"] .book--placeholder .spine-title {
    font-size: clamp(0.34rem, 2.1vw, 0.48rem);
  }
  html[lang="ru"] .book--placeholder .spine-title {
    font-size: clamp(0.42rem, 2.35vw, 0.56rem);
  }
  .page-left,
  .page-right,
  .page-flip-leaf,
  .page-flip-front,
  .page-flip-back {
    box-sizing: border-box;
  }
  .cover-stage {
    top: 0;
    bottom: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  .cover-face {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: clamp(0.55rem, 1.8vw, 0.9rem) clamp(0.45rem, 1.5vw, 0.7rem) clamp(1.2rem, 3vw, 1.5rem);
    transition: transform 0.85s cubic-bezier(0.45, 0, 0.2, 1), box-shadow 0.15s ease;
  }
  .page-left {
    border-right: 2px solid rgba(100,60,20,0.35);
    box-shadow: inset -8px 0 16px rgba(0,0,0,0.12);
  }
  .page-right {
    display: block;
    box-shadow: inset 8px 0 16px rgba(0,0,0,0.06);
  }
  .page-left, .page-right {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding: clamp(0.55rem, 1.8vw, 0.9rem) clamp(0.45rem, 1.5vw, 0.7rem) clamp(1.2rem, 3vw, 1.5rem);
    overflow: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .page-left.sliding-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .page-left::before, .page-right::before {
    inset: clamp(1.6rem, 4vw, 2.2rem) clamp(0.5rem, 1.6vw, 0.75rem) clamp(0.85rem, 2.2vw, 1rem);
  }
  .page-chapter {
    font-size: clamp(0.48rem, 1.5vw, 0.58rem);
    letter-spacing: 0.18em;
    margin-top: clamp(0.45rem, 1.2vw, 0.6rem);
    margin-left: 0;
    margin-bottom: 0.82rem;
  }
  .page-heading { font-size: clamp(0.72rem, 2.2vw, 0.88rem); margin-bottom: clamp(0.35rem, 1.2vw, 0.55rem); }
  .page-body { font-size: clamp(0.6rem, 1.85vw, 0.74rem); line-height: 1.58; text-align: justify; }
  html:not(.book-layout-mode-fixed) .page-number { font-size: clamp(0.58rem, 1.75vw, 0.68rem); }
  .page-drop-cap::first-letter { font-size: 2.6em; }
  .page-flip-layer {
    overflow: hidden;
  }
  .page-flip-leaf {
    top: 0;
    width: 50%;
    min-width: 0;
    height: 100%;
    max-height: 100%;
  }
  .page-flip-front,
  .page-flip-back {
    padding: clamp(0.55rem, 1.8vw, 0.9rem) clamp(0.45rem, 1.5vw, 0.7rem) clamp(1.2rem, 3vw, 1.5rem);
    overflow: hidden;
    overflow-y: hidden;
    width: 100%;
    min-width: 0;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .page-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    top: auto;
    left: auto;
    right: auto;
    grid-row: 3;
    grid-column: 1 / -1;
    margin: 0;
    min-height: 1.1rem;
    max-height: none;
    overflow: hidden;
    white-space: nowrap;
    font-size: clamp(0.68rem, 1.9vw, 0.76rem);
    line-height: 1.2;
    flex-shrink: 0;
  }
  .overlay .nav-arrow:hover,
  .overlay .nav-arrow:active {
    transform: none;
  }
  .nav-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    font-size: 1.15rem;
    border-radius: 2px;
    flex-shrink: 0;
  }
}

@media (max-width: 420px) {
  .page-left, .page-right,
  .page-flip-front, .page-flip-back,
  .cover-face {
    padding: clamp(0.5rem, 1.6vw, 0.8rem) clamp(0.4rem, 1.4vw, 0.6rem) clamp(1rem, 2.8vw, 1.3rem);
  }
  .page-body { font-size: clamp(0.56rem, 1.7vw, 0.68rem); line-height: 1.52; }
}
