:root{--purple: #512888;--purple-dark: #3a1c63;--purple-light: #7a52ad;--purple-tint: #ece6f7;--silver: #c7c9cc;--silver-light: #e8e9eb;--silver-dark: #9a9da1;--bg: #f4f3f6;--surface: #ffffff;--text: #201c29;--text-muted: #635f6d;--danger: #b3261e;--danger-bg: #fbe9e7;--danger-border: #e3aca7;--radius: 10px;--shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);font-family:Segoe UI,system-ui,-apple-system,sans-serif}@media (prefers-color-scheme: dark){:root{--purple: #a389d9;--purple-dark: #8267c4;--purple-light: #c3aeea;--purple-tint: #2c2438;--silver: #55505f;--silver-light: #2c2734;--silver-dark: #8b8594;--bg: #161320;--surface: #211c2b;--text: #f1eef7;--text-muted: #b3accb;--danger: #ff8177;--danger-bg: #3a201d;--danger-border: #6b3630;--shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3)}}*{box-sizing:border-box}html{color-scheme:light dark}body{margin:0;background:var(--bg);color:var(--text)}.bg-art{position:fixed;top:0;right:0;bottom:0;left:0;z-index:0;overflow:hidden;pointer-events:none}.bg-art-canvas{width:100%;height:100%}.bg-art-ink{opacity:.3}.bg-art-dot,.bg-art-drop{fill:var(--purple)}.bg-art-spike{fill:none;stroke:var(--purple);stroke-linecap:round}button{font-family:inherit;cursor:pointer}input,select,textarea{font-family:inherit;font-size:.9rem}.app{position:relative;z-index:1;max-width:1100px;margin:0 auto;padding:1.5rem 1.5rem 4rem}.app-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}.app-header h1{color:var(--purple);font-size:1.6rem;margin:0;letter-spacing:-.01em}.app-header .subtitle{color:var(--text-muted);font-size:.85rem;margin-top:.15rem}.tracker-group{display:flex;gap:.75rem;flex-wrap:wrap;align-items:flex-start}.history-stats{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1.5rem}.history-stat{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--silver-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:.75rem 1.25rem;min-width:140px}.history-stat-value{font-size:1.6rem;font-weight:800;color:var(--purple)}.history-stat-label{font-size:.75rem;color:var(--text-muted)}.tracker{display:flex;flex-direction:column;align-items:flex-end;gap:.3rem}.tracker-title{font-size:.7rem;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}.ahead-behind{padding:.6rem 1rem;border-radius:var(--radius);font-weight:600;font-size:.95rem;background:var(--silver-light);color:var(--text);border:1px solid var(--silver);white-space:nowrap}.ahead-behind.ahead{background:var(--purple-tint);color:var(--purple);border-color:var(--purple-light)}.ahead-behind.behind{background:var(--danger-bg);color:var(--danger);border-color:var(--danger-border)}.ahead-behind .sub{font-weight:400;font-size:.8rem;opacity:.8;margin-left:.4rem}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;background:var(--surface);border:1px solid var(--silver-light);border-radius:var(--radius);padding:.75rem 1rem;box-shadow:var(--shadow)}.toolbar-group{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.view-toggle{display:inline-flex;border:1px solid var(--purple);border-radius:999px;overflow:hidden}.view-toggle button{border:none;background:var(--surface);color:var(--purple);padding:.4rem 1rem;font-size:.85rem;font-weight:600}.view-toggle button.active{background:var(--purple);color:#fff}.settings-field{display:flex;align-items:center;gap:.4rem;font-size:.85rem;color:var(--text-muted)}.settings-field input{width:4.5rem;padding:.3rem .5rem;border:1px solid var(--silver);border-radius:6px}.btn{border:1px solid var(--purple);background:var(--purple);color:#fff;padding:.45rem .9rem;border-radius:6px;font-size:.85rem;font-weight:600}.btn:hover{background:var(--purple-dark)}.btn.secondary{background:var(--surface);color:var(--purple)}.btn.secondary:hover{background:var(--silver-light)}.btn.silver{background:var(--silver-light);border-color:var(--silver);color:var(--text)}.btn.silver:hover{background:var(--silver)}.btn.danger{background:var(--surface);border-color:var(--danger);color:var(--danger)}.btn.danger:hover{background:var(--danger-bg)}.btn.small{padding:.25rem .55rem;font-size:.75rem}.btn:disabled{opacity:.5;cursor:not-allowed}.seed-panel{background:var(--surface);border:1px solid var(--silver-light);border-radius:var(--radius);padding:1.5rem;box-shadow:var(--shadow)}.seed-panel h2{color:var(--purple);margin-top:0}.seed-panel textarea{width:100%;min-height:220px;padding:.75rem;border:1px solid var(--silver);border-radius:8px;font-family:Cascadia Code,Consolas,monospace;font-size:.82rem;resize:vertical}.seed-panel .actions{display:flex;gap:.6rem;margin-top:.75rem;align-items:center}.seed-error{color:var(--danger);font-size:.85rem;margin-top:.5rem}.cover{width:96px;height:144px;object-fit:cover;border-radius:6px;background:var(--silver-light);flex-shrink:0;box-shadow:var(--shadow)}.cover--placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,var(--purple) 0%,var(--purple-dark) 100%);color:#fff;text-align:center;font-size:.85rem;font-weight:600;padding:.6rem;line-height:1.3;overflow:hidden}.cover--loading{background:linear-gradient(90deg,var(--silver-light) 25%,var(--silver) 50%,var(--silver-light) 75%);background-size:200% 100%;animation:shimmer 1.4s infinite}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.book-list{display:flex;flex-direction:column;gap:.75rem}.month-stack{display:flex;flex-direction:column;gap:2rem}.month-tile{border-radius:16px;padding:1.25rem 1.25rem 1.5rem;box-shadow:0 18px 40px #5128881a,0 4px 14px #201c290f}.month-tile.tint-purple{border:1px solid rgba(81,40,136,.4);background:linear-gradient(160deg,rgba(81,40,136,.24) 0%,var(--surface) 70%)}.month-tile.tint-silver{border:1px solid rgba(120,122,126,.55);background:linear-gradient(160deg,rgba(120,122,126,.38) 0%,var(--surface) 70%)}.month-tile-header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.75rem;border-bottom:2px solid var(--purple-light);padding-bottom:.6rem;margin-bottom:1.25rem}.month-tile-header-title{color:var(--purple);font-weight:800;font-size:1.4rem;text-align:center;letter-spacing:.02em;white-space:nowrap}.month-tile-header-spacer{min-width:0}.month-tile-header-corner{display:flex;justify-content:flex-end;min-width:0}.month-tile-badge{padding:.3rem .65rem;border-radius:999px;font-size:.7rem;font-weight:700;white-space:nowrap;background:var(--silver-light);color:var(--text-muted);border:1px solid var(--silver)}.month-tile-badge.ahead{background:var(--purple-tint);color:var(--purple);border-color:var(--purple-light)}.month-tile-badge.behind{background:var(--danger-bg);color:var(--danger);border-color:var(--danger-border)}.book-card{display:flex;gap:1rem;background:var(--surface);border:1px solid var(--silver-light);border-left:5px solid var(--silver);border-radius:var(--radius);padding:1rem;box-shadow:var(--shadow);align-items:flex-start}.book-card.status-tbr{border-left-color:var(--silver-dark);background:linear-gradient(135deg,rgba(154,157,161,.14) 0%,var(--surface) 40%)}.book-card.status-currently_reading{border-left-color:var(--purple);background:linear-gradient(135deg,rgba(81,40,136,.16) 0%,var(--surface) 40%)}.book-card.status-finished{border-left-color:var(--silver-dark);background:linear-gradient(135deg,rgba(120,122,126,.16) 0%,var(--surface) 40%)}.book-card.at-risk{border-color:var(--danger);border-left-color:var(--danger);background:linear-gradient(135deg,rgba(179,38,30,.14) 0%,var(--surface) 40%)}.book-card.dragging{opacity:.5}.book-card .grip{cursor:grab;color:var(--silver-dark);padding-top:.5rem;-webkit-user-select:none;user-select:none}.book-card-body{flex:1;min-width:0}.book-card-top{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap}.book-title{font-weight:700;font-size:1.02rem;margin:0}.book-author{color:var(--text-muted);font-size:.85rem;margin:.1rem 0 .5rem}.book-status-badge{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:.2rem .5rem;border-radius:999px;background:var(--silver-light);color:var(--text-muted);white-space:nowrap;height:fit-content}.book-status-badge.currently_reading{background:var(--purple-tint);color:var(--purple)}.book-status-badge.finished{background:var(--silver);color:var(--text)}.risk-badge{font-size:.7rem;font-weight:700;color:var(--danger);background:var(--danger-bg);padding:.2rem .5rem;border-radius:999px;white-space:nowrap}.progress-track{background:var(--silver-light);border-radius:999px;height:8px;overflow:hidden;margin:.4rem 0}.progress-fill{height:100%;background:var(--purple);border-radius:999px;transition:width .2s ease}.progress-fill.finished{background:var(--silver-dark)}.book-meta-row{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem;font-size:.8rem;color:var(--text-muted);margin-top:.4rem}.book-meta-row strong{color:var(--text)}.book-edit-row{display:flex;flex-wrap:wrap;gap:.6rem 1rem;margin-top:.6rem;align-items:center}.field-inline{display:flex;align-items:center;gap:.35rem;font-size:.78rem;color:var(--text-muted)}.field-inline input{padding:.25rem .45rem;border:1px solid var(--silver);border-radius:5px;width:6rem}.field-inline input.narrow{width:4rem}.progress-input{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}.progress-input-mode,.progress-input-speed{padding:.25rem .35rem;border:1px solid var(--silver);border-radius:5px;background:var(--surface);color:var(--text);font-size:.78rem}.progress-input-mode{width:8.5rem}.progress-input-speed{width:4.2rem}.progress-input-time{padding:.25rem .45rem;border:1px solid var(--silver);border-radius:5px;width:4.5rem;color:var(--text);background:var(--surface)}.progress-input-hint{font-size:.75rem;color:var(--text-muted);white-space:nowrap}.book-card-actions{display:flex;gap:.4rem;margin-top:.6rem;flex-wrap:wrap}.reorder-buttons{display:flex;flex-direction:column;gap:.15rem}.reorder-buttons button{border:1px solid var(--silver);background:var(--surface);border-radius:4px;width:22px;height:22px;line-height:1;font-size:.7rem;color:var(--text-muted)}.reorder-buttons button:hover:not(:disabled){background:var(--silver-light)}.empty-state{text-align:center;padding:3rem 1rem;color:var(--text-muted)}.timeline-view{background:var(--surface);border:1px solid var(--silver-light);border-radius:var(--radius);box-shadow:var(--shadow);padding:1.25rem}.timeline-container{display:flex;align-items:flex-start;border:1px solid var(--silver-light);border-radius:8px;overflow:hidden}.timeline-labels{flex:0 0 280px;width:280px;border-right:1px solid var(--silver-light)}.timeline-label-spacer{border-bottom:1px solid var(--silver);box-sizing:border-box}.timeline-row-label{height:76px;box-sizing:border-box;padding:.4rem .75rem;display:flex;align-items:center;gap:.6rem;border-bottom:1px solid var(--silver-light)}.timeline-row-label .cover{width:44px;height:66px}.timeline-row-label .cover--placeholder{font-size:.5rem;padding:.25rem}.timeline-row-text{display:flex;flex-direction:column;justify-content:center;gap:.15rem;min-width:0}.timeline-row-label.alt{background:var(--bg)}.timeline-row-label.at-risk .timeline-row-title{color:var(--danger)}.timeline-row-title{font-size:.8rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline-row-author{font-size:.7rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline-scroll{flex:1 1 auto;min-width:0;overflow-x:auto}.timeline-scale{position:relative;min-width:700px}.timeline-grid-lines{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.timeline-tick-line{position:absolute;top:0;bottom:0;border-left:1px dashed var(--silver-light)}.timeline-axis{position:relative;box-sizing:border-box;border-bottom:1px solid var(--silver)}.timeline-tick-label{position:absolute;top:6px;font-size:.7rem;color:var(--text-muted);white-space:nowrap;transform:translate(4px)}.timeline-today-line{position:absolute;top:0;bottom:0;width:2px;background:var(--purple);z-index:2}.timeline-rows{position:relative}.timeline-row{position:relative;height:76px;box-sizing:border-box;border-bottom:1px solid var(--silver-light)}.timeline-row.alt{background:var(--bg)}.timeline-bar{position:absolute;top:26px;height:24px;border-radius:5px;background:var(--purple-light);display:flex;align-items:center;justify-content:center;padding:0 .4rem;font-size:.7rem;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;box-shadow:var(--shadow)}.timeline-bar.finished{background:var(--silver-dark)}.timeline-bar.currently_reading{background:var(--purple)}.timeline-bar.at-risk{background:var(--danger)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#201c2973;display:flex;align-items:center;justify-content:center;z-index:10;padding:1rem}.modal{background:var(--surface);border-radius:var(--radius);padding:1.5rem;width:100%;max-width:480px;max-height:90vh;overflow-y:auto;box-shadow:0 8px 30px #00000040}.modal h2{color:var(--purple);margin-top:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.form-grid .full{grid-column:1 / -1}.form-field{display:flex;flex-direction:column;gap:.25rem;font-size:.8rem;color:var(--text-muted)}.form-field input,.form-field select{padding:.45rem .55rem;border:1px solid var(--silver);border-radius:6px;color:var(--text)}.cover-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:.6rem;max-height:260px;overflow-y:auto;padding:.25rem;border:1px solid var(--silver-light);border-radius:8px}.cover-results-status{grid-column:1 / -1;color:var(--text-muted);font-size:.8rem;padding:1rem .25rem;text-align:center}.cover-result{display:flex;flex-direction:column;align-items:center;gap:.3rem;border:2px solid transparent;background:none;border-radius:6px;padding:.3rem}.cover-result:hover{border-color:var(--purple-light);background:var(--silver-light)}.cover-result img{width:100%;height:110px;object-fit:cover;border-radius:4px;background:var(--silver-light)}.cover-result-source{font-size:.65rem;color:var(--text-muted)}.cover-thumb-wrap{display:flex;flex-direction:column;align-items:center;gap:.3rem;flex-shrink:0}.cover-thumb-wrap .btn{white-space:nowrap}.modal-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.25rem}.app-footer{text-align:center;color:var(--text-muted);font-size:.75rem;margin-top:2rem}.link-button{background:none;border:none;padding:0;color:var(--purple);font-size:inherit;font-weight:600;text-decoration:underline}.sync-status{font-size:.75rem;color:var(--text-muted);white-space:nowrap}
