@font-face {
    font-family: "Source Serif 4";
    src:
        url("../fonts/source-serif-4/source-serif-4-v14-latin-ext-regular.woff2")
        format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Source Serif 4";
    src:
        url("../fonts/source-serif-4/source-serif-4-v14-latin-ext-600.woff2")
        format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

/*
 * Gemeinsamer Bereich für Inhaltsverzeichnis und Leseprobe
 */

.book-preview-area {
    padding-top: 1rem;
    padding-bottom: 4rem;
}

.book-page {
    position: relative;

    width: 100%;
    max-width: 820px;
    min-height: 1050px;

    margin-right: auto;
    margin-left: auto;
    padding: 5rem 5.5rem 6rem;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.025),
            transparent 8%,
            transparent 92%,
            rgba(0, 0, 0, 0.02)
        ),
        #fbfaf6;

    border: 1px solid rgba(70, 65, 55, 0.18);
    border-radius: 2px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.06),
        0 18px 45px rgba(0, 0, 0, 0.12);

    color: #292722;

    font-family:
        "Source Serif 4",
        Georgia,
        "Times New Roman",
        serif;
}

.book-running-title {
    margin-bottom: 2rem;

    color: #8b6f4a;

    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.4;

    text-align: center;
    text-transform: uppercase;
}

.book-page-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.book-title {
    margin-top: 0;
    margin-bottom: 0.7rem;

    font-family: inherit;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.2;
}

.book-subtitle {
    margin: 0;

    color: #625e57;

    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5;
}

.book-page-number {
    position: absolute;
    right: 0;
    bottom: 2.1rem;
    left: 0;

    color: #777168;

    font-size: 0.9rem;
    line-height: 1;

    text-align: center;
}

.book-preview-navigation {
    width: 100%;
    max-width: 820px;

    margin: 1.75rem auto 0;
}

/*
 * Inhaltsverzeichnis
 */

.toc-section {
    margin-top: 2.8rem;
}

.toc-section:first-of-type {
    margin-top: 0;
}

.toc-entry {
    display: grid;
    grid-template-columns: auto minmax(1rem, 1fr) auto;
    gap: 0.55rem;
    align-items: end;

    margin-bottom: 0.85rem;

    font-size: 1.04rem;
    line-height: 1.45;
}

.toc-entry-heading {
    margin-top: 1.5rem;
}

.toc-entry-heading:first-child {
    margin-top: 0;
}

.toc-entry-heading .toc-entry-title {
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;

    /* text-transform: uppercase; */
}

.toc-entry-level-2 {
    padding-left: 1.35rem;

    color: #4d4943;

    font-size: 0.98rem;
}

.toc-entry-level-3 {
    padding-left: 2.7rem;

    color: #66615a;

    font-size: 0.94rem;
}

.toc-entry-title {
    min-width: 0;
}

.toc-entry-dots {
    min-width: 1rem;
    overflow: hidden;

    color: #a29c91;

    white-space: nowrap;
}

.toc-entry-dots::before {
    content:
        "................................................................................................................";

    letter-spacing: 0.08em;
}

.toc-entry-page {
    min-width: 2ch;
    text-align: right;
}

/*
 * Leseprobe
 */

.book-reading-sample {
    font-size: 1.08rem;
    line-height: 1.75;
}

.book-reading-sample p {
    margin-top: 0;
    margin-bottom: 1.25em;
    text-indent: 0;
}

.book-chapter-title {
    margin-top: 0;
    margin-bottom: 2.5rem;

    font-family: inherit;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 600;
    line-height: 1.25;

    text-align: left;
}
.preview-note {
    max-width: 820px;      /* derselbe Wert wie .book-page */
    margin: 0 auto 2rem;
}
/*
 * Tablet und Smartphone
 */

@media (max-width: 767.98px) {
    .book-preview-area {
        padding-top: 0.5rem;
        padding-bottom: 2.5rem;
    }

    .book-page {
        min-height: auto;

        padding: 2.75rem 1.5rem 5rem;

        border-right: 0;
        border-left: 0;
        border-radius: 0;

        box-shadow:
            0 3px 10px rgba(0, 0, 0, 0.05),
            0 8px 24px rgba(0, 0, 0, 0.09);
    }

    .book-running-title {
        margin-bottom: 2.5rem;

        font-size: 0.75rem;
    }

    .book-page-header {
        margin-bottom: 2.75rem;
    }

    .book-subtitle {
        font-size: 1rem;
    }

    .toc-section {
        margin-top: 2.25rem;
    }

    .toc-entry {
        gap: 0.35rem;

        margin-bottom: 0.9rem;

        font-size: 0.98rem;
    }

    .toc-entry-heading {
        margin-top: 1.5rem;
    }

    .toc-entry-heading:first-child {
        margin-top: 0;
    }

    .toc-entry-heading .toc-entry-title {
        font-size: 1rem;
        letter-spacing: 0.025em;
        line-height: 1.35;
    }

    .toc-entry-level-2 {
        padding-left: 0.75rem;

        font-size: 0.93rem;
    }

    .toc-entry-level-3 {
        padding-left: 1.5rem;

        font-size: 0.9rem;
    }

    .book-preview-navigation {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }
}
