img.page-preview {
    border: 1px solid #ddd;
    background: white;
    cursor: zoom-in;
    border-collapse: collapse;
    margin: 1px;
}
blockquote + hr {
    clear: both;
    border: 0;
}
div.preview-gallery, iframe.zui {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top:0;
    max-height: 100vh;
    max-width: 100vw;
    z-index: 100;
    background: white;
    border: 1px solid black;
}
iframe.zui {
    height: 100vh;
    width: calc(min(80vw, 800px));
    outline: 5px solid #666;
}
div.preview-gallery > img {
    max-height: 100vh;
    max-width: 100vw;
    cursor: zoom-out;
}
div.preview-gallery > img.hidden {
    display: none;
}
div.preview-gallery > div.prev {
    left:0;
    text-align: left;
}
div.preview-gallery > div.next {
    right: 0;
    text-align: right;
}
div.preview-gallery > div.nav {
    user-select: none;
    display: none;
    position: absolute;
    top: 0;
    bottom:0;
    width: 10%;
    background: rgba(200, 200, 200, 0.45);
    font-size: 10vh;
    padding-top: 50%;
    cursor: pointer;
}
div.preview-gallery:hover > div.nav {
    display: block;
}
div.preview-gallery > button.invert {
    visibility: hidden;
    display: none;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}
div.preview-gallery:hover > button.invert {
    visibility: visible;
}
@media screen and (prefers-color-scheme: dark) {
    body:not(.light) div.preview-gallery > button.invert {
        display: block;
    }
}
@media screen {
    body.dark div.preview-gallery > button.invert {
        display: block;
    }
}
textarea.bibtex {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100vw;
    max-height: 100vh;
}
ol.all-pages {
    display: grid;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    max-width: fit-content;
}
ol.all-pages > li {
    display: inline-block;
    grid-row: 1;
    border: 1px solid black;
    cursor: zoom-in;
    width: fit-content;
}
ol.all-pages > li ol.subsections {
    padding-left: 2ch;
}
ol.all-pages > li ol.subsections li {
    clear: both;
}
ol.all-pages > li ol.subsections img {
    display: none;
    float: right;
    max-width: 20%;
    border: 1px solid black;
}
ol.all-pages > li ol.subsections img + br {
    display: none;
}
summary > br:first-child {
    display: none;
}
ol.all-pages summary {
    cursor: pointer;
}
