/* 山色为幕，图册为主。No remote fonts or network dependencies. */
:root{--bg:#183b3d;--surface:#204648;--text:#f3f2eb;--muted:#b6c8c3;--gold:#d4c6a5;--line:#496866}
body{background:#183b3d}
.masthead{height:52px;padding:0 24px;background:transparent;border-bottom:1px solid #ffffff0c;justify-content:center}
.brand{gap:9px}.brand img{width:23px;height:29px}.brand strong{font-size:14px;letter-spacing:1px;font-weight:500}
#reader{padding:8px 24px 10px}
.reading-heading{font-size:11px;padding:0 0 8px;letter-spacing:0}
.stage:before{display:none}
.toolbar{min-height:58px;padding:4px 20px max(4px,env(safe-area-inset-bottom));display:flex;justify-content:center;gap:12px;background:#163638;border-color:#ffffff12}
.toolbar .tool{min-width:52px;min-height:44px;padding:4px 8px;flex-direction:column;gap:1px;font-size:10px}
.toolbar .tool svg{width:19px;height:19px}
.toolbar #jumpForm{display:flex;align-items:center;gap:2px;height:44px;padding:0 8px;border:0;min-width:70px;justify-content:center}
.toolbar #pageInput{width:34px;height:42px;padding:0;background:transparent;color:var(--text);border:0;text-align:center;appearance:textfield;font-variant-numeric:tabular-nums;font-size:14px}
.toolbar #pageInput::-webkit-inner-spin-button{appearance:none}
.toolbar .page-total{color:var(--muted);font-size:12px}
.toolbar .page-control{color:var(--text)}
.more-dialog{width:410px;max-width:calc(100vw - 24px);padding:16px;border-radius:8px;background:#1b4041}
.more-dialog header{display:flex;justify-content:space-between;align-items:center;padding:0 0 12px;border-bottom:1px solid var(--line)}
.more-dialog h2{font-size:17px;font-weight:500;margin:0}
.more-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:12px}
.more-item{min-height:52px;white-space:normal!important;border:1px solid #ffffff14;border-radius:4px;justify-content:flex-start;padding:12px;font-size:13px;flex-direction:row!important;gap:8px}
.more-item svg{width:19px;height:19px}
.more-item[aria-pressed=true]{color:var(--gold);border-color:var(--gold)}
.toast{bottom:75px}
body.focus-reading .masthead,body.focus-reading .reading-heading{display:none}
.zoom-dialog{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;border:0;border-radius:0;background:#123235}
.zoom-dialog header{flex-wrap:wrap}.zoom-dialog h2{min-width:0;overflow-wrap:anywhere}#zoomPageChoices{display:flex;flex-wrap:wrap;gap:4px}
.zoom-body{overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center;padding:0;touch-action:none;min-height:0}
.zoom-body img,.zoom-body.original img{width:auto;height:auto;max-width:100%;max-height:100%;margin:0;transform-origin:center center;user-select:none;-webkit-user-drag:none}
.zoom-dialog p{margin:0;padding:8px;text-align:center;color:var(--muted);font-size:11px}
@media(max-width:700px){
 .masthead{height:44px;padding:0 12px;justify-content:flex-start}.brand{gap:8px}.brand strong{font-size:13px;letter-spacing:.5px}.brand img{width:21px;height:26px}
 #reader{padding:4px 8px 6px;overflow-x:hidden;overflow-y:auto;display:block;overscroll-behavior:contain;scrollbar-width:thin}
 .reading-heading{font-size:10px;line-height:18px;padding:0 2px 4px;gap:8px}
 .stage{flex:none;width:100%;height:calc((100vw - 16px) * 1253 / 923);padding:0;align-items:flex-start}
 #book{filter:none;transition:none}
 .toolbar{display:flex;grid-template-columns:none;min-height:54px;padding:3px 6px max(3px,env(safe-area-inset-bottom));gap:0;justify-content:space-between}
 .toolbar .tool{grid-row:auto;min-width:44px;min-height:44px;padding:3px 5px;font-size:10px}
 .toolbar .page-control{width:44px;padding:8px}.toolbar #jumpForm{min-width:64px;padding:0}
 .toolbar .page-control svg{width:20px;height:22px}
 body.fit-page #reader{display:flex;overflow:hidden}
 body.fit-page .stage{flex:1;height:auto;min-height:0;align-items:center}
 .toast{bottom:68px}
 .more-tools .desktop-tool{display:flex}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Isolate utility-grid placement from the inherited mobile toolbar row. */
.more-tools > .more-item{grid-row:auto;grid-column:auto;min-width:0;width:auto;min-height:52px;overflow-wrap:anywhere}
