/* Styles for book (serialized story) pages, on top of styles.css + story.css */

.chapter-book-title {
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 8px;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chapter-nav a {
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
    max-width: 45%;
}

.chapter-nav a:hover {
    opacity: 1;
}

.chapter-nav .nav-next {
    margin-left: auto;
    text-align: right;
}

.chapter-nav .nav-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 4px;
}

/* Book cover / table of contents */
.book-cover {
    text-align: center;
    padding: 24px 0 8px;
}

.book-cover .book-tagline {
    font-style: italic;
    opacity: 0.7;
    margin-top: 8px;
}

.book-synopsis {
    max-width: 620px;
    margin: 16px auto 24px;
    line-height: 1.7;
    opacity: 0.85;
}

.book-status {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 16px;
    text-align: center;
}

.file-item.locked {
    opacity: 0.4;
    pointer-events: none;
}

.file-item.locked .file-name::after {
    content: " 🔒";
}

/* Grimoire table-of-contents tagline (parchment TOC) */
.grimoire-toc-tagline {
    text-align: center;
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    color: #8a7d68;
    margin: 10px auto 22px;
}

/* ── Rich chapter content ─────────────────────────────────────────────
   These style HTML placed inside a chapter's `content`. Bigger grimoire
   chapters can now carry hero images, captioned illustrations, maps,
   epigraphs, pull quotes, scene breaks, and codex/appendix entries. */

/* Chapter hero image — sits above the story text */
.chapter-hero {
    margin: 0 0 40px;
    border: 1px solid rgba(138, 125, 104, 0.3);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    background: #0b0806;
}

.chapter-hero img {
    display: block;
    width: 100%;
    height: auto;
}

/* Inline illustration with caption */
figure.grimoire-figure {
    margin: 36px 0;
    text-align: center;
}

figure.grimoire-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(138, 125, 104, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    filter: saturate(0.9) contrast(1.02);
}

figure.grimoire-figure figcaption {
    margin-top: 12px;
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #8a7d68;
}

/* Wide image / map — breaks past the text column on large screens */
figure.grimoire-figure.wide {
    margin-left: -56px;
    margin-right: -56px;
}

@media (max-width: 760px) {
    figure.grimoire-figure.wide { margin-left: 0; margin-right: 0; }
}

/* Epigraph — a quote/verse opening a chapter */
.epigraph {
    max-width: 460px;
    margin: 0 auto 40px;
    padding-left: 18px;
    border-left: 2px solid rgba(138, 125, 104, 0.4);
    font-style: italic;
    color: #a3957e;
    line-height: 1.7;
}

.epigraph cite {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 0.82rem;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Pull quote — emphasised line inside the prose */
.pull-quote {
    margin: 32px 0;
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 1.5rem;
    line-height: 1.5;
    color: #d8cdb8;
    text-align: center;
    text-shadow: 0 0 22px rgba(216, 205, 184, 0.12);
}

/* Scene break — ornamental divider between scenes */
.scene-break {
    margin: 40px 0;
    text-align: center;
    color: #6f6353;
    letter-spacing: 8px;
    font-size: 1.1rem;
}

.scene-break::before { content: "⸻ ✦ ⸻"; }

/* Codex / appendix entry — lore fragments (also useful as design notes) */
.codex-entry {
    margin: 28px 0;
    padding: 20px 22px;
    border: 1px dashed rgba(138, 125, 104, 0.3);
    background: rgba(216, 205, 184, 0.03);
}

.codex-entry h4 {
    margin: 0 0 10px;
    font-family: 'IM Fell English', Georgia, serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: #d8cdb8;
}

.codex-entry p {
    margin: 0 0 10px;
    font-size: 0.96rem;
    color: #b3a68e;
}

@media (prefers-reduced-motion: reduce) {
    .pull-quote { text-shadow: none; }
}
