﻿
:root {
    color-scheme: dark light;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    background: #111;
    color: #eee;
}

.header {
    position: sticky;
    top: 0;
    background: #111;
    border-bottom: 1px solid #333;
    padding: .5rem .75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

    .header h1 {
        font-size: 1rem;
        margin: 0;
        font-weight: 600;
    }

    .header .muted {
        color: #bbb;
        font-size: .9rem;
    }

.btn {
    background: #333;
    color: #eee;
    border: 1px solid #444;
    padding: .25rem .5rem;
    border-radius: 6px;
    cursor: pointer;
}

    .btn:hover {
        background: #3a3a3a;
    }

.pages {
    padding: .75rem;
}

.page {
    margin: 0 auto 1rem;
    max-width: 1000px;
    background: #1a1a1a;
    padding: .5rem;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .85rem;
    color: #bbb;
    margin-bottom: .35rem;
}

.ph {
    width: 100%;
    aspect-ratio: 8.5/11;
    background: linear-gradient(90deg,#2a2a2a, #343434, #2a2a2a);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Fade-in images when loaded; do NOT use display:none */
.page img {
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity .2s ease-in;
    border-radius: 6px;
    background: #222;
    display: block;
}

    .page img.loaded {
        opacity: 1;
    }

.empty {
    margin: 2rem auto;
    max-width: 800px;
    background: #1a1a1a;
    border: 1px dashed #444;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: #ccc;
}
