/* A4 landscape preview — soft watercolor / pastel children's book */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;700&family=Nunito:wght@400;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --ink: #2c3a4a;
  --ink-soft: #5a6a7a;
  --cream: #f7f1e8;
  --sand: #e8d9c4;
  --sky: #c5dde8;
  --rose: #e8b4b8;
  --sage: #a8c5b0;
  --gold: #d4a574;
  --page-w: 297mm;
  --page-h: 210mm;
}

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: #3d4f5f;
  color: var(--ink);
  line-height: 1.45;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.65rem 1.25rem;
  background: #1e2a35;
  color: #f0e6d8;
  font-size: 0.9rem;
}
.toolbar a {
  color: #f0c987;
  text-decoration: none;
  font-weight: 700;
}
.toolbar .pdf-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b2b 0%, #ff3d57 100%);
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(255, 107, 43, 0.35);
}
.toolbar .pdf-btn:hover { filter: brightness(1.06); }

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1rem 3rem;
}

.page {
  width: min(100%, 1100px);
  aspect-ratio: 297 / 210;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(232, 180, 184, 0.25), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(197, 221, 232, 0.35), transparent 45%),
    linear-gradient(160deg, #faf6f0 0%, #f3ebe0 55%, #ebe3d6 100%);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  padding: 1.6rem 2rem;
  position: relative;
  overflow: hidden;
  page-break-after: always;
}

.page::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 165, 116, 0.35);
  border-radius: 2px;
  pointer-events: none;
}

