﻿body {
    margin: 0;
    font-family: Georgia, serif;
    background: black;
    color: white;
    padding-top: 70px; /* For fixed menu */
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body.copy-locked {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body.copy-locked img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.hero {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 70px);
    min-height: calc(100svh - 70px);

    background:
        linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.32)),
        url('../img/hero-optimized.jpg') center / cover no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    z-index: 2;
}

.content-text {
    position: absolute;
    left: clamp(24px, 7vw, 96px);
    bottom: clamp(34px, 9vh, 92px);
    z-index: 3;
    max-width: min(520px, calc(100% - 48px));
    text-align: left;
}

.content-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(18px, 2vw, 28px);
    line-height: 1.45;
    text-align: center;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.hero-title {
    font-size: clamp(38px, 8vw, 64px);
    font-style: italic;
    margin: 0;
    line-height: 1.08;
}

.hero-author {
    color: white;
    font-size: clamp(19px, 4vw, 28px);
    margin: 0 0 12px;
}

.hero-links a {
    color: white;
    margin: 0 15px;
    font-size: 20px;
    text-decoration: none;
}

.hero-links a:hover {
    text-decoration: underline;
}

.home-chapters {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 20px 76px;
    color: #ddd;
    line-height: 1.6;
}

.home-chapters-section + .home-chapters-section {
    margin-top: 42px;
}

.home-chapters h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(28px, 4vw, 42px);
    font-style: italic;
}

.home-chapter-list {
    columns: 2;
    column-gap: 42px;
    margin: 0;
    padding-left: 24px;
}

.home-chapter-list li {
    break-inside: avoid;
    margin: 8px 0;
}

.home-chapter-list a {
    color: #ddd;
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 188, 126, 0.52);
}

.home-chapter-list a:hover,
.home-chapter-list a:focus {
    color: #fff;
    border-bottom-color: #fff;
}

.found-scroll {
    position: relative;
    display: block;
    max-width: 820px;
    margin: 0 auto;
    padding: 34px clamp(22px, 5vw, 58px);
    color: #3b2413;
    background:
        radial-gradient(circle at 14% 18%, rgba(91, 47, 22, 0.16), transparent 15%),
        radial-gradient(circle at 86% 76%, rgba(91, 47, 22, 0.18), transparent 17%),
        linear-gradient(90deg, rgba(95, 55, 25, 0.2), transparent 8%, transparent 92%, rgba(95, 55, 25, 0.18)),
        repeating-linear-gradient(0deg, rgba(78, 46, 20, 0.045) 0 1px, transparent 1px 12px),
        #d8b87b;
    border: 1px solid rgba(84, 46, 20, 0.55);
    border-radius: 8px 5px 9px 6px;
    box-shadow:
        inset 0 0 34px rgba(83, 45, 18, 0.34),
        0 18px 42px rgba(0, 0, 0, 0.45);
    transform: rotate(-0.6deg);
}

.found-scroll::before,
.found-scroll::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    height: 18px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, rgba(61, 34, 14, 0.28), transparent 62%),
        linear-gradient(90deg, transparent, rgba(255, 232, 169, 0.55), transparent);
    pointer-events: none;
}

.found-scroll::before {
    top: -9px;
}

.found-scroll::after {
    bottom: -9px;
}

.found-scroll h2,
.found-scroll h3,
.found-scroll-heading {
    margin: 0 0 18px;
    color: #2f1b0d;
    font-size: clamp(22px, 3vw, 34px);
    font-style: italic;
    line-height: 1.15;
    text-align: center;
}

.found-scroll h2 span,
.found-scroll h3 span,
.found-scroll-heading span {
    display: block;
    margin-top: 6px;
    font-size: 0.62em;
    font-style: normal;
    font-weight: normal;
}

.found-scroll-text {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 12px;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.72;
    scrollbar-color: rgba(91, 47, 22, 0.62) rgba(255, 232, 169, 0.28);
}

.found-scroll-text p {
    margin: 0 0 1.05em;
}

.found-scroll-text p:last-child {
    margin-bottom: 0;
}

.museum-scroll-card {
    padding: 12px;
    overflow: hidden;
}

.museum-scroll-card:hover {
    transform: none;
}

.found-scroll-compact {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    padding: 20px 18px 22px;
    transform: rotate(-0.45deg);
}

