
/* 《合法隐瞒》V1.5 单页正文阅读器 */
#reader-app {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: none;
    overflow: hidden;
    background:
        linear-gradient(rgba(0,0,0,.80), rgba(0,0,0,.80)),
        url("../images/home-desktop.jpg") center center / cover fixed no-repeat,
        #090909;
}

#reader-app.visible {
    display: block;
}

.reader-spa-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 54px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(225,225,225,.13);
    background: rgba(9,9,9,.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.reader-spa-topbar button {
    border: 0;
    background: transparent;
    color: rgba(185,185,185,.58);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: .08em;
    cursor: pointer;
}

.reader-spa-topbar button:hover,
.reader-spa-topbar button:focus-visible {
    color: #f2f2f2;
    outline: none;
}

.reader-topbar-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 14px;
}

.reader-chapter-picker {
    position: relative;
    justify-self: center;
}

#reader-chapter-button {
    max-width: min(52vw, 520px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-liked-picker {
    position: relative;
    justify-self: end;
}

.reader-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    min-width: 280px;
    max-height: min(70vh, 560px);
    overflow: auto;
    display: none;
    padding: 8px;
    border: 1px solid rgba(225,225,225,.14);
    background: rgba(15,15,15,.98);
    box-shadow: 0 18px 60px rgba(0,0,0,.50);
}

.reader-dropdown.open {
    display: block;
}

.reader-chapter-picker .reader-dropdown {
    left: 50%;
    transform: translateX(-50%);
}

.reader-liked-picker .reader-dropdown {
    right: 0;
}

.reader-dropdown button {
    width: 100%;
    display: block;
    padding: 10px 12px;
    text-align: left;
    color: rgba(205,205,205,.70);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: .04em;
}

.reader-dropdown button:hover,
.reader-dropdown button.active {
    color: #fff;
    background: rgba(255,255,255,.045);
}

.reader-dropdown .empty {
    padding: 14px 12px;
    color: rgba(180,180,180,.48);
    font-size: 12px;
    line-height: 1.7;
}

.reader-spa-scroll {
    position: absolute;
    inset: 55px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.reader-spa-shell {
    width: min(100% - 40px, 780px);
    margin: 0 auto;
    padding: 64px 0 96px;
}

.reader-spa-head {
    padding-bottom: 25px;
    margin-bottom: 42px;
    border-bottom: 1px solid rgba(225,225,225,.13);
}

.reader-spa-kicker {
    margin: 0 0 12px;
    color: rgba(185,185,185,.54);
    font-size: 11px;
    letter-spacing: .18em;
}

#reader-title {
    margin: 0;
    color: rgba(242,242,242,.96);
    font-size: clamp(25px, 3.8vw, 38px);
    font-weight: 400;
    letter-spacing: .07em;
}

.reader-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 20px;
}

.reader-tools button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(225,225,225,.14);
    background: transparent;
    color: rgba(190,190,190,.58);
    font-size: 11px;
    letter-spacing: .06em;
    cursor: pointer;
}

.reader-tools button:hover,
.reader-tools button.active,
.reader-tools button.manual {
    color: #f2f2f2;
    border-color: rgba(235,235,235,.28);
}

#reader-like .heart {
    display: inline-block;
    margin-right: 5px;
}

.reader-paragraph {
    position: relative;
}

.reader-paragraph p {
    margin: 0 0 1.15em;
    color: rgba(222,222,222,.88);
    font-size: 17px;
    line-height: 1.95;
    letter-spacing: .02em;
    text-align: justify;
    text-justify: inter-ideograph;
}

.reader-spa-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid rgba(225,225,225,.13);
}

.reader-spa-bottom button {
    border: 0;
    background: transparent;
    color: rgba(185,185,185,.54);
    font-size: 12px;
    cursor: pointer;
}

#reader-prev {
    justify-self: start;
    text-align: left;
}

#reader-next {
    justify-self: end;
    text-align: right;
}

.reader-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 90;
    transform: translate(-50%, 10px);
    padding: 10px 14px;
    border: 1px solid rgba(225,225,225,.14);
    background: rgba(18,18,18,.96);
    color: rgba(235,235,235,.9);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.reader-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 768px) {
    #reader-app {
        background:
            linear-gradient(rgba(0,0,0,.80), rgba(0,0,0,.80)),
            url("../images/home-mobile.jpg") center center / cover fixed no-repeat,
            #090909;
    }

    .reader-spa-topbar {
        min-height: 50px;
        padding: 0 12px;
    }

    .reader-spa-topbar button {
        font-size: 10px;
    }

    .reader-topbar-left {
        gap: 8px;
    }

    #reader-chapter-button {
        max-width: 36vw;
    }

    .reader-dropdown {
        min-width: min(86vw, 320px);
        max-height: 64vh;
    }

    .reader-spa-scroll {
        inset: 51px 0 0;
    }

    .reader-spa-shell {
        width: min(100% - 34px, 780px);
        padding: 46px 0 72px;
    }

    #reader-title {
        font-size: 27px;
    }

    .reader-paragraph p {
        font-size: 16px;
        line-height: 1.9;
        text-align: left;
    }

    .reader-liked-picker .reader-dropdown {
        right: -4px;
    }
}
