body.novel-mode { overflow:hidden; }
body.novel-mode #app { display:none!important; }
#novel-space {
  --media-line:#e7e1d8;
  --media-sidebar-background:#faf8f4;
  --media-highlight:#ede6da;
  --media-selected:#6e4e32;
  --media-caption:#70675d;
  --media-brand-icon:#8f6848;
  position:fixed;
  inset:0;
  display:grid;
  z-index:20;
  background:#fcfaf6;
  color:#332c25;
  color-scheme:light;
  font-family:inherit;
}
#novel-space[hidden], #novel-space [hidden] { display:none!important; }
#novel-space :where(.media-rail, .media-nav) button {
  appearance:none;
  border:0;
  background:transparent;
}
#novel-space .media-rail { background:#faf7f3; border-color:var(--media-line); }
#novel-space .media-rail button { color:var(--media-caption); }
#novel-space .media-rail button:hover { background:var(--media-highlight); }
#novel-space .media-rail button[aria-current] { color:var(--media-selected); }
#novel-space .media-rail button.media-rail-server { background:var(--media-highlight); }
#novel-space .media-rail button.media-menu-toggle { background:transparent; }
#novel-space .media-sidebar::backdrop { background:#2c201e38; }
#novel-space :focus-visible { outline:2px solid #9d7958; outline-offset:2px; }
#novel-space button { cursor:pointer; color:inherit; }
#novel-space a { color:inherit; }
#novel-space h1, #novel-space h2, #novel-space p { margin:0; }
#novel-space h1 { font-size:clamp(25px,4vw,40px); line-height:1.2; overflow-wrap:anywhere; }
#novel-space h2 { font-size:20px; }
#novel-space small { color:var(--media-caption); }
.nv-main { min-width:0; min-height:0; overflow:auto; padding:clamp(14px,4vw,52px); }
.nv-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-bottom:24px; }
.nv-controls { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin-bottom:18px; }
.nv-controls label { display:grid; gap:4px; min-width:0; font-size:13px; }
.nv-controls :is(input,select), .nv-controls :is(a,button), #novel-space .nv-primary, .nv-main > button {
  min-width:0;
  max-width:100%;
  min-height:38px;
  padding:7px 11px;
  border:1px solid var(--media-line);
  border-radius:8px;
  background:#fffcf8;
  color:#332c25;
  font:inherit;
}
.nv-controls :is(a,button), #novel-space .nv-primary, .nv-main > button { display:inline-grid; place-items:center; text-decoration:none; }
#novel-space .nv-primary { background:#6e4e32; color:#fff; border-color:#6e4e32; }
.nv-controls button:disabled { opacity:.55; cursor:wait; }
.nv-controls :is(input,select) { width:100%; }
.nv-controls input[type=range] { min-height:26px; padding:0; accent-color:#986d49; }
.nv-status { color:var(--media-caption); padding:14px 0; }
.nv-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,8rem),1fr)); gap:22px 16px; }
.nv-cards a { display:grid; gap:5px; align-content:start; text-decoration:none; overflow-wrap:anywhere; }
.nv-cards a:hover strong { text-decoration:underline; }
.nv-cover { display:grid; place-items:center; position:relative; overflow:hidden; border-radius:8px; aspect-ratio:2/3; background:#efe5d5; color:#9a7856; }
.nv-cover svg { width:32px; height:32px; }
.nv-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.nv-list { display:grid; gap:0; padding:0; margin:0; list-style:none; }
.nv-list li { display:flex; flex-wrap:wrap; justify-content:space-between; gap:7px; padding:12px 0; border-bottom:1px solid var(--media-line); overflow-wrap:anywhere; }
.nv-list a { text-decoration:underline; }
.nv-pager { margin-top:18px; align-items:center; }
.nv-detail { display:grid; grid-template-columns:minmax(72px,145px) minmax(0,1fr); gap:clamp(12px,3vw,30px); margin-bottom:26px; max-width:64rem; }
.nv-detail > div { align-self:start; }
.nv-detail .nv-controls { margin:14px 0 0; }
.nv-detail h1 + p, .nv-summary { margin-top:8px!important; color:var(--media-caption); white-space:pre-line; overflow-wrap:anywhere; }
.nv-chapters { max-width:64rem; padding-top:16px; border-top:1px solid var(--media-line); }
.nv-chapters h2 { margin-bottom:10px!important; }
.nv-chapters .nv-controls label { flex:1 1 12rem; }
.nv-main:has(.nv-reader) { padding:0; background:var(--nv-reader-background,#faf5ea); }
.nv-reader { max-width:54rem; margin:0 auto; padding:clamp(15px,4vw,48px); color:var(--nv-reader-foreground,#382c20); }
.nv-reader[data-theme="night"] { color-scheme:dark; }
.nv-reader article { margin:32px 0 34px; }
.nv-reader h1 { font-size:clamp(21px,3vw,30px)!important; margin-bottom:24px!important; }
.nv-prose { font-family:"Songti SC","Noto Serif CJK SC",SimSun,serif; font-size:var(--nv-reader-font,19px); line-height:var(--nv-reader-line,1.95); letter-spacing:var(--nv-reader-spacing,0); white-space:pre-wrap; overflow-wrap:anywhere; padding-inline:clamp(0px,2vw,var(--nv-reader-inset,0px)); }
#novel-space .nv-prose p + p { margin-top:var(--nv-reader-gap,0); }
.nv-prose p { text-indent:var(--nv-reader-indent,0); }
.nv-reader-tools, .nv-reader-pages { justify-content:space-between; align-items:center; margin:0; }
.nv-reader[data-theme="night"] .nv-controls :is(a,input,select) { border-color:#50453a; background:#332d27; color:#e7dbcc; }
@media(max-width:760px) {
  .nv-cards { grid-template-columns:repeat(auto-fill,minmax(min(100%,6.25rem),1fr)); gap:14px 10px; }
  .nv-detail { grid-template-columns:minmax(55px,85px) minmax(0,1fr); }
  .nv-controls label { flex:1 1 10rem; }
  .nv-reader-tools label { flex:0 1 auto; }
}