.found-scroll-compact h2 {
    margin-bottom: 12px;
    font-size: clamp(18px, 2vw, 23px);
}

.found-scroll-preview {
    display: block;
    color: #4c2d15;
    font-size: 15px;
    line-height: 1.5;
}

.found-scroll-compact .found-scroll-text {
    max-height: 290px;
    padding-right: 8px;
    font-size: 15px;
    line-height: 1.55;
}

/* Top Navigation Menu */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 18px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.top-nav nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-toggle {
    display: none;
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    color: white;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}

.nav-toggle span::before {
    top: -7px;
}

.nav-toggle span::after {
    top: 7px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 2vw, 24px);
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    padding: 10px clamp(8px, 1vw, 14px);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 6px;
    transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding-top: 58px;
    }

    .top-nav {
        padding: 12px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .nav-toggle {
        display: inline-flex;
        align-self: flex-end;
    }

    .top-nav nav {
        width: 100%;
        display: none;
    }

    .top-nav.menu-open nav {
        display: block;
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        margin-top: 12px;
        padding: 0;
        white-space: normal;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        font-size: 16px;
        padding: 12px 16px;
        display: block;
        text-align: center;
    }

    .hero {
        min-height: calc(100vh - 58px);
        min-height: calc(100svh - 58px);
        padding: 42px 18px 150px;
        background-position: center top;
    }

    .hero-content {
        max-width: 100%;
    }

    .content-text {
        left: 18px;
        right: 18px;
        bottom: 52px;
        max-width: none;
        text-align: center;
    }

    .content-text p {
        font-size: 18px;
    }
}


main {
    padding-top: 20px; /* Additional spacing */
}

.site-footer {
    padding: 18px 16px 14px;
    text-align: center;
    color: #777;
    font-size: 11px;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #aaa;
    text-decoration: underline;
}

.site-footer span {
    margin: 0 7px;
}

.visit-counter {
    display: block;
    margin-top: 8px;
    color: #5f5f5f;
    font-size: 10px;
    letter-spacing: 0;
}

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.legal-page h1 {
    margin-top: 0;
    font-size: clamp(32px, 8vw, 42px);
}

.legal-page h2 {
    margin-top: 34px;
}

.legal-page address {
    color: #0000ee;
    font-style: normal;
}

.legal-page address a {
    color: inherit;
}

.sitemap-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 48px 20px 90px;
    color: #e7e0d5;
    line-height: 1.7;
}

.sitemap-page h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 5vw, 56px);
    font-style: italic;
}

.sitemap-page h2 {
    margin: 36px 0 12px;
    color: #fff;
    font-size: 26px;
}

.sitemap-page a {
    color: #ddd;
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 188, 126, 0.52);
}

.sitemap-page a:hover,
.sitemap-page a:focus {
    color: #fff;
    border-bottom-color: #fff;
}

.sitemap-section ul,
.sitemap-section ol {
    margin: 0;
    padding-left: 24px;
}

.sitemap-section li {
    margin: 8px 0;
}

.museum-page,
.exhibit-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 20px 96px;
    color: #e7e0d5;
    line-height: 1.65;
}

.museum-archive {
    position: relative;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid rgba(214, 188, 126, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 38%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px),
        radial-gradient(circle at 50% 0%, rgba(214, 188, 126, 0.12), transparent 42%),
        #070707;
    box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.72), 0 22px 70px rgba(0, 0, 0, 0.45);
}

.museum-archive::before,
.museum-archive::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214, 188, 126, 0.45), transparent);
}

.museum-archive::before {
    top: 14px;
}

.museum-archive::after {
    bottom: 14px;
}

.museum-kicker {
    margin: 0 0 10px;
    color: #a99567;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.museum-page h1,
.exhibit-page h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(36px, 6vw, 66px);
    font-style: italic;
    line-height: 1.08;
}

.museum-lead {
    max-width: 760px;
    margin: 0 0 38px;
    color: #cfc6b5;
    font-size: clamp(18px, 2vw, 22px);
}