/* COVER */
.cover {
  background:
    linear-gradient(180deg, rgba(44,58,74,0.15), transparent 40%),
    radial-gradient(ellipse at 50% 30%, #f0d9a8 0%, transparent 55%),
    linear-gradient(165deg, #d4e5ef 0%, #e8d4c4 40%, #c9b8a0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.cover-inner { position: relative; z-index: 1; max-width: 28rem; }
.series {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.cover h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.cover h1 span { color: #8b5e3c; }
.subtitle {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.cover-cat {
  margin: 1.4rem auto;
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
}
.author { margin-top: 1.5rem; font-size: 0.95rem; color: var(--ink-soft); }

/* PARENT / MAP */
.parent-note h2, .map h2, .chapter h2, .coloring h2, .end h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  margin-bottom: 0.85rem;
  color: #5c4030;
}
.parent-note p, .parent-note li { font-size: 1.02rem; margin-bottom: 0.55rem; }
.parent-note ul { padding-left: 1.25rem; margin: 0.75rem 0; }
.hint {
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  background: rgba(168, 197, 176, 0.35);
  border-radius: 8px;
  font-size: 0.95rem;
}

.journey {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.25rem;
  font-size: 1.05rem;
}
.journey li { margin-bottom: 0.45rem; break-inside: avoid; }
.vocab-preview {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  padding: 0.6rem 0.9rem;
  background: rgba(197, 221, 232, 0.5);
  border-radius: 8px;
}

/* CHAPTER — full-bleed art + overlay type on soft watercolor wash */
.chapter {
  --wash: rgba(255, 250, 243, 0.78);
  --wash-edge: rgba(255, 248, 238, 0.35);
  background: #d4c4a8;
  z-index: 0;
  padding: 0 !important;
  display: block !important;
  overflow: hidden;
  box-shadow: none;
}
.chapter > * { position: relative; z-index: 2; }

/* Soft vignette only — art stays visible */
.chapter::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(40, 30, 20, 0.12) 0%, transparent 22%, transparent 45%, rgba(40, 30, 20, 0.18) 100%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(60, 40, 25, 0.2), transparent 65%);
  opacity: 1;
  animation: none;
}
.chapter::after {
  content: '';
  position: absolute;
  inset: 0;
  border: none;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.chapter[data-scene="desert"] { --wash: rgba(255, 248, 236, 0.8); }
.chapter[data-scene="meadow"] { --wash: rgba(245, 252, 242, 0.8); }
.chapter[data-scene="village"] { --wash: rgba(255, 248, 240, 0.8); }
.chapter[data-scene="forest"] { --wash: rgba(242, 250, 244, 0.8); }
.chapter[data-scene="sea"] { --wash: rgba(240, 250, 255, 0.8); }
.chapter[data-scene="autumn"] { --wash: rgba(255, 246, 236, 0.8); }
.chapter[data-scene="rails"] { --wash: rgba(246, 250, 246, 0.8); }
.chapter[data-scene="park"] { --wash: rgba(248, 252, 240, 0.8); }
.chapter[data-scene="sky"] { --wash: rgba(240, 248, 255, 0.8); }
.chapter[data-scene="space"] { --wash: rgba(244, 246, 255, 0.8); }

/* Full-bleed illustration — edge to edge */
.story-bleed {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: none;
  box-shadow: none;
}
.story-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

/* Overlay copy layer — positioned into negative space */
.chapter-copy {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1.2rem 1rem;
  margin: 0;
  overflow: visible;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
}
.chapter-copy > * { pointer-events: auto; max-width: min(40%, 22rem); }

.chapter-num {
  position: absolute;
  top: 0.65rem;
  right: 1.1rem;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 2px 10px rgba(30, 25, 20, 0.45);
  z-index: 5;
  line-height: 1;
  opacity: 1;
}
/* Keep chapter number opposite of text cluster */
.chapter:has(.text-pos-tr) .chapter-num,
.chapter:has(.text-pos-br) .chapter-num {
  right: auto;
  left: 1.1rem;
}
.chapter:has(.text-pos-tl) .chapter-num,
.chapter:has(.text-pos-bl) .chapter-num {
  right: 1.1rem;
  left: auto;
}

/* ---- text position presets (negative space of each art) ---- */
.text-pos-tr {
  align-items: flex-end;
  justify-content: flex-start;
  padding-left: 52%;
  padding-right: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 30%;
}
.text-pos-tl {
  align-items: flex-start;
  justify-content: flex-start;
  padding-right: 52%;
  padding-left: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 30%;
}
.text-pos-br {
  align-items: flex-end;
  justify-content: flex-end;
  padding-left: 52%;
  padding-right: 1rem;
  padding-top: 36%;
  padding-bottom: 0.85rem;
}
.text-pos-bl {
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 52%;
  padding-left: 1rem;
  padding-top: 36%;
  padding-bottom: 0.85rem;
}
.text-pos-tm {
  align-items: center;
  justify-content: flex-start;
  padding-inline: 22%;
  padding-top: 0.75rem;
  padding-bottom: 40%;
}

/* ---- panel layouts: dedicated text column, art never covered ---- */
.chapter.layout-panel-left .story-bleed {
  inset: 0 0 0 40% !important;
  width: auto !important;
}
.chapter.layout-panel-left .chapter-copy,
.chapter.layout-panel-left .chapter-copy.text-pos-tl,
.chapter.layout-panel-left .chapter-copy.text-pos-tr,
.chapter.layout-panel-left .chapter-copy.text-pos-bl,
.chapter.layout-panel-left .chapter-copy.text-pos-br {
  inset: 0 auto 0 0 !important;
  width: 40% !important;
  max-width: 40% !important;
  padding: 0.85rem 0.9rem 0.85rem 1rem !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 0.4rem;
  background:
    linear-gradient(90deg, rgba(250, 246, 240, 0.96) 0%, rgba(250, 246, 240, 0.92) 82%, rgba(250, 246, 240, 0.15) 100%) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.chapter.layout-panel-left .chapter-copy > * {
  max-width: none !important;
  width: 100% !important;
}
.chapter.layout-panel-left .chapter-num {
  right: 1.1rem !important;
  left: auto !important;
}

.chapter.layout-panel-right .story-bleed {
  inset: 0 40% 0 0 !important;
  width: auto !important;
}
.chapter.layout-panel-right .chapter-copy,
.chapter.layout-panel-right .chapter-copy.text-pos-tl,
.chapter.layout-panel-right .chapter-copy.text-pos-tr,
.chapter.layout-panel-right .chapter-copy.text-pos-bl,
.chapter.layout-panel-right .chapter-copy.text-pos-br {
  inset: 0 0 0 auto !important;
  width: 40% !important;
  max-width: 40% !important;
  padding: 0.85rem 1rem 0.85rem 0.9rem !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 0.4rem;
  background:
    linear-gradient(270deg, rgba(250, 246, 240, 0.96) 0%, rgba(250, 246, 240, 0.92) 82%, rgba(250, 246, 240, 0.15) 100%) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.chapter.layout-panel-right .chapter-copy > * {
  max-width: none !important;
  width: 100% !important;
}
.chapter.layout-panel-right .chapter-num {
  right: auto !important;
  left: 1.1rem !important;
}

.chapter.layout-panel-left .verse.wash,
.chapter.layout-panel-right .verse.wash {
  font-size: 0.78rem;
  line-height: 1.34;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0.15rem 0;
}
.chapter.layout-panel-left .chapter-head,
.chapter.layout-panel-right .chapter-head {
  background: transparent;
}
.chapter.layout-panel-left .word-box,
.chapter.layout-panel-right .word-box,
.chapter.layout-panel-left .mini-q,
.chapter.layout-panel-right .mini-q {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 6px;
}
.chapter.layout-panel-left .chapter-body,
.chapter.layout-panel-right .chapter-body {
  max-height: min(58%, 11.5rem);
  overflow-y: auto;
  padding-right: 0.15rem;
}
.chapter.layout-panel-left .story-toggle,
.chapter.layout-panel-right .story-toggle {
  align-self: flex-start;
}

/* Aksâ + Nuh + Cennet use panel so focal art stays fully visible */
#ch2.layout-panel-left .story-bleed img { object-position: 70% 48%; }
#ch9.layout-panel-right .story-bleed img { object-position: 40% 45%; }
#ch10.layout-panel-left .story-bleed img { object-position: 55% 40%; }

.chapter-head {
  flex: 0 0 auto;
  width: 100%;
  max-width: inherit;
  padding: 0.45rem 0.75rem 0.5rem;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background:
    radial-gradient(ellipse 115% 130% at 20% 40%, var(--wash) 0%, transparent 70%),
    radial-gradient(ellipse 90% 100% at 80% 60%, var(--wash-edge) 0%, transparent 68%);
}
.chapter h2 {
  font-size: 1.28rem;
  margin-bottom: 0.08rem;
  color: #2a2118;
  line-height: 1.12;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
.chapter h2 span {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  color: #5a4334;
  margin-top: 0.05rem;
}
.wonder {
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: #3d2f24;
  margin: 0.12rem 0 0;
  line-height: 1.25;
}

.story-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.28rem 0.7rem;
  border: 1px solid rgba(139, 94, 60, 0.35);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.92) 0%, rgba(245, 232, 214, 0.88) 100%);
  color: #5a4334;
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 2px 8px rgba(60, 40, 20, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.story-toggle::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid #8b5e3c;
  border-bottom: 2px solid #8b5e3c;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.2s ease;
}
.story-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}
.story-toggle:hover {
  border-color: rgba(139, 94, 60, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96) 0%, rgba(248, 236, 220, 0.94) 100%);
}
.story-toggle:focus-visible {
  outline: 2px solid #8b5e3c;
  outline-offset: 2px;
}

.chapter-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: inherit;
  animation: story-open 0.28s ease;
}
.chapter-body[hidden] {
  display: none !important;
}
@keyframes story-open {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

.chapter-copy.is-expanded {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Smaller, more transparent wash — still readable */
.chapter .verse.wash {
  flex: 0 1 auto;
  width: 100%;
  max-width: inherit;
  margin: 0;
  padding: 0.55rem 0.8rem 0.6rem;
  font-size: 0.82rem;
  line-height: 1.38;
  color: #243040;
  opacity: 1;
  visibility: visible;
  overflow: visible;
  border: none;
  border-radius: 0;
  box-shadow: none;
  align-self: stretch;
  background:
    radial-gradient(ellipse 100% 90% at 25% 20%, var(--wash) 0%, transparent 74%),
    radial-gradient(ellipse 85% 95% at 85% 80%, rgba(255,252,247,0.55) 0%, transparent 70%);
  -webkit-backdrop-filter: blur(4px) saturate(1.04);
  backdrop-filter: blur(4px) saturate(1.04);
}
.verse p { margin-bottom: 0.3rem; }
.verse p:last-child { margin-bottom: 0; }
.verse .soft {
  font-size: 0.72rem;
  font-style: italic;
  color: #5a6a7a;
}

.chapter .word-box {
  flex: 0 0 auto;
  width: 100%;
  max-width: inherit;
  margin: 0;
  padding: 0.28rem 0.55rem;
  color: #2c3a4a;
  opacity: 1;
  border: none;
  border-radius: 0;
  box-shadow: none;
  align-self: stretch;
  background:
    radial-gradient(ellipse 110% 130% at 0% 50%, rgba(255, 248, 236, 0.75) 0%, transparent 78%);
  border-left: 2px solid rgba(180, 130, 80, 0.55);
  font-size: 0.74rem;
  line-height: 1.3;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.word-box span {
  display: inline;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b5e3c;
  margin-right: 0.3rem;
}

.chapter .mini-q {
  flex: 0 0 auto;
  width: 100%;
  max-width: inherit;
  margin: 0.15rem 0 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #3d2f24;
  background: radial-gradient(ellipse 110% 130% at 0% 50%, rgba(197, 221, 232, 0.55) 0%, transparent 78%);
  border-left: 2px solid rgba(90, 130, 140, 0.45);
}

/* Lighter wash — art stays readable under type */
.chapter { --wash: rgba(255, 250, 243, 0.52); --wash-edge: rgba(255, 248, 238, 0.2); }
.chapter[data-scene="desert"] { --wash: rgba(255, 248, 236, 0.55); }
.chapter[data-scene="meadow"] { --wash: rgba(245, 252, 242, 0.55); }
.chapter[data-scene="village"] { --wash: rgba(255, 248, 240, 0.55); }
.chapter[data-scene="forest"] { --wash: rgba(242, 250, 244, 0.55); }
.chapter[data-scene="sea"] { --wash: rgba(240, 250, 255, 0.55); }
.chapter[data-scene="autumn"] { --wash: rgba(255, 246, 236, 0.55); }
.chapter[data-scene="rails"] { --wash: rgba(246, 250, 246, 0.55); }
.chapter[data-scene="park"] { --wash: rgba(248, 252, 240, 0.55); }
.chapter[data-scene="sky"] { --wash: rgba(240, 248, 255, 0.55); }
.chapter[data-scene="space"] { --wash: rgba(244, 246, 255, 0.55); }

/* Coloring pages keep slots */
.illust-slot, .coloring-slot {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(139, 94, 60, 0.18);
  border-radius: 10px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  overflow: hidden;
}
.illust-slot.filled, .coloring-slot.filled {
  border-style: solid;
  border-color: rgba(139, 94, 60, 0.16);
  background: rgba(255,255,255,0.55);
  padding: 0;
  box-shadow: none;
}

.coloring .activity-block {
  margin-top: 0.55rem;
  padding: 0.5rem 0.75rem 0.55rem;
  background: rgba(197, 221, 232, 0.42);
  border-radius: 8px;
}
.coloring .activity-lead {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: #6b4c3b;
  margin-bottom: 0.3rem;
}
.coloring .activity-qs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.coloring .activity-qs li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--ink);
}
.coloring .activity-qs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #8b5e3c;
  opacity: 0.55;
}
.coloring-slot {
  min-height: 280px;
  max-height: 360px;
  padding: 0.5rem !important;
}
.coloring-slot img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  display: block;
  background: #fff;
  margin: 0 auto;
}

.draft .draft-note {
  margin-top: 2rem;
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  color: var(--ink-soft);
  text-align: center;
}

.words { list-style: none; font-size: 1.08rem; }
.words li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(139, 94, 60, 0.15);
}
.closing {
  margin-top: 1.5rem;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  text-align: center;
  color: #6b4c3b;
}

