/* =========================================================
   XOLFCUT — BOOK PAGE
   ========================================================= */

.book-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top,
            rgba(255, 255, 255, 0.035),
            transparent 34rem
        ),
        #080808;
    color: #e8e4dc;
}


/* =========================================================
   HEADER
   ========================================================= */

.book-header {
    width: min(100% - 48px, 1400px);
    margin: 0 auto;
    padding: 28px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.book-header .brand {
    color: inherit;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
}

.book-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.book-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: rgba(232, 228, 220, 0.72);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    transition:
        color 180ms ease,
        transform 180ms ease;
}

.book-back:hover {
    color: #ffffff;
    transform: translateY(-1px);
}


/* =========================================================
   LANGUAGE SWITCHER
   ========================================================= */

.book-page .lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;

    padding: 4px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.book-page .lang-button {
    appearance: none;
    border: 0;
    border-radius: 999px;

    padding: 7px 10px;

    background: transparent;
    color: rgba(232, 228, 220, 0.46);

    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;

    cursor: pointer;

    transition:
        background 180ms ease,
        color 180ms ease;
}

.book-page .lang-button:hover {
    color: rgba(232, 228, 220, 0.82);
}

.book-page .lang-button.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}


/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.book-main {
    width: min(100% - 48px, 1400px);
    margin: 0 auto;
}

.book-article {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 104px 0 120px;
}


/* =========================================================
   BOOK INTRO
   ========================================================= */

.book-intro {
    margin-bottom: 48px;
    text-align: center;
}

.book-label {
    margin: 0 0 24px;

    color: rgba(232, 228, 220, 0.42);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.book-title {
    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3.4rem, 9vw, 6.8rem);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.055em;
}

.book-meta {
    margin-top: 28px;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;

    color: rgba(232, 228, 220, 0.55);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.book-divider {
    width: 56px;
    height: 1px;
    margin: 0 auto 88px;

    background: rgba(232, 228, 220, 0.32);
}


/* =========================================================
   CHAPTER TYPOGRAPHY
   ========================================================= */

.chapter-content {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 1.4vw, 1.22rem);
    line-height: 1.92;
}

.chapter-content p {
    color: rgba(255,255,255,.92);
    line-height: 1.95;
}

.chapter-title {
    margin: 0 0 64px;

    color: #f1ede5;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    letter-spacing: -0.025em;
}

.chapter-content p {
    margin: 0 0 1.6em;
}

.chapter-content p:last-child {
    margin-bottom: 0;
}

.chapter-content p:not(.book-message):not(.translation-note) {
    text-wrap: pretty;
}

.chapter-content > .lang > p:first-of-type::first-letter {
    float: left;

    margin: 0.1em 0.13em 0 0;

    color: #ffffff;
    font-size: 4.5em;
    line-height: 0.78;
}


/* =========================================================
   CHAT MESSAGES
   ========================================================= */

.book-message {
    width: fit-content;
    max-width: 76%;
    margin: 2.2em 0;
    padding: 0.9em 1.1em;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.035);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.88em;
    line-height: 1.65;
}

.book-message p {
    margin: 0;
}

.message-in {
    margin-right: auto;
    border-bottom-left-radius: 5px;
    color: rgba(232, 228, 220, 0.78);
}

.message-out {
    margin-left: auto;
    border-bottom-right-radius: 5px;

    background: rgba(232, 228, 220, 0.09);
    color: rgba(242, 238, 230, 0.9);
}

.message-name {
    display: block;
    margin-bottom: 0.45em;

    color: rgba(232, 228, 220, 0.34);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =========================================================
   SCENE BREAK
   ========================================================= */

.chapter-break {
    width: 44px;
    height: 1px;
    margin: 72px auto;

    border: 0;
    background: rgba(232, 228, 220, 0.28);
}


/* =========================================================
   TRANSLATION PLACEHOLDER
   ========================================================= */

.translation-note {
    padding: 32px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);

    color: rgba(232, 228, 220, 0.52);
    font-family: inherit;
    font-style: italic;
    text-align: center;
}


/* =========================================================
   FOOTER
   ========================================================= */

.book-footer {
    margin-top: 104px;
    padding-top: 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.book-footer p {
    margin: 0;

    color: rgba(232, 228, 220, 0.4);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-home-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: rgba(232, 228, 220, 0.78);
    text-decoration: none;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    transition:
        color 180ms ease,
        transform 180ms ease;
}

.book-home-link:hover {
    color: #ffffff;
    transform: translateX(3px);
}


/* =========================================================
   LANGUAGE VISIBILITY
   ========================================================= */

.book-page .lang {
    display: none;
}

.book-page .lang.active {
    display: initial;
}

.chapter-content > .lang.active {
    display: block;
}


/* =========================================================
   REVEAL FALLBACK
   ========================================================= */

.book-page .reveal {
    opacity: 1;
    transform: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {
    .book-header {
        width: min(100% - 32px, 1400px);
        padding: 20px 0;
    }

    .book-header-actions {
        gap: 12px;
    }

    .book-back {
        font-size: 0.68rem;
    }

    .book-main {
        width: min(100% - 32px, 1400px);
    }

    .book-article {
        padding: 72px 0 88px;
    }

    .book-intro {
        margin-bottom: 36px;
    }

    .book-label {
        margin-bottom: 18px;
    }

    .book-title {
        font-size: clamp(3rem, 17vw, 4.8rem);
    }

    .book-meta {
        margin-top: 22px;
        gap: 8px;
        font-size: 0.64rem;
    }

    .book-divider {
        margin-bottom: 64px;
    }

    .chapter-content {
        font-size: 1.04rem;
        line-height: 1.82;
    }

    .chapter-title {
        margin-bottom: 48px;
    }

    .book-message {
        margin: 2em 0;
        padding: 16px 18px;
        font-size: 0.88em;
    }

    .chapter-break {
        margin: 56px auto;
    }

    .book-footer {
        margin-top: 80px;
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 440px) {
    .book-header .brand {
        font-size: 0.68rem;
    }

    .book-back .lang {
        display: none;
    }

    .book-back {
        gap: 0;
    }

    .book-page .lang-button {
        padding: 6px 8px;
        font-size: 0.62rem;
    }

    .book-article {
        padding-top: 58px;
    }

    .chapter-content {
        font-size: 1rem;
        line-height: 1.78;
    }

    .chapter-content > .lang > p:first-of-type::first-letter {
        font-size: 3.8em;
    }
}
@media (max-width: 720px) {
    .book-message {
        max-width: 88%;
        padding: 0.85em 1em;
        font-size: 0.86em;
    }
}
.book-support {
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.08);
    text-align: center;
}

.book-support p {
    max-width: 36rem;
    margin: 0 auto 1.5rem;
    color: rgba(255,255,255,.82);
    line-height: 1.8;
}

.book-support-link,
.book-support-link:visited {
    display: inline-block;
    color: #00d9ff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: .03em;
    transition: color .25s ease, transform .25s ease;
}

.book-support-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.reader-impression {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 720px;
}

.reader-impression-label {
    margin: 0 0 1rem;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.reader-impression-text,
.reader-impression-note {
    max-width: 620px;
    line-height: 1.7;
}

.reader-impression-text {
    margin: 0 0 0.75rem;
}

.reader-impression-note {
    margin: 0 0 1.75rem;
    opacity: 0.72;
}

.reader-impression-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}