:root{--bg:#f8f8f3;--paper:#fff;--ink:#253b32;--muted:#747e73;--line:#e3e7dd;--green:#305846;--orange:#c27c4b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Segoe UI',Arial,sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{transition:background .18s,transform .18s}button:hover{filter:brightness(.96)}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible{outline:3px solid #bb905a;outline-offset:3px}input:focus,select:focus,textarea:focus{outline:2px solid #7d9c80;outline-offset:1px}a{color:inherit}button{border:0}button.primary,.primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--green);color:#fff;padding:12px 20px;border-radius:9px;font-weight:600}button.secondary{background:#eef0e9;padding:11px 17px;border-radius:9px;color:var(--ink)}.shell{display:grid;grid-template-columns:224px 1fr;min-height:100vh}.sidebar{padding:32px 20px 20px;background:#f0f2e9;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;margin:0 8px 48px;font-size:30px;font-weight:750;line-height:1}.brand-icon{width:45px;height:45px;border-radius:13px;background:var(--green);color:#f3ebd5;font-family:Georgia,serif;font-size:37px;display:flex;align-items:center;justify-content:center}.brand-icon span{font-size:23px;color:#e9ae76;margin-left:-2px;margin-top:10px}.brand small{font-size:9px;display:block;letter-spacing:2.3px;margin-top:8px;font-weight:600}.nav-caption{font-size:9px;letter-spacing:1.5px;color:#8a9484;margin:0 12px 15px;font-weight:600}.nav{display:flex;align-items:center;text-align:left;gap:12px;width:100%;padding:12px 13px;margin-bottom:6px;background:transparent;color:#67745f;border-radius:8px;font-size:13px}.nav>span{font-size:20px;min-width:20px;line-height:20px}.nav b{margin-left:auto;background:#dce3d4;border-radius:5px;padding:2px 6px;font-size:10px}.nav.active{background:#dde6d6;color:#294b3b;font-weight:700}.side-note{margin:34px 12px 28px;padding:15px 0 0;border-top:1px solid #dce2d4}.side-note>span{font-family:Georgia;font-size:40px;color:#b7bfa2;line-height:1}.side-note p{font-family:Georgia,'Times New Roman',serif;font-size:22px;line-height:1.45;margin:4px 0 13px}.side-note small{line-height:1.9;color:#84907c;font-size:11px}.side-bottom{margin-top:auto}.profile{display:flex;gap:10px;align-items:center;border-top:1px solid #dde3d4;padding:20px 8px 0;margin-top:15px;font-size:12px}.profile>span{display:grid;place-items:center;width:32px;height:32px;background:#e2d5bd;color:#746448;border-radius:50%;font-family:Georgia}.profile small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.profile i{width:7px;height:7px;border-radius:50%;background:#6e9474;margin-left:auto}main{min-width:0;padding:0 46px;max-width:1600px;width:100%;margin:auto}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;font-size:11px;border-bottom:1px solid var(--line);color:#8b9285}.breadcrumb span{margin:0 12px;color:#babeb3}.breadcrumb b{font-weight:500;color:#67715f}.device-label{font-size:10px;letter-spacing:.3px;color:#6c8266}.hero{display:flex;align-items:center;justify-content:space-between;min-height:330px;padding:38px 0 30px;gap:20px}.eyebrow{font-size:9px;letter-spacing:2px;font-weight:600;color:#9b815c;margin-bottom:18px}h1{font-weight:600;font-size:clamp(28px,2.8vw,42px);letter-spacing:-1.5px;line-height:1.3;margin:0 0 15px}h1 em{font-family:Georgia,'Times New Roman',serif;color:#bd8153;font-weight:400}p{line-height:1.7}.hero p{font-size:12px;color:#7b8474;margin:0 0 22px}.hero .primary{font-size:12px;padding:11px 18px}.hero-art{width:330px;height:250px;position:relative;flex-shrink:0;overflow:hidden}.art-orbit{position:absolute;width:230px;height:210px;border-radius:50%;background:#e9ecdf;right:25px;top:10px}.book{position:absolute;border-radius:3px 8px 8px 3px;box-shadow:-4px 0 0 #e4dcc7,8px 14px 15px #34462d16;display:flex;flex-direction:column;align-items:center;text-align:center;width:120px;height:173px;top:29px;padding-top:24px;border-left:7px solid #ffffff22}.book small{font-size:7px;letter-spacing:2px}.book strong{font-family:Georgia;font-size:19px;font-weight:400;margin-top:10px}.book span{font-size:55px;margin-top:15px}.b1{transform:rotate(-14deg);left:45px;background:#2f5849;color:#ede6ce}.b2{transform:rotate(12deg);left:160px;top:45px;background:#d59c67;color:#573f29}.b2 strong{font-size:20px}.b2 span{font-size:58px;line-height:50px}.art-base{position:absolute;height:5px;width:275px;border-radius:50%;background:#b7bba64f;top:229px;left:32px}.art-star{position:absolute;right:26px;top:5px;font-size:35px;color:#c5ad75}.art-caption{position:absolute;bottom:0;left:110px;color:#909981;font-size:9px;letter-spacing:1.7px}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);background:#fff;border-radius:12px;padding:20px 0;margin:5px 0 38px}.stats>div{display:flex;align-items:center;gap:15px;padding:0 25px;border-right:1px solid var(--line)}.stats>div:last-child{border-right:0}.stats>div>span{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:#eef2e8;color:#7b8d69;font-size:21px}.stats>div:nth-child(2)>span{background:#faf1e4;color:#b99464}.stats>div:nth-child(4)>span{background:#f6eae4;color:#b77c6a}.stats p{margin:0}.stats b{display:block;font-weight:600;font-size:24px;line-height:1}.stats small{display:block;margin-top:7px;font-size:10px;color:#8b9285}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}h2{font-size:21px;letter-spacing:-.5px;font-weight:600;margin:0}.section-title h2 span{font-size:11px;font-weight:500;display:inline-block;vertical-align:middle;margin-left:6px;background:#e9eddf;padding:3px 7px;border-radius:5px;color:#748062}.section-title p{font-size:11px;color:#8b9285;margin:7px 0 0}.text-button{font-size:11px;background:none;color:#7c8a6e;padding:8px}.controls{display:flex;gap:10px;margin-bottom:18px}.search-wrap{display:flex;align-items:center;gap:10px;flex:1;background:#fff;border:1px solid var(--line);border-radius:8px;padding:0 12px}.search-wrap>span{font-size:25px;color:#8b9285}.search-wrap input{border:0;background:none;width:100%;padding:12px 0;font-size:11px;min-width:0}.controls select{border:1px solid var(--line);border-radius:8px;background:white;color:#707b66;padding:0 12px;font-size:11px;max-width:145px}.square{border:1px solid var(--line);background:#fff;border-radius:8px;width:40px;font-size:21px;color:#7e8972}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.chip{background:transparent;color:#8a9382;padding:8px 13px;font-size:11px;border:1px solid transparent;border-radius:6px}.chip.selected{background:#e9eedf;color:#4c6747;font-weight:600;border-color:#dbe3ce}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:white;transition:transform .18s,box-shadow .18s}.card:hover{transform:translateY(-3px);box-shadow:0 9px 25px #263a2910}.cover{height:174px;position:relative;overflow:hidden;background:var(--cover-bg);color:var(--cover-ink)}.cover:before{content:'';position:absolute;width:190px;height:190px;right:-34px;top:35px;background:var(--cover-shape);border-radius:50%;opacity:.65}.cover:after{content:'';position:absolute;height:110px;width:240px;background:var(--cover-front);transform:rotate(-32deg);left:-30px;bottom:-55px;border-radius:50%}.palette-0{--cover-bg:#c8d7bf;--cover-ink:#315248;--cover-shape:#f3edc9;--cover-front:#809e87}.palette-1{--cover-bg:#c5cfda;--cover-ink:#354a5c;--cover-shape:#e6e7d9;--cover-front:#879bb0}.palette-2{--cover-bg:#d9c0ac;--cover-ink:#624637;--cover-shape:#f3dfb2;--cover-front:#a8806c}.palette-3{--cover-bg:#d9cce0;--cover-ink:#5f496e;--cover-shape:#f5e5d4;--cover-front:#ac94b7}.palette-4{--cover-bg:#b6d3cf;--cover-ink:#2d5b59;--cover-shape:#e1e5c7;--cover-front:#6d9f9b}.palette-5{--cover-bg:#ddd5b1;--cover-ink:#68633d;--cover-shape:#f8eac2;--cover-front:#aea572}.cover-mark{position:absolute;top:45px;left:20px;font-size:63px;line-height:1;font-family:Georgia;opacity:.8;letter-spacing:-5px;z-index:1}.cover-word{position:absolute;left:19px;bottom:17px;right:20px;font-size:9px;letter-spacing:2px;text-transform:uppercase;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cover img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;z-index:3}.cover img.broken{display:none}.cover-badges{position:absolute;left:11px;top:11px;display:flex;gap:5px;z-index:4}.badge{font-size:8px;letter-spacing:.3px;background:#ffffffcf;backdrop-filter:blur(6px);padding:4px 7px;border-radius:4px;color:#53634f}.favorite{position:absolute;right:10px;top:9px;z-index:4;width:28px;height:28px;border-radius:50%;background:#ffffffc9;color:#7f886d;font-size:19px;display:grid;place-items:center}.favorite.on{color:#ba775c}.card-body{padding:15px 14px}.card h3{font-size:14px;line-height:1.4;margin:0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}.title-button{padding:0;background:none;color:inherit;font:inherit;text-align:left;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-meta{display:flex;justify-content:space-between;font-size:9px;color:#8b9484;gap:8px}.status-label{color:#74835e}.status-label.completed{color:#568171}.progress-text{font-size:11px;margin:15px 0 8px;color:#6e7a62;display:flex;justify-content:space-between}.progress-text b{font-weight:500;color:#88927d;font-size:9px}.progress-track{height:3px;background:#edf0e7;border-radius:5px;overflow:hidden}.progress-fill{height:100%;background:#94a77b;width:0;max-width:100%}.card-buttons{display:flex;gap:6px;margin-top:14px}.continue{display:block;flex:1;text-align:center;text-decoration:none;background:#f1f4eb;color:#627a51;border-radius:5px;padding:8px 5px;font-size:10px;border:0}.increment{border:1px solid var(--line);background:#fff;border-radius:5px;color:#6b7c5c;font-size:11px;min-width:34px}.detail{display:block;width:100%;background:none;color:#929a8a;font-size:9px;margin-top:8px;padding:3px}.trash-action{color:#9a7562}.empty{text-align:center;border:1px dashed #d6dfcb;border-radius:12px;padding:55px 15px;background:#ffffff88}.empty>div{font-size:55px;color:#b3bea5}.empty h3{font-size:20px;font-weight:500}.empty p{font-size:12px;color:#8a9480}.empty .primary{margin-top:14px}.empty[hidden],[hidden]{display:none!important}.error-banner{background:#faeee5;color:#a05f40;padding:14px;border-radius:9px;margin-bottom:18px}footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:22px 0;margin:36px 0 0;font-size:9px;color:#9bA28f}dialog{width:min(570px,calc(100% - 28px));max-height:90dvh;border:1px solid #e1e5d8;border-radius:17px;background:#fffffb;color:var(--ink);padding:27px;box-shadow:0 30px 100px #23362c30;overflow:auto}dialog::backdrop{background:#24392d66;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.dialog-heading small{font-size:8px;letter-spacing:1.8px;color:#929f7b}.dialog-heading h2{margin-top:7px}.close{font-size:26px;background:#f0f2e9;border-radius:50%;width:33px;height:33px;color:#859175;flex-shrink:0}label{display:block;font-size:11px;font-weight:500;margin:0 0 14px}label>span{color:#b87b51}label>input:not([type=checkbox]),label>select,label>textarea{display:block;width:100%;margin-top:7px;border:1px solid #dfe4d4;padding:11px 12px;background:#fff;border-radius:7px;color:#4c5a43;font-size:12px;min-width:0}label small{display:block;color:#919c86;font-size:10px;margin-top:6px;line-height:1.5;font-weight:400}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-row.three{grid-template-columns:1fr 1fr 1fr}fieldset{border:1px solid #e0e6d7;border-radius:9px;margin:3px 0 17px;padding:14px 13px 0}legend{font-size:11px;padding:0 6px;color:#7c8b6b}.checkbox{display:flex;align-items:center;gap:8px;color:#70815f}.checkbox input{accent-color:var(--green)}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:18px;margin-top:14px}.form-error{color:#ac6949;font-size:12px;line-height:1.5}dialog h3{font-size:14px;margin-top:24px}dialog p{font-size:12px;color:#7a866c}dialog code{font-size:11px;background:#eff2e7;padding:2px 4px;border-radius:3px;overflow-wrap:anywhere}.backup-actions{display:flex;gap:8px;flex-wrap:wrap}.backup-actions button{font-size:11px}.history{font-size:10px;color:#8b947e;line-height:2.1}.muted{color:#919b86!important;font-size:10px!important}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);padding:14px 24px;background:#30503e;color:white;border-radius:10px;box-shadow:0 5px 30px #1d332d22;z-index:10;font-size:12px;line-height:1.6}.toast.error{background:#8c4d35}
@media(min-width:1500px){.cover{height:215px}.grid{gap:24px}}@media(max-width:1150px){main{padding:0 28px}.shell{grid-template-columns:198px 1fr}.sidebar{padding:28px 13px 18px}.grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.hero-art{width:260px;transform:scale(.88);transform-origin:right}.hero{gap:0}h1{font-size:32px}.stats>div{padding:0 16px;gap:10px}.stats>div>span{width:29px;height:29px}.stats small{font-size:9px}}@media(max-width:850px){.hero-art{display:none}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(2,1fr);row-gap:20px}.stats>div:nth-child(2){border:0}.device-label{display:none}.hero{min-height:290px}.side-note{margin-top:22px}.cover{height:190px}}@media(max-width:600px){.shell{display:block}.sidebar{position:relative;display:block;width:100%;height:auto;padding:18px 18px 0;border-right:0;background:var(--bg)}.brand{margin:0 0 20px;font-size:26px;gap:9px}.brand-icon{height:36px;width:36px;font-size:28px;border-radius:10px}.brand-icon span{font-size:19px}.brand small{font-size:8px;letter-spacing:1.9px}.nav-caption,.side-note,.profile{display:none}.sidebar nav{display:flex;overflow:auto;border-bottom:1px solid var(--line);gap:6px;padding-bottom:10px;scrollbar-width:none}.sidebar nav .nav{width:auto;flex-shrink:0;padding:8px 10px;font-size:11px;gap:5px;margin:0}.nav>span{font-size:17px;min-width:17px}.side-bottom{position:absolute;right:16px;top:20px;display:flex;gap:5px}.side-bottom .nav{width:auto;padding:7px;font-size:0;margin:0}.side-bottom .nav>span{font-size:21px}.side-bottom .nav.active{background:#e5eadb}.topbar{display:none}main{padding:0 18px}.hero{padding:29px 0 24px;min-height:0}.eyebrow{font-size:8px;letter-spacing:1.5px;margin-bottom:15px}h1{font-size:31px;letter-spacing:-1px}.hero p{font-size:11px;margin-bottom:19px}.stats{margin:0 0 27px;padding:17px 0;row-gap:17px}.stats>div{padding:0 20px}.stats b{font-size:22px}.stats small{font-size:9px}.section-title{align-items:flex-start;margin-bottom:18px}.section-title h2{font-size:20px}.section-title p{font-size:10px}.text-button{font-size:10px;max-width:110px;text-align:right;padding:4px 0}.controls{gap:6px}.controls select{font-size:10px;padding:0 6px;width:112px}.search-wrap{padding:0 8px;gap:5px}.search-wrap input{font-size:10px;padding:11px 0}.square{width:33px}.filters{flex-wrap:nowrap;overflow:auto;margin-bottom:19px;gap:3px;padding-bottom:3px}.chip{flex-shrink:0;padding:7px 10px;font-size:10px}.grid{gap:12px}.cover{height:153px}.cover-mark{font-size:55px;left:14px}.cover-word{font-size:7px;left:14px;right:10px}.cover-badges{left:8px;top:8px}.badge{font-size:7px;padding:4px 5px}.favorite{right:7px;top:7px;width:25px;height:25px;font-size:17px}.card-body{padding:12px 10px}.card h3{font-size:12px}.card-meta{font-size:8px;min-height:13px}.progress-text{font-size:10px;margin-top:12px;gap:5px}.progress-text b{font-size:8px}.card-buttons{gap:5px}.continue{font-size:9px}.increment{min-width:29px;font-size:10px}footer{font-size:8px;flex-direction:column;gap:5px;margin-top:25px}dialog{padding:20px;max-height:92dvh}.dialog-heading h2{font-size:20px}.dialog-heading{margin-bottom:21px}.form-row{gap:10px}.dialog-actions{position:sticky;bottom:-20px;background:#fffffb;padding-bottom:15px}.empty{padding:35px 14px}.empty h3{font-size:17px}.toast{bottom:16px;width:max-content;max-width:calc(100% - 24px)}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.position-note{font-size:9px;color:#8b947e;line-height:1.4;min-height:13px;margin-top:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.discover-button{width:100%;margin:-20px 0 24px;font-size:12px}.bookmark-link{display:inline-block;color:#305846;background:#e8eddf;border-radius:8px;padding:12px 16px;font-size:12px;cursor:grab}#discover hr{border:0;border-top:1px solid #e3e7dd;margin:24px 0}@media(max-width:600px){.discover-button{position:absolute;right:128px;top:21px;margin:0;width:auto;padding:8px 10px!important;font-size:11px!important}.side-bottom{gap:0;right:10px;top:20px}.side-bottom .nav{padding:5px}.brand{font-size:24px}.brand small{font-size:6px;letter-spacing:1.2px}}
.brand{gap:10px;font-size:23px;letter-spacing:-.6px}.brand>div{white-space:nowrap}.brand small{letter-spacing:1.8px}.brand-icon{flex-shrink:0}@media(max-width:1150px) and (min-width:601px){.brand{font-size:20px}.brand-icon{width:38px;height:40px}}@media(max-width:600px){.brand{font-size:22px}.discover-button{position:static;width:100%;margin:0 0 13px;padding:10px 14px!important;justify-content:flex-start}.side-bottom{top:20px;right:12px}.brand{margin-right:112px}.brand small{font-size:7px;letter-spacing:1.5px}}
.brand{font-size:20px;gap:8px;letter-spacing:-.7px}.brand-icon{width:38px;height:40px}.brand small{font-size:8px;letter-spacing:1.5px}@media(max-width:1150px) and (min-width:601px){.brand{font-size:18px;gap:6px}.brand-icon{width:33px;height:35px}}@media(max-width:600px){.brand{font-size:20px;margin-right:100px}.brand-icon{width:34px;height:36px}.brand small{font-size:7px;letter-spacing:1.2px}}
.friend-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:9px 0;border-bottom:1px solid var(--line)}
.friend-row strong{margin-right:auto;overflow-wrap:anywhere}
.friend-row .secondary,#chat-older{padding:6px 10px;font-size:12px}
.messages{max-height:36vh;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:10px 2px;margin-bottom:10px}
.message{align-self:flex-start;max-width:85%;border-radius:10px;background:#eef0e9;padding:8px 12px;white-space:pre-wrap;overflow-wrap:anywhere}
.message.mine{align-self:flex-end;background:#dde6d6}
.message small{display:block;margin-top:5px;color:#586b54;font-size:10px}

/* Shelf-first layout */
.sidebar .brand{margin:0 0 22px}
.sidebar .discover-button{margin:0 0 16px;min-height:44px}
.sidebar .nav{font-size:14px}
.connection-state{margin-top:auto;padding:10px 4px;color:#526654}
.primary-views .nav{min-height:42px}
.more-views{margin:10px 0;padding:0 8px}
.more-views summary,.library-filters summary,.discover-other summary,#reader-downloads summary{cursor:pointer;font-size:14px;color:#365542;font-weight:600;padding:8px 0}
.more-views>div{margin-top:4px}
main{align-self:start;margin:0 auto;padding-top:36px;padding-bottom:40px}
.section-title{gap:10px;margin-bottom:18px}
.section-title h1{font-size:clamp(23px,3vw,33px);letter-spacing:-.6px;margin:0}
.section-title h1 span{display:inline-block;vertical-align:middle;padding:3px 8px;border-radius:7px;background:#e9eddf;color:#526654;font-size:13px;letter-spacing:0}
.section-title p{font-size:14px;color:#526654}
#reader-status{font-size:13px;padding:8px 12px;flex-shrink:0;max-width:52%}
#reader-status.reader-ready{background:#e0ebdd;color:#28523b}
.controls{margin-bottom:4px}
.search-wrap input{font-size:14px;min-height:42px}
#refresh{font-size:18px;min-width:42px;padding:4px}
.library-filters{margin-bottom:18px}
.filter-options{display:flex;flex-wrap:wrap;align-items:end;gap:8px 18px;padding:6px 0 0}
.filter-options .filters{margin:0;max-width:100%}
.filter-options label{margin:0;min-width:130px}
.filter-options select{padding:7px}
.card{overflow:visible}
.card:hover{transform:none}
.card .cover{border-radius:10px 10px 0 0}
.card h2{font-size:16px;line-height:1.4;margin:0 0 5px}
.title-button{display:block;width:100%;white-space:normal}
.title-button span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.card-meta{font-size:11px;color:#526654}
.card-progress-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-top:10px}
.card-progress{flex-shrink:0;font-size:17px;font-weight:700;margin:0;line-height:1.3}
.position-note{min-width:0;margin:0;font-size:12px;color:#526654}
.card-buttons{margin-top:10px;align-items:start}
.card-buttons .continue,.card-options summary{min-height:39px;font-size:13px;padding:9px 7px;border-radius:7px}
.card-buttons .continue{color:#274938}
.card-options{position:relative;flex-shrink:0}
.card-options summary{display:grid;place-items:center;min-width:38px;cursor:pointer;list-style:none;background:#eef0e9;font-size:20px;line-height:1}
.card-options summary::-webkit-details-marker{display:none}
.card-options>div{position:absolute;right:0;top:calc(100% + 4px);width:max-content;max-width:calc(100vw - 40px);padding:5px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 24px #263a291a;z-index:5}
.card-options button{display:block;width:100%;padding:9px;text-align:left;background:white;color:inherit;border-radius:5px;font-size:13px}
.card-options button:hover{background:#eef0e9}
.card-options .trash-action{color:#84412d}
.discover-other,#reader-downloads details{border-top:1px solid var(--line);padding-top:6px;margin-top:12px}
#reader-help{padding:4px 0;color:#305846;text-decoration:underline;font-size:13px}
#reader-downloads ol{padding-left:23px;line-height:1.55;font-size:13px}
#reader-downloads li+li{margin-top:7px}
.download-link{display:inline-block;padding:9px 14px;border-radius:8px;background:#e8eddf;color:#274938}
dialog #reading-mode,dialog #setup-state{color:#435b4b;font-size:14px}
@media(max-width:600px){
  .sidebar .brand{margin-bottom:12px}
  .sidebar .discover-button{margin-bottom:8px}
  .sidebar .primary-views{display:flex;flex-wrap:wrap;overflow:visible;gap:6px;padding-bottom:0;border-bottom:0}
  .sidebar .primary-views .nav{font-size:13px;padding:8px 10px}
  .sidebar .more-views{margin:4px 0 0;padding:0}
  .more-views>div{display:flex;flex-wrap:wrap;gap:4px}
  .more-views .nav{width:auto;padding:6px 9px;margin:0;font-size:12px}
  .connection-state{display:none}
  main{padding-top:13px}
  .section-title{align-items:center}
  .section-title p{font-size:12px}
  #reader-status{font-size:12px}
  .card h2{font-size:14px}
  .card-progress{font-size:15px}
  .card-buttons .continue,.card-options summary{font-size:12px}
  .card-options summary{font-size:18px;min-width:33px}
}

.reader-feedback{margin:0 0 14px;padding:8px 12px;border-radius:8px;background:#e7efe4;color:#28523b;font-size:13px}
.reader-feedback.reader-error{background:#faeee5;color:#84412d}

#web-player{width:min(860px,calc(100% - 28px))}
#web-video{display:block;width:100%;max-height:65vh;background:#151a16;border-radius:8px}
#web-video[hidden],#comic-pages[hidden],.part-nav[hidden]{display:none}
#catalog{margin-bottom:20px;padding:12px;background:#edf2e8;border-radius:10px}
#catalog h3,#catalog p{margin:0 0 8px}
#catalog-list{display:grid;gap:6px}
#catalog-list button{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;text-align:left}
#catalog-list small{font-weight:400}
.part-nav{display:flex;align-items:center;gap:6px;margin-bottom:10px}
.part-nav select{flex:1;min-width:0}
#comic-pages{position:relative;height:min(65dvh,800px);overflow:auto;overflow-anchor:none;background:#f1f2eb;border-radius:8px}
#comic-pages img{display:block;width:100%;max-width:660px;height:auto;margin:auto}
#web-player-status,#catalog-credits{margin:6px 0;font-size:12px}
.card-genres{display:flex;flex-wrap:wrap;gap:4px;list-style:none;margin:9px 0 0;padding:0}
.card-genres li{padding:3px 7px;border-radius:5px;background:#edf2e9;color:#345543;font-size:11px;line-height:1.35}
.cover:has(img:not(.broken)){width:100%;height:auto;aspect-ratio:4/5;max-height:240px}
.cover img{object-position:center 35%}
.watch-page{background:#101b17;color:#f2f5ef;color-scheme:dark}
.watch-page .shell{display:none}
#watch-wait{width:min(850px,100%);padding:25px;margin:auto}
#watch-wait a{color:#b0ebc8}
.watch-page #web-player{inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:#101b17;color:#edf6ef}
.watch-heading{display:flex;align-items:center;gap:clamp(12px,3vw,32px);padding:clamp(12px,1.4vw,22px) clamp(14px,3vw,42px);border-bottom:1px solid #334a3d;background:#172821}
.watch-heading h1{margin:2px 0;font-size:clamp(19px,2.4vw,34px);line-height:1.2;letter-spacing:-.02em}
.watch-heading small{color:#8cd8ac;font-size:10px;letter-spacing:.16em}
.watch-heading #watch-part{color:#acd2bd;margin:4px 0 0;font-size:14px}
.watch-heading .close{margin-left:auto}
.watch-back{flex-shrink:0;text-decoration:none;font-size:14px;font-weight:650}
.watch-page .watch-back{display:inline-flex;padding:9px 12px;border-radius:8px;background:#294638;color:#def6e8}
.watch-layout{display:grid;gap:18px;align-items:start}
.watch-page .watch-layout{grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:clamp(12px,2vw,28px);max-width:1920px;margin:auto;padding:clamp(12px,1.5vw,22px) clamp(12px,2.5vw,35px)}
.watch-page .watch-layout:has(#part-nav[hidden]){grid-template-columns:minmax(0,1fr);max-width:1550px}
.watch-page .watch-wide .watch-layout{grid-template-columns:minmax(0,1fr)}
.watch-stage{min-width:0}
.watch-page #web-video{background:#040705;aspect-ratio:16/9;max-height:min(72dvh,max(230px,calc(100dvh - 220px)));border-radius:10px}
.watch-page .watch-wide #web-video{max-height:max(240px,calc(100dvh - 100px))}
.watch-page #comic-pages{height:calc(100dvh - 160px);min-height:300px;background:#0a100d}
.watch-page #comic-pages img{max-width:850px}
.watch-tools,.part-nav{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.watch-tools{margin-top:8px}
.watch-tools label{display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap}
.watch-tools label select,.part-nav select{margin:0;min-width:0}
.watch-page .watch-tools button,.watch-page .watch-tools select,.watch-page .watch-parts button,.watch-page .watch-parts select{border:1px solid #3b5949;background:#20382c;color:#e9f6ed;border-radius:7px;padding:8px}
.watch-page .watch-tools button:focus-visible,.watch-page .watch-parts button:focus-visible{outline:2px solid #b8f1ce;outline-offset:2px}
.watch-page .watch-tools button:hover,.watch-page .watch-parts button:hover{background:#305340}
.watch-parts{padding:13px;border-radius:12px}
.watch-page .watch-parts{background:#192d24;border:1px solid #334c3e}
.watch-parts h2{font-size:16px;margin:0 0 12px}
.part-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(39px,1fr));gap:6px;max-height:48dvh;overflow:auto}
.watch-page .part-grid [aria-current=true]{background:#9fe4b9;color:#142b1e;font-weight:750}
.watch-page #watch-wide[aria-pressed=true]{background:#9fe4b9;color:#142b1e;font-weight:650}
.watch-page #web-player-status,.watch-page #catalog-credits,.watch-page #catalog-credits a{color:#b6d9c4!important;font-size:13px!important}
.watch-shortcuts{display:none}
@media(hover:hover) and (pointer:fine){
  .watch-page .watch-shortcuts{display:block;margin:8px 0 4px;color:#a9c5b4;font-size:12px}
  #video-tools[hidden]+.watch-shortcuts{display:none}
}
@media(max-width:790px){
  .watch-page .watch-layout{grid-template-columns:1fr}
  .watch-heading .close{display:none}
  .watch-page #comic-pages{height:70dvh}
  .part-grid{max-height:28dvh}
}
@media(max-width:600px){.cover:has(img:not(.broken)){max-height:190px}}
