:root{color-scheme:dark;font-family:Georgia,Times New Roman,serif;line-height:1.6;--bg: #0f0f0f;--surface: #1a1a1a;--surface-2: #242424;--border: rgba(255, 255, 255, .08);--text: #e8e4df;--text-muted: #9a9590;--accent: #c8956c;--accent-soft: rgba(200, 149, 108, .15)}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100vh;background:var(--bg);color:var(--text)}.library{min-height:100vh;display:flex;flex-direction:column;max-width:1100px;margin:0 auto;padding:2rem 1.5rem}.library-header{display:flex;align-items:center;gap:1rem;margin-bottom:3rem;padding-bottom:2rem;border-bottom:1px solid var(--border)}.logo-icon{color:var(--accent);flex-shrink:0}.library-header h1{font-size:1.75rem;font-weight:700;letter-spacing:-.02em;margin:0;font-family:Georgia,serif}.subtitle{color:var(--text-muted);font-size:.9rem;margin:.25rem 0 0;font-style:italic}.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.5rem;flex:1}.book-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;cursor:pointer;transition:transform .2s,box-shadow .2s,border-color .2s;text-align:left;color:inherit;font:inherit;padding:0;display:flex;flex-direction:column}.book-card:hover{transform:translateY(-4px);box-shadow:0 12px 40px #0006;border-color:var(--accent)}.book-cover{position:relative;height:200px;display:flex;align-items:center;justify-content:center;overflow:hidden}.book-spine{position:absolute;left:0;top:0;bottom:0;width:8px;background:#0000004d}.book-cover-content{text-align:center;padding:1.5rem;z-index:1}.book-cover-content h2{font-size:1.3rem;font-weight:700;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.5);margin:0 0 .5rem;line-height:1.2}.book-cover-content .book-author{font-size:.85rem;color:#fffc;margin:0;font-style:italic}.book-info{padding:1.25rem;flex:1;display:flex;flex-direction:column}.book-info h3{font-size:1.1rem;font-weight:600;margin:0 0 .25rem}.book-info .author{color:var(--accent);font-size:.85rem;margin:0 0 .75rem;font-style:italic}.book-info .description{color:var(--text-muted);font-size:.85rem;margin:0 0 1rem;flex:1;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-family:system-ui,sans-serif;line-height:1.5}.chapter-count{font-size:.75rem;color:var(--text-muted);background:var(--surface-2);padding:.3rem .75rem;border-radius:100px;align-self:flex-start;font-family:system-ui,sans-serif}.library-footer{margin-top:3rem;padding-top:1.5rem;border-top:1px solid var(--border);text-align:center;color:var(--text-muted);font-size:.85rem;font-style:italic}.book-detail{min-height:100vh;max-width:800px;margin:0 auto;padding:2rem 1.5rem}.back-btn{display:inline-flex;align-items:center;gap:.5rem;background:none;border:none;color:var(--text-muted);font:inherit;font-size:.9rem;cursor:pointer;padding:.5rem 0;margin-bottom:2rem;font-family:system-ui,sans-serif;transition:color .2s}.back-btn:hover{color:var(--accent)}.book-hero{display:flex;gap:2rem;margin-bottom:3rem;align-items:flex-start}.hero-cover{width:180px;min-height:260px;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem;flex-shrink:0;text-align:center}.hero-cover h1{font-size:1.2rem;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.5);margin:0 0 .5rem;line-height:1.2}.hero-cover p{color:#fffc;font-size:.8rem;margin:0;font-style:italic}.hero-info{flex:1}.hero-info h2{font-size:2rem;font-weight:700;margin:0 0 .5rem;line-height:1.2}.hero-author{color:var(--accent);font-size:1rem;margin:0 0 1rem;font-style:italic}.hero-desc{color:var(--text-muted);font-size:.95rem;margin:0;font-family:system-ui,sans-serif;line-height:1.6}.chapter-list h3{font-size:1rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em;margin:0 0 1rem;font-family:system-ui,sans-serif;font-weight:600}.chapter-btn{display:flex;align-items:center;gap:1rem;width:100%;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:1rem 1.25rem;margin-bottom:.5rem;cursor:pointer;color:inherit;font:inherit;transition:background .2s,border-color .2s;text-align:left}.chapter-btn:hover{background:var(--surface-2);border-color:var(--accent)}.chapter-btn svg{margin-left:auto;color:var(--text-muted);flex-shrink:0}.chapter-num{width:32px;height:32px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:600;flex-shrink:0;font-family:system-ui,sans-serif}.chapter-btn .chapter-title{font-size:.95rem;flex:1}.reader{min-height:100vh;display:flex;flex-direction:column}.reader-nav{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:10}.reader-controls{display:flex;align-items:center;gap:1rem}.font-controls{display:flex;align-items:center;gap:.5rem}.ctrl-btn{background:var(--surface-2);border:1px solid var(--border);color:var(--text);padding:.4rem .75rem;border-radius:6px;cursor:pointer;font-size:.8rem;font-family:system-ui,sans-serif;transition:background .2s,border-color .2s}.ctrl-btn:hover:not(:disabled){background:var(--accent-soft);border-color:var(--accent)}.ctrl-btn:disabled{opacity:.4;cursor:default}.font-size-label{font-size:.75rem;color:var(--text-muted);min-width:3rem;text-align:center;font-family:system-ui,sans-serif}.toc-btn{padding:.4rem}.toc-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;z-index:20;display:flex;justify-content:flex-end}.toc-panel{width:320px;max-width:90vw;background:var(--surface);border-left:1px solid var(--border);padding:2rem 1.5rem;overflow-y:auto;height:100%}.toc-panel h3{font-size:1rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em;margin:0 0 1.5rem;font-family:system-ui,sans-serif;font-weight:600}.toc-item{display:flex;align-items:center;gap:.75rem;width:100%;background:none;border:none;color:var(--text);font:inherit;font-size:.9rem;padding:.75rem;border-radius:6px;cursor:pointer;text-align:left;transition:background .2s}.toc-item:hover{background:var(--surface-2)}.toc-item.active{background:var(--accent-soft);color:var(--accent)}.toc-num{width:28px;height:28px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:600;flex-shrink:0;font-family:system-ui,sans-serif}.toc-item.active .toc-num{background:var(--accent);color:#fff}.reader-content{max-width:700px;margin:0 auto;padding:3rem 1.5rem 6rem;flex:1}.reader-chapter-title{font-size:1.4em;font-weight:700;margin:0 0 2rem;color:var(--accent);text-align:center;line-height:1.3}.reader-text p{margin:0 0 1.5em;text-align:justify;-webkit-hyphens:auto;hyphens:auto;line-height:1.8}.reader-footer{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-top:1px solid var(--border);background:var(--surface);position:sticky;bottom:0}.nav-btn{display:inline-flex;align-items:center;gap:.5rem;background:var(--accent-soft);border:1px solid var(--accent);color:var(--accent);padding:.6rem 1.25rem;border-radius:8px;cursor:pointer;font-size:.85rem;font-family:system-ui,sans-serif;font-weight:500;transition:background .2s}.nav-btn:hover{background:var(--accent);color:#fff}.chapter-indicator{font-size:.8rem;color:var(--text-muted);font-family:system-ui,sans-serif}@media(max-width:640px){.book-hero{flex-direction:column;align-items:center;text-align:center}.hero-cover{width:140px;min-height:200px}.hero-info h2{font-size:1.5rem}.book-grid{grid-template-columns:1fr}.library-header{flex-direction:column;text-align:center}}
