
/* Classic literary reading mode — isolated from the homepage, volumes and appendices */
body:has(.novel-chapter){--read-bg:#f2efe7;--read-paper:#fffdf8;--read-text:#29332d;--read-muted:#6f796f;--read-rule:#ddd9ce;--read-accent:#657d6a;background:var(--read-bg)!important}
body:has(.novel-chapter) #quarto-content.page-columns{display:block!important;grid-template-columns:none!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:36px clamp(18px,4vw,70px) 90px!important;background:transparent!important}
body:has(.novel-chapter) #quarto-content>main#quarto-document-content{display:block!important;grid-column:unset!important;grid-row:unset!important;float:none!important;min-width:0!important;width:min(940px,100%)!important;max-width:940px!important;margin:0 auto!important;padding:66px clamp(36px,6vw,86px) 94px!important;background:var(--read-paper)!important;border:1px solid var(--read-rule)!important;box-shadow:0 20px 65px #313b3020;overflow:visible!important}
body:has(.novel-chapter) #quarto-header .quarto-secondary-nav,body:has(.novel-chapter) #title-block-header nav.quarto-title-breadcrumbs,body:has(.novel-chapter) #title-block-header .quarto-title-meta{display:none!important}
body:has(.novel-chapter) #quarto-sidebar{display:block!important;position:fixed!important;top:66px!important;left:0!important;bottom:0!important;right:auto!important;height:auto!important;width:min(340px,88vw)!important;min-width:0!important;max-width:340px!important;padding:26px 18px 40px!important;z-index:2500!important;overflow:auto!important;overscroll-behavior:contain;opacity:0;visibility:hidden;pointer-events:none;transform:translateX(-104%)!important;transition:transform .22s,opacity .2s,visibility .2s;background:var(--read-paper)!important;border-right:1px solid var(--read-rule)!important;box-shadow:9px 0 35px #1b291a26}
body:has(.novel-chapter).ic-toc-open #quarto-sidebar{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:translateX(0)!important}
body:has(.novel-chapter) #quarto-sidebar .sidebar-menu-container>ul>li:first-child{display:none!important}
body:has(.novel-chapter) #quarto-sidebar .sidebar-item-container a{color:var(--read-muted)!important;font-size:.88rem!important;line-height:1.5!important;border-radius:7px;padding:7px 9px!important;text-decoration:none!important}
body:has(.novel-chapter) #quarto-sidebar a.sidebar-link.active,body:has(.novel-chapter) #quarto-sidebar a.sidebar-link:hover{background:#e8efe8!important;color:#47614f!important}
.ic-toc-backdrop{position:fixed;inset:0;background:#1f292244;z-index:2400;cursor:pointer}
body:has(.novel-chapter) #title-block-header{max-width:750px!important;width:100%;margin:0 auto!important;padding:0!important;border:0!important}
body:has(.novel-chapter) #title-block-header .quarto-title{margin:0!important;padding:0!important;border:0!important}
body:has(.novel-chapter) #title-block-header h1.title{font-family:var(--font-literary)!important;font-size:clamp(2.48rem,4.3vw,3.35rem)!important;letter-spacing:.09em!important;font-weight:600!important;line-height:1.45!important;color:var(--read-text)!important;text-align:left!important;margin:22px 0 24px!important}
body:has(.novel-chapter) .ic-chapter-supertitle{margin:0 0 26px;padding:0;font:400 .7rem/1.6 Georgia,serif;letter-spacing:.17em;color:var(--read-accent)}
body:has(.novel-chapter) .chapter-preface{max-width:none!important;margin:0 0 16px!important;display:flex;align-items:center;gap:12px;color:var(--read-accent)!important;font-family:var(--font-interface);font-size:.84rem!important;font-weight:600;letter-spacing:.12em!important}
body:has(.novel-chapter) .chapter-preface a{color:var(--read-accent)!important;text-decoration:none!important}
body:has(.novel-chapter) .chapter-dateline{max-width:750px!important;margin:0 auto!important;font-family:var(--font-literary);font-size:.94rem!important;letter-spacing:.14em;color:var(--read-muted)!important}
body:has(.novel-chapter) .chapter-reading-meta{max-width:750px!important;margin:27px auto 49px!important;padding:15px 0!important;display:flex!important;align-items:center;gap:15px;border-top:1px solid var(--read-rule)!important;border-bottom:1px solid var(--read-rule)!important;color:var(--read-muted)!important;font-size:.78rem!important;letter-spacing:.025em}
body:has(.novel-chapter) .ic-chapter-toc{margin-left:auto;border:1px solid var(--read-rule);background:transparent;color:var(--read-accent);padding:6px 12px;font-size:.79rem;font-family:var(--font-interface);font-weight:600;cursor:pointer;white-space:nowrap}
body:has(.novel-chapter) .ic-chapter-toc:hover{background:#edf0e8}
body:has(.novel-chapter) .novel-chapter{max-width:750px!important;width:100%!important;margin:0 auto!important}
body:has(.novel-chapter) .novel-chapter>p{font-family:var(--font-literary)!important;font-size:calc(1.16rem * var(--reader-scale))!important;line-height:2.16!important;letter-spacing:.012em!important;color:var(--read-text)!important;text-indent:2em!important;text-align:justify!important;margin:0 0 1.05em!important;overflow-wrap:break-word}
body:has(.novel-chapter) .novel-chapter .book-plate{margin:3.5rem auto 3.75rem!important;max-width:750px!important;background:var(--read-paper)!important;border:0!important;border-top:1px solid var(--read-rule)!important;border-bottom:1px solid var(--read-rule)!important;box-shadow:none!important;padding:22px 0 0!important}
body:has(.novel-chapter) .book-plate__media{background:#f0eee7!important;padding:24px!important;min-height:150px!important}
body:has(.novel-chapter) .book-plate__media img{max-width:100%!important;max-height:610px!important;object-fit:contain!important;margin-inline:auto;display:block}
body:has(.novel-chapter) .book-plate figcaption{padding:17px 0 19px!important;color:var(--read-muted)!important;font-size:.83rem!important;line-height:1.9!important}
body:has(.novel-chapter) .book-plate .plate-description{color:var(--read-text)!important;font-size:.91rem!important}
body:has(.novel-chapter) .history-note,body:has(.novel-chapter) .chapter-turn{max-width:750px!important;width:100%!important;margin-inline:auto!important}
body:has(.novel-chapter) .history-note{margin-top:72px!important;padding:28px 30px!important;border:0!important;border-left:3px solid var(--read-accent)!important;background:#f3f0e8!important}
body:has(.novel-chapter) .history-note h2{font-family:var(--font-literary)!important;color:var(--read-accent)!important;font-size:1.15rem!important;letter-spacing:.05em!important}
body:has(.novel-chapter) .history-note p{font-size:.95rem!important;color:var(--read-muted)!important;line-height:1.98!important}
body:has(.novel-chapter) .chapter-turn{margin-top:48px!important;padding-top:24px!important;border-top:1px solid var(--read-rule)!important}
body:has(.novel-chapter) .chapter-turn>a{background:transparent!important;border:1px solid var(--read-rule)!important}
body:has(.novel-chapter) .chapter-turn>a:hover{background:#f1f2ec!important;border-color:var(--read-accent)!important}
body:has(.novel-chapter) .reader-controls{background:var(--read-paper)!important;border:1px solid var(--read-rule)!important;right:22px!important;bottom:22px!important;box-shadow:0 8px 24px #1e2a2020!important}
body:has(.novel-chapter) .reader-controls button{font-size:.91rem!important;min-width:37px!important;min-height:37px!important}
body:has(.novel-chapter) .reader-controls button.ic-chapter-toc-icon{border-right:1px solid var(--read-rule)!important;border-radius:2px!important;margin-right:4px!important;color:var(--read-accent)!important}
body:has(.novel-chapter) #quarto-content>nav.page-navigation{display:none!important}
html[data-reader-theme="night"] body:has(.novel-chapter){--read-bg:#171f1a;--read-paper:#222c25;--read-text:#e7eade;--read-muted:#b0bbad;--read-rule:#425247;--read-accent:#c4b69a}
html[data-reader-theme="night"] body:has(.novel-chapter) .history-note{background:#2c382f!important}
html[data-reader-theme="night"] body:has(.novel-chapter) .book-plate__media{background:#303a33!important}
html[data-reader-theme="night"] body:has(.novel-chapter) .ic-chapter-toc:hover,html[data-reader-theme="night"] body:has(.novel-chapter) .chapter-turn>a:hover{background:#344037!important}
@media(max-width:850px){body:has(.novel-chapter) #quarto-content.page-columns{padding:9px 0 55px!important}body:has(.novel-chapter) #quarto-content>main#quarto-document-content{max-width:none!important;width:100%!important;padding:46px clamp(23px,5vw,47px) 65px!important;border-left:0!important;border-right:0!important;box-shadow:none!important}body:has(.novel-chapter) #title-block-header h1.title{font-size:clamp(2.1rem,5vw,2.7rem)!important}body:has(.novel-chapter) .novel-chapter>p{font-size:calc(1.08rem * var(--reader-scale))!important;line-height:2.05!important}}
@media(max-width:480px){body:has(.novel-chapter) #quarto-content>main#quarto-document-content{padding:34px 19px 58px!important}body:has(.novel-chapter) #title-block-header h1.title{font-size:2.1rem!important}body:has(.novel-chapter) .chapter-reading-meta{margin:20px auto 36px!important;gap:8px 12px;flex-wrap:wrap}body:has(.novel-chapter) .novel-chapter>p{font-size:calc(1.055rem * var(--reader-scale))!important;line-height:2.02!important}body:has(.novel-chapter) .history-note{padding:22px 16px!important}body:has(.novel-chapter) .book-plate__media{padding:11px!important}body:has(.novel-chapter) .reader-controls{right:9px!important;bottom:11px!important}body:has(.novel-chapter) .reader-controls button{min-width:33px!important;min-height:33px!important}}
@media(prefers-reduced-motion:reduce){body:has(.novel-chapter) #quarto-sidebar{transition:none!important}}


/* V5 — quiet editorial chapter reading refinement. Scoped strictly to novel pages. */
:root{--ic-reader-width:750px;--ic-reader-leading:2.16}
body:has(.novel-chapter){--read-bg:#eeece5;--read-paper:#fffdf8;--read-text:#292e29;--read-rule:#dbd7cd;--read-accent:#65776c}
body:has(.novel-chapter) #quarto-content.page-columns{
  padding:clamp(22px,3.8vw,56px) clamp(18px,4vw,70px) 105px!important;
}
body:has(.novel-chapter) #quarto-content>main#quarto-document-content{
  width:min(1010px,100%)!important;max-width:1010px!important;
  padding:clamp(60px,6vw,94px) clamp(32px,6vw,94px) 100px!important;
  box-shadow:0 26px 82px rgba(47,57,49,.075)!important;
  border-color:#ddd9ce!important;
}
body:has(.novel-chapter) .chapter-preface,
body:has(.novel-chapter) #title-block-header,
body:has(.novel-chapter) .chapter-dateline,
body:has(.novel-chapter) .chapter-reading-meta,
body:has(.novel-chapter) .novel-chapter,
body:has(.novel-chapter) .history-note,
body:has(.novel-chapter) .chapter-turn{
  max-width:var(--ic-reader-width)!important;
  width:100%!important;
  margin-left:auto!important;margin-right:auto!important;
}
body:has(.novel-chapter) .chapter-preface{
  border-bottom:1px solid var(--read-rule);padding:0 0 18px!important;
  color:var(--read-accent)!important;font-size:.81rem!important;font-weight:500!important;
  letter-spacing:.065em!important;gap:10px!important;margin-bottom:36px!important;
}
body:has(.novel-chapter) .chapter-preface .chapter-preface__sep{color:#b8bbb1}
body:has(.novel-chapter) #title-block-header .ic-chapter-supertitle{
  font:500 .76rem/1.6 var(--font-interface)!important;
  letter-spacing:.16em!important;color:var(--read-accent)!important;margin:0 0 14px!important;
}
body:has(.novel-chapter) #title-block-header h1.title{
  font-size:clamp(2.85rem,4.55vw,3.7rem)!important;
  letter-spacing:.12em!important;font-weight:600!important;
  margin:0 0 18px!important;line-height:1.5!important;
}
body:has(.novel-chapter) .chapter-dateline{
  font-size:1rem!important;letter-spacing:.10em!important;
  color:#767d75!important;margin:0 auto 25px!important;
}
body:has(.novel-chapter) .chapter-reading-meta{
  position:relative;margin:0 auto 56px!important;
  padding:16px 0!important;font-size:.80rem!important;
  border-top:1px solid var(--read-rule)!important;
  border-bottom:1px solid var(--read-rule)!important;
  color:#727c72!important;gap:12px!important;
}
body:has(.novel-chapter) .ic-reading-percent{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--read-accent)}
body:has(.novel-chapter) .ic-chapter-settings-trigger,
body:has(.novel-chapter) .ic-chapter-toc{
  font:500 .79rem/1.5 var(--font-interface)!important;
  letter-spacing:.04em;border:1px solid transparent!important;
  padding:8px 10px!important;background:transparent!important;
  color:var(--read-accent)!important;border-radius:3px;cursor:pointer;
  margin-left:0!important;white-space:nowrap;
}
body:has(.novel-chapter) .ic-chapter-settings-trigger{margin-left:auto!important}
body:has(.novel-chapter) .ic-chapter-settings-trigger:hover,
body:has(.novel-chapter) .ic-chapter-toc:hover{
  background:#edf0e8!important;border-color:#d7ddd4!important;
}
body:has(.novel-chapter) .ic-settings-popover{
  position:absolute;z-index:1300;top:calc(100% + 10px);right:0;
  width:min(340px,calc(100vw - 38px));padding:22px 23px 20px;
  background:var(--read-paper);border:1px solid var(--read-rule);
  box-shadow:0 18px 38px #2536291c;color:var(--read-text);
  font-family:var(--font-interface);
}
.ic-settings-popover[hidden]{display:none!important}
.ic-settings-title{margin:0 0 19px;font-size:1rem;font-weight:600;letter-spacing:.08em}
.ic-settings-group{margin:0 0 16px;border:0;padding:0;min-width:0}
.ic-settings-group legend{font-size:.76rem;color:var(--read-muted);margin:0 0 9px}
.ic-settings-options{display:flex;gap:8px}
.ic-settings-options button{
  flex:1;border:1px solid var(--read-rule);background:transparent;
  color:var(--read-muted);min-height:39px;padding:8px 5px;
  font:500 .8rem var(--font-interface);cursor:pointer;
}
.ic-settings-options button[aria-pressed="true"]{border-color:var(--read-accent);background:#eef1e9;color:#425c49}
.ic-settings-hint{font-size:.74rem;line-height:1.7;color:var(--read-muted);margin:0}
body:has(.novel-chapter) .novel-chapter>p{
  font-size:calc(1.16rem * var(--reader-scale))!important;
  line-height:var(--ic-reader-leading)!important;
  letter-spacing:.011em!important;
  text-align:justify!important;text-indent:2em!important;
  margin:0 0 1.08em!important;color:var(--read-text)!important;
  hanging-punctuation:first allow-end;
}
body:has(.novel-chapter) .novel-chapter .book-plate{
  margin:3.7rem auto 3.9rem!important;padding:19px 0 0!important;
  border-top:1px solid var(--read-rule)!important;
  border-bottom:1px solid var(--read-rule)!important;
}
body:has(.novel-chapter) .book-plate__media{
  padding:30px!important;background:#efeee9!important;
}
body:has(.novel-chapter) .book-plate figcaption{
  padding:18px 2px 22px!important;gap:.72rem!important;
  font-size:.82rem!important;
}
body:has(.novel-chapter) .book-plate .plate-category{letter-spacing:.12em;font-size:.72rem!important}
body:has(.novel-chapter) .book-plate .plate-description{font-size:.9rem!important;line-height:1.85!important}
body:has(.novel-chapter) .history-note{
  margin-top:6rem!important;padding:33px 35px!important;
  background:#f4f0e7!important;border-left:2px solid var(--read-accent)!important;
}
body:has(.novel-chapter) .history-note h2{font-size:1.22rem!important;line-height:1.45!important;margin-bottom:1.3rem!important}
body:has(.novel-chapter) .history-note p{font-size:.94rem!important;line-height:2.01!important}
body:has(.novel-chapter) .chapter-turn>a{
  padding:22px 24px!important;min-height:118px!important;
  border-color:var(--read-rule)!important;background:#fffdf8!important;
}
body:has(.novel-chapter) .chapter-turn>a:hover{transform:translateY(-2px);border-color:var(--read-accent)!important}
body:has(.novel-chapter) #quarto-sidebar:before{
  content:'全部六卷 · 四十八章';display:block;
  font:600 .78rem var(--font-interface);letter-spacing:.08em;
  color:var(--read-accent);padding:12px 10px 24px;
}
body:has(.novel-chapter) .reader-controls{border-radius:28px!important}
html[data-reader-theme="night"] body:has(.novel-chapter) .ic-settings-popover{
  background:var(--read-paper)!important;border-color:var(--read-rule)!important;
}
html[data-reader-theme="night"] body:has(.novel-chapter) .ic-settings-options button[aria-pressed="true"]{background:#35463a;color:#e5eddf}
html[data-reader-theme="night"] body:has(.novel-chapter) .book-plate__media{background:#2c3930!important}
html[data-reader-theme="night"] body:has(.novel-chapter) .chapter-turn>a{background:var(--read-paper)!important}
html[data-reader-theme="night"] body:has(.novel-chapter) .history-note{background:#2c382f!important}
@media(max-width:850px){
  body:has(.novel-chapter) #quarto-content.page-columns{padding:0 0 55px!important}
  body:has(.novel-chapter) #quarto-content>main#quarto-document-content{
    max-width:none!important;width:100%!important;
    padding:54px clamp(22px,5vw,46px) 76px!important;
    border-left:0!important;border-right:0!important;box-shadow:none!important;
  }
  body:has(.novel-chapter) #title-block-header h1.title{font-size:clamp(2.5rem,6vw,3.2rem)!important}
  body:has(.novel-chapter) .chapter-reading-meta{flex-wrap:wrap!important;gap:8px 12px!important}
  body:has(.novel-chapter) .novel-chapter>p{font-size:calc(1.11rem * var(--reader-scale))!important}
}
@media(max-width:520px){
  body:has(.novel-chapter) #quarto-content>main#quarto-document-content{padding:32px 22px 100px!important}
  body:has(.novel-chapter) .chapter-preface{margin-bottom:28px!important}
  body:has(.novel-chapter) #title-block-header h1.title{font-size:2.55rem!important;letter-spacing:.075em!important}
  body:has(.novel-chapter) .chapter-reading-meta{margin-bottom:40px!important}
  body:has(.novel-chapter) .ic-reading-percent{display:none}
  body:has(.novel-chapter) .ic-chapter-settings-trigger{margin-left:auto!important}
  body:has(.novel-chapter) .novel-chapter>p{font-size:calc(1.06rem * var(--reader-scale))!important;line-height:var(--ic-reader-leading)!important}
  body:has(.novel-chapter) .book-plate__media{padding:12px!important}
  body:has(.novel-chapter) .history-note{padding:24px 19px!important}
  body:has(.novel-chapter) .reader-controls{
    left:50%!important;right:auto!important;transform:translateX(-50%)!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    max-width:calc(100vw - 28px);border-radius:100px!important;
  }
  body:has(.novel-chapter) .reader-controls button{min-width:34px!important;min-height:34px!important}
}
@media print{
  body:has(.novel-chapter) #quarto-header,body:has(.novel-chapter) #quarto-sidebar,
  body:has(.novel-chapter) .reader-controls,body:has(.novel-chapter) .ic-chapter-settings-trigger,
  body:has(.novel-chapter) .ic-chapter-toc,body:has(.novel-chapter) .chapter-turn{display:none!important}
  body:has(.novel-chapter) #quarto-content>main#quarto-document-content{
    width:100%!important;border:0!important;box-shadow:none!important;padding:0!important;
  }
  body:has(.novel-chapter) .novel-chapter>p{font-size:11pt!important;line-height:1.85!important;color:#161616!important}
  body:has(.novel-chapter) .book-plate{break-inside:avoid}
}


/* V5 polish after desktop / mobile rendered-page inspection */
body:has(.novel-chapter) #quarto-content>main#quarto-document-content{padding-top:76px!important}
body:has(.novel-chapter) .chapter-preface{margin-bottom:28px!important}
body:has(.novel-chapter) #title-block-header .ic-chapter-supertitle{margin-bottom:10px!important}
body:has(.novel-chapter) #title-block-header h1.title{margin-bottom:14px!important}
body:has(.novel-chapter) .chapter-dateline{margin-bottom:20px!important}
body:has(.novel-chapter) .chapter-reading-meta{margin-bottom:42px!important}
body:has(.novel-chapter) .reader-controls button{
  white-space:nowrap!important;display:flex!important;align-items:center!important;
  justify-content:center!important;line-height:1!important;flex-shrink:0!important;
}
@media(max-width:520px){
  body:has(.novel-chapter) #quarto-content>main#quarto-document-content{padding-top:31px!important}
  body:has(.novel-chapter) .chapter-reading-meta{
    flex-wrap:nowrap!important;gap:5px!important;min-height:59px!important;
    padding:10px 0!important;margin-bottom:37px!important;
  }
  body:has(.novel-chapter) .chapter-reading-meta>span:nth-child(2){display:none!important}
  body:has(.novel-chapter) .ic-chapter-settings-trigger{margin-left:auto!important}
  body:has(.novel-chapter) .ic-chapter-settings-trigger,
  body:has(.novel-chapter) .ic-chapter-toc{padding:8px!important}
}
/* Keep mobile book reading unobstructed until tools are needed. */
@media(min-width:521px){
 body:has(.novel-chapter) .reader-controls .ic-reading-toggle{display:none!important}
}
@media(max-width:520px){
 body:has(.novel-chapter) .reader-controls .ic-reading-toggle{
   border:0!important;border-radius:50%!important;min-width:39px!important;
   font:600 .88rem var(--font-interface)!important;color:var(--read-accent)!important;
 }
 body:has(.novel-chapter) .reader-controls.ic-reader-compact{
   left:auto!important;right:14px!important;transform:none!important;
   bottom:max(14px,env(safe-area-inset-bottom))!important;
   width:auto!important;min-width:0!important;padding:.28rem!important;
 }
 body:has(.novel-chapter) .reader-controls.ic-reader-compact > button:not(.ic-reading-toggle){display:none!important}
 body:has(.novel-chapter) .reader-controls:not(.ic-reader-compact){
   overflow-x:auto;max-width:calc(100vw - 16px);
   padding:.25rem!important;gap:0!important;
 }
}
