/* Pai paper, quiet controls, system reading font for arbitrary user text. */
.novel-reader{--novel-size:18px;position:relative;max-width:704px;margin:24px auto 0;color:var(--ink);text-align:left}
.novel-reader button{min-height:44px;min-width:44px;border-radius:12px;font:500 14px/1.4 Nunito,'PingFang SC',sans-serif;color:var(--ink);padding:8px 12px}
.novel-reader button:hover{background:var(--wash,#F1EFF3)}
.novel-reader button:disabled{color:var(--muted);opacity:.45;cursor:default;background:none}
.novel-reader .novel-book-title{font:500 14px/1.7 Nunito,'PingFang SC',sans-serif;color:var(--muted);margin:0 64px 12px 0;overflow-wrap:anywhere}
.novel-toolbar{display:flex;align-items:center;gap:4px;padding:0 0 14px;border-bottom:1px solid var(--line)}
.novel-toolbar button:first-child{padding-left:0}.novel-chapter-position{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;flex:1}
.novel-toolbar>button[aria-expanded=true]{background:var(--wash,#F1EFF3)}
.novel-stage{position:relative;min-height:0}
.novel-window{height:clamp(240px,54dvh,640px);overflow:hidden;touch-action:pan-y pinch-zoom;outline-offset:6px}
.novel-reader .novel-pages{width:100%;column-fill:auto;column-gap:48px;overflow:visible;will-change:transform;overflow-wrap:anywhere;line-break:strict}
.novel-reader .novel-chapter-title{font:600 24px/1.6 Nunito,PaiTitles,'PingFang SC',sans-serif;margin:28px 0 32px;break-after:avoid}
.novel-reader .novel-paragraph{font:400 var(--novel-size)/1.95 'PingFang SC','Microsoft YaHei',sans-serif!important;letter-spacing:.01em;margin:0 0 1.15em!important;white-space:pre-wrap;orphans:2;widows:2}
.novel-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding:10px 0 0;margin-top:24px}
.novel-progress{font:400 12px/1.5 Nunito,'PingFang SC',sans-serif;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.novel-reader .novel-pagination button{font-size:13px;padding:8px;min-width:84px}
.novel-reader .novel-status{font-size:14px;color:var(--muted);padding:24px 0}
.novel-sheet{position:absolute;inset:0;background:var(--paper);overflow:auto;padding:20px 0;z-index:2}
.novel-sheet-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
.novel-reader .novel-sheet-heading h3{font-size:20px;line-height:1.5;margin:0}
.novel-contents{display:flex;flex-direction:column;gap:4px}
.novel-reader .novel-contents button{text-align:left;line-height:1.8;padding:10px 12px;overflow-wrap:anywhere}
.novel-reader .novel-contents [aria-current=page],.novel-reader [aria-pressed=true]{background:var(--wash,#F1EFF3);color:var(--ink);font-weight:700}
.novel-reader .novel-setting-label{font-size:13px;color:var(--muted);margin:24px 0 10px}
.novel-size-options,.novel-mode-options{display:flex;flex-wrap:wrap;gap:8px}
.novel-scroll .novel-window{overflow:auto;overscroll-behavior:contain}
.novel-scroll .novel-pages{columns:auto;will-change:auto}
.novel-detail.novel-focus{width:min(880px,calc(100% - 40px));height:calc(100dvh - 40px);max-height:none;overflow:hidden;margin:auto}
.novel-focus #detail-content,.novel-focus .detail-copy,.novel-focus .novel-reader-host{height:100%}
.novel-focus .detail-copy{padding:24px 48px 20px}
.novel-focus .detail-copy>:not(.novel-reader-host),.novel-focus>.pub-owner-tools{display:none}
.novel-focus .novel-reader{height:100%;margin:0 auto;display:flex;flex-direction:column}
.novel-focus .novel-stage{flex:1;min-height:0;margin-top:4px}
.novel-focus .novel-window{height:100%}
.novel-focus .novel-pagination{flex:none;margin-top:16px;padding-bottom:env(safe-area-inset-bottom)}
.novel-focus>.close{position:absolute;left:auto;right:12px;top:12px;margin:0;min-width:44px;min-height:44px;background:transparent;border:0}
.novel-focus .novel-status{position:absolute;inset:90px 0 auto}
@media(max-width:600px){
 .novel-detail.novel-focus{width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0}
 .novel-focus .detail-copy{padding:max(20px,env(safe-area-inset-top)) 24px max(12px,env(safe-area-inset-bottom))}
 .novel-focus .novel-reader .novel-book-title{font-size:13px;margin-bottom:12px}
 .novel-reader .novel-chapter-title{font-size:24px;margin:28px 0}
 .novel-toolbar{padding-bottom:8px;gap:0}.novel-reader .novel-toolbar button{font-size:13px;padding:8px}
 .novel-reader .novel-toolbar button:first-child{padding-left:0}
 .novel-reader .novel-paragraph{line-height:1.95}
 .novel-focus .novel-pagination{margin-top:12px}
}
@media(max-width:350px){.novel-focus .detail-copy{padding-left:20px;padding-right:20px}.novel-reader .novel-toolbar button{font-size:12px;padding:6px}.novel-chapter-position{font-size:11px}.novel-reader .novel-pagination button{min-width:72px}}
.novel-reader .novel-illustration{break-inside:avoid;page-break-inside:avoid;margin:20px 0 24px;text-align:center}
.novel-reader .novel-illustration-open{display:block;width:100%;padding:0;min-height:0;border-radius:4px;background:none}
.novel-reader .novel-illustration img{display:block;width:auto;height:auto;max-width:100%;max-height:max(64px,calc(var(--novel-page-height,500px) - 108px));object-fit:contain;margin:auto}
.novel-reader .novel-illustration figcaption{font:400 13px/1.65 'PingFang SC',sans-serif;color:var(--muted);margin:10px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:pre-wrap}
.novel-reader .novel-image-expanded{width:100%;height:auto;max-height:calc(100% - 80px);object-fit:contain}
.novel-reader .novel-image-caption{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.novel-scroll .novel-illustration img{max-height:70dvh}
