:root {
    color-scheme: light;
    --paper: #faf8f1;
    --surface: #fffdf6;
    --ink: #25332b;
    --muted: #616c61;
    --rule: #d6d9ca;
    --pine: #254f43;
    --accent: #984a32;
    --wash: #eaeede;
    --serif: "STIX Two Text", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
    --sans: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;
    --reading-size: 20px;
}
:root.night {
    color-scheme: dark;
    --paper: #19221f;
    --surface: #202c26;
    --ink: #e0e2d7;
    --muted: #b0bbaf;
    --rule: #414d44;
    --pine: #aad1bb;
    --accent: #e3a68b;
    --wash: #28362e;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .24em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
button, select, input, textarea { background: var(--surface); border: 1px solid var(--rule); border-radius: 3px; padding: .5em .75em; }
button:hover, select:hover { border-color: var(--pine); }
.skip { position: absolute; z-index: 10; left: 1rem; top: -5rem; background: var(--surface); padding: .6rem; }
.skip:focus { top: .6rem; }
.mast { border-top: 3px solid var(--pine); border-bottom: 1px solid var(--rule); }
.mast-inner, .shell, .foot { width: min(calc(100% - 48px), 1080px); margin-inline: auto; }
.mast-inner, .mast nav, .brand, .foot, .foot div, .actions, .section-line, .crumb, .reader-tools, .reader-tools label, .byline, .volumes { display: flex; align-items: center; gap: 1rem; }
.mast-inner { min-height: 73px; justify-content: space-between; }
.brand { gap: .7rem; font: bold clamp(1.2rem, 3vw, 1.65rem)/1.3 var(--serif); }
.mark { position: relative; width: 22px; height: 25px; flex: none; border: 2px solid var(--pine); border-left-width: 5px; border-radius: 3px 1px 1px 3px; }
.mark::after { content: ""; position: absolute; top: -2px; right: 3px; background: var(--accent); width: 5px; height: 12px; clip-path: polygon(0 0,100% 0,100% 100%,50% 76%,0 100%); }
.mast nav { gap: clamp(.75rem, 3vw, 2.2rem); white-space: nowrap; font-size: .9rem; }
.search { position: relative; }
.search summary { list-style: none; }
.search summary::-webkit-details-marker { display: none; }
.search summary:hover { color: var(--accent); }
.search form { position: absolute; z-index: 3; right: 0; top: 2.3rem; width: min(310px, 88vw); padding: 1rem; border: 1px solid var(--rule); background: var(--surface); box-shadow: 0 8px 25px #182a2015; }
.search form div { display: flex; gap: .5rem; margin-top: .4rem; }
.search input { min-width: 0; flex: 1; }
.shell { padding-block: clamp(2rem, 5vw, 4rem); min-height: 65vh; }
h1, h2, h3, .entry-title, .book-info strong { font-family: var(--serif); }
h1 { margin: .35em 0 .55em; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2rem 0 1rem; line-height: 1.35; }
.kicker, .folio, .muted, .source, time, .section-line > span, .byline, .end-note { color: var(--muted); }
.kicker { display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem; letter-spacing: .12em; }
.kicker i { width: 20px; height: 2px; background: var(--accent); }
.feature { display: grid; grid-template-columns: 1.3fr 1fr; overflow: hidden; min-height: 350px; border: 1px solid var(--rule); background: var(--surface); }
.feature-copy { align-self: center; padding: clamp(1.5rem, 5vw, 4.5rem); }
.feature h1 { font-size: clamp(2.7rem, 5.5vw, 4.7rem); }
.feature-copy p, .synopsis { max-width: 42em; color: var(--muted); line-height: 1.9; white-space: normal; }
.actions { flex-wrap: wrap; margin-top: 1.4rem; }
.actions:empty { display: none; }
.button, .primary { display: inline-flex; align-items: center; gap: 1.1rem; border: 0; border-radius: 3px; padding: .65em 1.15em; }
.primary { background: var(--pine); color: var(--paper); }
.primary:hover { color: var(--paper); filter: brightness(1.12); text-decoration: none; }
.resume { color: var(--pine); border-bottom: 1px solid; }
.cover-stage { display: grid; place-items: center; overflow: hidden; padding: 28px; background: repeating-linear-gradient(140deg, transparent 0 7px, #53684c0b 7px 8px), #e2e7d6; }
.binding { width: clamp(135px, 17vw, 200px); aspect-ratio: 2/2.85; position: relative; overflow: hidden; background: #ece6d2; border-radius: 2px 4px 4px 2px; transform: rotate(5deg); box-shadow: 3px 3px 0 #b6b29d, 7px 7px 0 -2px #eee9d7, 12px 18px 23px #28382d40; isolation: isolate; }
.binding::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: linear-gradient(90deg,#28382d35,transparent 80%,#514b3826); }
.cover-title { position: absolute; inset: 8% 10% 8% auto; z-index: 1; writing-mode: vertical-rl; overflow: hidden; color: #223d32; font: bold clamp(20px, 2.8vw, 37px)/1.35 var(--serif); letter-spacing: .1em; }
.sun { position: absolute; left: 24%; top: 32%; width: 23%; aspect-ratio: 1; background: #b96142; border-radius: 50%; }
.ridges, .ridges::after { position: absolute; inset: 48% 0 0; background: #88977d; clip-path: polygon(0 42%,25% 24%,42% 38%,69% 6%,100% 33%,100% 100%,0 100%); }
.ridges::after { content: ""; inset: 25% 0 0; background: #385e4d; transform: scaleX(-1); }
.binding img { width: 100%; height: 100%; object-fit: cover; }
.shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.book-card { display: flex; align-items: center; gap: 1.2rem; padding: 1rem; background: var(--surface); border: 1px solid var(--rule); }
.book-card:hover { border-color: var(--pine); text-decoration: none; }
.book-card .binding, .catalog-head .binding { display: block; flex: none; width: 78px; transform: none; box-shadow: 2px 2px 0 #b6b29d, 4px 5px 9px #28382d18; }
.book-card .cover-title, .catalog-head .cover-title { font-size: 16px; }
.book-info strong { display: block; font-size: 1.2rem; }
.book-info small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .4rem; color: var(--muted); }
.entries, .chapters, .page-navigator { list-style: none; margin: 0; padding: 0; }
.entries, .chapters { border-top: 2px solid var(--pine); }
.entries li { display: grid; grid-template-columns: 7.3rem minmax(0,1fr) minmax(0,auto); align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--rule); padding: 1rem .25rem; }
.entries time, .folio, .byline time { font-variant-numeric: tabular-nums; }
.entries time, .source, .byline, .section-line > span { font-size: .85rem; }
.entry-title { font-size: 1.18rem; }
.source { text-align: right; }
.page-navigator { display: flex; gap: .35rem; flex-wrap: wrap; margin: 1.6rem 0; }
.page-navigator a, .volumes a { display: inline-block; padding: .35em .8em; border: 1px solid var(--rule); }
.page-navigator .current a { background: var(--pine); color: var(--paper); }
.catalog-head { display: flex; align-items: flex-start; gap: clamp(1rem, 3vw, 2.4rem); padding: .4rem 0; }
.catalog-head .binding { width: clamp(80px, 16vw, 146px); }
.section-line { justify-content: space-between; align-items: baseline; }
.volumes { flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; font-size: .9rem; }
.chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.chapters li { border-bottom: 1px solid var(--rule); }
.chapters a { display: flex; gap: 1rem; align-items: baseline; padding: .95rem .25rem; }
.folio { font: .82rem/1.5 monospace; }
.reading-shell { width: min(calc(100% - 44px), 730px); margin: clamp(2rem, 5vw, 4rem) auto; }
.chapter-head { border-bottom: 1px solid var(--rule); padding-bottom: 1.3rem; }
.chapter-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-block: .5em; }
.crumb { flex-wrap: wrap; gap: .55rem; color: var(--pine); font-size: .9rem; }
.reader-tools { justify-content: flex-end; gap: .75rem; padding-top: .75rem; font-size: .85rem; }
.reader-tools label { gap: .35rem; }
.reader-tools button[aria-pressed=true] { background: var(--wash); border-color: var(--pine); }
.prose { font: var(--reading-size)/1.95 var(--serif); margin: 2rem 0 3rem; }
.prose p { margin: .9em 0; }
.reader .prose > p { text-indent: 2em; }
.prose a, .comment-content a { text-decoration: underline; text-underline-offset: .2em; }
.prose img, .prose video, .prose iframe, .comment-list img { max-width: 100%; }
.prose img, .prose video { height: auto; }
.prose pre, .prose table { overflow: auto; max-width: 100%; }
.prose table { display: block; }
.prose blockquote { border-left: 3px solid var(--accent); margin-inline: 0; padding-inline: 1.2em; color: var(--muted); }
.turn-page { display: grid; grid-template-columns: 1fr auto 1fr; gap: .75rem; align-items: center; border-block: 1px solid var(--rule); padding: 1rem 0; }
.turn-page small { display: block; color: var(--muted); }
.turn-page > :last-child { text-align: right; }
.turn-page .back { border: 1px solid var(--rule); padding: .35rem .7rem; }
.end-note { font-size: .85rem; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .comment-list { padding-left: min(3vw, 1.2rem); }
.comment-body { padding-block: .7rem; border-top: 1px solid var(--rule); }
.comment-author .avatar { width: 30px; height: 30px; border-radius: 50%; vertical-align: middle; margin-right: .3rem; }
.comment-meta, .comment-reply { font-size: .8rem; color: var(--muted); }
#comment-form { display: grid; gap: .65rem; }
.identity { display: flex; gap: .8rem; flex-wrap: wrap; }
.identity label { flex: 1 1 165px; }
.identity input, #comment-form textarea { display: block; width: 100%; }
#comment-form button { justify-self: start; }
.foot { border-top: 1px solid var(--rule); padding-block: 1.5rem 2rem; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.foot div { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 650px) {
    .mast-inner, .shell, .foot { width: calc(100% - 32px); }
    .mast-inner { min-height: 62px; }
    .mast nav { gap: .65rem; font-size: .82rem; }
    .feature { grid-template-columns: minmax(0,1fr) minmax(90px,32%); min-height: 230px; }
    .feature-copy { padding: 1.15rem; }
    .feature h1 { font-size: 2.15rem; }
    .feature-copy p { font-size: .9rem; }
    .cover-stage { padding: .65rem; }
    .binding { width: 90%; }
    .cover-title { font-size: clamp(15px,3.8vw,24px); }
    .entries li { grid-template-columns: 1fr auto; gap: .15rem .6rem; }
    .entry-title { grid-column: 1/-1; grid-row: 1; }
    .entries time, .source { font-size: .76rem; }
    .chapters { grid-template-columns: 1fr; }
    .turn-page { font-size: .88rem; }
    .reading-shell { width: calc(100% - 36px); }
}
