/* Knigo owns shared frame geometry; this layer keeps Qiuzao identity and reader constraints. */
:root {--song:"Noto Serif CJK SC","Source Han Serif SC","Songti SC","STSong","SimSun",serif;--kai:"Kaiti SC","KaiTi","STKaiti",var(--song);--ui:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif}
body.pilot-layout.reader-page {
  --qz-nav-size:14px;
  --r-font:var(--song);--r-size:16px;--r-leading:2;--r-text-width:820px;--r-indent:2em;
  --r-accent:#8e3929;--r-selected:#f0e4d4;
  --ink:var(--r-ink);--muted:var(--r-muted);--green:var(--r-accent);--gold:var(--r-border);
  --paper:var(--r-bg);--paper-raised:var(--r-panel);--line:var(--r-border);
  font-family:var(--song);line-break:strict;
}
body.pilot-layout.reader-page .r-backdrop {background:#e9ddc5 url('../backgrounds/reader-room-hd.png') center top/min(100vw,1672px) auto no-repeat!important}
body.pilot-layout.reader-page :is(button,input,select,a) {touch-action:manipulation}
body.pilot-layout.reader-page :is(button,a,input,select):focus-visible {outline:2px solid var(--r-accent);outline-offset:3px}
body.pilot-layout.reader-page button:disabled {opacity:.45;cursor:default}
body.pilot-layout.reader-page .button {font:14px/1.5 var(--ui);min-height:44px}
body.pilot-layout.reader-page .button.primary {color:var(--r-on-accent,#fffaf0)}
body.pilot-layout.reader-page .qz-brand {display:flex;align-items:center;flex-shrink:0;min-height:44px}
body.pilot-layout.reader-page .qz-brand img {width:222px;height:68px;object-fit:contain}
body.pilot-layout.reader-page .desktop-nav {flex:1;min-width:0;justify-content:space-between}
body.pilot-layout.reader-page .desktop-nav a {font:400 var(--qz-nav-size)/1.5 var(--ui);letter-spacing:0;min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
body.pilot-layout.reader-page .nav-personal-group {margin-left:auto}
body.pilot-layout.reader-page .mobile-data {display:none}
body.pilot-layout.reader-page .header-actions {display:flex;align-items:center;gap:16px;font:400 var(--qz-nav-size)/1.5 var(--ui)}
body.pilot-layout.reader-page .header-actions button {align-items:center;justify-content:center;min-width:44px;min-height:44px}
body.pilot-layout.reader-page .header-actions [data-han] {display:inline-flex;font:inherit;letter-spacing:0}
body.pilot-layout.reader-page .header-actions [data-han][hidden] {display:none}
body.pilot-layout.reader-page .mobile-menu a {font:400 var(--qz-nav-size)/1.5 var(--ui);min-height:44px}
body.pilot-layout.reader-page[data-page=data] .data-center {width:var(--pilot-width);max-width:1980px;margin:18px auto 0;padding:clamp(18px,3vw,40px);border:1px solid var(--r-border);border-radius:12px;background:var(--r-panel);font:16px/1.8 var(--ui)}
body.pilot-layout.reader-page[data-page=data] .pilot-page-title {font:20px/1.5 var(--song);letter-spacing:0}
body.pilot-layout.reader-page[data-page=data] :is(.transfer-card h2,.storage-panel h2) {font:18px/1.5 var(--song)}
body.pilot-layout.reader-page .desktop-nav a[aria-current=page] {text-decoration:underline;text-decoration-color:var(--r-border);text-underline-offset:12px}
@media(max-width:760px) {
  body.pilot-layout.reader-page[data-page=data] .pilot-page-title {font-size:20px}
}
body.pilot-layout.reader-page[data-page=data] :is(.small-status,.storage-help) {font:14px/1.8 var(--ui);overflow-wrap:anywhere}
body.pilot-layout.reader-page[data-page=data] .transfer-layout>* {min-width:0}
body.pilot-layout.reader-page[data-page=data] .file-picker {font:14px/1.5 var(--ui);min-height:44px;display:inline-flex;align-items:center}
body.pilot-layout.reader-page[data-page=data] .text-button {font:14px/1.5 var(--ui);min-height:44px}
body.pilot-layout.reader-page[data-page=data] .button.primary {background:var(--r-accent);border-color:var(--r-accent)}
body.pilot-layout.reader-page .site-header {height:94px;min-height:0;background-color:var(--r-panel)}
body.pilot-layout.reader-page .breadcrumbs {font-family:var(--song);line-height:1.5}
body.pilot-layout.reader-page .r-book {gap:15px;align-items:center}
.qz-title-cover {width:65px;min-width:65px;height:108px;border:1px solid #997e54;background:#e4d3ad;box-shadow:inset 5px 0 #52634a,inset 8px 0 #c3b18c;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;letter-spacing:.12em;font:24px/1.3 var(--kai);color:#463b26}
body.pilot-layout.reader-page .r-book h2 {font:26px/1.5 var(--song);letter-spacing:.06em;margin:0 0 4px}
body.pilot-layout.reader-page .r-book .text-link {font:15px/1.7 var(--song)}
body.pilot-layout.reader-page .r-toc-tabs button {font:14px/1.6 var(--ui);min-height:44px}
body.pilot-layout.reader-page .r-toc-tabs button+button {margin-left:auto}
body.pilot-layout.reader-page .r-about {font:14px/1.6 var(--song);border-top:1px solid var(--r-border);margin-top:13px}
body.pilot-layout.reader-page .r-reading-heading {font-family:var(--song);margin-bottom:30px}
body.pilot-layout.reader-page .r-reading-heading h1 {font:38px/1.5 var(--song);letter-spacing:.08em;margin:6px 0 10px}
body.pilot-layout.reader-page .r-reading-heading h2 {font:23px/1.6 var(--kai);letter-spacing:.05em;margin:0}
body.pilot-layout.reader-page .r-byline {font:14px/1.7 var(--kai);letter-spacing:.12em;margin:0 0 8px}
.qz-divider {display:flex;align-items:center;gap:10px;justify-content:center;margin:10px auto 0;width:150px;color:#9e6543;font-size:15px}
.qz-divider::before,.qz-divider::after {content:'';width:48px;height:1px;background:#cdbd9e}
body.pilot-layout.reader-page .r-text {line-break:strict;word-break:normal}
body.pilot-layout.reader-page .r-text.is-prose p:first-child {text-indent:var(--r-indent)}
body.pilot-layout.reader-page .r-text .source-body {font:inherit;line-height:inherit;letter-spacing:inherit}
body.pilot-layout.reader-page .r-text .source-body p {font:inherit;line-height:inherit;margin:0 0 var(--r-gap);text-indent:var(--r-indent)}
body.pilot-layout.reader-page .r-text :is(h1,h2,h3) {font-size:1.1em;font-weight:600;line-height:1.8;text-indent:0;margin:1.4em 0 .5em}
body.pilot-layout.reader-page .r-text img {max-width:100%;height:auto}
body.pilot-layout.reader-page .r-text a {color:var(--r-accent);text-decoration:underline;text-underline-offset:3px}
body.pilot-layout.reader-page .r-text table {max-width:100%;font-size:.9em;display:block;overflow:auto}
body.pilot-layout.reader-page .r-tools {max-height:none!important;overflow:visible!important}
body.pilot-layout.reader-page .r-tools>.r-tool {font:12px/1.3 var(--ui);height:clamp(44px,calc((100dvh - 220px)/8),64px);min-height:44px}
body.pilot-layout.reader-page .r-tool [data-r-label] {display:block;font:inherit}
body.pilot-layout.reader-page .r-tool[aria-pressed=true] {box-shadow:inset 3px 0 var(--r-accent)}
body.pilot-layout.reader-page .r-progress {font:13px/1.5 var(--song)}
body.pilot-layout.reader-page .r-dialog {z-index:80;font-family:var(--ui);border-radius:6px}
body.pilot-layout.reader-page .r-dialog[open] {display:flex;flex-direction:column}
body.pilot-layout.reader-page .r-dialog .r-dialog-body {flex:1 1 auto;min-height:0;max-height:none}
body.pilot-layout.reader-page .r-dialog-header h2 {font:18px/1.5 var(--song)}
body.pilot-layout.reader-page .r-dialog-body :is(input,select) {font-family:var(--ui)}
body.pilot-layout.reader-page .r-dialog-body .r-note {font:12px/1.8 var(--ui);letter-spacing:0}
body.pilot-layout.reader-page .r-dialog .r-close {width:44px;height:44px;min-height:44px;min-width:44px}
body.pilot-layout.reader-page .r-dialog .r-dialog-actions .button {font-family:var(--ui);min-height:44px}
body.pilot-layout.reader-page .r-number-wrap input {min-height:44px}
body.pilot-layout.reader-page .r-quick-size button {width:44px;height:44px;font-family:var(--ui)}
body.pilot-layout.reader-page .r-settings-grid {grid-template-columns:minmax(0,1fr)}
body.pilot-layout.reader-page .r-advanced>summary {letter-spacing:0;font-family:var(--ui)}
body.pilot-layout.reader-page :is(.r-focus-exit,.r-mini-player) {font-family:var(--ui)}
body.pilot-layout.reader-page .r-mini-player button {min-height:44px}
body.pilot-layout.reader-page .r-reset-short {display:none}
body.pilot-layout.reader-page .motto>span {font:19px/1.7 var(--kai);letter-spacing:.04em}
body.pilot-layout.reader-page .site-footer {color:var(--r-ink);background:var(--r-panel);border:1px solid var(--r-border)}
body.pilot-layout.reader-page .site-footer .qz-brand img {width:222px;height:68px}
body.pilot-layout.reader-page .footer-top nav a {font:14px/1.5 var(--ui);min-height:44px;color:var(--r-accent)}
body.pilot-layout.reader-page .footer-top>em {font:16px/1.8 var(--kai);max-width:360px;color:var(--r-muted)}
body.pilot-layout.reader-page .footer-bottom {font:12px/1.8 var(--ui);color:var(--r-muted)}
body.pilot-layout.reader-page .mobile-menu:not([hidden]) {display:grid;grid-template-columns:1fr 1fr;gap:8px;font-family:var(--ui);top:82px;z-index:60}
body.pilot-layout.reader-page .mobile-menu a {padding:12px;min-height:44px}
body.pilot-layout.reader-page .toast {font:14px/1.7 var(--ui);z-index:100}
body.pilot-layout.reader-page[data-reader-theme=night] .r-backdrop {background-color:var(--r-bg)!important;background-blend-mode:multiply}
body.pilot-layout.reader-page[data-reader-theme=night] .qz-title-cover {background:#394437;color:#ede6d1;border-color:var(--r-border)}
body.pilot-layout.reader-page[data-reader-theme=night] .qz-brand {background:#fbf7ed;border-radius:5px;padding:6px}
@media (max-width:1100px) {
  body.pilot-layout.reader-page .site-header {height:82px}
  body.pilot-layout.reader-page .qz-brand img {width:196px;height:60px}
}
@media (max-width:760px) {
  body.pilot-layout.reader-page {--qz-nav-size:14px}
  body.pilot-layout.reader-page .r-backdrop {background-size:auto min(100vh,941px)!important}
  body.pilot-layout.reader-page .site-header {height:76px!important;min-height:0}
  body.pilot-layout.reader-page .qz-brand img {width:170px;height:53px}
  body.pilot-layout.reader-page .site-header .qz-brand img {width:clamp(120px,calc(100vw - 230px),170px);height:auto;max-height:53px}
  body.pilot-layout.reader-page .header-actions {gap:6px}
  body.pilot-layout.reader-page .header-actions .mobile-data {display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font:inherit}
  body.pilot-layout.reader-page .mobile-menu:not([hidden]) {top:76px}
  body.pilot-layout.reader-page .r-paper {border-radius:6px;border:1px solid var(--r-border);min-height:0}
  body.pilot-layout.reader-page .r-reading-heading {margin-bottom:24px}
  body.pilot-layout.reader-page .r-reading-heading h1 {font-size:32px;margin:4px 0 8px}
  body.pilot-layout.reader-page .r-reading-heading h2 {font-size:21px}
  body.pilot-layout.reader-page .r-byline {font-size:13px}
  body.pilot-layout.reader-page .r-tools {grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
  body.pilot-layout.reader-page .r-tools>.r-tool {height:54px;min-height:54px;font-size:11px}
  body.pilot-layout.reader-page .r-tool[aria-pressed=true] {box-shadow:inset 0 -2px var(--r-accent)}
  body.pilot-layout.reader-page .r-dialog {left:8px!important;right:8px!important;width:auto;max-height:calc(100dvh - var(--r-tool-bottom) - 30px)!important}
  body.pilot-layout.reader-page .r-dialog-header h2 {font-size:18px}
  body.pilot-layout.reader-page .footer-top>em {grid-column:1/-1;justify-self:center;text-align:center;max-width:100%}
  body.pilot-layout.reader-page .footer-top {grid-template-columns:minmax(0,1fr) auto}
  body.pilot-layout.reader-page .site-footer .qz-brand img {width:160px;height:49px}
}
@media (max-width:350px) {
  body.pilot-layout.reader-page .qz-brand img {width:120px;height:40px}
  body.pilot-layout.reader-page .header-actions {gap:0}
  body.pilot-layout.reader-page .r-reading-heading h1 {font-size:30px}
  body.pilot-layout.reader-page .site-footer .qz-brand img {width:140px;height:43px}
  body.pilot-layout.reader-page[data-reader-theme=night] .site-header .qz-brand img {width:108px}
}
@media (min-width:761px) and (max-width:1100px) {
  body.pilot-layout.reader-page .header-actions .mobile-data {display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font:inherit}
}
@container navigation (max-width:1040px) {
  body.pilot-layout.reader-page .header-actions .mobile-data {display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;font:inherit}
}
@media (max-height:600px) {
  body.pilot-layout.reader-page .r-shell {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
  body.pilot-layout.reader-page .r-sidebar {display:none!important}
  body.pilot-layout.reader-page .r-rail {position:fixed;z-index:40;bottom:8px;left:50%;right:auto;transform:translateX(-50%);width:var(--pilot-width);padding:6px;border:1px solid var(--r-border);border-radius:6px;background:var(--r-panel)}
  body.pilot-layout.reader-page .r-tools {position:static;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;padding:0;border:0}
  body.pilot-layout.reader-page .r-tools>.r-tool {height:46px;min-height:46px}
  body.pilot-layout.reader-page .r-dialog {top:8px!important;bottom:auto!important;max-height:calc(100dvh - var(--r-tool-bottom) - 24px)!important}
}
@media (max-height:600px) and (max-width:429px) {
  body.pilot-layout.reader-page .r-tools {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-height:360px) and (max-width:760px) {
  body.pilot-layout.reader-page .r-reset-short {display:inline}
}
@media (prefers-reduced-motion:reduce) {body.pilot-layout.reader-page * {scroll-behavior:auto!important;transition:none!important}}
@media print {
  body.pilot-layout.reader-page .qz-divider {display:none}
  body.pilot-layout.reader-page .r-paper {padding:0!important;border:0!important;border-radius:0!important}
}

body.pilot-layout.reader-page[data-page=data] :is(small,.eyebrow) {font:12px/1.6 var(--ui)}
