*{margin:0;padding:0;box-sizing:border-box}:root{--bg: #f5f0e8;--surface: #fff;--surface-hover: #f0ebe3;--accent: #8b5c2a;--accent-hover: #a06b32;--text: #2c2c2c;--text-muted: #8a8078;--border: #e0d6c8;--error: #c0392b;--radius: 10px}body{font-family:Georgia,Times New Roman,serif;background:var(--bg);color:var(--text);min-height:100vh}.auth-page{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:1rem}.auth-card{background:var(--surface);border-radius:var(--radius);padding:2.5rem;width:100%;max-width:380px;text-align:center;box-shadow:0 2px 20px #00000014}.auth-card h1{font-size:1.8rem;margin-bottom:.25rem;color:var(--accent)}.auth-card .subtitle{color:var(--text-muted);margin-bottom:1.5rem;font-style:italic}.auth-card form{display:flex;flex-direction:column;gap:.75rem}.auth-card input{padding:.75rem 1rem;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);font-size:1rem;font-family:inherit;outline:none}.auth-card input:focus{border-color:var(--accent)}.auth-card button{padding:.75rem;border:none;border-radius:8px;background:var(--accent);color:#fff;font-size:1rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .2s}.auth-card button:hover{background:var(--accent-hover)}.auth-card .error{color:var(--error);font-size:.875rem}.auth-card .link{margin-top:1rem;color:var(--text-muted);font-size:.875rem}.auth-card .link a{color:var(--accent);text-decoration:none}.library-page{max-width:900px;margin:0 auto;padding:1.5rem;min-height:100vh}.library-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.library-header h1{font-size:1.5rem;color:var(--accent)}.logout-btn{background:none;border:1px solid var(--border);color:var(--text-muted);padding:.4rem 1rem;border-radius:8px;cursor:pointer;font-size:.875rem;font-family:inherit}.logout-btn:hover{border-color:var(--text-muted)}.library-actions{margin-bottom:1.5rem}.upload-btn{padding:.75rem 1.5rem;border:none;border-radius:8px;background:var(--accent);color:#fff;font-size:1rem;font-weight:600;font-family:inherit;cursor:pointer;transition:background .2s}.upload-btn:hover{background:var(--accent-hover)}.upload-btn:disabled{opacity:.5;cursor:not-allowed}.empty-state{text-align:center;color:var(--text-muted);margin-top:4rem;font-size:1.1rem;font-style:italic}.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}.book-card{background:var(--surface);border-radius:var(--radius);padding:1.25rem;cursor:pointer;transition:box-shadow .2s,transform .2s;box-shadow:0 1px 8px #0000000f}.book-card:hover{box-shadow:0 4px 16px #0000001f;transform:translateY(-2px)}.book-icon{font-size:2rem;font-weight:700;color:var(--accent);margin-bottom:.5rem}.book-card h3{font-size:1rem;margin-bottom:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chunk-count{color:var(--text-muted);font-size:.8rem;margin-bottom:.5rem}.badge{font-size:.75rem;padding:.2rem .5rem;border-radius:4px}.badge.processing{background:#fef3cd;color:#856404}.badge.error-badge{background:#f8d7da;color:var(--error)}.progress-bar-container{position:relative;height:6px;background:var(--border);border-radius:3px;overflow:hidden}.progress-bar{height:100%;background:var(--accent);border-radius:3px;transition:width .3s}.progress-text{position:absolute;right:0;top:-18px;font-size:.7rem;color:var(--text-muted)}.reader-page{max-width:700px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column}.reader-header{display:flex;align-items:center;gap:.75rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border);background:var(--surface)}.back-btn{background:none;border:none;color:var(--accent);font-size:1.4rem;cursor:pointer;padding:.2rem .5rem;border-radius:6px;transition:background .2s;line-height:1}.back-btn:hover{background:var(--surface-hover)}.reader-title{font-size:1rem;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.book-reader{flex:1;display:flex;flex-direction:column}.autoplay-progress{height:3px;background:var(--border)}.autoplay-progress-fill{height:100%;background:var(--accent);transition:width .05s linear}.page-area{flex:1;display:flex;align-items:center;justify-content:center;padding:3rem 2rem;min-height:60vh}.chunk-card{background:var(--surface);border-radius:var(--radius);padding:3rem 2.5rem;max-width:550px;width:100%;box-shadow:0 2px 24px #00000012;position:relative}.chunk-chapter{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--accent);margin-bottom:.75rem;padding-bottom:.5rem;border-bottom:1px solid var(--border)}.chunk-summary{font-size:.85rem;font-style:italic;color:var(--text-muted);margin-bottom:1rem;padding-left:.75rem;border-left:2px solid var(--border);line-height:1.5}.chunk-text{font-size:1.2rem;line-height:1.9;text-align:left}.chunk-footer{margin-top:2rem;text-align:center}.chunk-position{color:var(--text-muted);font-size:.85rem;font-style:italic}.reader-controls{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.5rem;border-top:1px solid var(--border);background:var(--surface)}.nav-btn{background:none;border:1px solid var(--border);color:var(--text);padding:.5rem 1.25rem;border-radius:8px;cursor:pointer;font-family:inherit;font-size:.9rem;transition:background .2s,border-color .2s}.nav-btn:hover:not(:disabled){background:var(--surface-hover);border-color:var(--text-muted)}.nav-btn:disabled{opacity:.3;cursor:not-allowed}.play-controls{display:flex;align-items:center;gap:.5rem}.play-btn{background:var(--accent);border:none;color:#fff;padding:.5rem 1.5rem;border-radius:8px;cursor:pointer;font-family:inherit;font-size:.9rem;font-weight:600;transition:background .2s}.play-btn:hover{background:var(--accent-hover)}.speed-btn{background:none;border:1px solid var(--border);color:var(--text-muted);padding:.5rem .75rem;border-radius:8px;cursor:pointer;font-family:inherit;font-size:.8rem;transition:background .2s}.speed-btn:hover{background:var(--surface-hover)}.loading{display:flex;align-items:center;justify-content:center;height:100vh;color:var(--text-muted);font-size:1.2rem;font-style:italic}
