/* Chapter reader: placeholder box shown behind each page image while it
   loads, so the strip doesn't collapse to blank space / jump around as
   images arrive. No per-page width/height is known ahead of time, so we
   reserve a generic portrait aspect-ratio (matches auth-collage.css) until
   the real image loads, then let it fall back to its natural size. */
.reader-page-ph {
    position: relative;
    background: rgb(var(--c-white) / 0.04);
    overflow: hidden;
}

.reader-page-ph:not(.is-loaded) {
    aspect-ratio: 2 / 3;
}

.reader-page-ph:not(.is-loaded)::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgb(var(--c-white) / 0.03) 0%,
            rgb(var(--c-white) / 0.09) 50%,
            rgb(var(--c-white) / 0.03) 100%);
    animation: reader-page-ph-sweep 1.6s ease-in-out infinite;
}

@keyframes reader-page-ph-sweep {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.reader-page-ph img.reader-page {
    transition: opacity .25s ease;
}

.reader-page-ph:not(.is-loaded) img.reader-page {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}

/* Comments (components/zmio-comments) under the chapter on phones: full-bleed —
   the wrapper's gutter and the frame's rounded hairline go, the thread runs
   edge to edge; only the heading keeps the gutter. Wider screens keep the
   framed card (index.php #rd-comments-anchor). */
@media (max-width: 767.98px) {
    #rd-comments-anchor {
        padding-left: 0;
        padding-right: 0;
    }

    #rd-comments-anchor .zc>h2 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #rd-comments-anchor .zc-frame {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}
