#reading-room {
    position: fixed;
    inset: 0;
    z-index: 30;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    box-sizing: border-box;
    margin: 0;
    padding: clamp(6px, 1.8vmin, 24px);
    border: 0;
    background: #121a15d9;
    color: #fff4d8;
}

#reading-room[open] {
    display: flex;
    justify-content: center;
}

.reading-room-interior {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(100%, 1800px);
    min-width: 0;
    overflow: auto;
    border: 1px solid #d6ad6e;
    border-radius: 18px;
    background:
        linear-gradient(180deg, #160e08cf 0%, transparent 28%, transparent 46%, #20110bb3 100%),
        url('/harian-assets/pondok/central-library-narmada-v2.webp') center / cover no-repeat,
        #302219;
    box-shadow: 0 16px 45px #0009;
}

.reading-room-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(14px, 3vmin, 36px);
}

#reading-room-title {
    margin: 0;
    color: #fff2d1;
    font: 600 clamp(30px, 5vmin, 64px)/1.04 Georgia, serif;
    text-shadow: 0 2px 8px #170d07;
}

#reading-room-link-note {
    margin: 6px 0 0;
    color: #fff4d8;
    font-size: 14px;
    text-shadow: 0 1px 4px #170d07;
}

.reading-room-collection {
    display: grid;
    justify-items: center;
    gap: clamp(8px, 1.6vmin, 18px);
    padding: 0 12px clamp(10px, 2.4vmin, 26px);
}

.reading-room-shelves {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid #b68e5b;
    border-radius: 16px;
    background: #211b15f2;
}

#reading-room :is(button, .reading-room-catalog) {
    min-height: 44px;
    padding: 7px 13px;
    border: 1px solid #caa770;
    border-radius: 8px;
    background: #23473b;
    color: #fff5da;
    font: 700 14px/1.25 system-ui, sans-serif;
}

#reading-room button[aria-pressed="true"] {
    background: #f2d9a6;
    color: #2c2116;
}

#reading-room :is(a, button):focus-visible {
    outline: 3px solid #ffe08b;
    outline-offset: 3px;
}

#reading-room-books {
    display: flex;
    justify-content: center;
    width: min(100%, 510px);
    gap: clamp(7px, 1.8vmin, 22px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.reading-book {
    flex: 0 1 154px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reading-book[hidden] { display: none; }

.reading-book-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-height: clamp(122px, 19dvh, 210px);
    padding: 15px 13px 19px 18px;
    box-sizing: border-box;
    border: 1px solid #e1bd75;
    border-radius: 3px 8px 8px 3px;
    background: linear-gradient(90deg, #0006 0 7%, transparent 8%), var(--book-color);
    box-shadow: 4px 0 #ede1c9, 5px 0 #a4875d, 6px 7px 10px #130a07bd;
    color: #fff3d3;
    text-align: center;
    text-decoration: none;
}

.reading-book-cover::before {
    content: '';
    position: absolute;
    inset: 6px 6px 6px 11px;
    border: 1px solid #e6c48b99;
    border-radius: 3px;
    pointer-events: none;
}

.reading-book-cover:hover { filter: brightness(1.22); }
.reading-book-cover strong { font: 700 clamp(13px, 2.2vmin, 21px)/1.11 Georgia, serif; }
.reading-book-arabic { color: #ffe3a6; font: 600 clamp(15px, 2.8vmin, 27px)/1.25 Georgia, serif; }
.reading-book-arrow { position: absolute; bottom: 8px; inset-inline-end: 10px; color: #ffe3a6; font-size: 12px; }
.reading-book-emerald { --book-color: #1a4e3d; }
.reading-book-indigo { --book-color: #283958; }
.reading-book-burgundy { --book-color: #6b2c3c; }
.reading-book-teal { --book-color: #195459; }

.reading-book-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 8px;
    padding: 0 4px;
    border-radius: 6px;
    background: #211b15f2;
}

.reading-book-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: #fff4d8;
    font-size: 13px;
}

#reading-room .reading-room-catalog { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
#reading-room .reading-room-catalog:hover { text-decoration: underline; }

@media (max-width: 620px) {
    .reading-room-interior {
        gap: 100px;
        background-size: auto 390px;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .reading-room-shelves { width: 100%; box-sizing: border-box; }
    #reading-room .reading-room-shelves button { flex: 1 0 auto; min-width: 0; padding-inline: 8px; }
    .reading-book-cover { padding-inline: 12px 8px; }
    .reading-book-actions a { min-height: 44px; }
}
