:root {
  --paper: #fcfbf8;
  --ink: #4b3225;
  --muted: #79695d;
  --line: #d9cfc4;
  --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;
  --sans: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --gutter: 56px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 26px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 18px/1.8 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; border-radius: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .35; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
h1, h2, h3 { font-family: var(--serif); }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
::selection { background: #e2d9ce; }
[hidden] { display: none !important; }
.wrap { width: calc(100% - var(--gutter)*2); max-width: 1600px; margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: fixed; z-index: 30; top: -100px; left: 20px; background: var(--paper); padding: 10px; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-header { min-height: 108px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { width: 28px; height: auto; }
.site-header nav { display: flex; gap: 40px; }
.site-header nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 20px; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 45px; padding: 70px 0 88px; }
.hero h1 { font-size: clamp(80px,10.8vw,168px); line-height: 1.1; letter-spacing: .08em; white-space: nowrap; margin-left: -.035em; }
.hero-side { padding-bottom: 8px; font-size: 20px; line-height: 1.9; }
.collection-head { border-top: 1px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 21px 0 22px; }
.collection-heading { display: flex; align-items: baseline; gap: 36px; }
.collection-heading h2 { font-size: clamp(30px,3.1vw,44px); line-height: 1.4; white-space: nowrap; }
.search { width: 126px; }
.search input { width: 100%; min-width: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 5px 0; background: none; font-size: 16px; }
.search input:focus { border-bottom-color: var(--line); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.alphabet { display: flex; gap: 12px; align-items: center; }
.alphabet button { min-height: 44px; min-width: 26px; padding: 5px 2px; border-bottom: 1px solid transparent; font-size: 16px; color: var(--muted); }
.alphabet button[data-letter=all] { min-width: 44px; }
.alphabet button[aria-pressed=true] { color: var(--ink); border-bottom-color: currentColor; }
.alphabet button:hover { color: var(--ink); }
.book-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 70px 52px; padding-top: 18px; }
.book-card { min-width: 0; }
.book-link { display: block; }
.cover-stage { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.cover-stage img { width: auto; height: 92%; max-width: 90%; object-fit: contain; transition: transform .55s cubic-bezier(.2,.6,.3,1); }
.book-link:hover .cover-stage img, .book-link:focus-visible .cover-stage img { transform: scale(1.025); }
.book-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.book-meta h3 { font-size: clamp(28px,2.5vw,36px); line-height: 1.4; letter-spacing: .03em; }
.book-title { font-size: 18px; white-space: nowrap; }
.catalog-bottom { padding: 48px 0 25px; text-align: center; }
.text-link { display: inline-block; padding: 5px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.text-link:hover { border-bottom-color: var(--ink); }
.empty { padding: 55px 0; font-size: 24px; }
.empty .muted { font-size: 17px; }
.contact { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 40px; padding: 70px 0 68px; margin-top: 58px; border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(30px,3.1vw,44px); }
.contact-links { display: flex; align-items: baseline; gap: 44px; font-size: 20px; }
.contact-links a, .wechat-contact button { min-height: 44px; }
.contact-links a:hover, .wechat-contact button:hover { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.wechat-contact { display: flex; align-items: baseline; gap: 16px; }
.wechat-contact button { font-family: var(--sans); }
.copy-status { grid-column: 2; font-size: 14px; min-height: 0; color: var(--muted); }
.copy-status:empty { display: none; }
.site-footer { border-top: 1px solid var(--ink); padding: 28px 0 38px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.site-footer a, .work-note summary { display: inline-flex; align-items: center; min-height: 40px; }
.work-note { margin-top: 8px; }
.work-note summary { list-style: none; cursor: pointer; }
.work-note summary::-webkit-details-marker { display: none; }
.work-note summary:hover { text-decoration: underline; text-underline-offset: 5px; }
.work-note p { margin-top: 10px; font-size: 14px; }
.section { padding: 90px 0; }
/* Reading pages keep the same quiet hierarchy. */
.reader-header { border-bottom: 1px solid var(--line); }
.reader-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 50px; padding: 38px 0 33px; }
.reader-title { display: flex; align-items: baseline; gap: 35px; }
.reader-title h1 { font-size: 50px; line-height: 1.4; }
.reader-title p { font-size: 20px; }
.download { flex-shrink: 0; text-align: right; }
.download a { font-size: 16px; }
.download small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-block: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: var(--paper); }
.page-controls { display: flex; align-items: center; gap: 22px; }
.page-controls button, .zoom-button { min-height: 44px; font-size: 16px; }
.page-controls button:hover:not(:disabled), .zoom-button:hover { text-decoration: underline; text-underline-offset: 6px; }
.page-picker { display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; }
.page-picker select { background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 5px 9px; min-height: 38px; }
.reader-stage { margin-top: 20px; padding: 24px; overflow: auto; overscroll-behavior-x: contain; scrollbar-color: #b1a296 var(--paper); }
.page-image { width: min(100%,760px); height: auto; margin: auto; background: var(--paper); }
.reader-stage.zoomed .page-image { width: 1200px; max-width: none; margin: 0 auto; }
.reader-caption { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); padding: 16px 0; }
.bottom-navigation { display: flex; justify-content: center; gap: 42px; padding: 8px 0 28px; }
.bottom-navigation button { padding: 8px 0; min-height: 44px; font-size: 16px; }
.text-reader { border-block: 1px solid var(--line); padding: 18px 0; margin: 10px 0 20px; }
.text-reader summary { cursor: pointer; font-size: 16px; list-style: none; min-height: 36px; }
.text-reader summary::-webkit-details-marker { display: none; }
.text-reader summary:hover { text-decoration: underline; text-underline-offset: 5px; }
.page-text { padding: 25px 0; font: 21px/2.1 var(--serif); white-space: pre-line; max-width: 36em; margin: auto; }
.reader-error { padding: 18px; border: 1px solid var(--line); }
.reader-tail { display: flex; align-items: baseline; justify-content: space-between; gap: 25px; padding: 20px 0 50px; font-size: 16px; }
.reader-tail a { min-height: 44px; }
@media (min-width:1700px) { .book-grid { gap: 90px; } .hero { padding: 95px 0 110px; } }
@media (max-width:1050px) {
  :root { --gutter: 36px; }
  .hero h1 { font-size: clamp(76px,10.8vw,118px); }
  .hero-side { font-size: 18px; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 58px 40px; }
  .collection-head { flex-wrap: wrap; gap: 10px; }
  .collection-heading { width: 100%; justify-content: space-between; }
  .alphabet { gap: 13px; }
  .contact { grid-template-columns: 1fr; gap: 24px; }
  .copy-status { grid-column: 1; }
}
@media (max-width:700px) {
  :root { --gutter: 20px; }
  .site-header { min-height: 84px; }
  .site-header nav { gap: 28px; }
  .site-header nav a { font-size: 18px; }
  .logo img { width: 25px; }
  .hero { display: block; padding: 46px 0 58px; }
  .hero h1 { font-size: clamp(54px,14vw,94px); letter-spacing: .1em; margin-left: 0; }
  .hero-side { padding: 25px 0 0; font-size: 18px; line-height: 1.9; }
  .hero-side br { display: none; }
  .hero-side p { letter-spacing: .015em; }
  .collection-head { padding: 18px 0 10px; }
  .collection-heading { align-items: center; }
  .collection-heading h2 { font-size: 30px; }
  .search { width: 98px; }
  .search input { font-size: 15px; text-align: right; }
  .alphabet { width: 100%; justify-content: space-between; gap: 0; }
  .alphabet button { font-size: 14px; min-width: 24px; }
  .alphabet button[data-letter=all] { min-width: 36px; }
  .book-grid { gap: 42px 26px; }
  .book-meta { padding: 17px 0 15px; }
  .book-meta h3 { font-size: 30px; }
  .book-title { font-size: 18px; }
  .catalog-bottom { padding-top: 32px; }
  .contact { padding: 46px 0 42px; margin-top: 34px; gap: 20px; }
  .contact h2 { font-size: 30px; }
  .contact-links { gap: 22px; flex-wrap: wrap; font-size: 18px; }
  .wechat-contact { width: 100%; gap: 20px; }
  .copy-status { font-size: 13px; }
  .site-footer { font-size: 12px; padding: 24px 0 30px; }
  .work-note p { font-size: 13px; }
  .reader-intro { gap: 24px; padding: 26px 0; align-items: center; }
  .reader-title { display: block; }
  .reader-title h1 { font-size: 38px; }
  .reader-title p { font-size: 17px; margin-top: 5px; }
  .download a { font-size: 14px; }
  .download small { font-size: 11px; }
  .reader-toolbar { gap: 14px; padding: 7px 0; }
  .page-controls { gap: 15px; }
  .page-controls button, .zoom-button { font-size: 14px; }
  .page-picker { gap: 4px; font-size: 12px; }
  .page-picker select { padding: 4px; }
  .reader-stage { padding: 10px 0; margin: 12px calc(-1*var(--gutter)) 0; }
  .reader-caption { font-size: 12px; }
  .reader-caption span:last-child { display: none; }
  .page-image { width: 100%; }
  .reader-stage.zoomed .page-image { width: 950px; }
  .reader-tail { padding-bottom: 28px; font-size: 15px; }
}
@media (max-width:600px) {
  .book-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 12px; }
  .cover-stage { max-width: 440px; margin-inline: auto; }
  .book-meta h3 { font-size: 32px; }
}
@media (max-width:360px) { .alphabet button { min-width: 21px; } .page-controls { gap: 9px; } .zoom-button { font-size: 13px; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none!important; animation: none!important; } }
