:root{--bg:#101411;--surface:#19211c;--surface2:#212d25;--ink:#f1efe5;--muted:#a4b1a7;--line:#334337;--accent:#e7a76b;--green:#b6cfa7}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px system-ui,-apple-system,sans-serif}button,input,select{font:inherit}button,.button{background:var(--accent);border:1px solid transparent;color:#211a12;border-radius:9px;padding:11px 17px;font-weight:650;text-decoration:none;cursor:pointer}button:disabled{opacity:.45;cursor:default}.secondary{background:transparent;border-color:var(--line);color:var(--ink)}.quiet{background:none;color:var(--muted);padding:8px 0;text-align:left}.icon{background:transparent;color:var(--ink);font-size:26px;padding:0 10px}a{color:var(--green)}input,select{background:#101913;border:1px solid #425147;border-radius:8px;padding:11px 12px;color:var(--ink);width:100%}input:focus,select:focus,button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}label{display:block;font-size:13px;color:var(--muted);margin:15px 0}label input,label select{margin-top:7px}h1,h2,h3,p{margin-top:0}h1{font-size:38px;letter-spacing:-1px;margin-bottom:0}h2{font-size:25px;letter-spacing:-.6px}h3{font-size:16px;line-height:1.35}p{line-height:1.65}small,.muted{color:var(--muted);font-size:12px;line-height:1.6}.eyebrow{font-size:10px;letter-spacing:2.2px;font-weight:750;color:var(--green);margin-bottom:11px}.rail{position:fixed;inset:0 auto 0 0;width:225px;padding:34px 23px;border-right:1px solid var(--line);background:#141b16;display:flex;flex-direction:column;z-index:5}.wordmark{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);font-size:20px;font-weight:700}.wordmark b{background:var(--accent);color:#211a12;padding:5px 11px;border-radius:8px;font-size:31px}.wordmark small{display:block;font-size:8px;letter-spacing:2px;margin-top:4px}nav{display:grid;gap:8px;margin-top:60px}nav button{background:transparent;color:var(--muted);text-align:left;padding:14px 16px}nav button.active{background:#2b372b;color:#dce6ce}.rail-footer{margin-top:auto;font-size:8px;letter-spacing:1.3px;color:var(--muted)}.rail-footer a{display:block;letter-spacing:0;font-size:12px;line-height:1.7;margin:18px 0}.rail-footer button{display:block;font-size:12px}.online-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:7px}main{margin-left:225px;padding:36px 44px 70px;max-width:1900px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:32px}.account-chip{padding:9px 15px;border:1px solid var(--line);border-radius:25px;color:var(--muted);font-size:12px}.spotlight{display:grid;grid-template-columns:1.3fr 1fr;gap:35px;padding:40px;border:1px solid #43513b;border-radius:18px;background:radial-gradient(ellipse at 100% 15%,#465139,#223427 58%,#1c2c22)}.spotlight h2{font-size:clamp(30px,4vw,51px);line-height:1.06;letter-spacing:-1.8px;max-width:540px;margin:24px 0}.spotlight p:not(.eyebrow){color:#c0caba;max-width:500px}.spotlight-art{align-self:center;transform:rotate(-7deg);text-align:center}.spotlight-art span,.spotlight-art strong{display:block;font-size:clamp(24px,3.5vw,53px);font-weight:900;line-height:1.1;letter-spacing:-2px;color:#8f9d75}.spotlight-art strong{font-size:clamp(64px,8vw,120px);color:var(--accent)}.spotlight-art small{display:block;margin-top:20px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:38px 0 18px}.section-head h2{margin-bottom:0}.section-head .eyebrow{margin-bottom:8px}.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:25px}.book-row{display:flex;overflow-x:auto;gap:22px;padding-bottom:16px;scroll-snap-type:x proximity}.book-row .book-card{flex:0 0 172px;scroll-snap-align:start}.book-card{min-width:0}.art{position:relative;aspect-ratio:2/3;background:linear-gradient(145deg,#334939,#202e24);border:1px solid #435442;border-radius:10px;overflow:hidden;cursor:pointer;display:grid;place-items:center}.art img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;transition:transform .2s}.art:hover img{transform:scale(1.025)}.art-placeholder{font-size:42px;font-weight:800;color:#859e7a}.badge{display:inline-block;padding:5px 8px;border-radius:5px;font-size:10px;color:var(--green);background:#263a29}.art .badge{position:absolute;bottom:10px;left:9px;right:auto;background:#122019e8;z-index:2}.book-card h3{margin:11px 0 5px}.book-card p{font-size:11px;color:var(--muted);margin:5px 0;line-height:1.5}.book-card button{width:100%;font-size:12px;margin-top:9px;padding:9px}.book-card .progress-line{margin-top:8px}.progress-line{height:4px;background:#344036;border-radius:6px;overflow:hidden}.progress-line span{display:block;height:100%;background:var(--green)}.toolbar{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:20px 0}.toolbar label{display:flex;gap:9px;align-items:center;margin:0;white-space:nowrap}.toolbar select{margin:0;width:auto;min-width:150px}.library-tools>input{flex:1;min-width:220px}.searchbar{display:flex;gap:10px}.searchbar input{flex:1}.empty{padding:30px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);line-height:1.7;grid-column:1/-1}.panel,.list-card{background:var(--surface);padding:25px;border:1px solid var(--line);border-radius:13px}.list-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}.list-card p{color:var(--muted);font-size:12px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.wide{grid-column:1/-1}.button-row{display:flex;gap:9px;flex-wrap:wrap;margin:18px 0}.button-row a,.button-row button{font-size:12px}.notice,#notice{background:#293d2b;border:1px solid #50674b;border-radius:9px;color:#e0e7d6;padding:15px;line-height:1.6;overflow-wrap:anywhere}#notice{position:sticky;top:10px;z-index:20;margin-bottom:20px}.error{background:#472f25!important;border-color:#a27655!important}code{display:block;overflow-wrap:anywhere;font-size:13px;color:var(--green);padding:12px;background:#111b14;border-radius:8px}.account-row{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line)}.account-row .button-row{margin:0}.account-row strong{display:block}.account-row small{display:block;margin-top:5px}dialog{background:#17231b;color:var(--ink);width:min(1050px,94vw);max-height:92vh;border:1px solid #526449;border-radius:16px;padding:28px}dialog::backdrop{background:#060c08dc;backdrop-filter:blur(5px)}.dialog-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:20px}.dialog-head h2{margin-bottom:8px}.book-detail{display:grid;grid-template-columns:220px 1fr;gap:30px}.description{white-space:pre-line;color:#b8c8b9;font-size:13px;line-height:1.7;margin-top:22px;max-height:280px;overflow:auto}.series-book{display:grid;grid-template-columns:90px 1fr;gap:20px;border-bottom:1px solid var(--line);padding:20px 0}.series-book h3{margin:4px 0}.series-book p{font-size:12px;color:var(--muted);margin:5px 0}.list-item{display:flex;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.list-item span{flex:1}.list-item button{padding:7px 10px;font-size:12px}.auth-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at top,#30452e,#101411 70%)}.auth-card{margin:30px;padding:38px;width:min(440px,92vw);background:#17231bee;border:1px solid var(--line);border-radius:18px}.auth-card .wordmark{margin-bottom:50px}.auth-card h1{font-size:35px;margin-bottom:15px}.auth-card p{color:var(--muted)}.auth-card form button{width:100%;margin:14px 0}.auth-card .eyebrow{color:var(--green)}
#reader{position:fixed;inset:0;background:#090c0a;z-index:100;display:flex;flex-direction:column}#reader header,#reader footer{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 18px;background:#17201a;flex-wrap:wrap}#reader header span{flex:1;font-size:13px;max-width:650px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#reader button,#reader select{font-size:12px;padding:8px 12px}#reader select{width:auto}#reader-stage{flex:1;overflow:auto;text-align:center;min-height:0;padding:8px;position:relative}#reader-page{display:block;max-width:100%;max-height:100%;width:auto;height:auto;margin:0 auto;object-fit:contain}#reader.width #reader-page{width:min(100%,1600px);max-height:none}#reader footer label{display:flex;align-items:center;gap:8px;margin:0;font-size:12px}#reader-number{width:76px;margin:0;padding:7px}#reader-total{font-size:12px;color:var(--muted)}#reader-status{font-size:12px;color:#f5c496;text-align:center;padding:3px}#reader-status:empty{display:none}[hidden]{display:none!important}
@media(min-width:1500px){.book-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}.book-row .book-card{flex-basis:190px}}@media(max-width:1000px){.rail{width:190px;padding:30px 16px}main{margin-left:190px;padding:30px 25px}.spotlight{padding:30px}.wordmark{font-size:17px}.spotlight-art{display:none}.spotlight{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}}@media(max-width:650px){.rail{inset:auto 0 0;width:100%;height:70px;padding:5px 8px;border-top:1px solid var(--line);border-right:0;z-index:30}.rail .wordmark,.rail-footer{display:none}nav{display:flex;margin:0;gap:2px;height:100%}nav button{font-size:11px;text-align:center;flex:1;padding:7px 3px}main{margin:0;padding:24px 17px 95px}h1{font-size:30px}.page-heading{margin-bottom:24px}.account-chip{padding:7px 10px}.spotlight{padding:27px}.spotlight h2{font-size:38px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.book-row .book-card{flex-basis:150px}.book-detail{grid-template-columns:1fr}.book-detail #book-cover{max-width:180px}.toolbar{gap:10px}.toolbar label{font-size:11px}.toolbar select{min-width:120px;font-size:12px}.searchbar{flex-wrap:wrap}.searchbar input{min-width:190px}.panel{padding:20px}.series-book{grid-template-columns:72px 1fr;gap:13px}.account-row{flex-wrap:wrap}.auth-card{padding:28px;margin:15px}.section-head{align-items:flex-start}.section-head h2{font-size:23px}dialog{padding:20px}.book-detail{gap:20px}#reader header{gap:8px;padding:8px}#reader header span{flex-basis:50%;font-size:11px}#reader-fullscreen{display:none}#reader footer{gap:7px;padding:8px 5px}#reader-bookmarks{max-width:130px}#reader-prev,#reader-next{font-size:11px}}

.book-card details{font-size:.85rem;line-height:1.5;color:var(--muted)}.book-card details p{max-height:16rem;overflow:auto}.book-card summary{cursor:pointer;margin:8px 0}.book-card>a{font-size:.8rem}

#taste-dialog{width:min(620px,calc(100vw - 32px));max-height:90dvh;overflow:auto}#taste-dialog h2{font-size:clamp(1.5rem,5vw,2.2rem)}#taste-picks{margin:12px 0 24px;flex-wrap:wrap}#taste-picks button{font-size:.85rem;padding:8px 12px}#taste-error{color:#ffb2a9}

#reader-sync{font-size:11px;text-align:center;color:var(--muted);min-height:18px}#reader.spread #reader-stage{display:flex;justify-content:center;align-items:flex-start;gap:5px}#reader.spread #reader-stage img{max-width:49%;max-height:100%;object-fit:contain;margin:0}#reader-panel{max-width:100%;max-height:100%;object-fit:contain}#reader.panels #reader-page{display:none}#reader-resync{align-self:center}#list-results{max-height:250px;overflow:auto}#list-items{margin-top:20px}#request-list{display:grid;gap:12px}@media(max-width:650px){#reader header span{flex-basis:100%}#reader header,#reader footer{gap:4px}#reader button,#reader select{padding:6px;font-size:11px}#reader-panel{touch-action:pan-y}#list-items .list-item{flex-wrap:wrap}}
/* Reading rooms share the original Crankernet visual system. */
.room-tabs{display:flex;gap:8px;margin:0 0 28px;border-bottom:1px solid #344236;padding-bottom:16px}.room-tabs button{background:transparent;color:#b9c6b8;border:1px solid transparent;font-size:18px;padding:12px 26px}.room-tabs button.active{background:#c3dc9f;color:#152017;border-radius:30px}.format-choice{display:flex;gap:18px}.format-choice label{display:flex;gap:8px;align-items:center}.format-choice input{width:auto}#read-detail .art{max-width:270px}#epub-reader{position:fixed;inset:0;background:#151a17;z-index:1000;display:flex;flex-direction:column}#epub-reader header,#epub-reader footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 20px;background:#202820}#epub-reader header strong{flex:1}#epub-reader header span{font-size:13px}#epub-reader iframe{border:0;flex:1;width:100%;background:#151a17}#epub-reader select{width:auto;max-width:200px}#room-home>section{margin:32px 0}#room-books .panel select{max-width:100%}@media(max-width:700px){.room-tabs{position:sticky;top:0;background:#111512;z-index:20;justify-content:center}.room-tabs button{padding:10px 20px}#epub-reader header,#epub-reader footer{padding:8px;gap:6px}#epub-reader header strong{flex-basis:100%;font-size:15px}}
#audio-player{position:fixed;bottom:16px;left:260px;right:24px;z-index:1100;background:#253326;border:1px solid #729461;border-radius:18px;padding:14px;box-shadow:0 8px 40px #0009}#audio-player[hidden]{display:none}.audio-player-head,.audio-player-extra{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.audio-player-head strong{flex:1}.audio-player-head img{width:44px;height:56px;object-fit:cover;border-radius:5px}#audio-player audio{width:100%;height:38px;margin:10px 0}#audio-player.mini .audio-player-extra{display:none}.audio-player-extra select{width:auto;max-width:230px}.audio-player-extra .muted{font-size:12px}.has-audio main{padding-bottom:240px}#epub-reader{z-index:1200}@media(max-width:700px){#audio-player{left:10px;right:10px;bottom:80px;padding:10px}.room-tabs{gap:2px}.room-tabs button{font-size:15px;padding:10px 12px}.audio-player-head strong{font-size:14px}.audio-player-extra select{max-width:160px}}

/* Foldable and touch reading: keep page identity as the available width changes. */
#reader-stage{touch-action:pan-y pinch-zoom;overscroll-behavior:contain}#reader.rtl.spread #reader-stage{flex-direction:row-reverse}
@media(pointer:coarse){#reader button,#reader select{min-height:44px}#reader header,#reader footer{gap:5px}#reader-stage img{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}#reader footer{padding-bottom:max(5px,env(safe-area-inset-bottom))}}
/* Reader surface fills the viewport; controls overlay it instead of shrinking artwork. */
body.comic-reading #audio-player{display:none!important}
#reader{z-index:2000;display:block;background:#000}
#reader #reader-stage{position:absolute;inset:0;padding:0;display:flex;align-items:center;justify-content:center;gap:0;overflow:auto}
#reader #reader-page,#reader #reader-page-two{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0;flex-shrink:0}
#reader.spread #reader-stage{align-items:center;gap:0}
#reader.spread #reader-page,#reader.spread #reader-page-two{width:50%;max-width:50%;height:100%;object-fit:contain;flex-shrink:0}
#reader.spread #reader-page:has(+img[hidden]){width:100%;max-width:100%}
#reader.width #reader-stage{align-items:flex-start}
#reader.width #reader-page,#reader.width #reader-page-two{height:auto;max-height:none;width:100%;max-width:100%}
#reader.width.spread #reader-page,#reader.width.spread #reader-page-two{width:50%;max-width:50%}
#reader #reader-panel{max-width:100%;max-height:100%;object-fit:contain}
#reader header,#reader footer{position:absolute;left:0;right:0;z-index:5;background:#152017f5;visibility:hidden;pointer-events:none;max-height:42%;overflow:auto}
#reader header{top:44px;padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left))}
#reader footer{bottom:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
#reader.controls-open header,#reader.controls-open footer{visibility:visible;pointer-events:auto}
#reader #reader-sync{position:absolute;bottom:28%;left:12%;right:12%;z-index:6;background:#152017ef;padding:6px;visibility:hidden;pointer-events:none}
#reader.controls-open #reader-sync{visibility:visible}
#reader #reader-status:not(:empty),#reader #reader-resync:not([hidden]){position:absolute;left:15%;right:15%;top:46%;z-index:7;background:#152017ee;padding:12px}
#reader #reader-resync:not([hidden]){top:54%}
#reader #reader-controls-toggle{position:absolute;inset:0 0 auto;height:44px;width:100%;z-index:8;border:0;border-radius:0;background:transparent;color:transparent;padding:0;min-height:44px}
#reader #reader-controls-toggle:focus-visible,#reader.controls-open #reader-controls-toggle{background:#152017ed;color:#e9eedd;outline:2px solid #e6ac71;outline-offset:-2px}
#reader #reader-fullscreen{display:inline-block}
#reader header #reader-title{flex-basis:auto;min-width:0}
@media(max-width:650px){#reader header #reader-title{flex:1 1 50%}#reader #reader-number{width:54px}#reader header,#reader footer{gap:6px}#reader button,#reader select{min-height:44px}}
#reader.spread:not(.width) #reader-page{object-position:right center}
#reader.spread:not(.width) #reader-page-two{object-position:left center}
#reader.spread.rtl:not(.width) #reader-page{object-position:left center}
#reader.spread.rtl:not(.width) #reader-page-two{object-position:right center}
#reader.spread:not(.width) #reader-page:has(+img[hidden]){object-position:center}
#reader header button,#reader footer button,#reader select{border-radius:13px;font-family:Arial,Helvetica,sans-serif;font-size:13px;letter-spacing:.1px;font-weight:500}
#reader header,#reader footer{box-shadow:0 4px 24px #0005;backdrop-filter:blur(12px)}
#reader #reader-sync{font-size:12px;border-radius:10px}
/* Shared controls and first-run guidance, October 2026. */
body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea,.button{font-family:inherit;letter-spacing:.01em}
button,.button{border-radius:13px;font-size:14px;font-weight:600;line-height:1.4;min-height:44px;transition:background .15s,border-color .15s,box-shadow .15s}
button.secondary,.button.secondary{background:#1c2920;border-color:#3b4c3f;color:#e7eddf}
@media(hover:hover){button:hover:not(:disabled),.button:hover{filter:brightness(1.08)}button.secondary:hover{background:#2b3a2d;border-color:#71816a}}
input,select,textarea{border-radius:12px;min-height:44px;background:#121c16;border-color:#3b4c3f;accent-color:var(--green)}
input[type=checkbox],input[type=radio]{width:auto;min-height:0;accent-color:var(--green)}
textarea{padding:12px;color:var(--ink)}
.panel,.list-card,dialog{border-radius:20px}.panel h2{font-size:23px}.book-card h3{letter-spacing:-.02em}
.book-card .art{border-radius:12px;box-shadow:0 10px 24px #0003}.book-card .button,.book-card>button{width:100%}
.button-row{row-gap:10px}.toolbar{align-items:end}.toolbar input{min-width:0}.toolbar label{min-width:0}
.room-tabs{gap:6px}.room-tabs button{border-radius:14px;font-size:15px;font-weight:600}.room-tabs button.active{border-radius:14px;background:#bed3a8}
.page-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}.page-actions button{font-size:12px;min-height:38px;padding:8px 12px}.page-heading{gap:16px}.page-heading>div:first-child{min-width:0}
#taste-dialog{width:min(720px,calc(100vw - 24px));padding:32px}#taste-dialog>p{color:var(--muted)}
.taste-group{border:0;border-top:1px solid var(--line);padding:22px 0 8px;margin:22px 0 0;min-width:0}.taste-group legend{font-size:17px;font-weight:650;padding:0 10px 0 0}.taste-group p{margin:0 0 12px}
.taste-choices{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}#taste-picks{margin:8px 0 14px}.taste-choices button,#taste-picks button{border-radius:24px;font-size:13px;padding:10px 14px;min-height:44px}
.taste-choices button[aria-pressed=true]{background:#c0d4ac;color:#142017;border-color:#c0d4ac;box-shadow:inset 0 0 0 1px #91ab79}
#taste-more{border-top:1px solid var(--line);padding:18px 0;margin:12px 0}#taste-more summary{cursor:pointer;font-weight:600;line-height:1.6}.taste-actions{position:sticky;bottom:-32px;background:#19211cf5;padding:16px 0;backdrop-filter:blur(12px)}
#welcome-tour{position:fixed;inset:auto 20px 24px auto;margin:0;width:min(430px,calc(100vw - 32px));max-height:calc(100dvh - 130px);overflow:visible;padding:28px;background:#1c2a20;box-shadow:0 16px 70px #0007;border:1px solid #526449}
#welcome-tour::backdrop{background:#000a}#welcome-tour.tour-at-top{inset:24px 16px auto auto}#welcome-tour h2{font-size:26px;outline:none}#welcome-tour p:not(.eyebrow){color:#c3cdbf;font-size:14px;line-height:1.7}.tour-actions{display:flex;gap:10px;align-items:center}.tour-actions button:first-child{margin-right:auto;background:none;border:0;color:var(--muted);padding-left:0}.tour-error:empty{display:none}.tour-error{color:#ffc0ab!important}
#tour-spotlight{position:fixed;border:2px solid #d2e7b9;border-radius:14px;box-shadow:0 0 0 5px #c0d4ac22;pointer-events:none}
@media(max-width:650px){.page-heading{flex-wrap:wrap;align-items:flex-start}.page-actions{width:100%;justify-content:space-between}.room-tabs{overflow-x:auto;justify-content:flex-start;padding:8px 0 12px;scrollbar-width:none}.room-tabs button{flex:1;white-space:nowrap;font-size:13px;padding:10px 12px}nav button{min-width:0;font-size:11px}.toolbar{flex-wrap:wrap}.toolbar>input{flex:1 1 100%;width:100%}.button-row>button,.button-row>.button{max-width:100%}#taste-dialog{padding:22px}.taste-actions{bottom:-22px;flex-wrap:wrap}#welcome-tour{bottom:94px;right:16px;padding:22px}#welcome-tour h2{font-size:23px}.tour-actions button{padding:10px 12px}}
@media(prefers-reduced-motion:reduce){button,.button{transition:none}html{scroll-behavior:auto}}

#welcome-tour::backdrop{backdrop-filter:none;background:#0006}.tour-copy{max-height:calc(100dvh - 260px);overflow:auto}.tour-actions{flex-wrap:wrap}#taste-title:focus{outline:none}
@media(max-height:550px){#welcome-tour,#welcome-tour.tour-at-top{top:12px;bottom:auto;padding:18px}.tour-copy{max-height:calc(100dvh - 130px)}}

button[aria-busy=true]{cursor:progress;opacity:.7}button[aria-busy=true]::after{content:"";display:inline-block;width:11px;height:11px;margin-left:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:middle;animation:app-working .8s linear infinite}@keyframes app-working{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){button[aria-busy=true]::after{animation:none}}
@media(max-height:550px){#welcome-tour{top:auto;bottom:12px}#welcome-tour.tour-at-top{top:12px;bottom:auto}}

/* Ebook recovery remains available without overwriting a newer device position. */
#epub-reader .epub-recovery{padding:16px 20px;background:#332e20;border-block:1px solid #76643e;color:#f1e3c8;max-height:45dvh;overflow:auto}#epub-reader .epub-recovery p{margin:0 0 12px}#epub-reader .epub-recovery button{margin:0 8px 6px 0}#epub-reader header,#epub-reader footer{background:#1b2920;border-color:var(--line)}#epub-reader header{border-bottom:1px solid var(--line)}#epub-reader footer{border-top:1px solid var(--line)}#epub-reader header strong{font-size:15px;min-width:0}#epub-reader select{font-size:13px}#epub-reader header span{font-size:12px;color:var(--muted)}@media(max-width:650px){#epub-reader footer{display:grid;grid-template-columns:1fr 1fr}#epub-reader footer select{grid-column:1/-1;grid-row:1;width:100%;max-width:none}#epub-reader footer button{font-size:12px;padding:9px}#epub-reader footer button:last-child{grid-column:1/-1}#epub-reader header{padding-top:max(8px,env(safe-area-inset-top))}#epub-reader footer{padding-bottom:max(8px,env(safe-area-inset-bottom))}}
/* A consistent audiobook transport replaces platform-specific native controls. */
#audio-player{padding:18px;background:#1b2b21f5;border-color:#465d45;box-shadow:0 14px 55px #0008;backdrop-filter:blur(18px)}.audio-identity{display:grid;gap:4px;flex:1;min-width:110px}.audio-identity strong{font-size:15px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audio-identity .muted{font-size:12px}.audio-player-head{flex-wrap:nowrap;gap:12px}.audio-player-head img{width:44px;height:52px;border-radius:8px}.audio-player-head button{font-size:12px;padding:8px 12px}.audio-transport{display:flex;justify-content:center;gap:12px;margin:14px 0 8px}.audio-transport button{min-width:70px}.audio-transport button:nth-child(2){min-width:100px}.audio-scrub input{width:100%;padding:0;min-height:28px;border:0;background:transparent;cursor:pointer;accent-color:#c4d9ad}.audio-times{display:flex;justify-content:space-between;font-size:11px;font-variant-numeric:tabular-nums;color:var(--muted);margin:0 0 12px}.audio-player-extra{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.audio-player-extra select{width:100%;max-width:none;font-size:12px}.audio-recovery{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}.audio-recovery button{font-size:12px;padding:8px}.audio-recovery>span{flex:1;font-size:11px}.audio-player-extra select:first-child{min-width:0}#audio-player.mini .audio-scrub{display:none}#audio-player.mini .audio-transport{margin-bottom:0}#audio-player.mini .audio-recovery:has(button:not([hidden])){display:flex}#audio-player.mini .audio-recovery:not(:has(button:not([hidden]))){display:none}.has-audio main{padding-bottom:400px}
@media(max-width:650px){#audio-player{padding:12px;max-height:75dvh;overflow:auto}.audio-player-head{gap:8px;flex-wrap:wrap}.audio-identity{min-width:140px}.audio-player-head button{min-height:36px}.audio-player-extra{grid-template-columns:1fr 1fr}.audio-player-extra select:first-child{grid-column:1/-1}.audio-player-head img{height:42px;width:36px}.audio-transport{margin:10px 0 4px}}
/* EPUB text fills the reading surface; controls appear only on request. */
body.ebook-reading #audio-player{display:none!important}
#epub-reader{display:block;background:#151a17}
#epub-reader iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
#epub-reader header,#epub-reader footer{position:absolute;left:0;right:0;z-index:3;visibility:hidden;pointer-events:none;max-height:40dvh;overflow:auto;background:#1b2920f5;backdrop-filter:blur(14px)}
#epub-reader header{top:44px}#epub-reader footer{bottom:0}
#epub-reader.controls-open header,#epub-reader.controls-open footer{visibility:visible;pointer-events:auto}
#epub-controls-toggle{position:absolute;inset:0 0 auto;width:100%;height:44px;z-index:4;background:transparent;color:transparent;border:0;border-radius:0;padding:0}
#epub-controls-toggle:focus-visible,#epub-reader.controls-open #epub-controls-toggle{background:#1b2920f5;color:var(--ink)}
#epub-reader .epub-recovery{position:absolute;top:35%;left:16px;right:16px;z-index:5;border:1px solid #76643e;border-radius:16px}

.reading-estimate{flex-basis:100%;color:var(--muted,#bac5b8);font-size:13px;line-height:1.5}.download-stages{display:flex;list-style:none;padding:0;gap:8px;margin:18px 0}.download-stages li{flex:1;border-top:3px solid #354039;padding-top:8px;font-size:13px;color:#9dac9f}.download-stages li.done{border-color:#77956b}.download-stages li.current{border-color:#e5aa69;color:#f5d4ac;font-weight:700}.panel progress{width:100%;height:8px;accent-color:#b3cc9d}.book-card{content-visibility:auto;contain-intrinsic-size:auto 440px}.art img{object-fit:cover}

/* Compact touch controls preserve artwork and iOS input scale. */
#reader header,#reader footer{border-radius:0;padding:10px 12px;gap:8px}
#reader header button,#reader footer button,#reader select{border-radius:14px;min-height:44px;font-weight:600}
#reader-status{position:absolute;top:auto!important;bottom:14px;left:50%;transform:translateX(-50%);width:max-content;max-width:85%;font-size:12px;border-radius:12px;padding:8px 12px;pointer-events:auto;z-index:4}
#reader-status button{margin-left:8px;font-size:12px;min-height:36px}
#reader.controls-open #reader-status{display:none}
#reader-stage img,#reader-panel{user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
@media(max-width:650px){input,select,textarea{font-size:16px}#reader header span{flex-basis:100%;font-size:13px}#reader header select{flex:1;min-width:0;font-size:13px}#reader footer label{font-size:12px}#reader-number{width:52px}#reader footer button{font-size:12px;padding:8px 10px}#reader-fullscreen{display:none!important}}

/* Shared, categorized settings across web and mobile. */
.settings-intro{margin-bottom:24px}.settings-categories{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 28px}.settings-categories button{min-height:44px}.settings-categories button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink,#101411);border-color:var(--accent)}.settings-category{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;min-width:0}.settings-category[hidden]{display:none}.settings-category .wide{grid-column:1/-1}.settings-category>.panel{min-width:0}.settings-category code{overflow-wrap:anywhere}@media(max-width:760px){.settings-category{grid-template-columns:1fr}.settings-categories{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.settings-categories button{text-align:left;font-size:14px;padding:12px}.rail nav{overflow-x:auto}}

/* Keep phone controls readable without input-focus magnification. */
@media(max-width:760px){input,select,textarea{font-size:16px!important}.download-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.download-stages li{min-width:0;font-size:12px;overflow-wrap:anywhere}.panel{min-width:0;overflow-wrap:anywhere}.library-tools>details{grid-column:1/-1;width:100%}.library-tools>details:not([open]){margin:0}.library-tools{align-items:start}}

/* Bookclubs shares page navigation; small screens scroll rather than shrink labels. */
html.ios-native-app .rail nav{overflow-x:auto!important;overscroll-behavior-x:contain;scrollbar-width:thin}html.ios-native-app .rail nav button{flex:0 0 auto!important;white-space:nowrap;min-width:84px;padding:8px 12px!important}html.ios-native-app .page-actions:has(>#app-tour):not(:has(>button:not(#app-tour))){display:none}@media(max-width:650px){.rail nav{overflow-x:auto;overscroll-behavior-x:contain}.rail nav button{flex:0 0 auto;min-width:72px;white-space:nowrap;padding:8px 10px}}

/* Discovery leads with search and covers, without a duplicate welcome card. */
.discover-search{width:100%;margin:0 0 20px}.discover-search input{min-width:0;flex:1}.toolbar[hidden]{display:none!important}@media(max-width:650px){.discover-search{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.discover-search input{width:100%;min-width:0}.discover-search button{min-height:44px;width:100%}}

.availability-status{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:650;line-height:1.4;padding:6px 9px;margin-bottom:9px;border-radius:8px;background:var(--surface2);color:var(--ink)}.availability-status[hidden]{display:none}.availability-dot{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:#298cff}.availability-status[data-state=available] .availability-dot{background:#2dc979}
.availability-status[data-state=failed] .availability-dot,.availability-status[data-state=cancelled] .availability-dot{background:#f06670}

.availability-status[data-state="partial"] .availability-dot{background:#b78aff}

/* Lock the paginated reading surface; chapter/font/recovery panels remain scrollable. */
html.ebook-reading,body.ebook-reading{overflow:hidden!important;overscroll-behavior:none!important}body.ebook-reading #epub-reader{overflow:hidden;overscroll-behavior:none}body.ebook-reading #epub-reader iframe{touch-action:none;overscroll-behavior:none}body.ebook-reading #epub-reader header,body.ebook-reading #epub-reader footer,body.ebook-reading #epub-reader .epub-recovery{touch-action:pan-y}

/* Stable shared Home shelf geometry; respect reduced motion. */
.home-shelf-slot:empty{display:none}.cover-placeholder{flex:0 0 clamp(140px,18vw,210px);aspect-ratio:2/3;border-radius:var(--radius,14px);background:linear-gradient(110deg,var(--surface) 25%,var(--border) 40%,var(--surface) 55%);background-size:200% 100%;animation:shelf-shimmer 1.6s linear infinite}.shelf-loading .book-row{overflow:hidden}.home-shelf-slot{min-width:0}@keyframes shelf-shimmer{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.cover-placeholder{animation:none}}

.global-search{display:grid;grid-template-columns:minmax(140px,1fr) auto auto;gap:10px;margin:20px 0;align-items:center}.global-search input{width:100%;min-width:0}.search-options{display:flex;gap:8px}.search-options select{min-width:0;max-width:180px}#global-results{width:min(1100px,96vw);max-height:90dvh}#global-results>.dialog-head{position:sticky;top:0;background:var(--surface);z-index:2}.global-search button{min-height:44px}@media(max-width:640px){.global-search{grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:12px 0}.global-search>.search-options{grid-column:1/-1;grid-row:2}.global-search>.search-options select{flex:1;max-width:none}.global-search input{font-size:16px!important}.global-search>button{grid-column:2;grid-row:1}}

html.unified-search .discover-search{display:none!important}

#startup-screen{display:none}.reader-starting #startup-screen{display:block}.reader-starting main>section{display:none!important}.reader-starting .page-heading{visibility:hidden}

.audio-card .art,.book-detail .art.audio-art{aspect-ratio:1/1}.reader-title-dialog{width:min(960px,96vw);max-height:90dvh}.reader-title-dialog .title-progress{color:var(--accent);font-weight:600}.reader-title-dialog .description{line-height:1.65}.reader-title-dialog .button-row{margin-block:14px}

/* Shared cross-format reading lists. */
.reading-list-entries{padding:0;list-style:none}.reading-list-entries .list-item{gap:12px;flex-wrap:wrap;padding:14px 0}.reading-list-number{font-variant-numeric:tabular-nums;color:var(--muted);min-width:1.5em}.reading-list-cover{width:48px;flex:0 0 48px;min-height:0;aspect-ratio:2/3;border-radius:6px}.reading-list-cover img{width:100%;height:100%;object-fit:cover}.reading-list-entries .list-item>small{margin-left:auto}