.museum-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.museum-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(214, 188, 126, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        #10100f;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.62);
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.museum-card:hover,
.museum-card:focus {
    border-color: rgba(214, 188, 126, 0.68);
    background-color: #15130f;
    transform: translateY(-2px);
}

.museum-card-image,
.exhibit-image-placeholder {
    position: relative;
    display: block;
    min-height: 168px;
    overflow: hidden;
    border-bottom: 1px solid rgba(214, 188, 126, 0.18);
    background:
        radial-gradient(circle at 22% 24%, rgba(214, 188, 126, 0.22), transparent 20%),
        radial-gradient(circle at 76% 70%, rgba(94, 122, 137, 0.18), transparent 24%),
        linear-gradient(145deg, #22201b, #090909 62%);
}

.museum-card-image::before,
.exhibit-image-placeholder::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(214, 188, 126, 0.25);
    background:
        linear-gradient(90deg, transparent 49%, rgba(214, 188, 126, 0.12) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(214, 188, 126, 0.12) 50%, transparent 51%);
    opacity: 0.8;
}

.museum-card-image::after,
.exhibit-image-placeholder::after {
    content: attr(data-mark);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(231, 224, 213, 0.72);
    font-size: clamp(32px, 7vw, 54px);
    font-style: italic;
}

.museum-card-image-photo {
    background: #090909;
}

.museum-card-image-photo::before,
.museum-card-image-photo::after {
    content: none;
}

.museum-card-image img,
.exhibit-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.museum-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.museum-card h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.museum-scroll-card .found-scroll-heading,
.museum-scroll-card .found-scroll h2 {
    margin: 0 0 12px;
    color: #2f1b0d;
    font-size: clamp(18px, 2vw, 23px);
    font-style: italic;
    line-height: 1.15;
    text-align: center;
}

.museum-scroll-card .found-scroll-heading span,
.museum-scroll-card .found-scroll h2 span {
    display: block;
    margin-top: 6px;
    font-size: 0.62em;
    font-style: normal;
    font-weight: normal;
}

.found-scroll-exhibit {
    margin: 36px auto 18px;
    transform: rotate(-0.35deg);
}

.found-scroll-exhibit .found-scroll-text {
    max-height: none;
    overflow: visible;
}

.museum-caption {
    margin: 0;
    color: #bdb4a5;
    font-size: 15px;
}

.museum-card-link {
    margin-top: auto;
    padding-top: 18px;
    color: #d6bc7e;
    font-size: 14px;
}

.exhibit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: start;
}

.exhibit-image-placeholder {
    min-height: 420px;
    border: 1px solid rgba(214, 188, 126, 0.26);
    box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.66);
}

.exhibit-image {
    margin: 0;
    min-height: 420px;
    border: 1px solid rgba(214, 188, 126, 0.26);
    background: #090909;
    box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.66);
    overflow: hidden;
}

.exhibit-description {
    color: #d8d0c1;
    font-size: 20px;
}

.exhibit-description p {
    margin: 0 0 1.1em;
}

.museum-back-link {
    display: inline-block;
    margin-top: 18px;
    color: #d6bc7e;
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 188, 126, 0.55);
}

.museum-back-link:hover,
.museum-back-link:focus {
    color: #fff;
    border-bottom-color: #fff;
}

.museum-discussion {
    margin-top: 56px;
    padding-top: 30px;
    border-top: 1px solid rgba(214, 188, 126, 0.22);
}

.museum-discussion h2 {
    margin: 0 0 22px;
    color: #fff;
    font-size: clamp(26px, 4vw, 38px);
    font-style: italic;
}

.comments-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 42px;
}

.comments-form label {
    color: #d8d0c1;
}

.comments-form input,
.comments-form textarea {
    padding: 11px 12px;
    background: #0b0b0a;
    border: 1px solid rgba(214, 188, 126, 0.28);
    color: #fff;
    font: inherit;
}

.comments-form textarea {
    min-height: 140px;
    resize: vertical;
}

.comments-form button,
.comment-reply-button {
    align-self: flex-start;
    padding: 10px 14px;
    background: #25221b;
    color: #fff;
    border: 1px solid rgba(214, 188, 126, 0.24);
    cursor: pointer;
    font: inherit;
}

.comments-form button:hover,
.comments-form button:focus,
.comment-reply-button:hover,
.comment-reply-button:focus {
    background: #352f23;
    border-color: rgba(214, 188, 126, 0.5);
}

