:root{--text:#28302b;--text-strong:#111612;--muted:#6b756e;--bg:#e8dfcf;--surface:#fbf8f1;--input:#fff;--border:#d4cbbd;--accent:#2f6f4e;--focus:#2f6f4e47;--book-cover:#2f6f4e;--progress-bg:#2f6f4e2e;--error:#8a1f11;--error-bg:#fde7e0;--page-shadow:0 22px 50px #1f180e3d, 0 2px 6px #1f180e1f;--control-shadow:0 10px 26px #1f180e2e;--sans:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;color:var(--text);background:var(--bg);font:16px/1.5 var(--sans);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--text:#d7ded6;--text-strong:#f4f7f2;--muted:#aab3ad;--bg:#121416;--surface:#1b2022;--input:#111416;--border:#333b3f;--accent:#8fc99e;--focus:#8fc99e4d;--book-cover:#426e50;--progress-bg:#8fc99e29;--error:#ffb2a5;--error-bg:#43221d;--page-shadow:0 22px 50px #00000073;--control-shadow:0 10px 26px #0000006b}}*{box-sizing:border-box}html,body,#root{min-width:320px;min-height:100%;margin:0}h1,h2,p{margin-top:0}h1{font-size:2rem;line-height:1.05}.app-shell{grid-template-columns:var(--sidebar-width,320px) 8px minmax(0, 1fr);background:var(--reader-bg);min-height:100svh;display:grid}.app-shell.sidebar-collapsed{grid-template-columns:0 0 minmax(0,1fr)}.app-shell.reader-maximized{grid-template-columns:0 0 1fr}.library-panel{border-right:1px solid var(--border);background:var(--surface);flex-direction:column;gap:16px;height:100svh;padding:22px;display:flex;position:sticky;top:0;overflow:auto}.sidebar-collapsed .library-panel,.reader-maximized .library-panel{border:0;width:0;padding:0;overflow:hidden}.sidebar-resizer{cursor:col-resize;background:var(--border);border:0;border-radius:0;width:8px;min-height:100svh;padding:0}.sidebar-resizer:hover{background:var(--accent)}.sidebar-collapsed .sidebar-resizer,.reader-maximized .sidebar-resizer{display:none}.collapsed-library-button{z-index:5;background:var(--surface);box-shadow:var(--control-shadow);display:none;position:fixed;top:14px;left:14px}.sidebar-collapsed:not(.reader-maximized) .collapsed-library-button{align-items:center;display:inline-flex}.brand h1,.reader-toolbar h2,.empty-reader h2{color:var(--text-strong);margin:0}.eyebrow{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;margin:0 0 5px;font-size:.78rem;font-weight:800}.primary-action{border-color:var(--accent);background:var(--accent);color:#fff;width:100%}.secondary-action{background:var(--input)}.file-input{display:none}.search-field,.reader-toolbar label{color:var(--muted);gap:6px;font-size:.82rem;font-weight:800;display:grid}input,select,button{border:1px solid var(--border);min-height:42px;color:var(--text);background:var(--input);font:inherit;border-radius:6px}input,select{width:100%;padding:0 11px}button{color:var(--text-strong);cursor:pointer;padding:0 12px;font-weight:800}button:disabled{cursor:not-allowed;opacity:.55}button:not(:disabled):hover{border-color:var(--accent)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.error-message{background:var(--error-bg);color:var(--error);border-radius:6px;margin:0;padding:10px 12px;font-weight:700}.book-list{gap:10px;display:grid}.book-card{border:1px solid var(--border);background:var(--input);border-radius:8px;gap:8px;padding:10px;display:grid}.book-card.active{border-color:var(--accent);box-shadow:inset 4px 0 0 var(--accent)}.book-card>button:first-child{text-align:left;background:0 0;border:0;grid-template-columns:44px 1fr;align-items:center;gap:10px;width:100%;height:auto;padding:0;display:grid}.book-card strong,.book-card small{display:block}.book-card strong{color:var(--text-strong);line-height:1.25}.book-card small,.empty-library{color:var(--muted)}.book-cover{background:var(--book-cover);color:#fff;border-radius:5px;place-items:center;min-height:58px;font-size:.75rem;font-weight:900;display:grid}.delete-button{min-height:34px;color:var(--muted);justify-self:end;font-size:.82rem}.empty-library{margin:8px 0 0}.reader-shell{grid-template-rows:auto 4px minmax(0,1fr);min-width:0;height:100svh;display:grid}.reader-maximized .reader-shell{width:100vw;height:100svh}.reader-toolbar{border-bottom:1px solid var(--border);background:var(--toolbar);justify-content:space-between;align-items:center;gap:18px;padding:18px 24px;display:flex}.reader-toolbar h2{font-size:1.35rem;line-height:1.2}.reader-maximized .reader-toolbar{justify-content:end;padding:12px}.reader-maximized .now-reading,.reader-maximized .standard-control{display:none}.toolbar-actions{flex-wrap:wrap;justify-content:end;align-items:end;gap:12px;display:flex}.toolbar-actions label{min-width:120px}.progress-track{background:var(--progress-bg);overflow:hidden}.progress-track span{background:var(--accent);height:100%;transition:width .2s;display:block}.pdf-stage{background:linear-gradient(90deg, #0000000d, transparent 24px), var(--reader-bg);resize:both;justify-content:center;min-height:0;padding:22px;display:flex;overflow:auto}.reader-maximized .pdf-stage{resize:none;padding:0}.pdf-frame{min-width:min(100%,720px);max-width:100%;height:calc(100svh - 104px);box-shadow:var(--page-shadow);background:#fff;border:0;border-radius:8px}.reader-maximized .pdf-frame{min-width:100%;height:calc(100svh - 78px);box-shadow:none;border-radius:0;width:100%!important;min-height:calc(100svh - 78px)!important}.empty-reader{border:1px solid var(--border);background:var(--surface);border-radius:8px;align-self:center;justify-items:start;gap:14px;width:min(520px,100%);padding:28px;display:grid}.empty-reader p{color:var(--muted);margin:0}.theme-light{--reader-bg:#f0f2f4;--toolbar:#fff}.theme-sepia{--reader-bg:#e8dfcf;--toolbar:#f7f1e5}.theme-dark{--reader-bg:#121416;--toolbar:#171b1d}@media (width<=900px){.app-shell,.app-shell.sidebar-collapsed,.app-shell.reader-maximized{grid-template-columns:1fr}.library-panel{border-right:0;border-bottom:1px solid var(--border);height:auto;max-height:42svh;position:static}.sidebar-collapsed .library-panel,.reader-maximized .library-panel,.sidebar-resizer{display:none}.reader-shell{height:auto;min-height:58svh}.reader-maximized .reader-shell{height:100svh}.reader-toolbar,.toolbar-actions{flex-direction:column;align-items:stretch}.pdf-stage{resize:none;padding:12px}.pdf-frame{min-width:100%;height:72svh}}