.page.chapter {
  display: block;
  padding: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}

@page {
  size: A4 landscape;
  margin: 0;
}

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html, body { background: #faf6f0 !important; }
  .toolbar { display: none !important; }
  .book { padding: 0; gap: 0; }
  .page {
    width: 297mm !important;
    height: 210mm !important;
    max-width: none !important;
    aspect-ratio: auto !important;
    box-shadow: none;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  .chapter::before {
    background: linear-gradient(180deg, rgba(40,30,20,0.08) 0%, transparent 30%, transparent 50%, rgba(40,30,20,0.12) 100%);
  }
  .chapter .verse.wash,
  .chapter .word-box,
  .chapter-head {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .chapter .verse.wash {
    background: rgba(255, 250, 243, 0.9);
  }
  .chapter-head {
    background: rgba(255, 250, 243, 0.88);
  }
  .chapter .word-box {
    background: rgba(255, 248, 236, 0.9);
  }
  .story-toggle { display: none !important; }
  .chapter-body[hidden] {
    display: flex !important;
  }
  .chapter.layout-panel-left .chapter-body,
  .chapter.layout-panel-right .chapter-body {
    max-height: none;
    overflow: visible;
  }
}

/* ===== PDF: full-page art, then text (no overlay covering illustrations) ===== */
html.pdf-export .toolbar { display: none !important; }
html.pdf-export .book { padding: 0; gap: 0; }
html.pdf-export .page {
  width: 297mm !important;
  height: 210mm !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  box-shadow: none;
  border-radius: 0;
  page-break-after: always;
  break-after: page;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
html.pdf-export .story-toggle { display: none !important; }

html.pdf-export .page.chapter.pdf-art-only {
  padding: 0 !important;
  overflow: hidden !important;
  background: #1a1520 !important;
}
html.pdf-export .page.chapter.pdf-art-only.layout-panel-left,
html.pdf-export .page.chapter.pdf-art-only.layout-panel-right {
  display: block !important;
}
html.pdf-export .page.chapter.pdf-art-only::before,
html.pdf-export .page.chapter.pdf-art-only::after {
  display: none !important;
}
html.pdf-export .page.chapter.pdf-art-only .chapter-copy {
  display: none !important;
}
html.pdf-export .page.chapter.pdf-art-only .story-bleed {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
}
html.pdf-export .page.chapter.pdf-art-only .story-bleed img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
html.pdf-export .page.chapter.pdf-art-only .chapter-num {
  z-index: 2;
  color: rgba(255,255,255,0.85);
}

html.pdf-export .page.chapter.pdf-text-only {
  padding: 1.1rem 1.6rem 1.2rem !important;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(232, 180, 184, 0.18), transparent 50%),
    linear-gradient(160deg, #faf6f0 0%, #f3ebe0 100%) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
html.pdf-export .page.chapter.pdf-text-only.layout-panel-left,
html.pdf-export .page.chapter.pdf-text-only.layout-panel-right {
  display: flex !important;
}
html.pdf-export .page.chapter.pdf-text-only::before,
html.pdf-export .page.chapter.pdf-text-only::after {
  display: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .story-bleed {
  display: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .chapter-copy {
  position: relative !important;
  inset: auto !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  background: transparent !important;
  pointer-events: auto !important;
}
html.pdf-export .page.chapter.pdf-text-only .chapter-copy > * {
  max-width: none !important;
  width: 100% !important;
  pointer-events: auto !important;
}
html.pdf-export .page.chapter.pdf-text-only .chapter-copy.text-pos-tr,
html.pdf-export .page.chapter.pdf-text-only .chapter-copy.text-pos-tl,
html.pdf-export .page.chapter.pdf-text-only .chapter-copy.text-pos-br,
html.pdf-export .page.chapter.pdf-text-only .chapter-copy.text-pos-bl {
  padding: 0 !important;
  align-items: stretch !important;
}
html.pdf-export .page.chapter.pdf-text-only .chapter-body,
html.pdf-export .page.chapter.pdf-text-only .chapter-body[hidden] {
  display: block !important;
  position: relative !important;
  margin-top: 0.45rem !important;
}
html.pdf-export .page.chapter.pdf-text-only .ferman-veil {
  grid-template-rows: 1fr !important;
  opacity: 1 !important;
  transition: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .ferman-rod {
  display: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .ferman-sheet,
html.pdf-export .page.chapter.pdf-text-only .chapter-head,
html.pdf-export .page.chapter.pdf-text-only .verse.wash {
  background: rgba(255, 252, 246, 0.98) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .ferman-sheet {
  box-shadow: 0 4px 18px rgba(60, 40, 30, 0.08) !important;
  border: 1px solid rgba(200, 170, 140, 0.35) !important;
  max-height: none !important;
  overflow: visible !important;
}
html.pdf-export .page.chapter.pdf-text-only .ferman-sheet > * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
html.pdf-export .page.chapter.pdf-text-only .chapter-num {
  color: rgba(80, 60, 50, 0.35);
  text-shadow: none;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
}
html.pdf-export .page.chapter.pdf-text-only .chapter .verse.wash,
html.pdf-export .page.chapter.pdf-text-only .verse.wash {
  font-size: 0.84rem;
  line-height: 1.4;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
}

html.pdf-export .page.coloring {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.3rem !important;
  padding: 0.7rem 1rem 0.75rem !important;
}
html.pdf-export .page.coloring > h2 {
  flex-shrink: 0;
  margin: 0 !important;
}
html.pdf-export .page.coloring .coloring-slot {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0.25rem !important;
  background: #fff !important;
}
html.pdf-export .page.coloring .coloring-slot img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
}
html.pdf-export .page.coloring .activity-block {
  flex-shrink: 0;
  margin-top: 0.25rem !important;
}
