*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}html,body{overscroll-behavior:none;-webkit-overflow-scrolling:touch;width:100%;height:100%;margin:0;padding:0;overflow:hidden}body{color:#1d1d1f;background:#f5f5f7;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.6}#root{flex-direction:column;width:100%;height:100dvh;display:flex;position:relative;overflow:hidden}button{cursor:pointer;color:inherit;background:0 0;border:none;padding:0;font-family:inherit}input{font-family:inherit}::-webkit-scrollbar{display:none}.about-overlay{z-index:1000;background:#0006;justify-content:center;align-items:center;animation:.2s fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.about-modal{background:#fff;border-radius:16px;width:90%;max-width:340px;max-height:85vh;animation:.3s slideUp;overflow:hidden;box-shadow:0 20px 60px #0000004d}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.about-header{border-bottom:1px solid #f0f0f0;justify-content:center;align-items:center;padding:18px 20px;display:flex;position:relative}.about-header h2{color:#1d1d1f;margin:0;font-size:17px;font-weight:600}.about-close{color:#007aff;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:0;transition:background .15s;display:flex;position:absolute;top:50%;left:16px;transform:translateY(-50%)}.about-close:active{background:#007aff1a}.about-content{text-align:center;-webkit-overflow-scrolling:touch;max-height:calc(85vh - 60px);padding:24px 20px;overflow-y:auto}.about-icon{margin-bottom:16px}.about-title{color:#1d1d1f;margin:0 0 4px;font-size:28px;font-weight:700}.about-version{color:#86868b;margin:0 0 20px;font-size:15px}.about-check-btn{color:#fff;background:#007aff;border-radius:20px;margin-bottom:24px;padding:8px 20px;font-size:14px;font-weight:600;transition:opacity .15s}.about-check-btn:active{opacity:.8}.about-divider{background:#e5e5ea;height:1px;margin-bottom:24px}.about-copyright{color:#6e6e73;margin-bottom:16px;font-size:13px;line-height:1.5}.about-license{color:#6e6e73;text-align:left;font-size:12px;line-height:1.6}.about-license p{margin:0 0 12px}.about-license a{color:#007aff;text-decoration:none}.about-license a:active{text-decoration:underline}.about-source{text-align:center;margin-top:8px}.bookshelf{background:#f5f5f7;flex-direction:column;width:100%;height:100%;display:flex}.shelf-header{padding:16px 20px;padding-top:calc(16px + env(safe-area-inset-top));z-index:10;background:#fff;border-bottom:1px solid #e5e5ea;flex-shrink:0;justify-content:space-between;align-items:center;display:flex;position:sticky;top:0}.shelf-header h1{color:#1d1d1f;margin:0;font-size:20px;font-weight:600}.icon-btn{color:#007aff;border-radius:8px;justify-content:center;align-items:center;width:40px;height:40px;transition:background .15s;display:flex}.icon-btn:active{background:#007aff1a}.shelf-content{-webkit-overflow-scrolling:touch;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));flex:1;overflow-y:auto}.empty-state{text-align:center;flex-direction:column;justify-content:center;align-items:center;padding:80px 20px;display:flex}.empty-icon{margin-bottom:16px;font-size:64px}.empty-state p{color:#6e6e73;margin:4px 0}.empty-hint{font-size:14px;margin-top:8px!important}.empty-import-btn{color:#fff;background:#007aff;border-radius:24px;align-items:center;gap:8px;margin-top:28px;padding:12px 24px;font-size:15px;font-weight:600;transition:opacity .15s,transform .15s;display:inline-flex}.empty-import-btn:active{opacity:.85;transform:scale(.97)}@media (width>=768px){.empty-import-btn:hover{opacity:.9}}.book-grid{grid-template-columns:repeat(3,1fr);gap:20px 16px;display:grid}@media (width>=768px){.book-grid{grid-template-columns:repeat(4,1fr);gap:24px 20px}}@media (width>=1024px){.shelf-content{padding:24px 32px;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.book-grid{grid-template-columns:repeat(6,1fr);gap:28px 24px}}@media (width>=1440px){.shelf-content{padding:32px 48px;padding-bottom:calc(32px + env(safe-area-inset-bottom))}.book-grid{grid-template-columns:repeat(8,1fr);gap:32px 28px}}.book-card{cursor:pointer;flex-direction:column;gap:8px;display:flex;position:relative}.book-card:active .book-card-cover{transform:scale(.96)}.book-card-cover{aspect-ratio:2/3;background:#f5f5f7;border-radius:8px;justify-content:center;align-items:center;transition:transform .15s;display:flex;overflow:hidden;box-shadow:0 3px 12px #00000026}.book-card-cover-img{object-fit:cover;width:100%;height:100%;display:block}.book-card-text{color:#fff;text-shadow:0 1px 3px #0000004d;letter-spacing:1px;text-align:center;word-break:break-all;padding:0 8px;font-size:22px;font-weight:600}@media (width>=768px){.book-card:hover .book-card-cover{transform:scale(1.02)}}.book-card-add .book-card-cover{box-shadow:none;background:#fff;border:2px dashed #d1d1d6}.book-card-add-icon{color:#d1d1d6;font-size:36px;font-weight:300}.book-card-info{flex-direction:column;gap:4px;display:flex}.book-card-title{color:#1d1d1f;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:13px;font-weight:500;line-height:1.3;display:-webkit-box;overflow:hidden}.book-card-progress{align-items:center;gap:6px;display:flex}.book-card-progress-track{background:#e5e5ea;border-radius:2px;flex:1;height:3px;overflow:hidden}.book-card-progress-bar{background:#007aff;border-radius:2px;height:100%;transition:width .3s}.book-card-progress span{color:#86868b;text-align:right;min-width:28px;font-size:11px}.book-card-delete{color:#8e8e93;background:#fff;border-radius:50%;justify-content:center;align-items:center;width:22px;height:22px;font-size:12px;font-weight:600;line-height:1;transition:background .15s,color .15s;display:flex;position:absolute;top:-4px;right:-4px;box-shadow:0 1px 4px #0000001f}.book-card-delete:active{color:#fff;background:#ff3b30}@media (width>=768px){.book-card-delete:hover{color:#fff;background:#ff3b30}}.reader{color:#1d1d1f;background:#fff;width:100%;height:100%;position:relative;overflow:hidden}.reader-theme-sepia{color:#5b4636;background:#f4ecd8}.reader-theme-dark{color:#f5f5f7;background:#1c1c1e}.reader-viewer-wrap{z-index:1;box-sizing:border-box;position:absolute;inset:0}.reader-viewer{width:100%;height:100%;position:relative;overflow:hidden}.reader-viewer iframe{border:0;display:block;background:0 0!important}.reader-tap-overlay{z-index:10;cursor:pointer;background:0 0;position:absolute;inset:0}.reader-flash{z-index:9;opacity:0;pointer-events:none;background:linear-gradient(90deg,#7878801f,#78788000);width:40%;transition:opacity .18s ease-out;position:absolute;top:0;bottom:0}.reader-flash-right{background:linear-gradient(270deg,#7878801f,#78788000);left:auto;right:0}.reader-flash.active{opacity:1}.reader-progress-line{z-index:60;pointer-events:none;background:#7878801f;height:2px;position:absolute;top:0;left:0;right:0;overflow:hidden}.reader-theme-sepia .reader-progress-line{background:#5b46361f}.reader-theme-dark .reader-progress-line{background:#ffffff14}.reader-progress-line-inner{background:#007aff;height:100%;transition:width .28s cubic-bezier(.22,1,.36,1)}.reader-theme-sepia .reader-progress-line-inner{background:#8b6914}.reader-theme-dark .reader-progress-line-inner{background:#0a84ff}.reader-loading{background:#fff;flex-direction:column;justify-content:center;align-items:center;gap:16px;width:100%;height:100%;display:flex}.reader-loading-overlay{z-index:999;background:#fff;position:absolute;inset:0}.reader-theme-sepia .reader-loading-overlay{background:#f4ecd8}.reader-theme-dark .reader-loading-overlay{background:#1c1c1e}.spinner{border:3px solid #78788033;border-top-color:#007aff;border-radius:50%;width:32px;height:32px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.reader-loading p{color:#86868b;margin:0;font-size:14px}.reader-topbar,.reader-bottombar{z-index:50;pointer-events:none;opacity:0;transition:transform .3s cubic-bezier(.22,1,.36,1),opacity .25s;position:absolute;left:0;right:0}.reader-topbar.show,.reader-bottombar.show{opacity:1;pointer-events:auto}.reader-topbar{top:0;transform:translateY(-100%)}.reader-topbar.show{transform:translateY(0)}.topbar-bg{-webkit-backdrop-filter:saturate(180%)blur(24px);background:#ffffffc7;border-bottom:.5px solid #00000014;position:absolute;inset:0}.reader-theme-sepia .topbar-bg{background:#f4ecd8d1;border-bottom-color:#5b46361f}.reader-theme-dark .topbar-bg{background:#1c1c1ed1;border-bottom-color:#ffffff14}.topbar-content{padding:8px;padding-top:calc(8px + env(safe-area-inset-top));align-items:center;gap:4px;min-height:52px;display:flex;position:relative}.icon-btn{color:#1d1d1f;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:42px;height:42px;transition:background .14s,transform 80ms;display:flex}.icon-btn:active{background:#0000000f;transform:scale(.96)}.reader-theme-sepia .icon-btn{color:#5b4636}.reader-theme-sepia .icon-btn:active{background:#5b463614}.reader-theme-dark .icon-btn{color:#f5f5f7}.reader-theme-dark .icon-btn:active{background:#ffffff1a}.topbar-title{flex-direction:column;flex:1;align-items:center;gap:2px;min-width:0;padding:0 4px;display:flex}.book-title{color:#1d1d1f;white-space:nowrap;text-overflow:ellipsis;letter-spacing:.2px;max-width:100%;font-size:15px;font-weight:600;overflow:hidden}.reader-theme-sepia .book-title{color:#5b4636}.reader-theme-dark .book-title{color:#f5f5f7}.chapter-title{color:#86868b;white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:12px;overflow:hidden}.reader-theme-sepia .chapter-title{color:#5b46369e}.reader-theme-dark .chapter-title{color:#8e8e93}.reader-bottombar{bottom:0;transform:translateY(100%)}.reader-bottombar.show{transform:translateY(0)}.bottombar-bg{-webkit-backdrop-filter:saturate(180%)blur(24px);background:#ffffffc7;border-top:.5px solid #00000014;position:absolute;inset:0}.reader-theme-sepia .bottombar-bg{background:#f4ecd8d1;border-top-color:#5b46361f}.reader-theme-dark .bottombar-bg{background:#1c1c1ed1;border-top-color:#ffffff14}.bottombar-content{padding:10px 14px 14px;padding-bottom:calc(14px + env(safe-area-inset-bottom));flex-direction:column;gap:10px;display:flex;position:relative}.bottom-actions{justify-content:space-between;align-items:center;gap:12px;display:flex}.bookmark-btn,.settings-btn{color:#007aff;border-radius:12px;justify-content:center;align-items:center;width:48px;height:48px;transition:background .14s,transform 80ms,color .14s;display:flex}.bookmark-btn:active,.settings-btn:active{background:#007aff29;transform:scale(.98)}.bookmark-btn.active{color:#ff9500}.reader-theme-sepia .bookmark-btn.active{color:#b8860b}.reader-theme-dark .bookmark-btn.active{color:#ffb347}.reader-theme-sepia .bookmark-btn,.reader-theme-sepia .settings-btn{color:#8b6914}.reader-theme-sepia .bookmark-btn:active,.reader-theme-sepia .settings-btn:active{background:#8b691426}.reader-theme-dark .bookmark-btn,.reader-theme-dark .settings-btn{color:#0a84ff}.reader-theme-dark .bookmark-btn:active,.reader-theme-dark .settings-btn:active{background:#0a84ff26}.topbar-right{align-items:center;gap:2px;display:flex}.bookmark-panel{z-index:180;background:#fff;flex-direction:column;width:300px;max-width:85vw;transition:transform .3s cubic-bezier(.22,1,.36,1);display:flex;position:absolute;top:0;bottom:0;left:0;transform:translate(-100%);box-shadow:2px 0 20px #0000001a}.bookmark-panel.show{transform:translate(0)}.reader-theme-sepia .bookmark-panel{background:#f4ecd8}.reader-theme-dark .bookmark-panel{background:#1c1c1e}.bookmark-header{padding:16px;padding-top:calc(16px + env(safe-area-inset-top));border-bottom:.5px solid #00000014;justify-content:space-between;align-items:center;display:flex}.reader-theme-sepia .bookmark-header{border-bottom-color:#5b463626}.reader-theme-dark .bookmark-header{border-bottom-color:#ffffff1a}.bookmark-header span{color:#1d1d1f;font-size:17px;font-weight:600}.reader-theme-sepia .bookmark-header span{color:#5b4636}.reader-theme-dark .bookmark-header span{color:#f5f5f7}.bookmark-list{-webkit-overflow-scrolling:touch;flex:1;padding:8px;overflow-y:auto}.bookmark-item{align-items:stretch;margin-bottom:4px;display:flex}.bookmark-info{text-align:left;background:#007aff0f;border-radius:10px;flex:1;padding:12px 14px;transition:background .14s}.bookmark-info:active{background:#007aff1f}.reader-theme-sepia .bookmark-info{background:#5b463614}.reader-theme-sepia .bookmark-info:active{background:#5b463624}.reader-theme-dark .bookmark-info{background:#0a84ff1a}.reader-theme-dark .bookmark-info:active{background:#0a84ff2e}.bookmark-chapter{color:#1d1d1f;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px;font-size:14px;font-weight:600;overflow:hidden}.reader-theme-sepia .bookmark-chapter{color:#5b4636}.reader-theme-dark .bookmark-chapter{color:#f5f5f7}.bookmark-meta{color:#86868b;justify-content:space-between;font-size:11px;display:flex}.reader-theme-sepia .bookmark-meta{color:#5b463699}.reader-theme-dark .bookmark-meta{color:#8e8e93}.bookmark-delete{color:#8e8e93;border-radius:8px;justify-content:center;align-items:center;width:36px;margin-left:4px;transition:background .14s,color .14s;display:flex}.bookmark-delete:active{color:#ff3b30;background:#ff3b3026}.reader-theme-dark .bookmark-delete:active{color:#ff453a}.bookmark-empty{text-align:center;color:#86868b;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:40px 20px;display:flex}.bookmark-empty p{color:#1d1d1f;margin:0;font-size:15px;font-weight:500}.reader-theme-sepia .bookmark-empty p{color:#5b4636}.reader-theme-dark .bookmark-empty p{color:#f5f5f7}.bookmark-empty span{font-size:13px}.reader-page-indicator{padding:6px 14px;padding-bottom:calc(6px + env(safe-area-inset-bottom));z-index:5;background:linear-gradient(#fff0 0%,#ffffff8c 60%,#fffc 100%);justify-content:space-between;align-items:center;gap:12px;transition:opacity .2s;display:flex;position:absolute;bottom:0;left:0;right:0}.reader-theme-sepia .reader-page-indicator{background:linear-gradient(#f4ecd800 0%,#f4ecd88c 60%,#f4ecd8d9 100%)}.reader-theme-dark .reader-page-indicator{background:linear-gradient(#1c1c1e00 0%,#1c1c1e8c 60%,#1c1c1ed9 100%)}.reader-topbar.show~.reader-page-indicator,.reader-bottombar.show~.reader-page-indicator{opacity:.4}.page-slider{appearance:none;cursor:pointer;pointer-events:auto;touch-action:none;background:0 0;flex:auto;min-width:0;height:20px}.page-slider:disabled{opacity:.35;cursor:not-allowed}.page-slider::-webkit-slider-runnable-track{background:#78788038;border-radius:999px;height:3px}.reader-theme-sepia .page-slider::-webkit-slider-runnable-track{background:#5b463633}.reader-theme-dark .page-slider::-webkit-slider-runnable-track{background:#ffffff29}.page-slider::-moz-range-track{background:#78788038;border:0;border-radius:999px;height:3px}.reader-theme-sepia .page-slider::-moz-range-track{background:#5b463633}.reader-theme-dark .page-slider::-moz-range-track{background:#ffffff29}.page-slider::-moz-range-progress{background:#007aff;border:0;border-radius:999px;height:3px}.reader-theme-sepia .page-slider::-moz-range-progress{background:#8b6914}.reader-theme-dark .page-slider::-moz-range-progress{background:#0a84ff}.page-slider::-webkit-slider-thumb{appearance:none;background:#007aff;border:1.5px solid #fff;border-radius:50%;width:14px;height:14px;margin-top:-5.5px;transition:transform .12s,box-shadow .12s;box-shadow:0 1px 2px #0003,0 0 0 3px #007aff2e}.page-slider::-webkit-slider-thumb:active{transform:scale(1.18);box-shadow:0 1px 2px #00000040,0 0 0 5px #007aff2e}.reader-theme-sepia .page-slider::-webkit-slider-thumb{background:#8b6914;border-color:#f5efd8;box-shadow:0 1px 2px #5b46364d,0 0 0 3px #8b691438}.reader-theme-sepia .page-slider::-webkit-slider-thumb:active{box-shadow:0 1px 2px #5b463659,0 0 0 5px #8b691438}.reader-theme-dark .page-slider::-webkit-slider-thumb{background:#0a84ff;border-color:#1c1c1e;box-shadow:0 1px 2px #00000073,0 0 0 3px #0a84ff40}.reader-theme-dark .page-slider::-webkit-slider-thumb:active{box-shadow:0 1px 2px #0000008c,0 0 0 5px #0a84ff40}.page-slider::-moz-range-thumb{background:#007aff;border:1.5px solid #fff;border-radius:50%;width:14px;height:14px;transition:transform .12s,box-shadow .12s;box-shadow:0 1px 2px #0003,0 0 0 3px #007aff2e}.page-slider::-moz-range-thumb:active{transform:scale(1.18);box-shadow:0 1px 2px #00000040,0 0 0 5px #007aff2e}.reader-theme-sepia .page-slider::-moz-range-thumb{background:#8b6914;border-color:#f5efd8;box-shadow:0 1px 2px #5b46364d,0 0 0 3px #8b691438}.reader-theme-dark .page-slider::-moz-range-thumb{background:#0a84ff;border-color:#1c1c1e;box-shadow:0 1px 2px #00000073,0 0 0 3px #0a84ff40}.page-count{text-align:right;color:#3c3c4399;letter-spacing:.2px;font-variant-numeric:tabular-nums;pointer-events:none;flex:none;min-width:68px;font-size:11px;font-weight:500;line-height:1.4}.reader-theme-sepia .page-count{color:#5b4636b8}.reader-theme-dark .page-count{color:#c8c8cde0}.toc-panel,.settings-panel{z-index:200;background:#fff;border-left:.5px solid #0000000f;flex-direction:column;width:min(320px,85%);max-width:85%;transition:transform .32s cubic-bezier(.22,1,.36,1);display:flex;position:absolute;top:0;bottom:0;right:0;transform:translate(100%);box-shadow:-8px 0 32px #00000024}.toc-panel.show,.settings-panel.show{transform:translate(0)}.toc-header,.settings-header{padding:16px 14px 14px;padding-top:calc(16px + env(safe-area-inset-top));color:#1d1d1f;letter-spacing:.2px;border-bottom:.5px solid #e5e5ea;flex-shrink:0;justify-content:space-between;align-items:center;font-size:16px;font-weight:600;display:flex}.toc-list{-webkit-overflow-scrolling:touch;padding:6px 0 calc(16px + env(safe-area-inset-bottom));flex:1;overflow-y:auto}.toc-item{text-align:left;color:#1d1d1f;white-space:nowrap;text-overflow:ellipsis;border-bottom:.5px solid #78788014;width:100%;padding:13px 18px;font-size:15px;line-height:1.4;transition:background .14s;display:block;overflow:hidden}.toc-item:active{background:#f2f2f7}.toc-item.active{color:#007aff;background:#007aff0f;font-weight:500}.toc-empty{text-align:center;color:#86868b;padding:60px 20px;font-size:14px}.settings-list{-webkit-overflow-scrolling:touch;padding:4px 18px calc(18px + env(safe-area-inset-bottom));flex:1;overflow-y:auto}.setting-row{border-bottom:.5px solid #7878801a;flex-direction:column;gap:10px;padding:16px 0 18px;display:flex}.setting-row:last-child{border-bottom:none}.setting-row-header{justify-content:space-between;align-items:center;display:flex}.setting-label{color:#1d1d1f;letter-spacing:.2px;font-size:14px;font-weight:500}.setting-value{color:#86868b;font-variant-numeric:tabular-nums;font-size:13px;font-weight:500}.theme-options{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.theme-btn{letter-spacing:.2px;border:1.5px solid #0000;border-radius:11px;padding:12px 10px;font-size:13px;font-weight:600;transition:border-color .14s,transform 80ms}.theme-btn.active{border-color:#007aff;box-shadow:0 0 0 1px #007aff0f}.theme-btn:active{transform:scale(.97)}.font-options{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.font-btn{color:#1d1d1f;background:#f2f2f7;border-radius:10px;padding:10px 8px;font-size:13px;font-weight:500;transition:background .14s,color .14s,transform 80ms}.font-btn.active{color:#fff;background:#007aff;box-shadow:0 4px 12px #007aff47}.font-btn:active{opacity:.92;transform:scale(.97)}.settings-list input[type=range]{accent-color:#007aff;width:100%;height:28px;margin:0}.panel-overlay{z-index:150;-webkit-backdrop-filter:blur(2px);background:#00000061;animation:.22s fadeIn;position:absolute;inset:0}@media (width>=1024px){.reader-viewer-wrap,.reader-theme-sepia .reader-viewer-wrap,.reader-theme-dark .reader-viewer-wrap{padding:20px 80px}.reader-page-indicator{padding:8px 100px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}.toc-panel,.settings-panel{width:320px}.reader-topbar.show,.reader-bottombar.show{padding-left:60px;padding-right:60px}.reader-tap-overlay{grid-template-columns:25% 50% 25%;display:grid}}@media (width>=1440px){.reader-viewer-wrap,.reader-theme-sepia .reader-viewer-wrap,.reader-theme-dark .reader-viewer-wrap{padding:30px 120px}.reader-page-indicator{padding:10px 140px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}.reader-topbar.show,.reader-bottombar.show{padding-left:100px;padding-right:100px}}