.comment-status,
.comment-note {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.comment-status {
    min-height: 1.35em;
    color: #d6bc7e;
}

.comment-list-block {
    border-top: 1px solid rgba(214, 188, 126, 0.16);
    padding-top: 24px;
}

.comment-list-block h3 {
    margin: 0 0 22px;
    color: #fff;
    font-size: 23px;
}

.comment-date-group {
    margin-top: 26px;
}

.comment-date {
    margin: 0 0 14px;
    color: #d6bc7e;
    font-size: 1rem;
    font-weight: normal;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.comment-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.comment-meta {
    margin: 0 0 8px;
    color: #aaa;
    font-size: 0.9rem;
}

.comment-author {
    color: #fff;
    font-weight: bold;
}

.comment-text {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.reply-context {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #d6bc7e;
    font-size: 0.9rem;
}

.reply-context.is-hidden {
    display: none;
}

.comments-form .reply-cancel,
.comment-reply-button {
    margin-top: 10px;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.comment-replies {
    margin: 16px 0 0 18px;
    padding: 0 0 0 16px;
    border-left: 1px solid rgba(214, 188, 126, 0.28);
    list-style: none;
}

.comment-replies .comment-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
}

.book-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 48px 20px 90px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.book-page h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 64px);
    font-style: italic;
}

.book-author {
    margin: 10px 0 42px;
    color: #fff;
    font-size: 22px;
    text-align: center;
}

.book-part {
    margin: -24px 0 42px;
    color: #d6bc7e;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.book-intro {
    position: relative;
    color: #ddd;
    font-size: 20px;
    padding: 34px clamp(22px, 5vw, 58px);
}

.book-intro h2 {
    margin: 0 0 22px;
    color: #fff;
    font-size: 30px;
}

.table-of-contents {
    list-style: none;
    margin: 0 0 34px;
    padding: 0;
}

.table-of-contents li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.table-of-contents a,
.table-of-contents .toc-part,
.table-of-contents .toc-inactive {
    display: flex;
    align-items: baseline;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 0;
}

.table-of-contents a {
    color: #ddd;
    text-decoration: none;
}

.table-of-contents a:hover,
.table-of-contents a:focus {
    color: #fff;
}

.table-of-contents .toc-part {
    color: #fff;
    font-weight: bold;
}

.table-of-contents .toc-inactive {
    color: #8f8f8f;
}

.table-of-contents .toc-status {
    color: #666;
    font-size: 0.82em;
    font-style: italic;
}

.table-of-contents .toc-title {
    min-width: 0;
}

.table-of-contents .toc-page {
    flex: 0 0 auto;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}

.book-read-link {
    color: #ddd;
    text-decoration: none;
    border-bottom: 1px solid #777;
}

.book-read-link:hover,
.book-read-link:focus {
    color: #fff;
    border-bottom-color: #fff;
}

.book-intro::before,
.book-intro::after,
.chapter-content::before,
.chapter-content::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18px;
    pointer-events: none;
    opacity: 0.7;
    background:
        radial-gradient(circle at center, rgba(214, 188, 126, 0.72) 0 2px, transparent 3px),
        repeating-linear-gradient(
            to bottom,
            rgba(214, 188, 126, 0.52) 0 1px,
            transparent 1px 16px
        );
    background-size: 18px 28px, 100% 32px;
}

.book-intro::before,
.chapter-content::before {
    left: 0;
    border-left: 1px solid rgba(214, 188, 126, 0.42);
}

.book-intro::after,
.chapter-content::after {
    right: 0;
    border-right: 1px solid rgba(214, 188, 126, 0.42);
}

.chapter-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 42px 20px 90px;
}

