:root{--bg:#0b0e13;--surface:#131821;--raised:#1a212c;--selected:#222d3b;--text:#f4f7fb;--muted:#aab5c5;--subtle:#758297;--border:#2a3443;--primary:#8b5cf6;--primary-strong:#7c3aed;--accent:#34d399;--danger:#fb7185;--shadow:0 18px 50px #0003;--r-sm:10px;--r-md:16px;--r-lg:24px;color-scheme:dark;font-family:'Plus Jakarta Sans',system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box} [hidden]{display:none!important} html{min-width:320px;background:var(--bg)} body{margin:0;min-width:320px;min-height:100dvh;background:var(--bg);color:var(--text);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}button,input,select{font:inherit;touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}a{color:inherit}
.app-shell{min-height:100dvh}.login-view{display:grid;min-height:100dvh;place-items:center;padding:24px}.login-card{width:min(100%,460px);padding:clamp(28px,6vw,56px);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow)}.brand-mark,.wordmark-icon{display:grid;place-items:center;color:var(--primary)}.brand-mark{width:56px;height:56px;margin-bottom:24px}.brand-mark svg{width:48px;height:48px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.4}.eyebrow{margin:0 0 8px;color:var(--accent);font-size:12px;font-weight:700;letter-spacing:.12em;line-height:1.3;text-transform:uppercase}h1,h2,p{margin-top:0}h1,h2{text-wrap:balance}.login-card h1{margin-bottom:16px;font-size:clamp(28px,5vw,40px);line-height:1.1;letter-spacing:-.04em}.login-copy{max-width:36rem;margin-bottom:32px;color:var(--muted)}.login-form{display:grid;gap:8px}.login-form label{font-weight:600}input,select{min-height:48px;color:var(--text);background:var(--raised);border:1px solid var(--border);border-radius:var(--r-sm)}input{width:100%;padding:12px 14px}input::placeholder{color:var(--subtle)}input[type=search]{appearance:none}.field-error{margin:0;color:var(--danger);font-weight:600}
.button{min-height:48px;padding:10px 16px;border:1px solid transparent;border-radius:var(--r-sm);color:var(--text);background:transparent;font-size:14px;font-weight:700;transition:background-color 160ms ease,border-color 160ms ease,transform 160ms ease}.button:active,.icon-button:active,.back-button:active,.track-item:active{transform:scale(.98)}.button-primary{color:#fff;background:var(--primary-strong)}.button-primary:hover{background:var(--primary)}.button-secondary{background:var(--raised);border-color:var(--border)}.button-secondary:hover{background:var(--selected)}.button-wide{width:100%;margin-top:16px}.button-ghost{color:var(--muted);border-color:var(--border)}.button-ghost:hover{color:var(--text);background:var(--raised)}
.library-view{width:min(100%,1600px);margin:0 auto;padding:16px clamp(16px,4vw,56px) 56px}.topbar{display:flex;min-height:64px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border)}.wordmark{display:inline-flex;align-items:center;gap:10px;font-size:16px;font-weight:700;text-decoration:none}.wordmark-icon{width:32px;height:32px;border-radius:9px;background:var(--raised)}.wordmark-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.6}.topbar-actions{display:flex;align-items:center;gap:16px}.scope-badge{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px #34d3991f}
.home-view{padding-top:clamp(28px,5vw,64px)}.library-heading{display:flex;align-items:start;justify-content:space-between;gap:24px}.library-heading h1{margin-bottom:8px;font-size:clamp(34px,6vw,64px);line-height:1;letter-spacing:-.06em}.heading-copy{margin:0;color:var(--muted)}.icon-button{display:grid;width:48px;height:48px;flex:none;place-items:center;color:var(--muted);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm)}.icon-button:hover{color:var(--text);background:var(--raised)}.icon-button svg,.search-field svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.library-toolbar{display:flex;align-items:center;gap:16px;margin:32px 0 24px}.search-field{position:relative;display:block;width:min(100%,520px)}.search-field svg{position:absolute;top:13px;left:14px;color:var(--subtle);pointer-events:none}.search-field input{padding-left:46px}.panel-status{min-height:24px;margin:0;color:var(--subtle);font-size:13px}.book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:32px 20px}.book-card{display:block;width:100%;padding:0;color:var(--text);text-align:start;background:transparent;border:0;border-radius:var(--r-sm)}.book-card:hover .card-cover{transform:translateY(-4px);box-shadow:0 16px 30px #0006}.book-card:focus-visible{outline-offset:8px}.card-cover{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;background:linear-gradient(145deg,#31235f,#123e3c);border:1px solid #fff1;border-radius:var(--r-md);box-shadow:0 10px 22px #0004;transition:transform 160ms ease,box-shadow 160ms ease}.cover-fallback{display:grid;place-items:center;padding:20px;color:#fff;background:linear-gradient(145deg,#36256a,#0f514b);font-size:clamp(32px,5vw,54px);font-weight:700;letter-spacing:.06em;text-align:center;text-shadow:0 3px 12px #0006}.book-card-copy{display:block;padding:12px 4px 0}.book-card-title{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:15px;line-height:1.35}.book-card-meta{display:block;overflow:hidden;margin-top:5px;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.book-card-badge{display:inline-block;margin-top:8px;padding:3px 8px;color:var(--accent);background:#34d39914;border-radius:999px;font-size:11px;font-weight:700}.empty-state{grid-column:1/-1;padding:40px 8px;color:var(--muted)}
.detail-view{padding-top:32px}.back-button{min-height:48px;padding:10px 0;color:var(--muted);background:transparent;border:0;font-weight:700}.back-button:hover{color:var(--text)}.detail-grid{display:grid;grid-template-columns:minmax(180px,280px) minmax(0,1fr);align-items:center;gap:clamp(24px,6vw,80px);padding:24px 0 48px}.detail-cover{width:100%;max-width:280px}.detail-cover-image{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:var(--r-md);box-shadow:0 20px 40px #0005}.detail-info h1{max-width:800px;margin-bottom:12px;font-size:clamp(32px,6vw,68px);line-height:1.02;letter-spacing:-.06em}.detail-collection{min-height:16px}.detail-author{margin-bottom:8px;color:var(--muted);font-size:18px}.detail-meta{margin-bottom:24px;color:var(--subtle)}.detail-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.variant-label{width:100%;color:var(--muted);font-size:13px;font-weight:700}.chapter-section{padding:24px 0}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:16px}.section-heading h2{margin:0;font-size:28px;letter-spacing:-.04em}.chapter-count{color:var(--subtle);font-size:13px}.track-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:8px}.track-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:60px;padding:8px 12px;color:var(--text);text-align:start;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm)}.track-item:hover,.track-item.is-current{background:var(--selected);border-color:var(--primary)}.track-number{color:var(--primary);font-variant-numeric:tabular-nums;font-weight:700}.track-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.track-size{color:var(--subtle);font-size:12px}
.player-panel{display:flex;min-height:460px;flex-direction:column;justify-content:center;margin-top:32px;padding:clamp(24px,5vw,64px);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow)}.player-topline{display:flex;align-items:center;justify-content:space-between;gap:16px}.resume-status{color:var(--accent);font-size:13px;font-weight:600}.player-art{display:grid;width:min(100%,220px);aspect-ratio:2/3;margin:24px auto;place-items:center}.player-art img,.player-art .cover-fallback{width:100%;height:100%;border-radius:var(--r-md);box-shadow:0 20px 50px #0005}.player-copy{width:min(100%,680px);margin:0 auto 24px;text-align:center}.player-copy h2{margin-bottom:8px;font-size:clamp(24px,4vw,40px);line-height:1.1;letter-spacing:-.04em}.player-copy p{margin:0;color:var(--muted);overflow-wrap:anywhere}audio{display:block;width:min(100%,680px);height:48px;margin:0 auto}.player-controls{display:flex;align-items:center;justify-content:center;gap:clamp(20px,5vw,56px);margin:32px 0}.control-button{display:grid;min-width:64px;min-height:64px;place-items:center;padding:8px;color:var(--muted);background:transparent;border:1px solid transparent;border-radius:50%}.control-button:hover{color:var(--text);background:var(--raised)}.control-button span{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.control-button small{margin-top:-2px;font-size:11px}.play-button{display:grid;width:76px;height:76px;place-items:center;color:#fff;background:var(--primary-strong);border:0;border-radius:50%;box-shadow:0 10px 24px #7c3aed47}.play-button:hover{background:var(--primary)}.play-button svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.2}.play-button .play-icon{fill:currentColor;stroke:none;margin-left:3px}.pause-icon{display:none}.is-playing .play-icon{display:none}.is-playing .pause-icon{display:block}.player-footer{display:flex;width:min(100%,680px);align-items:center;gap:16px;margin:0 auto;color:var(--muted);font-size:13px}.player-footer select{min-height:44px;padding:8px 36px 8px 12px}.time-readout{margin-left:auto;color:var(--subtle);font-variant-numeric:tabular-nums}
.skip-link{position:fixed;top:8px;left:8px;z-index:10;padding:10px 14px;color:#fff;background:var(--primary-strong);border-radius:var(--r-sm);transform:translateY(-150%)}.skip-link:focus{transform:translateY(0)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (max-width:760px){.library-toolbar{display:block}.search-field{width:100%;margin-bottom:12px}.book-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:24px 14px}.detail-grid{grid-template-columns:140px minmax(0,1fr);gap:20px}.detail-info h1{font-size:clamp(28px,7vw,46px)}.detail-cover{max-width:140px}.player-panel{min-height:auto}.track-list{grid-template-columns:1fr}}
@media (max-width:520px){.topbar{align-items:flex-start;padding-bottom:16px}.scope-badge{display:none}.library-heading{gap:12px}.heading-copy{font-size:14px}.detail-grid{grid-template-columns:1fr;align-items:start}.detail-cover{max-width:190px}.detail-info h1{font-size:38px}.player-panel{padding:20px 16px;border-radius:var(--r-md)}.player-art{width:160px;margin-block:20px 24px}.track-item{grid-template-columns:36px minmax(0,1fr);gap:8px}.track-size{display:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
.book-card-badge-muted{margin-left:5px;color:var(--muted);background:var(--surface)}
.book-grid{display:block}.library-section+.library-section{margin-top:48px}.library-section-heading{display:flex;align-items:baseline;gap:12px;margin-bottom:18px}.library-section-heading h2{margin:0;font-size:clamp(22px,3vw,30px);letter-spacing:-.04em}.library-section-heading span{color:var(--subtle);font-size:13px}.library-section-heading p{margin:0 0 0 auto;color:var(--muted);font-size:13px}.shelf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:32px 20px}.book-card{position:relative}.book-card-open{display:block;width:100%;padding:0;color:var(--text);text-align:start;background:transparent;border:0;border-radius:var(--r-sm)}.book-card-open:focus-visible{outline-offset:8px}.favorite-button{position:absolute;top:8px;right:8px;z-index:1;display:grid;width:44px;height:44px;place-items:center;color:var(--text);background:#0b0e13b8;border:1px solid #fff3;border-radius:50%;box-shadow:0 4px 12px #0005}.favorite-button:hover,.favorite-button.is-favorite{color:#fbbf24;background:#0b0e13e8}.favorite-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-linejoin:round;stroke-width:1.8}.favorite-button.is-favorite svg{fill:currentColor}.book-card-open:active,.favorite-button:active{transform:scale(.97)}
@media (max-width:760px){.shelf-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:24px 14px}.library-section-heading{flex-wrap:wrap}.library-section-heading p{width:100%;margin:0}}
.book-card-media{position:relative;display:block;width:100%;aspect-ratio:2/3;overflow:hidden;background:var(--raised);border-radius:var(--r-md)}.book-card-media .card-cover{height:100%;object-fit:contain}.book-card-media .cover-fallback{width:100%;height:100%;box-sizing:border-box}.goodreads-rating{position:absolute;top:12px;left:50%;z-index:1;transform:translateX(-50%);padding:3px 7px;color:#fff7d6;background:#17120dcc;border:1px solid #fff4;border-radius:999px;box-shadow:0 3px 10px #0006;font-size:11px;font-weight:700;line-height:1.2;white-space:nowrap;pointer-events:none}.detail-cover-image{object-fit:contain;background:var(--raised)}
.book-card-media{aspect-ratio:auto}.book-card-media .card-cover{width:100%;height:auto;aspect-ratio:auto;object-fit:contain}.book-card-media .cover-fallback{height:auto;aspect-ratio:2/3}.book-options{position:absolute;right:8px;bottom:8px;z-index:3}.book-options-toggle{display:grid;width:36px;height:36px;place-items:center;padding:0;color:var(--text);background:#0b0e13c9;border:1px solid #fff3;border-radius:50%;box-shadow:0 4px 12px #0005}.book-options-toggle span{font-size:15px;letter-spacing:2px;line-height:1;transform:translateY(-2px)}.book-options-toggle:hover,.book-options-toggle:focus-visible{background:#252b38}.book-options-menu{position:absolute;right:0;bottom:44px;display:grid;min-width:150px;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);box-shadow:var(--shadow)}.book-options-menu[hidden]{display:none}.book-options-menu button{padding:10px 12px;color:var(--text);text-align:left;background:transparent;border:0;border-radius:6px;white-space:nowrap}.book-options-menu button:hover,.book-options-menu button:focus-visible{background:var(--selected)}
