:root{--bg: #f8f8f8;--fg: #111111;--muted: #6b7280;--surface: #ffffffcc;--ring: rgba(17, 17, 17, .12);--reader-width: 680px;--reader-font-size: 18px;--reader-line-height: 1.7;--reader-font-family: ui-serif, Georgia, "Times New Roman", serif}[data-theme=dark]{--bg: #0b0c0f;--fg: #e6e6e6;--muted: #9aa0aa;--surface: #0f1115cc;--ring: rgba(230, 230, 230, .18)}[data-theme=sepia]{--bg: #f4f1e8;--fg: #5c4b37;--muted: #8b7355;--surface: #faf8f3cc;--ring: rgba(139, 115, 85, .15)}[data-theme=solarized]{--bg: #fdf6e3;--fg: #657b83;--muted: #93a1a1;--surface: #eee8d5cc;--ring: rgba(101, 123, 131, .18)}*{box-sizing:border-box}html,body,#app{height:100%}body{margin:0;background:var(--bg);color:var(--fg);font-family:ui-sans-serif,-apple-system,system-ui,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.hero{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;text-align:center;padding:40px 20px;max-width:1200px;margin:0 auto}.hero-description{font-size:18px;color:var(--muted);margin:0;max-width:500px}.upload{display:flex;flex-direction:column;align-items:center;gap:12px;position:relative}.terms-link{font-size:13px;color:var(--muted);cursor:pointer;transition:all .15s;background:none;border:none;padding:4px 8px;margin:0;font-family:inherit;text-decoration:none;border-radius:4px}.terms-link u{color:var(--fg);text-decoration:underline;text-underline-offset:2px}.terms-link:hover{background:var(--ring)}.terms-link:hover u{text-decoration-thickness:2px}.file-overlay{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:2}.home{min-height:100vh;display:flex;flex-direction:column}.library{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;align-items:start;padding:20px;flex:0 1 auto}.card-wrapper{position:relative;width:100%}.card{width:100%;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--ring);background:var(--surface);color:var(--fg);border-radius:14px;padding:12px 14px;text-align:left;cursor:pointer;transition:box-shadow .15s ease,transform .04s ease,border-color .15s ease;position:relative}.card:hover{box-shadow:0 6px 28px -16px var(--ring);transform:translateY(-1px)}.card-content{flex:1;min-width:0;padding-right:10px}.card-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-meta{margin-top:6px;color:var(--muted);font-size:12px}.card-delete{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:50%;border:1px solid var(--ring);background:var(--bg);color:var(--muted);font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;opacity:0;visibility:hidden}.card:hover .card-delete{opacity:1;visibility:visible}.card-delete:hover{background:#f44;color:#fff;border-color:#f44;transform:scale(1.1)}.cta{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--ring);background:var(--surface);color:var(--fg);padding:16px 32px;border-radius:999px;font-size:18px;font-weight:600;letter-spacing:.2px;-webkit-backdrop-filter:saturate(120%) blur(4px);backdrop-filter:saturate(120%) blur(4px);cursor:pointer;transition:box-shadow .15s ease,transform .04s ease}.cta:hover{box-shadow:0 4px 24px -8px var(--ring);transform:translateY(-1px)}.cta:active{transform:translateY(0)}.layout{min-height:100%;display:grid;grid-template-rows:auto 1fr}.toolbar{position:sticky;top:0;display:flex;gap:10px;align-items:center;justify-content:center;padding:10px;-webkit-backdrop-filter:blur(8px) saturate(140%);backdrop-filter:blur(8px) saturate(140%);background:color-mix(in oklab,var(--bg) 86%,transparent);border-bottom:1px solid var(--ring);z-index:10}.icon-btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--ring);background:var(--surface);color:var(--fg);border-radius:999px;padding:8px 12px;cursor:pointer;transition:opacity .2s,transform .1s;-webkit-user-select:none;user-select:none}.icon-btn:hover{opacity:.85}.icon-btn:active{transform:scale(.95)}.select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--ring);background:var(--surface);color:var(--fg);border-radius:999px;padding:8px 12px}.theme-wrapper{position:relative}.theme-menu{position:absolute;top:100%;left:50%;transform:translate(-50%);margin-top:8px;background:#fff;border:1px solid rgba(0,0,0,.15);border-radius:12px;padding:4px;min-width:140px;-webkit-backdrop-filter:blur(12px) saturate(140%);backdrop-filter:blur(12px) saturate(140%);box-shadow:0 4px 20px -4px #0003;z-index:100}[data-theme=dark] .theme-menu{background:#1a1a1a;border-color:#fff3}.theme-option{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#111;text-align:left;cursor:pointer;border-radius:8px;transition:background .15s;font-size:14px}[data-theme=dark] .theme-option{color:#e6e6e6}.theme-option:hover{background:#00000014}[data-theme=dark] .theme-option:hover{background:#ffffff1a}.theme-option.active{background:#0000001f;font-weight:600}[data-theme=dark] .theme-option.active{background:#ffffff26}.size-slider-container{position:relative;display:flex;align-items:center}.size-label-btn{background:none;border:none;color:var(--muted);font-size:12px;padding:8px 12px;cursor:pointer;transition:color .15s}.size-label-btn:hover{color:var(--fg)}.size-slider-wrapper{position:absolute;top:100%;left:50%;transform:translate(-50%);margin-top:8px;background:var(--bg);border:1px solid var(--ring);border-radius:8px;padding:12px 16px;display:flex;align-items:center;gap:12px;box-shadow:0 4px 20px -4px #0003;z-index:100}.size-slider{width:120px;height:4px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ring);border-radius:2px;outline:none;cursor:pointer}.size-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;background:var(--fg);border-radius:50%;cursor:pointer;transition:transform .15s}.size-slider::-webkit-slider-thumb:hover{transform:scale(1.2)}.size-slider::-moz-range-thumb{width:16px;height:16px;background:var(--fg);border:none;border-radius:50%;cursor:pointer;transition:transform .15s}.size-slider::-moz-range-thumb:hover{transform:scale(1.2)}.size-value{color:var(--muted);font-size:12px;min-width:35px;text-align:center}.reader{display:flex;flex-direction:column;padding:28px 16px 60px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.page{width:100%;max-width:var(--reader-width);margin:0 auto 28px}.text{background:var(--surface);border:1px solid var(--ring);border-radius:16px;box-shadow:0 1px 2px #00000008,0 12px 40px -20px #00000040;padding:28px 22px;font-size:var(--reader-font-size);line-height:var(--reader-line-height);font-family:var(--reader-font-family);text-rendering:optimizeLegibility;width:100%}.text p{margin:0 0 1em}.page-control{display:flex;align-items:center;justify-content:center;min-width:70px}.page-label{min-width:70px;text-align:center;color:var(--muted);cursor:pointer;padding:4px 8px;border-radius:4px;transition:background-color .15s}.page-label:hover{background-color:var(--ring);color:var(--fg)}.page-input{width:60px;text-align:center;background:transparent;border:1px solid var(--ring);border-radius:4px;color:var(--fg);padding:4px;font-family:inherit;font-size:inherit;outline:none}.page-input:focus{border-color:var(--muted);background:var(--surface)}.page-input::-webkit-outer-spin-button,.page-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.page-input[type=number]{-moz-appearance:textfield}.footer{margin-top:auto;padding:20px;border-top:1px solid var(--ring)}.footer-content{max-width:1200px;margin:0 auto}.footer-contact{display:flex;flex-wrap:wrap;gap:20px;justify-content:center;align-items:center}.footer-contact a{color:var(--muted);text-decoration:none;font-size:14px;transition:color .15s}.footer-contact a:hover{color:var(--fg)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px}.terms-modal{background:var(--bg);border:1px solid var(--ring);border-radius:16px;max-width:600px;max-height:80vh;overflow-y:auto;box-shadow:0 8px 32px #0003;display:flex;flex-direction:column}.terms-title{margin:0;padding:24px 24px 16px;font-size:24px;font-weight:600;border-bottom:1px solid var(--ring)}.terms-content{padding:24px;line-height:1.6;color:var(--fg)}.terms-content p{margin:0 0 12px}.terms-content ul{margin:8px 0 16px;padding-left:24px}.terms-content li{margin:6px 0}.terms-buttons{display:flex;gap:12px;padding:16px 24px;border-top:1px solid var(--ring);justify-content:space-between}.terms-buttons>button:first-child{margin-right:auto}.terms-cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--ring);background:transparent;color:var(--fg);padding:12px 24px;border-radius:999px;font-size:14px;cursor:pointer;transition:background .15s}.terms-cancel:hover{background:var(--ring)}.featured-container{width:100%;max-width:1000px;margin:40px auto;display:flex;flex-direction:column;gap:20px}.featured-header{display:flex;justify-content:space-between;align-items:center;padding:0 20px}.featured-title{margin:0;font-size:20px;font-weight:600}.view-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:1px solid var(--ring);color:var(--fg);padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px;transition:all .2s}.view-toggle:hover{background:var(--ring)}.featured-content{position:relative;min-height:400px;transition:all .3s}.view-desk{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:20px;perspective:1000px;padding:40px}.desk-item{position:relative;transition:transform .3s cubic-bezier(.34,1.56,.64,1);transform:rotate(var(--rot)) translate(var(--x),var(--y))}.desk-item:hover{transform:scale(1.1) rotate(0) translateY(-10px);z-index:100!important}.desk-item>div{box-shadow:0 10px 20px #00000026!important}.featured-list{display:flex;flex-direction:column;gap:10px}.list-item{display:flex;justify-content:space-between;align-items:center;padding:16px;background:var(--surface);border:1px solid var(--ring);border-radius:8px}.list-info{display:flex;flex-direction:column;gap:4px}.list-title{font-weight:600;font-size:16px}.list-author{color:var(--muted);font-size:14px}.list-action{padding:8px 16px;background:var(--fg);color:var(--bg);border-radius:4px;cursor:pointer;font-size:14px;font-weight:500;text-decoration:none}.list-action:hover{opacity:.9}.book-cover-card{width:200px;height:280px;background:linear-gradient(135deg,#f5f5f5,#e0e0e0);border-radius:8px;box-shadow:0 2px 4px #0000001a,0 8px 16px #0000001a;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;text-align:center;cursor:pointer;transition:transform .3s,box-shadow .3s;position:relative;overflow:hidden}.book-cover-card:hover{transform:translateY(-4px);box-shadow:0 4px 8px #00000026,0 12px 24px #00000026}.book-cover-spine{position:absolute;left:10px;top:0;bottom:0;width:2px;background:#0000001a;box-shadow:1px 0 2px #0000001a}.book-cover-title{font-family:var(--reader-font-family);font-size:18px;font-weight:600;color:#333;margin:0 0 12px;line-height:1.3}.book-cover-author{font-size:14px;color:#666;font-style:italic;margin:0}@media (max-width: 600px){.book-cover-card{width:140px;height:196px;padding:12px}.book-cover-spine{left:6px}.book-cover-title{font-size:14px;margin-bottom:8px}.book-cover-author{font-size:12px}}.library{display:flex;flex-wrap:wrap;gap:24px;padding:20px;justify-content:center;max-width:1000px;margin:0 auto}.card-wrapper{position:relative;width:200px;height:280px}.card{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;border:none;background:linear-gradient(135deg,#fff,#f0f0f0);color:var(--fg);border-radius:8px;padding:20px;text-align:center;cursor:pointer;transition:transform .3s,box-shadow .3s;position:relative;box-shadow:0 2px 4px #0000001a,0 8px 16px #0000001a;overflow:hidden}[data-theme=dark] .card{background:linear-gradient(135deg,#2a2a2a,#1a1a1a);box-shadow:0 4px 12px #0000004d}.card:hover{transform:translateY(-4px);box-shadow:0 4px 8px #00000026,0 12px 24px #00000026}.card:before{content:"";position:absolute;left:10px;top:0;bottom:0;width:2px;background:#0000001a;box-shadow:1px 0 2px #0000001a}.card-content{display:flex;flex-direction:column;align-items:center;width:100%;padding:0}.card-title{font-family:var(--reader-font-family);font-size:18px;font-weight:600;margin-bottom:12px;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-overflow:ellipsis;line-height:1.3;color:#333}[data-theme=dark] .card-title{color:#e6e6e6}.card-meta{margin-top:0;font-size:12px;color:var(--muted);font-style:italic}.card-delete{position:absolute;top:8px;right:8px;width:28px;height:28px;border-radius:50%;border:none;background:#ff4444e6;color:#fff;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;opacity:0;transform:scale(.8);z-index:10;box-shadow:0 2px 4px #0003}.card:hover .card-delete{opacity:1;transform:scale(1)}.card-delete:hover{transform:scale(1.1);background:#f44}@media (max-width: 600px){.card-wrapper{width:140px;height:196px}.card{padding:12px}.card:before{left:6px}.card-title{font-size:14px;margin-bottom:8px}.card-meta{font-size:11px}}