@media (min-width: 1100px) and (orientation: landscape) {
    .book-page,
    .chapter-page {
        position: relative;
    }

    .book-page > *,
    .chapter-page > * {
        position: relative;
        z-index: 1;
    }

    .book-page::before,
    .book-page::after,
    .chapter-page::before,
    .chapter-page::after {
        content: "";
        position: fixed;
        top: 96px;
        bottom: 34px;
        width: clamp(60px, calc((100vw - 900px) / 2 - 40px), 176px);
        pointer-events: none;
        opacity: 0.55;
        z-index: 0;
        background:
            radial-gradient(ellipse at 50% 8%, rgba(214, 188, 126, 0.52) 0 9px, transparent 10px 100%),
            radial-gradient(ellipse at 50% 92%, rgba(214, 188, 126, 0.52) 0 9px, transparent 10px 100%),
            radial-gradient(ellipse at 28% 50%, transparent 0 34px, rgba(214, 188, 126, 0.34) 35px 36px, transparent 37px 100%),
            radial-gradient(ellipse at 72% 50%, transparent 0 34px, rgba(214, 188, 126, 0.34) 35px 36px, transparent 37px 100%),
            radial-gradient(circle at 50% 50%, rgba(214, 188, 126, 0.68) 0 2px, transparent 3px 100%),
            linear-gradient(to right, transparent 48%, rgba(214, 188, 126, 0.4) 49%, rgba(214, 188, 126, 0.4) 51%, transparent 52%);
        background-size:
            100% 168px,
            100% 168px,
            100% 112px,
            100% 112px,
            100% 42px,
            100% 100%;
        background-position:
            center top,
            center bottom,
            center 26px,
            center 82px,
            center top,
            center top;
        background-repeat: repeat-y;
        mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    }

    .book-page::before,
    .chapter-page::before {
        left: clamp(20px, calc((100vw - 900px) / 2 - 204px), 104px);
    }

    .book-page::after,
    .chapter-page::after {
        right: clamp(20px, calc((100vw - 900px) / 2 - 204px), 104px);
        transform: scaleX(-1);
    }
}

.chapter-content {
    position: relative;
    max-width: 720px;
    margin: 44px auto;
    padding: 28px clamp(22px, 5vw, 58px);
    color: #e7e0d5;
    font-size: 22px;
    line-height: 1.85;
}

.chapter-kicker {
    margin: 0 0 10px;
    color: #999;
    font-size: 16px;
    letter-spacing: 0;
}

.chapter-content h1 {
    margin: 0 0 38px;
    color: #fff;
    font-size: clamp(34px, 5vw, 56px);
    font-style: italic;
    line-height: 1.15;
}

.chapter-content h2 {
    margin: 0 0 34px;
    color: #fff;
    font-size: clamp(30px, 4vw, 48px);
    font-style: italic;
    line-height: 1.15;
}

.chapter-content p {
    margin: 0 0 1.25em;
}

.chapter-image {
    margin: 46px auto 0;
    max-width: 520px;
}

.chapter-image-wide {
    width: min(1040px, calc(100vw - 40px));
    max-width: min(1040px, calc(100vw - 40px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.chapter-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.chapter-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.chapter-nav-bottom {
    margin-top: 56px;
}

.chapter-nav-link {
    color: #bdbdbd;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid #333;
    padding: 9px 12px;
    text-align: center;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.chapter-nav-link:hover,
.chapter-nav-link:focus {
    color: #fff;
    border-color: #777;
    background-color: rgba(255, 255, 255, 0.06);
}

.chapter-nav-prev {
    justify-self: start;
}

.chapter-nav-home {
    justify-self: center;
}

.chapter-nav-next {
    justify-self: end;
}

.chapter-nav-disabled {
    color: #777;
    border-color: #242424;
    cursor: default;
}

.chapter-nav-disabled:hover,
.chapter-nav-disabled:focus {
    color: #777;
    border-color: #242424;
    background-color: transparent;
}

@media (max-width: 600px) {
    .home-chapter-list {
        columns: 1;
    }

    .book-page,
    .chapter-page,
    .legal-page,
    .museum-page,
    .exhibit-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .book-author {
        margin-bottom: 30px;
        font-size: 19px;
    }

    .book-intro {
        padding: 26px 18px;
        font-size: 18px;
    }

    .book-intro h2 {
        font-size: 25px;
    }

    .chapter-content {
        margin: 32px auto;
        padding: 24px 18px;
        font-size: 19px;
        line-height: 1.75;
    }

    .chapter-nav {
        grid-template-columns: 1fr;
    }

    .chapter-nav-prev,
    .chapter-nav-home,
    .chapter-nav-next {
        justify-self: stretch;
    }
}

@media (max-width: 980px) {
    .museum-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exhibit-layout {
        grid-template-columns: 1fr;
    }

    .exhibit-image-placeholder,
    .exhibit-image {
        min-height: 320px;
    }
}

@media (max-width: 560px) {
    .museum-archive {
        padding: 28px 18px;
    }

    .museum-grid {
        grid-template-columns: 1fr;
    }

    .museum-card-image {
        min-height: 150px;
    }

    .exhibit-description {
        font-size: 18px;
    }

    .reply-context {
        align-items: flex-start;
        flex-direction: column;
    }
}
