:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#fdf8fa;--surface:#fff;--surface-alt:#f5eff2;--surface-high:#efe7ea;--text:#211a1c;--muted:#7c7377;--accent:#fc6381;--accent-contrast:#fff;--primary-container:#ffd9e1;--on-primary-container:#4a071b;--border:#e4d7db;--danger:#ba1a1a;--danger-contrast:#fff;--shape-cover:10px;--shape-chip:20px;--shape-card:16px;--shape-card-lg:20px;--shape-sheet:28px;--shape-button:26px;--shape-pill:999px;--bottom-nav-height:64px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);font-family:Segoe UI,system-ui,sans-serif}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#151214;--surface:#1d191b;--surface-alt:#272225;--surface-high:#322c2f;--text:#f2edef;--muted:#cfc4c7;--accent:#ffb1c0;--accent-contrast:#601426;--primary-container:#7d2a3e;--on-primary-container:#ffd9e1;--border:#3a3336;--danger:#ffb4ab;--danger-contrast:#690005}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{overscroll-behavior-y:none;height:100%;min-height:100dvh;margin:0}body{background:var(--bg);color:var(--text)}button{font:inherit;cursor:pointer;background:var(--surface);color:var(--text);border:1px solid var(--border);-webkit-user-select:none;user-select:none;border-radius:8px;min-height:44px;padding:.5rem .9rem}button:disabled{opacity:.5;cursor:not-allowed}button:not(:disabled):active{transform:scale(.97)}@media (hover:hover){button:not(:disabled):hover{border-color:var(--accent)}}select,input{font:inherit;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:.5rem .7rem}.section-label{letter-spacing:0;color:var(--text);margin:0 0 .8rem;font-size:1.05rem;font-weight:600}.empty-state{color:var(--muted);text-align:center;flex-direction:column;align-items:center;padding:3rem 1.5rem;display:flex}.empty-state-icon{color:var(--muted);opacity:.7;margin-bottom:1rem}.empty-state-title{color:var(--text);margin:0 0 .35rem;font-size:1rem;font-weight:600}.empty-state-description{max-width:320px;margin:0;font-size:.88rem;line-height:1.5}.empty-state-action{background:var(--primary-container);color:var(--on-primary-container);border-radius:var(--shape-pill);border-color:#0000;margin-top:1.25rem;padding:.65rem 1.4rem;font-weight:600}.loading-screen{height:100%;color:var(--muted);justify-content:center;align-items:center;display:flex}.login-screen{background:var(--bg);justify-content:center;align-items:center;min-height:100dvh;padding:1.5rem;display:flex;position:relative}.login-theme-toggle{top:max(1.25rem, var(--safe-top));right:max(1.25rem, var(--safe-right));position:absolute}.login-form{background:var(--surface);border-radius:var(--shape-card-lg);flex-direction:column;gap:.9rem;width:100%;max-width:320px;padding:2rem;display:flex;box-shadow:0 12px 32px #0000001f}.login-form h1{text-align:center;margin:0 0 .5rem}.login-form input{background:var(--surface-alt);padding:.75rem .9rem}.login-form button[type=submit]{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent);border-radius:var(--shape-pill);padding:.75rem 1rem;font-weight:600}.login-error{color:var(--danger);text-align:center;margin:0;font-size:.85rem}.app-shell{flex-direction:column;height:100%;min-height:100dvh;display:flex}.app-screen{flex:1;min-height:0;overflow:hidden}.screen{flex-direction:column;height:100%;display:flex}.screen-scroll{padding:0 max(16px, var(--safe-left)) calc(2rem + var(--safe-bottom)) max(16px, var(--safe-right));flex:1;overflow-y:auto}.screen-scroll>*+*{margin-top:1.75rem}.top-app-bar{padding:calc(.75rem + var(--safe-top)) max(16px, var(--safe-left)) .75rem max(16px, var(--safe-right));background:var(--bg);flex-shrink:0;align-items:center;gap:.75rem;display:flex}.top-app-bar-title{text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:1.3rem;font-weight:600;overflow:hidden}.top-app-bar-back{border-radius:var(--shape-pill);background:0 0;border-color:#0000;flex-shrink:0;width:44px;height:44px;padding:0;font-size:1.2rem}.top-app-bar-trailing{flex-shrink:0}.bottom-nav{background:var(--surface);border-top:1px solid var(--border);padding:.4rem max(8px, var(--safe-left)) max(.4rem, var(--safe-bottom)) max(8px, var(--safe-right));flex-shrink:0;display:flex}.nav-item{min-height:52px;color:var(--muted);background:0 0;border:none;border-radius:0;flex-direction:column;flex:1;align-items:center;gap:.2rem;padding:.3rem .2rem;display:flex}.nav-item-indicator{border-radius:var(--shape-pill);justify-content:center;align-items:center;width:56px;height:30px;transition:background-color .15s;display:flex}.nav-item.active .nav-item-indicator{background:var(--primary-container)}.nav-item-label{font-size:.7rem;line-height:1}.nav-item.active{color:var(--text);font-weight:600}.nav-item.active .nav-item-indicator svg{color:var(--on-primary-container)}.chip-row{scrollbar-width:none;gap:.5rem;padding-bottom:.2rem;display:flex;overflow-x:auto}.chip-row::-webkit-scrollbar{display:none}.chip{background:var(--surface-alt);color:var(--text);border-radius:var(--shape-chip);white-space:nowrap;border:1px solid #0000;flex-shrink:0;align-items:center;gap:.35rem;min-height:40px;padding:.5rem 1rem;font-size:.85rem;display:inline-flex}.chip-selected{background:var(--primary-container);color:var(--on-primary-container);font-weight:600}.chip-outline{border-color:var(--border);color:var(--muted);background:0 0}.book-cover{aspect-ratio:2/3;border-radius:var(--shape-cover);object-fit:cover;background:var(--surface-alt);width:100%;box-shadow:0 6px 16px #0000002e}.book-cover-placeholder{background:linear-gradient(155deg, color-mix(in srgb, var(--accent) 25%, var(--surface-alt)), var(--surface-alt));color:var(--accent);letter-spacing:.05em;justify-content:center;align-items:center;font-size:.75rem;font-weight:700;display:flex}.progress-bar{border-radius:var(--shape-pill);background:var(--surface-high);width:100%;height:4px;overflow:hidden}.progress-bar-fill{background:var(--accent);border-radius:var(--shape-pill);height:100%}.book-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:1.5rem 1rem;margin:0;padding:0;list-style:none;display:grid}.book-card{position:relative}.book-card-main{text-align:left;background:0 0;border:none;flex-direction:column;align-items:flex-start;gap:.3rem;width:100%;min-height:0;padding:0;display:flex}.book-title{margin-top:.35rem;font-size:.85rem;font-weight:600;line-height:1.3}.book-author{color:var(--muted);font-size:.75rem}.book-card .progress-bar{margin-top:.3rem}.book-card-more{border-radius:var(--shape-pill);background:color-mix(in srgb, var(--surface) 75%, transparent);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border-color:#0000;justify-content:center;align-items:center;width:40px;height:40px;min-height:40px;padding:0;display:flex;position:absolute;top:.2rem;right:.2rem}.continue-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--shape-card-lg);text-align:left;align-items:center;gap:1.1rem;width:100%;padding:1rem;display:flex;box-shadow:0 8px 24px #0000000f}.continue-card .book-cover{flex-shrink:0;width:60px}.continue-card-body{flex-direction:column;flex:1;gap:.25rem;min-width:0;display:flex}.continue-card-title{text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:700;overflow:hidden}.continue-card-author{color:var(--muted);font-size:.82rem}.continue-card-resume{color:var(--accent);align-self:flex-start;margin-top:.4rem;font-size:.8rem;font-weight:700}.shelf-header{justify-content:space-between;align-items:baseline;display:flex}.shelf-header .section-label{margin:0}.shelf-see-all{color:var(--accent);background:0 0;border-color:#0000;min-height:auto;padding:.3rem .4rem;font-size:.8rem;font-weight:600}.shelf-scroll{scroll-snap-type:x proximity;scrollbar-width:none;gap:.9rem;padding:.6rem 0 .2rem;display:flex;overflow-x:auto}.shelf-scroll::-webkit-scrollbar{display:none}.shelf-item{scroll-snap-align:start;text-align:left;background:0 0;border:none;flex-direction:column;flex-shrink:0;gap:.35rem;width:108px;padding:0;display:flex}.shelf-item-title{text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:.78rem;font-weight:500;line-height:1.3;display:-webkit-box;overflow:hidden}.home-subtitle{margin:0;font-size:1.4rem;font-weight:600}.home-search{background:var(--surface-alt);border-radius:var(--shape-pill);width:100%;color:var(--muted);text-align:left;border:1px solid #0000;align-items:center;gap:.6rem;padding:.8rem 1.1rem;font-size:.95rem;display:flex}.home-search-icon{flex-shrink:0}.goal-row{align-items:baseline;gap:.4rem;margin-bottom:.4rem;display:flex}.goal-minutes{font-size:1.3rem;font-weight:700}.goal-of{color:var(--muted);font-size:.85rem}.search-field{align-items:center;display:flex;position:relative}.search-field-icon{color:var(--muted);pointer-events:none;position:absolute;left:14px}.library-search{border-radius:var(--shape-pill);background:var(--surface-alt);border-color:#0000;width:100%;padding:.75rem 1.1rem .75rem 2.75rem}.fab{right:max(1rem, var(--safe-right));bottom:calc(var(--bottom-nav-height) + var(--safe-bottom) + 1rem);border-radius:var(--shape-card);background:var(--accent);width:56px;height:56px;min-height:56px;color:var(--accent-contrast);border-color:var(--accent);z-index:20;justify-content:center;align-items:center;padding:0;font-size:1.6rem;display:flex;position:fixed;box-shadow:0 8px 20px #00000040}.fab-spinner{border:2.5px solid color-mix(in srgb, var(--accent-contrast) 35%, transparent);border-top-color:var(--accent-contrast);border-radius:50%;width:22px;height:22px;animation:.7s linear infinite fab-spin}@keyframes fab-spin{to{transform:rotate(360deg)}}.bookmark-manager-list{flex-direction:column;gap:.3rem;margin:0;padding:0;list-style:none;display:flex}.bookmark-manager-row{text-align:left;border-radius:var(--shape-card);background:0 0;border-color:#0000;align-items:center;gap:.9rem;width:100%;min-height:64px;padding:.6rem;display:flex}.bookmark-manager-row .book-cover{width:40px;box-shadow:none;flex-shrink:0}.bookmark-manager-info{flex-direction:column;gap:.15rem;min-width:0;display:flex}.bookmark-manager-book{color:var(--muted);text-transform:uppercase;letter-spacing:.03em;font-size:.72rem}.bookmark-manager-label{text-overflow:ellipsis;white-space:nowrap;font-size:.9rem;font-weight:500;overflow:hidden}.settings-section{flex-direction:column;display:flex}.segmented{background:var(--surface-alt);border-radius:var(--shape-chip);gap:.4rem;padding:.3rem;display:flex}.segmented-item{border-radius:calc(var(--shape-chip) - 4px);background:0 0;border-color:#0000;flex:1;padding:.5rem;font-size:.85rem}.segmented-item.selected{background:var(--surface);font-weight:600;box-shadow:0 1px 3px #0000001f}.stepper{background:var(--surface-alt);border-radius:var(--shape-chip);justify-content:space-between;align-items:center;gap:1rem;padding:.5rem .6rem;display:flex}.stepper-btn{border-radius:var(--shape-pill);background:var(--surface);border-color:#0000;width:40px;height:40px;min-height:40px;padding:0;font-size:1.2rem;font-weight:600;line-height:1}.stepper-value{text-align:center;flex:1;font-size:1.1rem;font-weight:700}.settings-logout{color:var(--danger);background:0 0;border-color:#0000;align-self:flex-start;padding-left:.2rem;font-weight:500}.sheet-backdrop{z-index:60;background:#14100a73;justify-content:center;align-items:flex-end;animation:.15s sheet-fade;display:flex;position:fixed;inset:0}@keyframes sheet-fade{0%{opacity:0}}.sheet{background:var(--surface);border-radius:var(--shape-sheet) var(--shape-sheet) 0 0;width:100%;max-width:560px;max-height:min(85dvh,640px);padding:.6rem 1.25rem calc(1.25rem + var(--safe-bottom));outline:none;flex-direction:column;animation:.2s cubic-bezier(.2,.8,.2,1) sheet-up;display:flex;overflow:hidden;box-shadow:0 -8px 30px #0003}@keyframes sheet-up{0%{transform:translateY(100%)}}.sheet-handle{border-radius:var(--shape-pill);background:var(--border);flex-shrink:0;width:36px;height:4px;margin:.3rem auto .9rem}.sheet-title{flex-shrink:0;margin:0 0 .75rem;font-size:1.05rem}.sheet-content{overflow-y:auto}.sheet-list{flex-direction:column;gap:.2rem;margin:0;padding:0;list-style:none;display:flex}.sheet-list-row{align-items:center;gap:.5rem;display:flex}.sheet-list-label{cursor:pointer;border-radius:8px;flex:1;padding:.7rem .5rem;font-size:.95rem}.sheet-toc-item{text-align:left;white-space:pre-wrap;background:0 0;border-color:#0000;width:100%;min-height:auto}.sheet-empty{text-align:center;padding:2rem 1rem}.sheet-list-action{border-radius:var(--shape-pill);background:0 0;border-color:#0000;flex-shrink:0;width:40px;height:40px;min-height:40px;padding:0}.sheet-list-action.danger{color:var(--danger)}.sheet-list-input{background:var(--surface-alt);border-radius:8px;flex:1;padding:.6rem .7rem}.sheet-new-form{flex-shrink:0;gap:.5rem;margin-top:.75rem;display:flex}.sheet-new-form input{background:var(--surface-alt);border-color:#0000;flex:1}.sheet-field-label{color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin:1.1rem 0 .5rem;font-size:.78rem;display:block}.sheet-field-label:first-child{margin-top:0}.sheet-actions{flex-direction:column;gap:.75rem;display:flex}.sheet-actions select{width:100%;padding:.7rem}.sheet-action-danger{color:var(--danger);border-color:var(--border)}.sheet-add-bookmark{background:var(--primary-container);width:100%;color:var(--on-primary-container);border-radius:var(--shape-pill);border-color:#0000;margin-bottom:.75rem;font-weight:600}.font-size-row{align-items:center;gap:.75rem;display:flex}.font-size-row input[type=range]{accent-color:var(--accent);flex:1}.font-size-btn{border-radius:var(--shape-pill);width:40px;height:40px;min-height:40px;padding:0;font-weight:700}.snackbar{left:max(1rem, var(--safe-left));right:max(1rem, var(--safe-right));bottom:calc(1rem + var(--safe-bottom));background:var(--text);color:var(--bg);border-radius:var(--shape-card);z-index:80;justify-content:space-between;align-items:center;gap:1rem;padding:.85rem .6rem .85rem 1.1rem;font-size:.88rem;animation:.2s snackbar-up;display:flex;position:fixed;box-shadow:0 8px 24px #0000004d}@keyframes snackbar-up{0%{opacity:0;transform:translateY(12px)}}.snackbar-action{color:var(--accent);background:0 0;border:none;flex-shrink:0;min-height:auto;padding:.3rem .6rem;font-weight:700}.reader{background:var(--bg);flex-direction:column;height:100%;min-height:100dvh;display:flex}.reader-header{padding:calc(.6rem + var(--safe-top)) max(.6rem, var(--safe-left)) .6rem max(.6rem, var(--safe-right));flex-shrink:0;align-items:center;gap:.5rem;display:flex}.reader-icon-btn{border-radius:var(--shape-pill);background:0 0;border-color:#0000;flex-shrink:0;width:44px;height:44px;min-height:44px;padding:0;font-size:1.1rem}.reader-header-title{text-align:center;text-overflow:ellipsis;white-space:nowrap;flex:1;margin:0;font-size:.95rem;font-weight:600;overflow:hidden}.reader-body{flex:1;min-height:0;display:flex;position:relative}.reader-page-nav{border-radius:var(--shape-pill);background:color-mix(in srgb, var(--surface) 78%, transparent);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);width:44px;height:44px;min-height:44px;color:var(--text);z-index:5;border-color:#0000;justify-content:center;align-items:center;padding:0;display:flex;position:absolute;top:50%;transform:translateY(-50%);box-shadow:0 2px 10px #00000026}.reader-page-nav-prev{left:max(.5rem, var(--safe-left))}.reader-page-nav-next{right:max(.5rem, var(--safe-right))}.reader-skeleton{flex-direction:column;flex:1;justify-content:center;gap:.9rem;padding:2rem;display:flex}.skeleton-line{background:linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-high) 50%, var(--surface-alt) 75%);background-size:200% 100%;border-radius:6px;height:14px;animation:1.4s ease-in-out infinite skeleton-shimmer}.skeleton-title{width:55%;height:22px;margin-bottom:.5rem}.skeleton-short{width:40%}@keyframes skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.epub-viewer,.pdf-viewer{flex-direction:column;flex:1;min-height:0;display:flex}.epub-page{background:#fff;flex:1;min-height:0}.pdf-page-container{background:var(--surface-alt);flex:1;justify-content:center;padding:1rem;display:flex;position:relative;overflow:auto}.pdf-page-error{background:var(--surface);border-radius:var(--shape-card-lg);max-width:320px;height:fit-content;margin:auto;padding:2rem 1.5rem;position:absolute;inset:0;box-shadow:0 8px 24px #0000002e}.pdf-page-loading{flex-direction:column;gap:.7rem;width:min(240px,80%);height:fit-content;margin:auto;display:flex;position:absolute;inset:0}.pdf-page-container canvas{max-width:100%;height:auto;box-shadow:0 4px 20px #0000002e}.reader-controls{background:var(--surface);border-top:1px solid var(--border);padding:.9rem max(1rem, var(--safe-left)) calc(.75rem + var(--safe-bottom)) max(1rem, var(--safe-right));flex-shrink:0}.reader-progress-bar{margin-bottom:.3rem}.reader-progress-label{color:var(--muted);font-size:.75rem}.reader-controls-row{justify-content:space-around;margin-top:.6rem;display:flex}.reader-control{color:var(--muted);background:0 0;border-color:#0000;flex-direction:column;align-items:center;gap:.2rem;min-width:64px;font-size:.72rem;display:flex}.reader-control-icon{color:var(--text);font-size:1.15rem;font-weight:700;line-height:22px}.reader-control-bookmarked{color:var(--accent)}.reader-settings-sheet{flex-direction:column;display:flex}.tts-error{color:var(--danger);font-size:.8rem}.tts-mini-player{background:var(--surface-high);margin:0 max(.75rem, var(--safe-left)) .6rem max(.75rem, var(--safe-right));border-radius:var(--shape-card-lg);flex-shrink:0;align-items:center;gap:.6rem;padding:.4rem .4rem .4rem .9rem;display:flex;box-shadow:0 4px 16px #0000001f}.tts-mini-info{text-align:left;min-width:0;min-height:auto;color:var(--text);background:0 0;border:none;flex:1;align-items:center;gap:.5rem;padding:.2rem;font-size:.82rem;font-weight:600;display:flex}.tts-mini-info span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tts-mini-transport{flex-shrink:0;align-items:center;gap:.1rem;display:flex}.tts-mini-play{border-radius:var(--shape-pill);background:var(--accent);width:44px;height:44px;min-height:44px;color:var(--accent-contrast);border-color:var(--accent);flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}.tts-mini-speed{background:var(--surface);border-radius:var(--shape-pill);border-color:#0000;flex-shrink:0;min-height:auto;padding:.35rem .7rem;font-size:.78rem;font-weight:600}.tts-settings{flex-direction:column;gap:.3rem;display:flex}.tts-transport-row{justify-content:center;align-items:center;gap:1.25rem;padding:.4rem 0 1.1rem;display:flex}.tts-transport-row .tts-mini-play{width:56px;height:56px;min-height:56px}.segmented-wrap{flex-wrap:wrap}.sheet-switch-row{justify-content:space-between;align-items:center;padding:.6rem .1rem;display:flex}.switch{flex-shrink:0;width:44px;height:26px;display:inline-block;position:relative}.switch input{opacity:0;cursor:pointer;margin:0;position:absolute;inset:0}.switch-track{background:var(--surface-high);border-radius:var(--shape-pill);pointer-events:none;transition:background-color .15s;position:absolute;inset:0}.switch-track:before{content:"";background:var(--surface);border-radius:50%;width:20px;height:20px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 3px #00000040}.switch input:checked+.switch-track{background:var(--accent)}.switch input:checked+.switch-track:before{background:var(--accent-contrast);transform:translate(18px)}.reading-highlight{background:var(--surface-alt);border-radius:var(--shape-card);max-height:8rem;color:var(--muted);padding:.6rem .8rem;font-size:.95rem;line-height:1.6;overflow-y:auto}.sentence.active{color:var(--text);background:color-mix(in srgb, var(--accent) 20%, transparent);border-radius:3px}.theme-toggle{border-radius:var(--shape-pill);background:0 0;border-color:#0000;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;min-height:44px;padding:0;font-size:1.1rem;display:flex}@media (width>=840px){.app-shell{flex-direction:row}.bottom-nav{border-top:none;border-right:1px solid var(--border);width:88px;height:100%;padding:calc(1.5rem + var(--safe-top)) .5rem 1.5rem;flex-direction:column;justify-content:flex-start;gap:.5rem}.nav-item{min-height:56px}.screen-scroll,.top-app-bar{padding-left:max(32px, var(--safe-left));padding-right:max(32px, var(--safe-right))}.screen-scroll{width:100%;max-width:900px;margin:0 auto}.reader-header,.reader-controls{padding-left:max(1.5rem, var(--safe-left));padding-right:max(1.5rem, var(--safe-right))}.reader-body{justify-content:center}.epub-viewer,.pdf-viewer{width:100%;max-width:760px;margin:0 auto}.sheet-backdrop{align-items:center}.sheet{border-radius:var(--shape-card-lg);max-height:80dvh}.fab{right:calc(2rem + var(--safe-right));bottom:calc(2rem + var(--safe-bottom))}.snackbar{max-width:420px;left:auto}}
