:root{color-scheme:light;--page:#f7f4ec;--surface:#fffdf8;--ink:#292725;--muted:#625c55;--line:#d9d1c5;--accent:#69513b;--tint:#eae2d5;font-family:system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--page)}*{box-sizing:border-box}body{margin:0}body.dark{color-scheme:dark;--page:#1b1917;--surface:#24211e;--ink:#eae5df;--muted:#c0b7ad;--line:#51483f;--accent:#e2c69f;--tint:#3d342b}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button,a,input,select,textarea{touch-action:manipulation}button{min-height:44px;padding:9px 14px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink)}button:hover{background:var(--tint)}button:active{opacity:.8}button:disabled{opacity:.5;cursor:wait}button[aria-pressed=true],button.active{background:var(--accent);color:var(--page);border-color:var(--accent)}a{color:var(--accent)}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}input,select,textarea{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;padding:10px;min-height:44px;max-width:100%}label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}header{display:flex;align-items:center;justify-content:space-between;gap:12px}#library-header{max-width:1280px;margin:auto;padding:24px 32px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);text-decoration:none;font-weight:600}.brand small{display:block;font-weight:400;color:var(--muted);font-size:12px;margin-top:4px}nav{display:flex;gap:8px;align-items:center}#library{max-width:1180px;margin:auto;padding:40px 32px}.shelf-heading{display:flex;justify-content:space-between;gap:24px;align-items:center}.eyebrow{letter-spacing:.16em;font-size:12px;color:var(--accent);font-weight:600}h1{font-family:Georgia,serif;font-size:clamp(28px,4vw,44px);font-weight:400;line-height:1.2;margin:14px 0}p{color:var(--muted);line-height:1.6}.library-tools{display:flex;gap:16px;align-items:end;margin:32px 0 24px;flex-wrap:wrap}.search-label{flex:1;min-width:180px}#categories{overflow:auto;padding-bottom:8px}#categories button{white-space:nowrap;border-radius:22px}#count{font-size:13px}.books{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:28px 20px}.book{min-width:0;position:relative}.book .open-book{display:block;width:100%;padding:0;background:none;border:0;text-align:left}.cover{aspect-ratio:3/4;background:var(--tint);border:1px solid var(--line);box-shadow:2px 4px 9px #0000000c;display:flex;flex-direction:column;justify-content:space-between;padding:18px;border-radius:2px 6px 6px 2px;position:relative;overflow:hidden}.cover img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.cover-title{font-family:Georgia,'Songti TC',serif;font-size:22px;line-height:1.5;overflow-wrap:anywhere}.cover small{font-size:11px;color:var(--muted)}.book-title{display:block;line-height:1.5;margin:12px 0 0;font-size:15px}.book small.category{display:block;color:var(--muted);margin-top:4px;font-size:12px}.books.list{display:block}.books.list .book{display:flex;border-bottom:1px solid var(--line);padding:12px 0}.books.list .open-book{display:flex;align-items:center;gap:16px}.books.list .book-title{margin:0}.continue-row{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:28px}.continue-row button{text-align:left}.continue-row small{display:block;color:var(--muted);margin-top:4px}footer{padding:48px 0 16px;color:var(--muted);font-size:13px;line-height:1.8}.skip{position:absolute;top:-100px}.skip:focus{top:0;z-index:999;background:var(--page);padding:16px}#reading{color:var(--ink);position:fixed;inset:0;background:var(--page);z-index:10;display:grid;grid-template-rows:auto 1fr auto}.reader-top{padding:calc(8px + env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid var(--line)}.reader-top h1{font:500 16px system-ui;margin:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reader-top button,.reader-bottom button{border:0;background:none;padding:8px}#engine{width:100%;height:100%;border:0;min-height:0;background:var(--page)}.reader-bottom{padding:8px 10px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--line);justify-content:space-around;flex-wrap:wrap;gap:2px}.reader-bottom button{font-size:13px}#reader-loading{position:absolute;inset:70px 0 70px;background:var(--page);display:grid;place-content:center;pointer-events:none}#selection-tools{position:absolute;bottom:90px;left:12px;right:12px;display:flex;gap:4px;flex-wrap:wrap;justify-content:center;background:var(--surface);padding:8px;border-radius:12px;box-shadow:0 3px 20px #0003}#dimmer,#eye-care{position:absolute;inset:0;pointer-events:none;background:black;opacity:0}#eye-care{background:#ffb859}dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:16px;width:min(620px,calc(100% - 24px));max-height:85dvh;padding:20px;overscroll-behavior:contain}dialog::backdrop{background:#0008}dialog>header{position:sticky;top:-20px;padding:8px 0;background:var(--surface);z-index:1}dialog h2{font:500 21px system-ui;margin:0}#sheet-body{display:grid;gap:14px;padding:16px 0}#sheet-body .row{display:flex;flex-wrap:wrap;gap:8px}#sheet-body label{font-size:14px}#sheet-body .item{display:flex;align-items:center;gap:10px}#sheet-body .item>button:first-child{flex:1;text-align:left}#sheet-body input[type=range]{width:100%;padding:0}#sheet-body input[type=checkbox]{min-height:24px;width:24px}#sheet-body p{margin:0;font-size:14px}.result{width:100%;text-align:left;line-height:1.6}#notice{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);z-index:1000;background:var(--ink);color:var(--page);padding:14px 20px;border-radius:12px;max-width:calc(100% - 24px);box-shadow:0 4px 20px #0003}textarea{width:100%;min-height:90px}#continue:empty{display:none}@media(max-width:600px){#library-header{padding:16px}.brand{font-size:14px}#library-header nav{gap:4px}#library-header button{padding:8px;font-size:13px}#library{padding:24px 16px}.shelf-heading{align-items:start}.shelf-heading>label{min-width:100px}.shelf-heading p:not(.eyebrow){font-size:14px}.shelf-heading h1{font-size:28px}.library-tools{gap:12px}.library-tools label:not(.search-label){flex:1}.search-label{flex-basis:100%}.books{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px}.cover-title{font-size:21px}.reader-top{gap:4px}.reader-top button{font-size:12px;padding:6px}.reader-top #bookmark{font-size:0;width:44px}.reader-top #bookmark::after{content:'☆';font-size:26px}.reader-top #share-current{max-width:75px}.reader-bottom button{font-size:12px;padding:6px}.reader-bottom{gap:0}dialog{padding:16px}dialog>header{top:-16px}}@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s,opacity .12s}}@media(max-height:450px){.reader-top{padding:4px 12px}.reader-bottom{padding:2px 12px}.reader-top button,.reader-bottom button{min-height:36px}dialog{max-height:95dvh}}

@media(max-width:600px){.reader-bottom{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0}.reader-bottom button{min-width:0;overflow-wrap:break-word}.reader-bottom #previous{grid-column:1;grid-row:2}.reader-bottom #progress{grid-column:2/5;grid-row:2}.reader-bottom #next{grid-column:5;grid-row:2}}

/* Match ReaderTheme, BookshelfCover and the native six-action reading chrome. */
@font-face{font-family:DafaBookUI;src:url('/fonts/serif.otf');font-display:swap}
:root{--page:#faf8f4;--surface:#f2eee8;--ink:#292725;--muted:#625b55;--line:#ded7ce;--accent:#58524c;--tint:#eee7de}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
button svg{width:24px;height:24px;display:block;margin:auto}button{border-radius:12px}button:has(svg){border:0;background:transparent;min-width:48px;min-height:48px;padding:12px}
#library-header{padding:16px 24px;border:0;max-width:1200px}#library-header h1{font:400 24px DafaBookUI,Georgia,serif;margin:0;line-height:1.4}#library-header nav{gap:0}.language-picker select{border:0;background:transparent;padding:8px;min-width:90px;font-size:14px}
#library{padding:4px 24px 24px;max-width:1200px}.library-tools{margin:6px 0 18px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.track-picker{font-size:12px;flex-direction:row;align-items:center;gap:8px}.track-picker select{border:0;background:transparent;font-size:14px}.search-label{flex-basis:100%;margin-top:8px}.search-label input{background:var(--surface);border:0;border-radius:16px}#categories{margin:8px 0 14px;padding:0;gap:8px}#categories button{border-radius:8px;padding:7px 12px;min-height:38px;background:transparent;font-size:14px}#categories button[aria-pressed=true]{color:var(--ink);background:var(--tint);border-color:transparent}#categories button[aria-pressed=true]::before{content:'✓';margin-right:8px}
.shelf-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 12px}.shelf-bar>div{display:flex;align-items:center;gap:0}.shelf-bar #count{color:var(--ink);font-size:14px;font-weight:600;margin:0}.sort-picker select{font-size:12px;max-width:135px;background:transparent;border:0;padding:6px;min-height:44px}
.books{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:20px 16px}.book .open-book{border-radius:0}.cover{aspect-ratio:4/5;max-height:156px;background:#efc74c;border:0;border-radius:2px;box-shadow:none;padding:14px;align-items:center;justify-content:center}.cover::before{content:'';position:absolute;inset:8px;border:1px solid #5d4620;pointer-events:none}.cover:has(img)::before{display:none}.cover img{object-fit:contain}.cover-title{text-align:center;font:400 15px DafaBookUI,Georgia,serif;line-height:1.35;color:#493419}.cover>small{display:none}.book-title{font:400 14px DafaBookUI,Georgia,serif;margin:8px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4;min-height:39px}.book small.category{display:none}.continue-row{background:var(--surface);border:0;border-radius:16px;padding:16px;margin:8px 0 16px}.continue-row button{border:0;background:transparent;padding:0;min-height:48px;font-family:DafaBookUI,Georgia,serif;font-size:20px}.continue-row small{font:13px system-ui;line-height:1.6}.continue-row>button:last-child{font:13px system-ui;text-align:right}footer{font-size:12px;padding-top:28px}
#reading{display:block}#engine{position:absolute;inset:0;width:100%;height:100%;display:block;margin:auto}.reader-top{position:absolute;inset:0 0 auto;z-index:2;min-height:64px;padding:calc(8px + env(safe-area-inset-top)) 8px 8px;border:0;background:var(--page)}.reader-top h1{font:400 22px DafaBookUI,Georgia,serif;line-height:1.1;white-space:normal}.reader-top #bookmark{font-size:inherit;width:48px}.reader-top #bookmark::after{content:none}.reader-top #share-current{max-width:none}.reader-bottom{position:absolute;inset:auto 0 0;z-index:2;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));padding:2px 8px calc(2px + env(safe-area-inset-bottom));height:calc(52px + env(safe-area-inset-bottom));border-top:2px solid var(--line);background:var(--page);gap:0}.reader-bottom button{min-height:48px;min-width:0;padding:10px;font-size:26px;background:transparent;border:0}.reader-bottom button svg{width:25px;height:25px}#reader-footer{position:absolute;inset:auto 0 calc(52px + env(safe-area-inset-bottom));height:20px;display:flex;justify-content:end;align-items:center;background:var(--page);z-index:2;padding:0 12px;font-size:11px}#reader-footer button{font-size:11px;min-height:20px;padding:0 0 0 10px;line-height:1;background:transparent;border:0}#footer-title{display:none}.quiet .reader-top,.quiet .reader-bottom{display:none!important}.quiet #reader-footer{bottom:0}.quiet #footer-title{display:block;position:absolute;left:64px;right:64px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#selection-tools{bottom:84px;left:50%;right:auto;transform:translateX(-50%);width:min(350px,calc(100% - 24px));flex-wrap:nowrap;justify-content:space-around;z-index:4;padding:4px;border-radius:16px}#selection-tools button{min-width:48px;min-height:48px;border:0;padding:10px;background:transparent}#dimmer,#eye-care{z-index:5}#reader-loading{z-index:3;inset:64px 0 72px}dialog{border-radius:24px}dialog::before{content:'';display:block;width:32px;height:4px;border-radius:3px;background:var(--line);margin:0 auto 8px}
@media(max-width:600px){#library-header{padding:16px}#library-header h1{font-size:22px}#library-header nav button{padding:10px}#library{padding:4px 24px 24px}.books{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 16px}.cover-title{font-size:13px}.cover{padding:12px}.library-tools label:not(.search-label){flex:initial}.sort-picker select{max-width:113px;font-size:11px}.shelf-bar>div{gap:0}.shelf-bar button{min-width:40px;padding:8px}.reader-top button{min-width:48px;padding:12px}.reader-top h1{font-size:22px}.reader-bottom button{font-size:26px;padding:10px}#selection-tools button{padding:10px}}
@media(max-width:360px){#library{padding-inline:16px}.books{gap:18px 12px}.language-picker select{min-width:78px}.shelf-bar .sort-picker select{max-width:100px}}
@media(max-width:600px){#library-header{gap:0}#library-header h1{font-size:20px;white-space:nowrap}#library-header nav button{min-width:44px;padding:10px}.language-picker select{min-width:78px;padding:4px;font-size:13px}}

/* Keep actual page surfaces and inherited title colors in the same theme. */
body{min-height:100dvh;background:var(--page);color:var(--ink)}
.book-title,#book-title,#library-header h1{color:var(--ink)}
.language-picker button{border:0;background:transparent;padding:8px;font-size:14px;white-space:nowrap}
#sheet-body .language-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;padding:14px 16px;border:0;background:transparent;color:var(--ink)}
#sheet-body .language-choice[aria-pressed=true]{background:var(--tint);color:var(--ink)}
.language-choice small{display:block;font-size:12px;color:var(--muted);line-height:1.5;margin-top:4px}
#sheet-body h3{font-size:14px;margin:8px 0 0;padding-top:16px;border-top:1px solid var(--line)}
.reader-bottom #pronunciation[aria-pressed=true]{background:var(--tint);color:var(--ink);border-radius:12px}
.no-pronunciation .reader-bottom{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:600px){.language-picker button{font-size:13px;padding:8px 4px}}

button{appearance:none;-webkit-appearance:none}

/* Native BookshelfCover and ReaderChrome geometry; reviewed crop rectangles are in the catalogue. */
.books{grid-template-columns:repeat(var(--shelf-columns,3),minmax(0,1fr));gap:16px}
.book .open-book{min-height:0;color:var(--ink)}
.cover{display:block;width:min(100%,124.8px);height:auto;aspect-ratio:4/5;max-height:none;margin-inline:auto;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden}
.cover::before{content:none}.cover-artwork{display:block;width:100%;height:100%;overflow:hidden}
.cover img{position:static;width:100%;height:100%;object-fit:contain}
.cover.fallback-cover{display:flex;padding:18px 13px;background:linear-gradient(90deg,#dfaa36 0%,#edb944 10%,#f3c85c 100%);border-radius:0 3px 3px 0;position:relative}
.fallback-cover::before{content:'';display:block;position:absolute;inset:18px 13px;border:1px solid #382b13}
.fallback-cover::after{content:'';position:absolute;inset:22px 17px;border:.5px solid #382b13;pointer-events:none}
.cover-title{padding:8px 6px;color:#382b13;font:400 18px DafaBookUI,serif;line-height:1.5;position:relative;z-index:1}
.book-title{font-size:14px;line-height:1.35;min-height:38px;margin-top:8px}
.books.list .open-book{display:flex}.books.list .book-title{min-height:0;margin-top:0}

.continue-row{border-radius:12px}.continue-row button{font-size:18px}
.reader-top{min-height:64px}.reader-top h1{font-size:20px;line-height:1.05;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.reader-bottom{height:calc(50px + env(safe-area-inset-bottom));border:0;padding-top:2px}
.reader-bottom::before{content:'';position:absolute;inset:0 0 auto;height:2px;background:var(--ink);opacity:.14}
#reading-progress{height:2px;position:absolute;top:0;left:0;background:var(--ink);pointer-events:none}
#reader-footer{bottom:calc(50px + env(safe-area-inset-bottom));background:transparent;pointer-events:none}
#reader-footer #progress{color:var(--ink);background:var(--page);pointer-events:none}
.quiet #reader-footer{background:var(--page)}
.text-size-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.text-size-row output{flex:1;text-align:center;font-size:16px}
#sheet-body .text-size-row button{width:48px;height:48px;padding:12px}.text-size-row button:disabled{cursor:default}
fieldset{min-width:0;border:0;padding:0;margin:12px 0 0}legend{font-size:14px;margin-bottom:8px}
.choice-row{display:flex;flex-wrap:wrap;gap:8px}.choice-row button{border-radius:8px;min-height:40px;padding:8px 12px}
.choice-row button[aria-pressed=true]{background:var(--tint);color:var(--ink);border-color:transparent}
.choice-row button[aria-pressed=true]::before{content:'✓';margin-right:8px}
#sheet-body .language-choice:disabled{cursor:default}#sheet-body input[type=color]{min-height:48px;width:100%}
@media(max-width:600px){dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-height:85dvh;border:0;border-radius:24px 24px 0 0;padding:16px 24px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain}dialog>header{top:-16px}#library-header h1{font-size:22px}.reader-top h1{font-size:20px}.cover-title{font-size:16px}.books{gap:16px}}

#reader-footer #progress{font:11px/20px system-ui;padding-inline:12px;white-space:nowrap}

body.dark{--surface:#24211e;--accent:#d5c9bc;--tint:#34302c;--muted:#c9c0b7;--line:#4b443e}
body.true-black{--page:#000;--surface:#101010}
.reader-top,.reader-bottom,#reader-footer{max-width:840px;margin-inline:auto}.full-reading .reader-top,.full-reading .reader-bottom,.full-reading #reader-footer{max-width:none}
.books.list .book-title{font-size:20px;line-height:1.4;margin:0 48px 0 0}.books.list .book{padding:20px 0}
#choose-reading-track{padding:8px 0;border:0;background:transparent;color:var(--accent);font-size:14px}
.continue-row{display:block;position:relative;margin:8px 0 16px}.continue-row .continue-book{width:100%;text-align:left;padding:0;font-family:system-ui;font-size:14px}
.continue-title{display:block;font:18px/1.4 DafaBookUI,serif;padding-right:120px;min-height:40px}
.continue-row .continue-progress{display:flex;justify-content:space-between;margin-top:8px;font:14px/1.5 system-ui;color:var(--ink)}
.continue-row .continue-track{position:absolute;right:12px;top:4px;max-width:120px;font:14px system-ui;color:var(--accent);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#continue details{margin-block:12px}#continue summary{padding:12px 0;cursor:pointer;font-size:14px}#continue details button{display:block;width:100%;text-align:left;background:transparent;border:0}

dialog,dialog>header{background:var(--page)}

input[type=range],input[type=checkbox]{accent-color:var(--accent)}
.fallback-cover .cover-title{position:absolute;left:50%;top:50%;padding:0;transform-origin:center;overflow-wrap:normal;word-break:normal;max-height:none}


@font-face{font-family:DafaMaterialIcons;src:url('/fonts/material-icons.otf');font-display:block}
.material-icon{font-family:DafaMaterialIcons;font-weight:normal;font-style:normal;font-size:24px;display:block;line-height:1;letter-spacing:normal;text-transform:none;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased}
button:has(.material-icon){border:0;background:transparent;min-width:48px;min-height:48px;padding:12px}
.reader-top .material-icon,.reader-bottom .material-icon{font-size:26px}
.reader-bottom button{padding:10px}.text-size-row button .material-icon{font-size:24px}

.footnote-content{color:var(--ink);overflow-wrap:anywhere}.footnote-content p{color:inherit;line-height:inherit}.footnote-content>*:first-child{margin-top:0}.footnote-content>*:last-child{margin-bottom:0}
/* Preference pages follow the native library's grouped rows and detail navigation. */
#preferences-page{position:fixed;inset:0;z-index:20;overflow:auto;background:var(--page);color:var(--ink);overscroll-behavior:contain}.prefs-header{position:sticky;top:0;z-index:1;display:grid;grid-template-columns:48px 1fr 48px;align-items:center;gap:8px;min-height:64px;padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));background:var(--page)}.prefs-header h1{font-family:DafaBookUI,Georgia,serif;font-size:22px;font-weight:500;margin:0;line-height:1.3}.settings-root .prefs-header h1{font-family:inherit;font-weight:600}.prefs-header button{border:0;background:transparent;padding:12px;width:48px;height:48px}.prefs-body{max-width:720px;margin:auto;padding:4px 16px calc(28px + env(safe-area-inset-bottom))}.pref-label{font-size:14px;font-weight:600;color:var(--accent);margin:24px 8px 10px}.pref-group{border-radius:20px;overflow:hidden;background:color-mix(in srgb,var(--ink) 4%,var(--page));margin-bottom:16px}.pref-row,.pref-radio{display:grid;align-items:center;text-align:start;width:100%;border:0;border-radius:0;background:transparent;color:var(--ink);padding:16px;min-height:72px;gap:16px;font-size:16px}.pref-row{grid-template-columns:24px 1fr 20px}.pref-row small,.pref-switch small{display:block;font-size:14px;line-height:1.45;color:var(--muted);margin-top:4px}.pref-row+.pref-row,.pref-radio+.pref-radio,.pref-switch+.pref-switch,.pref-inline{border-top:1px solid color-mix(in srgb,var(--line) 65%,transparent)}.pref-icon{color:var(--accent)}.pref-row>.material-icon:last-child{color:var(--muted)}.pref-row:hover,.pref-radio:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}.pref-row:active,.pref-radio:active{background:var(--tint)}.pref-radio{grid-template-columns:24px 1fr;min-height:60px}.radio-mark{width:20px;height:20px;border:2px solid var(--muted);border-radius:50%;display:grid;place-items:center}.pref-radio[aria-checked=true] .radio-mark{border-color:var(--accent)}.pref-radio[aria-checked=true] .radio-mark:after{content:'';width:10px;height:10px;border-radius:50%;background:var(--accent)}.pref-switch{display:flex;flex-direction:row;color:var(--ink);align-items:center;justify-content:space-between;gap:24px;padding:16px;min-height:76px;font-size:16px;cursor:pointer}.pref-switch input{appearance:none;flex-shrink:0;width:48px;height:28px;min-height:0;margin:0;border:1px solid var(--muted);border-radius:16px;background:var(--line);position:relative;cursor:pointer}.pref-switch input:after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px #0003}.pref-switch input:checked{background:var(--accent);border-color:var(--accent)}.pref-switch input:checked:after{left:23px}.pref-switch input:disabled{opacity:.5}.pref-inline{padding:16px}.pref-inline fieldset{margin:0;border:0;padding:0}.pref-inline legend{font-size:14px;margin-bottom:12px;color:var(--muted)}.pref-footer{margin:32px 8px;text-align:center;font-size:13px;color:var(--muted)}.pref-footer button{border:0;background:transparent;color:var(--accent);font-size:13px}.prefs-body>p{font-size:14px;line-height:1.6;color:var(--muted);padding:0 8px}.license-row{display:block;padding:16px;border-bottom:1px solid var(--line);color:var(--accent)}

/* Books library: native text rows, with compact recent-reading spacing. */
#library-header h1{flex:1;min-width:0}
#library-header nav{flex-shrink:0}
#library-header{padding-bottom:4px}
#library{padding-top:0}
.library-tools{margin:4px 0 8px}
.library-tools:not(:has(> :not([hidden]))){display:none}
#categories{margin:12px 0 8px}
.shelf-bar{margin:0 0 8px}
.continue-row{margin:0;padding:12px}
.continue-row .continue-book{min-height:0}
.continue-title{min-height:32px;line-height:1.55}
.continue-row .continue-progress{margin-top:4px;line-height:1.5}
.continue-row .continue-track{top:0;right:8px;min-height:48px;padding:0 4px}
.continue-trailing{display:flex;align-items:center;gap:8px}
.continue-percent{font-size:12px}
.continue-trailing .material-icon{font-size:20px}
.list-chevron{display:none}
.book-title{margin-right:0}
#view-mode[aria-pressed=true]{background:transparent;color:var(--ink)}
.books.list .book{display:block;padding:0;border-bottom:1px solid var(--line)}
.books.list .open-book{display:flex;align-items:center;gap:16px;min-height:80px;padding:24px 0;border-radius:0}
.books.list .open-book:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}
.books.list .cover,.books.list .category{display:none}
.books.list .book-title{display:block;flex:1;min-width:0;min-height:0;margin:0;font-size:20px;line-height:1.55;-webkit-line-clamp:unset;overflow:visible;overflow-wrap:anywhere}
.books.list .list-chevron{display:block;flex:0 0 24px;color:var(--muted)}
