:root {
    color: #26231f;
    background: #f5f1e8;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
    line-height: 1.65;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

a { color: #7a2f24; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    background: #fffdf8;
    border-bottom: 1px solid #ded7ca;
}

.header-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand { color: #26231f; font-weight: 750; font-size: 1.18rem; }

.search { display: flex; width: min(420px, 55vw); }
.search input {
    min-width: 0;
    flex: 1;
    border: 1px solid #cfc6b7;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    padding: 9px 11px;
    font: inherit;
    background: white;
}
.search button, .button {
    border: 1px solid #7a2f24;
    border-radius: 0 6px 6px 0;
    padding: 9px 16px;
    background: #7a2f24;
    color: white;
    font: inherit;
    cursor: pointer;
}

main { min-height: calc(100vh - 150px); padding: 38px 0 64px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0 0 4px; font-size: 1.75rem; }
.page-heading p, .meta, .latest, .crumb, .reader-heading p { color: #6d655b; }

.book-list { display: grid; gap: 20px; }
.book-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 22px;
    padding: 20px;
    border: 1px solid #ded7ca;
    border-radius: 10px;
    background: #fffdf8;
}
.cover-link img, .detail-cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 5px 18px rgba(48, 38, 28, .14);
}
.book-card h2 { margin: 2px 0 5px; font-size: 1.35rem; }
.book-card p { margin: 7px 0; }
.eyebrow { color: #8a6b3d; font-size: .78rem; letter-spacing: .08em; }
.intro-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    white-space: pre-line;
}

.book-detail {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: 34px;
}
.book-detail h1 { margin: 4px 0 8px; font-size: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.button { display: inline-block; border-radius: 6px; }
.button:hover { text-decoration: none; filter: brightness(.95); }
.button.secondary { color: #7a2f24; background: transparent; }
.intro-full { margin-top: 38px; padding-top: 20px; border-top: 1px solid #d8d0c2; }
.intro-full p { white-space: pre-line; }

.crumb { margin-bottom: 20px; font-size: .92rem; }
.chapter-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #d8d0c2; }
.chapter-list li {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 4px;
    border-bottom: 1px solid #d8d0c2;
}
.chapter-list span { color: #81786d; white-space: nowrap; font-size: .88rem; }

.reader { width: min(760px, 100%); margin: 0 auto; }
.reader-heading { text-align: center; margin: 26px 0 42px; }
.reader-heading h1 { margin-bottom: 8px; font-size: clamp(1.55rem, 4vw, 2rem); }
.chapter-content { font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: 1.12rem; line-height: 1.95; }
.chapter-content p { margin: 0 0 1.25em; text-indent: 2em; }
.reader-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 50px;
    padding-top: 22px;
    border-top: 1px solid #d8d0c2;
    text-align: center;
}
.reader-nav a:first-child { text-align: left; }
.reader-nav a:last-child { text-align: right; }

.empty, .error-page { padding: 32px; border: 1px dashed #c8bdad; border-radius: 8px; }
.site-footer { padding: 20px 0; color: #7b7268; border-top: 1px solid #ded7ca; font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 620px) {
    .header-row { align-items: stretch; flex-direction: column; gap: 12px; padding: 15px 0; }
    .search { width: 100%; }
    main { padding-top: 26px; }
    .book-card { grid-template-columns: 86px 1fr; gap: 15px; padding: 14px; }
    .book-detail { grid-template-columns: 110px 1fr; gap: 18px; }
    .book-detail h1 { font-size: 1.55rem; }
    .intro-clamp { -webkit-line-clamp: 4; }
    .chapter-content { font-size: 1.06rem; }
}
