/* =========================================================
   MACLOST — READER
   ========================================================= */

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.reader-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    padding: 32px 30px;
    border-right: 1px solid var(--line);
    background: var(--paper);
    z-index: 10;
}

.reader-sidebar-brand {
    margin-bottom: 55px;
    font-size: 22px;
    letter-spacing: 0.24em;
    font-weight: 300;
}

.reader-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.reader-sidebar-nav a {
    font-size: 11px;
    letter-spacing: 0.14em;
    transition: opacity 0.2s ease;
}

.reader-sidebar-nav a:hover {
    opacity: 0.55;
}


/* ---------------------------------------------------------
   GŁÓWNA PRZESTRZEŃ READERA
   --------------------------------------------------------- */

.reader-layout {
    margin-left: 220px;
    min-height: 100vh;
}

.reader {
    min-height: 100vh;
    padding: 55px 5vw 50px;
    background: var(--paper);
}


/* ---------------------------------------------------------
   NAGŁÓWEK ROZDZIAŁU
   --------------------------------------------------------- */

.reader-header {
    max-width: 1100px;
    margin: 0 auto 30px;
    text-align: center;
}

.reader-eyebrow {
    margin: 0 0 20px;
    font-size: 11px;
    letter-spacing: 0.28em;
}

.reader-title {
    margin: 0 0 12px;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0.06em;
}

.reader-chapter {
    margin: 0;
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 15px;
    color: var(--muted);
}

.reader-chapter-number {
    display: inline-block;
    margin-right: 10px;
}


/* ---------------------------------------------------------
   KARTKA
   --------------------------------------------------------- */

.reader-page {
    box-sizing: border-box;
    width: min(980px, 92vw);
    margin: 0 auto;
    padding: 64px 100px;
    background: var(--white);
    border: 1px solid var(--line);
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.005em;
}

.reader-page p {
    margin: 0 0 14px;
}

.reader-page p:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   NAWIGACJA STRON
   --------------------------------------------------------- */

.reader-navigation {
    width: min(1050px, 94vw);
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.14em;
}

.reader-navigation > .reader-edge {
    display: block;
}

.reader-navigation > .reader-edge:first-child {
    text-align: left;
}

.reader-prev {
    justify-self: start;
}

.reader-page-number {
    color: var(--muted);
}

.reader-next,
.reader-edge:last-child {
    justify-self: end;
}

.reader-navigation a {
    transition: opacity 0.2s ease;
}

.reader-navigation a:hover {
    opacity: 0.55;
}


/* ---------------------------------------------------------
   BRAK TŁUMACZENIA
   --------------------------------------------------------- */

.twor-translation-missing {
    margin: 20px 0 0;
    text-align: center;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .reader-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px 5vw;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .reader-sidebar-brand {
        margin-bottom: 20px;
    }

    .reader-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px 22px;
    }

    .reader-layout {
        margin-left: 0;
    }

    .reader {
        padding: 45px 5vw 50px;
    }

    .reader-header {
        margin-bottom: 40px;
    }

    .reader-page {
        width: 100%;
        padding: 42px 28px;
        font-size: 15px;
        line-height: 1.7;
    }

    .reader-page p {
        margin-bottom: 12px;
    }

    .reader-navigation {
        width: 100%;
    }
}
