@font-face {
  font-family: "Pavilion Serif";
  src: url("assets/serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f7f2e9; --paper-light: #fbf7ef; --paper-2: #eee6d8; --paper-3: #e4d8c4; --input: #f7f0e3;
  --ink: #272621; --ink-2: #4f4639; --quiet: #625a50; --ink-3: #8a7f70;
  --red: #922e26; --red-dark: #73221b; --red-soft: rgba(146, 46, 38, .08);
  --line: #d8cdbb; --line-2: #b9a283; --head-bg: rgba(248, 243, 233, .97); --head-line: #ded4c3;
  --jin: #9a7735; --jin-soft: rgba(154, 119, 53, .13); --dai: #2e4b5e; --now: rgba(201, 160, 72, .2);
  --glow-1: rgba(226, 178, 82, .34); --glow-2: rgba(240, 206, 130, .16); --glow-ring: rgba(176, 124, 36, .5);
  --glow-halo: rgba(232, 176, 70, .5); --glow-sweep: rgba(255, 246, 214, .85);
  --shadow: 0 10px 24px #39261717; --shadow-2: 0 22px 85px #2a201d59;
  --serif: "Pavilion Serif", "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  --jing: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Noto Serif SC", "Songti SC", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --edge: clamp(24px, 5.55vw, 88px);
  --jing-size: 1.42rem; --zh-size: 1rem; --max: 780px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191813; --paper-light: #211f19; --paper-2: #2a2720; --paper-3: #36312a; --input: #24211b;
  --ink: #ece3d0; --ink-2: #d0c5ae; --quiet: #b2a891; --ink-3: #8e8573;
  --red: #cf5e4c; --red-dark: #b84d3c; --red-soft: rgba(207, 94, 76, .12);
  --line: #3b362d; --line-2: #5e5443; --head-bg: rgba(25, 24, 19, .96); --head-line: #33302a;
  --jin: #d6b46d; --jin-soft: rgba(214, 180, 109, .13); --dai: #93b4c7; --now: rgba(214, 180, 109, .15);
  --glow-1: rgba(214, 170, 80, .26); --glow-2: rgba(214, 170, 80, .1); --glow-ring: rgba(226, 186, 104, .55);
  --glow-halo: rgba(230, 180, 80, .38); --glow-sweep: rgba(255, 230, 170, .28);
  --shadow: 0 10px 28px rgba(0, 0, 0, .4); --shadow-2: 0 22px 85px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --paper: #191813; --paper-light: #211f19; --paper-2: #2a2720; --paper-3: #36312a; --input: #24211b;
    --ink: #ece3d0; --ink-2: #d0c5ae; --quiet: #b2a891; --ink-3: #8e8573;
    --red: #cf5e4c; --red-dark: #b84d3c; --red-soft: rgba(207, 94, 76, .12);
    --line: #3b362d; --line-2: #5e5443; --head-bg: rgba(25, 24, 19, .96); --head-line: #33302a;
    --jin: #d6b46d; --jin-soft: rgba(214, 180, 109, .13); --dai: #93b4c7; --now: rgba(214, 180, 109, .15);
  --glow-1: rgba(214, 170, 80, .26); --glow-2: rgba(214, 170, 80, .1); --glow-ring: rgba(226, 186, 104, .55);
  --glow-halo: rgba(230, 180, 80, .38); --glow-sweep: rgba(255, 230, 170, .28);
    --shadow: 0 10px 28px rgba(0, 0, 0, .4); --shadow-2: 0 22px 85px rgba(0, 0, 0, .6);
  }
}
:root[data-size="0"] { --jing-size: 1.2rem; --zh-size: .92rem; }
:root[data-size="2"] { --jing-size: 1.7rem; --zh-size: 1.12rem; }
:root[data-size="3"] { --jing-size: 2.05rem; --zh-size: 1.25rem; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; font: 1rem/1.6 var(--sans); color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
::selection { background: #932f27; color: #fff; }
svg { fill: currentColor; }
main { display: block; outline: none; }
.wrap { width: min(100% - var(--edge) * 2, 1272px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 60; left: 16px; top: 16px; padding: 10px 16px; background: var(--paper-light); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.masthead { position: sticky; top: 0; z-index: 20; color: var(--ink); background: var(--head-bg); border-bottom: 1px solid var(--head-line); transition: transform .25s ease; }
.masthead.hide { transform: translateY(-100%); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 11px; justify-self: start; }
.brand-seal {
  display: grid; place-items: center; position: relative; flex: none; width: 36px; height: 36px; border-radius: 2px 3px 2px 3px;
  color: #fff4da; font: 700 21px/1 var(--serif);
  background: linear-gradient(105deg, transparent 38%, rgba(255, 236, 196, .62) 50%, transparent 62%) no-repeat, var(--red);
  background-size: 320% 100%, auto; background-position: 140% 0, 0 0;
  animation: seal-shine 7s ease-in-out 1.2s infinite;
}
@keyframes seal-shine { 0%, 72% { background-position: 140% 0, 0 0; } 100% { background-position: -40% 0, 0 0; } }
@keyframes seal-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 176, 70, 0); } 50% { box-shadow: 0 0 14px 4px rgba(232, 176, 70, .7); } }
body.playing .masthead .brand-seal { animation: seal-shine 2.4s ease-in-out infinite, seal-glow 2.4s ease-in-out infinite; }
.brand-seal::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(255, 240, 215, .68); border-radius: 1px 2px 0 2px; }
.brand-type { font: 800 1.22rem/1.14 var(--serif); letter-spacing: .13em; white-space: nowrap; }
.brand-type small { display: block; font: 650 .64rem/1 var(--sans); letter-spacing: .13em; margin-top: 5px; color: var(--quiet); }
.main-nav { display: flex; height: 100%; align-items: stretch; gap: clamp(26px, 3.6vw, 59px); }
.main-nav a { position: relative; display: grid; align-items: center; color: var(--ink-2); font-size: .9rem; letter-spacing: .09em; white-space: nowrap; }
.main-nav a[aria-current], .main-nav a:hover { color: var(--red); }
.main-nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--red); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-block-size: 42px; padding: 0 12px;
  color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 2px; font-size: .88rem;
}
.icon-button:hover { background: var(--paper-2); color: var(--red); }
.icon-button svg, .button svg, .book-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.motion-button, .theme-button { padding: 0; width: 42px; }
.search-button { border-color: var(--line); padding-inline: 12px 14px; white-space: nowrap; }
.play-icon, [data-motion="paused"] .pause-icon { display: none; }
[data-motion="paused"] .play-icon { display: inline; }
.hero { position: relative; isolation: isolate; overflow: hidden; background: #ecd7b4; border-bottom: 1px solid #dcccaf; }
.hero-art, .hero-glaze, .mist { position: absolute; inset: 0; pointer-events: none; }
.hero-art { background: url("assets/pavilion.webp") 50% 20% / cover no-repeat; animation: landscape-drift 25s ease-in-out infinite alternate; transform-origin: 71% 46%; }
.hero-glaze {
  background: linear-gradient(90deg, rgba(248, 235, 209, .74), rgba(247, 231, 202, .51) 28%, rgba(244, 223, 185, .05) 62%, transparent),
              linear-gradient(0deg, rgba(218, 184, 131, .16), transparent 18%);
}
.mist {
  inset: 28% -18% -7% 31%; opacity: .46; filter: blur(9px); animation: mist-drift 16s ease-in-out infinite alternate;
  background:
    radial-gradient(ellipse 34% 13% at 48% 78%, rgba(255, 248, 224, .9), transparent 96%),
    radial-gradient(ellipse 29% 9% at 64% 66%, rgba(255, 249, 229, .84), transparent 96%),
    radial-gradient(ellipse 28% 11% at 34% 57%, rgba(255, 248, 220, .75), transparent 96%);
}
@keyframes landscape-drift { from { transform: scale(1.001); } to { transform: scale(1.045); } }
@keyframes mist-drift { from { transform: translateX(-6%); opacity: .24; } to { transform: translateX(5%); opacity: .68; } }
.hero-inner { position: relative; display: grid; align-items: center; min-height: clamp(496px, 39vw, 620px); padding-block: 55px 73px; }
.hero-copy { max-width: 38rem; animation: ink-appear 950ms ease-out both; }
@keyframes ink-appear { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--red); font-size: .875rem; font-weight: 650; letter-spacing: .17em; }
.eyebrow span { width: 23px; height: 1px; background: currentColor; }
.hero h1 { margin: 19px 0 22px; font: 800 clamp(3.375rem, 5.15vw, 5.125rem)/1.18 var(--serif); letter-spacing: .035em; color: #24231e; }
.hero h1 span { color: #922e26; }
.hero .eyebrow { color: #922e26; }
.hero-description { margin: 0; color: #4f4639; line-height: 1.95; font-size: 1rem; letter-spacing: .035em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.hero-cont { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: .85rem; color: #5c4a34; }
.hero-cont a { padding: 5px 11px; border: 1px solid #c8b391; border-radius: 2px; background: rgba(249, 234, 206, .45); color: #3d3226; }
.hero-cont a:hover { border-color: #922e26; color: #73221b; }
.hero-cont b { font-weight: 650; }
.button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 19px;
  border: 1px solid; border-radius: 2px; font-weight: 620; font-size: .94rem; line-height: 1.35; letter-spacing: .055em; white-space: nowrap;
  transition: background 180ms, color 180ms, border-color 180ms; background: transparent;
}
.button-primary { color: #fff7e9; border-color: var(--red); background: var(--red); }
.button-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button-outline { border-color: #8a7359; background: rgba(249, 234, 206, .32); color: #3d3226; }
.button-outline:hover { color: #73221b; border-color: #922e26; background: #f2e2c6; }
.button-ghost { border-color: var(--line-2); color: var(--ink); }
.button-ghost:hover { border-color: var(--red); color: var(--red); background: var(--paper-2); }
.button .fill { fill: currentColor; stroke: none; }
.scroll-cue { position: absolute; bottom: 23px; left: 0; display: inline-flex; align-items: center; gap: 9px; padding: 5px 4px 5px 0; color: #5c4a34; font-size: .81rem; letter-spacing: .13em; border: 0; background: none; }
.scroll-cue span { display: inline-block; width: 1px; height: 18px; background: currentColor; transform-origin: top; animation: scroll-cue 2.8s ease-in-out infinite; }
@keyframes scroll-cue { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
.scroll-cue:hover { color: #922e26; }
:root[data-theme="dark"] .hero { background: #2a251c; border-color: #3b362d; }
:root[data-theme="dark"] .hero-art { filter: brightness(.6) saturate(.8); }
:root[data-theme="dark"] .hero-glaze { background: linear-gradient(90deg, rgba(25, 24, 19, .88), rgba(25, 24, 19, .6) 34%, rgba(25, 24, 19, .1) 70%, transparent); }
:root[data-theme="dark"] .hero h1 { color: #f1e8d4; }
:root[data-theme="dark"] .hero-description, :root[data-theme="dark"] .hero-cont, :root[data-theme="dark"] .scroll-cue { color: #d6cab1; }
:root[data-theme="dark"] .button-outline, :root[data-theme="dark"] .hero-cont a { color: #efe4cc; background: rgba(25, 24, 19, .4); border-color: #8a7359; }
.collection { padding-block: 63px 79px; }
.collection-header { display: flex; gap: 26px; flex-wrap: wrap; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.collection h2 { margin: 8px 0 6px; font: 800 clamp(2.2rem, 3.5vw, 3rem)/1.18 var(--serif); letter-spacing: .08em; }
.section-description { margin: 9px 0 0; color: var(--quiet); }
.filters { display: flex; flex-wrap: wrap; gap: 3px; border: 1px solid var(--line); padding: 4px; border-radius: 3px; }
.filters button { border: 1px solid transparent; border-radius: 2px; padding: 6px 13px; min-width: 40px; background: transparent; font-size: .9rem; color: var(--ink-2); }
.filters button:hover { background: var(--paper-2); color: var(--red); }
.filters button[aria-pressed="true"] { background: var(--red); color: #fff6e5; border-color: var(--red); }
.books-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2.2vw, 30px); }
.book-card {
  display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; color: var(--ink);
  text-align: left; background: var(--paper-light); transition: transform 240ms ease, border-color 240ms, box-shadow 240ms;
}
.book-card:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.book-art { position: relative; display: block; aspect-ratio: 1.75; overflow: hidden; background: #2f3429; }
.book-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.book-card:hover .book-art img, .book-card:hover .scroll { transform: scale(1.055); }
.category-tag { position: absolute; left: 13px; top: 13px; z-index: 2; padding: 4px 9px; border-radius: 2px; color: #fdf4e1; background: #28251fe0; border: 1px solid #ffffff38; font-size: .81rem; min-width: 46px; text-align: center; letter-spacing: .08em; }
.vol-tag { position: absolute; right: 13px; top: 13px; z-index: 2; padding: 3px 8px; border-radius: 2px; color: #3d3226; background: #f7ecd6e6; font-size: .78rem; letter-spacing: .08em; }
.book-details { position: relative; display: grid; gap: 4px; padding: 17px 63px 19px 17px; }
.book-name { font: 800 clamp(1.12rem, 1.6vw, 1.4rem)/1.3 var(--serif); letter-spacing: .06em; }
.book-meta { color: var(--quiet); font-size: .84rem; letter-spacing: .03em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-icon { display: grid; place-items: center; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 50%; width: 36px; height: 36px; color: var(--red); }
.book-icon svg { width: 16px; height: 16px; }
.book-card:hover .book-icon { background: var(--red); color: #fff; border-color: var(--red); }
.grid-empty { color: var(--quiet); padding: 30px 0; }
.scroll {
  position: absolute; inset: 0; display: block; transition: transform 500ms ease;
  background-color: var(--sc, #e8dcc4);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(110, 80, 40, .2) 46px 47px),
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(90% 70% at 80% 100%, rgba(120, 85, 40, .22), transparent 70%);
}
.scroll::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 40px rgba(90, 60, 25, .28); }
.scroll-t {
  position: absolute; right: 9%; top: 11%; height: 78%; writing-mode: vertical-rl; color: #2c2419;
  font: 700 clamp(1.1rem, 1.7vw, 1.45rem)/1.5 var(--kai); letter-spacing: .08em;
}
.scroll-t.long { font-size: clamp(.95rem, 1.35vw, 1.15rem); }
.scroll-s { position: absolute; right: calc(9% + 5.2em); top: 13%; height: 74%; writing-mode: vertical-rl; color: rgba(60, 45, 25, .55); font: 400 .78rem/1.7 var(--kai); letter-spacing: .18em; overflow: hidden; }
.scroll-seal { position: absolute; left: 9%; bottom: 13%; width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid #b0402f; color: #b0402f; font: 700 15px/1 var(--serif); border-radius: 2px; transform: rotate(-4deg); opacity: .85; }
.sc0 { --sc: #e8dcc4; } .sc1 { --sc: #e3e1d3; } .sc2 { --sc: #ead6c0; } .sc3 { --sc: #dfe2d3; } .sc4 { --sc: #e9dccf; } .sc5 { --sc: #e6d9b9; }
.reading { position: relative; isolation: isolate; overflow: hidden; background: #273330; color: #f7eddb; text-align: center; }
.reading::before {
  content: ""; pointer-events: none; position: absolute; z-index: -1; inset: 0; filter: saturate(.38); opacity: .31;
  background: linear-gradient(90deg, #26332e 6%, #26332ed6 43%, #26332e44), url("assets/pavilion.webp") center 34% / cover;
}
.reading-inner { padding-block: 67px 70px; }
.reading .eyebrow { justify-content: center; color: #ede0c9; }
.reading figure { margin: 20px 0 26px; }
.reading blockquote { margin: 0; font: 700 clamp(1.65rem, 4vw, 3rem)/1.5 var(--serif); letter-spacing: .09em; }
.reading blockquote br.b1 { display: none; }
.reading .verse-zh { max-width: 40em; margin: 14px auto 0; color: #e7dac2; font: 400 1rem/1.8 var(--kai); letter-spacing: .04em; }
.reading figcaption { margin-top: 13px; color: #e0d0b5; font-size: .9rem; letter-spacing: .1em; }
.reading-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button-reading { color: #fbf1de; border-color: #b9aa91; background: #26332e59; }
.button-reading:hover { background: #e5d4b6; color: #29332c; }
.reading :focus-visible { outline-color: #fbebcd; }
.footer { display: flex; align-items: center; gap: 23px; min-height: 91px; padding-block: 18px; color: var(--quiet); font-size: .84rem; border-top: 1px solid var(--line); }
.footer-brand { color: var(--ink); gap: 8px; flex: none; }
.footer-brand .brand-seal { width: 26px; height: 26px; font-size: 15px; }
.footer-brand .brand-type { font-size: 1rem; }
.footer p { margin: 0; line-height: 1.7; }
.footer-link { margin-inline-start: auto; white-space: nowrap; color: var(--red); }
.footer-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.footer-mail { color: inherit; }
.footer-mail:hover { color: var(--red); text-decoration: underline; text-underline-offset: .25em; }
body.playing .footer { padding-bottom: 130px; }
.library-dialog {
  color: var(--ink); background: var(--paper-light); border: 1px solid var(--line-2); border-radius: 5px; padding: 0;
  width: min(calc(100% - 32px), 630px); max-height: calc(100% - 32px); box-shadow: var(--shadow-2); overscroll-behavior: contain;
}
.library-dialog::backdrop { background: #25241ebe; backdrop-filter: blur(4px); }
body:has(.library-dialog[open]) { overflow: hidden; }
.library-dialog__inner { position: relative; padding: clamp(20px, 5vw, 40px); }
.library-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-inline-end: 43px; }
.library-dialog h2 { margin: 5px 0 10px; font: 800 clamp(1.9rem, 5vw, 2.6rem)/1.25 var(--serif); letter-spacing: .06em; }
.library-close { display: inline-grid; place-items: center; color: var(--red); background: transparent; border: 1px solid var(--line); border-radius: 2px; min-height: 39px; min-width: 39px; font-size: 1.4rem; line-height: 1; flex: none; }
.library-close:hover { border-color: var(--red); background: var(--paper-2); }
.library-dialog .library-close { position: absolute; top: 16px; right: 16px; }
.library-search { width: 100%; margin-top: 14px; color: var(--ink); background: var(--input); border: 1px solid var(--line-2); border-radius: 2px; padding: 12px; }
.library-status { margin: 8px 0 14px; font-size: .875rem; color: var(--quiet); }
.library-results { display: grid; gap: 8px; }
.library-result { display: block; width: 100%; padding: 12px 14px; text-align: left; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 2px; }
.library-result:hover { background: var(--paper-2); border-color: var(--line-2); }
.library-kicker { display: block; font-size: .78rem; color: var(--red); font-weight: 650; letter-spacing: .12em; }
.library-result b { display: block; font: 750 1.1rem/1.4 var(--serif); }
.library-result small { display: block; margin-top: 2px; color: var(--quiet); font-size: .86rem; }
.library-empty { color: var(--quiet); }
.book-page { padding-block: 44px 70px; }
.bk-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 54px); align-items: center; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.bk-head .book-art { border: 1px solid var(--line); border-radius: 3px; }
.bk-head h1 { margin: 10px 0 8px; font: 800 clamp(2rem, 4vw, 3rem)/1.22 var(--serif); letter-spacing: .06em; }
.bk-sub { margin: 0 0 4px; color: var(--ink-2); }
.bk-meta { margin: 0 0 22px; color: var(--quiet); font-size: .86rem; letter-spacing: .05em; }
.bk-act { display: flex; flex-wrap: wrap; gap: 12px; }
.toc { columns: 2 320px; column-gap: 40px; padding-top: 30px; }
.toc-ch { break-inside: avoid; margin: 0 0 26px; }
.toc-ch h2 { margin: 0 0 8px; font: 750 1.05rem/1.4 var(--serif); color: var(--red); letter-spacing: .1em; display: flex; align-items: center; gap: 10px; }
.toc-ch h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.toc-s { display: block; padding: 10px 12px; margin: 0 -12px; border-radius: 2px; border: 1px solid transparent; }
.toc-s:hover { background: var(--paper-2); border-color: var(--line); }
.toc-s b { font: 700 1.02rem/1.45 var(--jing); }
.toc-s small { display: block; margin-top: 2px; color: var(--quiet); font-size: .8rem; line-height: 1.55; }
.toc-s.read b::after { content: "· 读过"; margin-left: 8px; font: 400 .72rem var(--sans); color: var(--jin); }
.toc-s.cur { background: var(--red-soft); border-color: var(--line); }
.rbar {
  position: sticky; top: 76px; z-index: 15; display: flex; align-items: center; gap: 4px; padding: 6px var(--edge);
  background: var(--head-bg); border-bottom: 1px solid var(--head-line); transition: top .25s ease;
}
body.mast-hidden .rbar { top: 0; }
.rbar .icon-button { width: 40px; padding: 0; }
.rbar .icon-button svg { fill: currentColor; stroke: none; }
.rbar-t { flex: 1; min-width: 0; text-align: center; font-size: .86rem; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; }
.rbar-t b { color: var(--ink); font: 700 .95rem var(--serif); }
.rbar .listen { min-height: 38px; padding: 6px 14px; font-size: .86rem; }
.rbar .listen svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.listen .i-pause, .listen.on svg:first-child { display: none; }
.listen.on .i-pause { display: inline; }
.listen.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.cl.gatha br.b1 { display: none; }
.article { max-width: var(--max); margin: 0 auto; padding: 40px 24px 40px; }
.sec-head { text-align: center; margin: 0 0 36px; }
.sec-head small { display: block; color: var(--red); font-size: .84rem; font-weight: 650; letter-spacing: .2em; margin-bottom: 8px; }
.sec-head h1 { margin: 0; font: 800 clamp(1.7rem, 4.4vw, 2.5rem)/1.35 var(--serif); letter-spacing: .1em; }
.orn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; color: var(--red); }
.orn::before, .orn::after { content: ""; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--red)); }
.orn::after { transform: scaleX(-1); }
.orn i { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.sub { margin: 40px 0 18px; font: 750 calc(var(--jing-size) * .86)/1.4 var(--serif); letter-spacing: .1em; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.sub::before { content: ""; width: 4px; height: 1.1em; background: var(--red); border-radius: 1px; }
.para { margin: 0 0 22px; }
.u { position: relative; padding: 6px 10px 8px 14px; margin: 0 -10px 4px -14px; border-radius: 3px; cursor: pointer; transition: background .3s; }
.u::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 1px; background: transparent; transition: background .3s; }
.u:hover { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
.u.sel { background: var(--paper-2); }
.u.now {
  background: linear-gradient(90deg, var(--glow-1), var(--glow-2));
  box-shadow: 0 0 0 1px var(--glow-ring), 0 0 18px 2px var(--glow-halo);
  animation: now-breathe 2.4s ease-in-out infinite;
}
.u.now::before { background: var(--red); width: 4px; box-shadow: 0 0 10px 1px var(--red); animation: bar-glow 2.4s ease-in-out infinite; }
@keyframes bar-glow { 0%, 100% { box-shadow: 0 0 4px 0 var(--red); } 50% { box-shadow: 0 0 14px 3px var(--red); } }
.u.now::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, var(--glow-sweep) 50%, transparent 65%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0; animation: now-sweep 1.3s ease-out .05s 1 both;
}
.u.now.side-cl .zh, .u.now.side-zh .cl { opacity: .55; transition: opacity .3s; }
.sub.now { color: var(--red); }
@keyframes now-breathe {
  0%, 100% { box-shadow: 0 0 0 1px var(--glow-ring), 0 0 8px 0 var(--glow-halo); }
  50% { box-shadow: 0 0 0 1.5px var(--glow-ring), 0 0 28px 6px var(--glow-halo); }
}
@keyframes now-sweep { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.cl { margin: 0; font-family: var(--jing); font-size: var(--jing-size); line-height: 2.45; letter-spacing: .06em; color: var(--ink); text-align: justify; }
.cl ruby { ruby-position: over; }
.cl rt { font: 500 .5em/1.2 var(--sans); letter-spacing: 0; color: var(--quiet); user-select: none; -webkit-user-select: none; }
.zh { margin: 2px 0 0; font-family: var(--kai); font-size: var(--zh-size); line-height: 1.85; color: var(--ink-2); }
.u.now.side-zh .zh { color: var(--ink); text-decoration: underline 1px var(--jin); text-underline-offset: 5px; }
.prose { margin: 0; font-size: calc(var(--zh-size) * 1.02); line-height: 1.95; color: var(--ink); text-indent: 2em; }
.mantra .cl { color: var(--dai); letter-spacing: .14em; }
.mantra-k { display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 6px; padding: 2px 10px; border: 1px solid var(--red); border-radius: 2px; font-size: .78rem; color: var(--red); letter-spacing: .2em; }
.cm { border-bottom: 1.5px dotted var(--jin); cursor: help; }
.cm:hover { background: var(--jin-soft); }
.glyph { height: .95em; width: auto; vertical-align: -.1em; }
:root[data-theme="dark"] .glyph { filter: invert(.9) sepia(.2); }
.guide { margin: 14px 0 22px; padding: 12px 16px; border-inline-start: 3px solid var(--red); background: var(--paper-2); font-size: .95rem; color: var(--ink-2); }
.guide b { display: block; font-size: .76rem; letter-spacing: .3em; color: var(--red); margin-bottom: 4px; }
.guide p { margin: 0 0 6px; line-height: 1.85; }
.guide p:last-child { margin-bottom: 0; }
figure.fig { margin: 24px 0; text-align: center; }
figure.fig img { margin: 0 auto; height: auto; border: 1px solid var(--line); background: #fff; }
figure.fig figcaption { font-size: .8rem; color: var(--quiet); margin-top: 6px; }
.endnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: var(--max); margin: 10px auto 50px; padding: 0 24px; }
.endnav a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-light); transition: border-color .2s, box-shadow .2s; }
.endnav a:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.endnav small { display: block; color: var(--red); font-size: .76rem; letter-spacing: .15em; }
.endnav b { font: 700 1rem var(--serif); }
.endnav .nx { text-align: right; grid-column: 2; }
body.m-cl .zh, body.m-zh .cl { display: none; }
body.m-zh .u .zh { color: var(--ink); font-size: calc(var(--zh-size) * 1.08); }
body.nopy .cl rt { display: none; }
body.nopy .cl { line-height: 1.9; }
body.noguide .guide { display: none; }
.viewbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: -14px 0 30px; font-size: .82rem; color: var(--quiet); }
.viewbar > span { letter-spacing: .1em; margin-right: 2px; }
.viewbar button { border: 1px solid var(--line); background: transparent; border-radius: 2px; padding: 4px 12px; color: var(--quiet); letter-spacing: .06em; }
.viewbar button:hover { border-color: var(--red); color: var(--red); }
.viewbar button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff6e5; }
.viewbar button[aria-pressed="true"]::before { content: "✓ "; }
body.vert.m-cl .viewbar { display: none; }
@media (max-width: 630px) { .viewbar { gap: 4px; } .viewbar button { padding: 4px 8px; letter-spacing: 0; } .viewbar > span { margin-right: 0; } }
.rd { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; max-width: 1240px; margin: 0 auto; padding-inline: var(--edge); }
.rd .article { margin: 0 auto; width: 100%; }
.side-toc {
  position: sticky; top: 140px; align-self: start; max-height: calc(100vh - 160px); overflow-y: auto; overscroll-behavior: contain;
  margin-top: 34px; padding: 4px 4px 24px 22px; border-left: 1px solid var(--line);
}
body.mast-hidden .side-toc { top: 70px; max-height: calc(100vh - 90px); }
.side-h { display: flex; align-items: baseline; gap: 10px; padding: 0 0 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.side-h b { font: 800 1.05rem var(--serif); letter-spacing: .12em; color: var(--red); }
.side-h small { color: var(--quiet); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-toc .toc-ch { margin-bottom: 14px; }
.side-toc .toc-ch h2 { font-size: .9rem; margin: 12px 0 4px; }
.side-toc .toc-s { padding: 6px 10px; margin: 0 -10px; }
.side-toc .toc-s b { font-size: .92rem; }
.side-toc .toc-s small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .74rem; }
.side-toc .toc-s.cur { background: var(--red-soft); border-color: var(--red); }
.side-toc .toc-s.cur b { color: var(--red); }
@media (min-width: 1101px) { #tocBtn { display: none; } body.vert.m-cl #tocBtn { display: inline-flex; } }
@media (max-width: 1100px) { .rd { display: block; padding-inline: 0; } .side-toc { display: none; } }
body.vert.m-cl .rd { display: block; max-width: none; padding-inline: 0; }
body.vert.m-cl .side-toc { display: none; }
body.nonotes .cm { border-bottom: 0; cursor: inherit; }
body.vert.m-cl .article {
  writing-mode: vertical-rl; width: 100%; max-width: none; height: calc(100dvh - 76px - 51px - 24px); overflow-x: auto; overflow-y: hidden;
  padding: 26px var(--edge); margin: 0; overscroll-behavior-x: contain;
}
body.vert.m-cl.mast-hidden .article { height: calc(100dvh - 51px - 24px); }
body.vert.m-cl.playing .article { height: calc(100dvh - 76px - 51px - 130px); }
body.vert.m-cl .cl { line-height: 2.5; text-align: start; }
body.vert.m-cl .u { padding: 14px 8px 10px; margin: 0 0 0 4px; }
body.vert.m-cl .u::before { top: 0; bottom: auto; left: 10px; right: 10px; width: auto; height: 3px; }
body.vert.m-cl .para { margin: 0 0 0 22px; }
body.vert.m-cl .sec-head { margin: 0 0 0 38px; }
body.vert.m-cl .orn { flex-direction: column; }
body.vert.m-cl .orn::before, body.vert.m-cl .orn::after { width: 1px; height: 50px; background: linear-gradient(180deg, transparent, var(--red)); }
body.vert.m-cl .sub { margin: 0 34px 0 18px; }
body.vert.m-cl .sub::before { width: 1.1em; height: 4px; }
body.vert.m-cl .guide { border-inline-start: 0; border-top: 3px solid var(--red); margin: 0 14px 0 22px; max-height: 26em; }
body.vert.m-cl .endnav, body.vert.m-cl .footer { display: none; }
body.vert.m-cl figure.fig img { max-height: 60vh; }
.player {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  width: min(740px, calc(100vw - 28px)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 10px 12px 13px 18px; border-radius: 4px; background: var(--paper-light); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
}
.pl-now { min-width: 0; display: flex; flex-direction: column; }
.pl-now b { font: 750 .98rem/1.35 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .05em; }
.pl-now small { font-size: .74rem; color: var(--quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ctl { display: flex; align-items: center; gap: 4px; }
.pl-btn { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 2px; background: transparent; display: grid; place-items: center; color: var(--ink-2); position: relative; }
.pl-btn:hover { background: var(--paper-2); color: var(--red); }
.pl-btn svg { width: 20px; height: 20px; }
.pl-main { width: 50px; height: 50px; background: var(--red); color: #fff7e9; }
.pl-main:hover { background: var(--red-dark); color: #fff; }
.pl-main svg { width: 24px; height: 24px; }
.pl-main .i-pause, .player.on .pl-main .i-play { display: none; }
.player.on .pl-main .i-pause { display: block; }
.pl-spin { position: absolute; inset: -4px; border-radius: 3px; border: 2px solid transparent; border-top-color: var(--jin); opacity: 0; }
.player.wait .pl-spin { opacity: 1; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pl-opt { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 2px; padding: 5px 10px; font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.chip:hover { color: var(--red); border-color: var(--red); }
.pl-close {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 9px; margin-left: 4px;
  border: 1.5px solid var(--red); border-radius: 2px; background: var(--red-soft); color: var(--red);
  font-size: .82rem; font-weight: 650; letter-spacing: .06em; white-space: nowrap;
}
.pl-close svg { width: 16px; height: 16px; }
.pl-close:hover, .pl-close:focus-visible { background: var(--red); color: #fff7e9; }
.pl-bar { position: absolute; left: 18px; right: 18px; bottom: 5px; height: 2px; background: var(--line); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s; }
.pl-msg { grid-column: 1 / -1; margin: 0; font-size: .78rem; color: var(--red); text-align: center; }
body.playing .endnav { margin-bottom: 130px; }
.from-here {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 12px); z-index: 31;
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-2); font-size: .9rem; letter-spacing: .06em; animation: rise .2s ease;
}
body.playing .from-here { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 100px); }
.from-here svg { width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.back-now {
  position: fixed; left: 50%; top: 140px; transform: translateX(-50%); z-index: 31; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1.5px solid var(--red); border-radius: 2px; background: var(--paper-light); color: var(--red);
  font-size: .86rem; font-weight: 650; letter-spacing: .06em; box-shadow: var(--shadow-2); animation: rise .2s ease;
}
.back-now svg { width: 16px; height: 16px; }
.back-now:hover { background: var(--red); color: #fff7e9; }
body.mast-hidden .back-now { top: 66px; }
@media (max-width: 630px) { .back-now { top: 158px; } }
.scrim { position: fixed; inset: 0; z-index: 40; background: #25241ebe; backdrop-filter: blur(3px); }
.drawer, .sheet { position: fixed; z-index: 41; background: var(--paper-light); box-shadow: var(--shadow-2); display: flex; flex-direction: column; border: 1px solid var(--line-2); }
.drawer { top: 0; bottom: 0; right: 0; width: min(400px, 88vw); border-width: 0 0 0 1px; animation: slide .22s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.sheet { left: 50%; bottom: 0; transform: translateX(-50%); width: min(540px, 100vw); border-radius: 5px 5px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); animation: up .22s ease; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.drawer-head b { font: 800 1.15rem var(--serif); letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-list { overflow-y: auto; padding: 10px 20px 30px; }
.toc-list .toc-ch h2 { font-size: .95rem; margin-top: 14px; }
.toc-list .toc-s { padding: 8px 12px; }
.toc-list .toc-s b { font-size: .95rem; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px 0; }
.set-row > span { font-size: .88rem; color: var(--ink-2); white-space: nowrap; letter-spacing: .05em; }
.seg { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; border: 1px solid var(--line); padding: 3px; border-radius: 3px; }
.seg button { border: 1px solid transparent; background: transparent; border-radius: 2px; padding: 6px 12px; font-size: .84rem; color: var(--ink-2); }
.seg button:hover { background: var(--paper-2); color: var(--red); }
.seg button.on { background: var(--red); color: #fff6e5; border-color: var(--red); }
.set-hint { margin: 6px 20px 0; font-size: .74rem; color: var(--quiet); text-align: right; }
.pop { position: absolute; z-index: 35; max-width: min(340px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 3px; background: var(--paper-light); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-size: .9rem; line-height: 1.75; }
.pop b { display: block; font-family: var(--jing); color: var(--red); margin-bottom: 4px; }
.pop p { margin: 0; color: var(--ink-2); }
.loading { padding: 90px 0; text-align: center; color: var(--quiet); font: 700 1rem var(--serif); letter-spacing: .3em; }
.loading::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 14px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; }
.err { padding: 70px 0; text-align: center; color: var(--ink-2); }
.err .button { margin-top: 14px; }
.noscript { padding: 40px; text-align: center; }
[data-motion="paused"] { scroll-behavior: auto; }
[data-motion="paused"] *, [data-motion="paused"] *::before, [data-motion="paused"] *::after { animation: none !important; transition: none !important; }
[data-motion="paused"] .book-card:hover, [data-motion="paused"] .book-card:hover img, [data-motion="paused"] .book-card:hover .scroll { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="playing"]) { scroll-behavior: auto; }
  html:not([data-motion="playing"]) *, html:not([data-motion="playing"]) *::before, html:not([data-motion="playing"]) *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 850px) {
  .header-inner { gap: 19px; }
  .header-actions { gap: 2px; }
  .main-nav { gap: 20px; }
  .hero-inner { min-height: 490px; }
  .hero-glaze { background: linear-gradient(90deg, #f7e7caec, #f7e7cac7 26%, #f5e6c66b 49%, transparent 83%); }
  .hero h1 { font-size: clamp(2.75rem, 6.5vw, 3.6rem); }
  .collection { padding-block: 47px 60px; }
  .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-head { grid-template-columns: 1fr; }
}
@media (max-width: 630px) {
  :root { --edge: 22px; --jing-size: 1.3rem; }
  :root[data-size="0"] { --jing-size: 1.12rem; }
  :root[data-size="2"] { --jing-size: 1.55rem; }
  :root[data-size="3"] { --jing-size: 1.85rem; }
  html { scroll-padding-top: 110px; }
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; min-height: 0; }
  .brand, .header-actions { min-height: 59px; }
  .brand-seal { width: 32px; height: 32px; font-size: 18px; }
  .brand-type { font-size: 1.08rem; }
  .brand-type small { font-size: .58rem; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 15px; min-height: 39px; border-top: 1px solid var(--head-line); }
  .main-nav a { font-size: .875rem; }
  .search-button, .motion-button, .theme-button { min-width: 39px; min-height: 39px; padding: 0; }
  .search-button span { display: none; }
  .hero-inner { align-items: start; min-height: 630px; padding-block: 45px 57px; }
  .hero h1 { margin-block: 16px 16px; font-size: clamp(2.7rem, 9.8vw, 3.65rem); }
  .hero-description { max-width: 23rem; line-height: 1.75; }
  .hero-actions { margin-top: 23px; }
  .wide-break { display: none; }
  .hero-glaze { background: linear-gradient(180deg, #f3e3c6 1%, #f1e0c1 24%, #f0dfbfc9 44%, transparent 69%, #dcc39b70); }
  :root[data-theme="dark"] .hero-glaze { background: linear-gradient(180deg, #191813 1%, #191813f0 30%, #191813b0 50%, transparent 72%); }
  .hero-art { inset: 160px 0 0; background-position: 78% 30%; }
  .mist { inset: 38% -32% -4% -6%; }
  .scroll-cue { bottom: 12px; background: #f3e5cbdf; padding: 4px 9px; border-radius: 2px; }
  .scroll-cue span { height: 13px; }
  .collection-header { gap: 17px; margin-bottom: 17px; }
  .filters { width: 100%; }
  .filters button { padding: 6px 8px; min-width: 33px; }
  .books-grid { grid-template-columns: 1fr; gap: 16px; }
  .book-art { aspect-ratio: 1.85; }
  .reading-inner { padding-block: 55px 59px; }
  .reading blockquote br.b1 { display: inline; }
  .footer { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .footer p { grid-row: 2; grid-column: 1 / -1; }
  .footer-link { grid-row: 1; grid-column: 2; }
  .rbar { top: 98px; padding-inline: 10px; }
  .rbar .listen span { display: none; }
  .cl.gatha.long br.b1 { display: inline; }
  .article { padding-inline: 20px; }
  body.vert.m-cl .article { height: calc(100dvh - 98px - 51px - 20px); }
  .player { grid-template-columns: 1fr auto; padding: 10px 10px 13px 14px; gap: 6px 8px; }
  .pl-opt { grid-column: 1 / -1; justify-content: center; }
  .toc { columns: 1; }
}
@media (max-width: 360px) {
  :root { --edge: 15px; }
  .filters { gap: 1px; }
  .filters button { padding-inline: 6px; }
  .hero-actions { gap: 8px; }
  .button { padding-inline: 13px; }
}
.book-name, .bk-head h1, .sec-head h1, .sub, .reading blockquote, .rbar-t b, .drawer-head b, .toc-ch h2, .toc-s b,
.library-result b, .pl-now b, .endnav b { font-family: var(--jing); }
.book-name, .bk-head h1, .sec-head h1, .reading blockquote { font-weight: 700; }
@media print {
  .masthead, .rbar, .player, .from-here, .endnav, .drawer, .sheet, .scrim, .footer { display: none !important; }
  body { background: #fff; }
}
