:root{--bg:#f6f5f2;--surface:#fcfcfb;--border:#e4e2dc;--text:#0b0b0b;--text-2:#52514e;--muted:#75736d;--accent:#2a78d6;--accent-soft:#cde2fb;--good:#1a7f37;--error-bg:#fdecec;--error-text:#9b1c1c;--lv0:#eceae6;--lv1:#86b6ef;--lv2:#3987e5;--lv3:#1c5cab;--lv4:#0d366b;--shadow:0 1px 2px #0000000f}@media (prefers-color-scheme:dark){:root{--bg:#111110;--surface:#1a1a19;--border:#2e2e2c;--text:#fff;--text-2:#c3c2b7;--muted:#9a998f;--accent:#3987e5;--accent-soft:#1c3350;--good:#3fb950;--error-bg:#3a1616;--error-text:#ffb4b4;--lv0:#262624;--lv1:#184f95;--lv2:#256abf;--lv3:#3987e5;--lv4:#86b6ef;--shadow:none}}*{box-sizing:border-box;margin:0;padding:0}body{color:var(--text);background:var(--bg);padding:20px 16px 48px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1.5}a{color:var(--accent)}[hidden]{display:none!important}.container{flex-direction:column;gap:16px;max-width:1100px;margin:0 auto;display:flex}.muted{color:var(--muted);font-size:.85rem}h1{font-size:1.5rem}h2{font-size:1rem;font-weight:600}.top{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.top-actions{align-items:center;gap:12px;display:flex}.btn{font:inherit;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;border-radius:8px;padding:6px 12px;font-size:.9rem}.btn:hover:not(:disabled){border-color:var(--accent)}.btn:disabled{opacity:.45;cursor:default}.btn-quiet{color:var(--text-2);background:0 0;border-color:#0000}.segmented{border:1px solid var(--border);background:var(--surface);border-radius:8px;display:inline-flex;overflow:hidden}.segmented button{font:inherit;color:var(--text-2);cursor:pointer;background:0 0;border:0;padding:6px 12px;font-size:.85rem}.segmented button+button{border-left:1px solid var(--border)}.segmented button[aria-pressed=true]{background:var(--accent-soft);color:var(--text);font-weight:600}.chip{font:inherit;border:1px solid var(--border);background:var(--surface);color:var(--text-2);cursor:pointer;border-radius:999px;padding:3px 10px;font-size:.8rem}.chip.active{border-color:var(--accent);background:var(--accent-soft);color:var(--text)}.chip-small{padding:1px 8px;font-size:.72rem}.card{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:12px;padding:16px}.card-head{justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px;display:flex}.error{background:var(--error-bg);color:var(--error-text);border-radius:8px;padding:12px 16px}.loading{color:var(--muted);text-align:center;padding:12px}.stats{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;display:grid}.tile{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:12px;padding:14px 16px}.tile-label{color:var(--text-2);font-size:.85rem}.tile-value{margin:2px 0;font-size:1.75rem;font-weight:600;line-height:1.2}.tile.goal{align-items:center;gap:14px;display:flex}.ring{flex:none;width:56px;height:56px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:5px}.ring-track{stroke:var(--lv0)}.ring-fill{stroke:var(--accent);stroke-linecap:round;transition:stroke-dasharray .4s}.ring.done .ring-fill{stroke:var(--good)}.goal-edit{align-items:center;gap:6px;display:flex}.goal-edit input{width:3.5em;font:inherit;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:6px;padding:1px 4px}.heatmap-scroll{overflow-x:auto}.heatmap svg{width:100%;min-width:640px;height:auto;display:block}.hm-label{fill:var(--muted);font-size:9px}.hm-cell{cursor:pointer;stroke:var(--surface);stroke-width:0}.hm-cell:hover{stroke:var(--text);stroke-width:1.5px}.hm-selected{fill:none;stroke:var(--text-2);stroke-width:1.5px}.lv0{fill:var(--lv0);background:var(--lv0)}.lv1{fill:var(--lv1);background:var(--lv1)}.lv2{fill:var(--lv2);background:var(--lv2)}.lv3{fill:var(--lv3);background:var(--lv3)}.lv4{fill:var(--lv4);background:var(--lv4)}.heatmap-foot{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;display:flex}.legend{align-items:center;gap:3px;display:inline-flex}.legend i{border-radius:2px;width:11px;height:11px;display:inline-block}.legend .muted:first-child{margin-right:4px}.legend .muted:last-child{margin-left:4px}.tooltip{z-index:10;background:var(--text);color:var(--surface);pointer-events:none;white-space:nowrap;border-radius:6px;padding:4px 8px;font-size:.78rem;position:absolute;transform:translate(-50%,-100%)}.week-nav{flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;display:flex}.week-label{flex-direction:column;align-items:center;min-width:200px;display:flex}.controls{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.tags{flex-wrap:wrap;gap:6px;display:flex}.recap h2,.year-ago h2{margin-bottom:6px}.recap-text{font-size:1rem;line-height:1.6}.recap .btn{margin-top:4px}.random{border-color:var(--accent);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.random-title{font-size:1.1rem}.random-actions{gap:6px;display:flex}.group{margin-bottom:20px}.group-head{align-items:center;gap:8px;margin-bottom:8px;font-size:.95rem;display:flex}.count{color:var(--text-2);background:var(--lv0);border-radius:999px;padding:0 8px;font-size:.75rem;font-weight:600}.page-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;list-style:none;display:grid}.page-list{flex-direction:column;gap:6px;list-style:none;display:flex}.page-card{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;flex-direction:column;gap:6px;padding:12px 14px;display:flex;overflow:hidden}.page-card.compact{box-shadow:none;padding:6px 10px}.page-cover{object-fit:cover;width:calc(100% + 28px);height:72px;margin:-12px -14px 4px}.page-title{color:var(--text);align-items:flex-start;gap:8px;font-weight:600;line-height:1.35;text-decoration:none;display:flex}.page-title:hover span{text-decoration:underline}.compact .page-title{font-size:.9rem;font-weight:500}.page-icon{text-align:center;object-fit:cover;border-radius:3px;flex:none;width:1.25em;height:1.25em;line-height:1.25em}.page-meta{color:var(--muted);flex-wrap:wrap;gap:4px 12px;font-size:.8rem;display:flex}.page-meta a{text-decoration:none}.page-tags{flex-wrap:wrap;gap:4px;display:flex}.days{grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;display:grid}.day-col{background:var(--surface);border:1px solid var(--border);border-radius:10px;min-height:120px;padding:8px}.day-empty{opacity:.6}.day-head{justify-content:space-between;align-items:baseline;margin-bottom:6px;display:flex}.empty{text-align:center;color:var(--muted);border:1px dashed var(--border);border-radius:12px;padding:32px 16px}@media (width<=500px){.tile{padding:10px 12px}.tile-value{font-size:1.4rem}.ring{width:44px;height:44px}.tile.goal{gap:10px}}@media (width<=800px){.days{grid-template-columns:1fr}.day-col{min-height:0}.day-empty{display:none}}.view{flex-direction:column;gap:16px;display:flex}.tabs{align-self:flex-start}.shelf-view{--serif:"Newsreader", "Iowan Old Style", Palatino, Georgia, serif;--wood:#d9cfbf;--wood-edge:#c4b8a4}@media (prefers-color-scheme:dark){.shelf-view{--wood:#3a342c;--wood-edge:#2b2620}}.shelf-head{padding:8px 0 4px}.shelf-kicker{letter-spacing:.02em}.shelf-title{font-family:var(--serif);letter-spacing:-.03em;margin:6px 0 12px;font-size:clamp(2.6rem,8vw,4.5rem);font-weight:400;line-height:1}.shelf-stats{flex-wrap:wrap;gap:4px 16px;display:flex}.shelf-stats strong{color:var(--text);font-weight:600}.shelf-controls{flex-direction:column;gap:12px;display:flex}.shelf-bar{flex-wrap:wrap;align-items:center;gap:8px 12px;display:flex}.shelf-search{font:inherit;border:1px solid var(--border);background:var(--surface);max-width:320px;color:var(--text);border-radius:999px;flex:220px;padding:6px 12px;font-size:.9rem}.shelf-arrange-label{margin-left:auto}.shelf-toggle{cursor:pointer;align-items:center;gap:4px;display:inline-flex}.chip-dot{vertical-align:1px;border-radius:50%;width:8px;height:8px;margin-right:6px;display:inline-block}.shelves{flex-direction:column;gap:28px;margin-top:8px;display:flex}.shelf .group-head{margin-bottom:6px}.shelf-row{--row:222px;--board:12px;background:repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - var(--board)), var(--wood) calc(var(--row) - var(--board)) calc(var(--row) - 3px), var(--wood-edge) calc(var(--row) - 3px) var(--row));border-radius:4px;flex-wrap:wrap;align-content:flex-start;align-items:flex-end;padding:0 10px;display:flex}.spine{--lift:0px;height:var(--h);width:var(--w);margin:calc(var(--row) - var(--board) - var(--h)) 1px var(--board) 0;background:linear-gradient(90deg, #0000002e, transparent 18%, #ffffff14 45%, transparent 70%, #0003), var(--spine);color:var(--ink);cursor:pointer;transform:translateY(var(--lift));border:0;border-radius:3px 3px 1px 1px;flex-direction:column;align-items:center;gap:6px;padding:10px 0 8px;transition:transform .15s;display:flex;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px #00000014}.spine:before,.spine:after{content:"";opacity:.35;border-top:1px solid;border-bottom:1px solid;height:2px;position:absolute;left:0;right:0}.spine:before{top:4px}.spine:after{bottom:4px}.spine:hover,.spine:focus-visible{--lift:-8px}.spine:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.spine-mark{flex:none;font-size:.7rem;line-height:1}.spine-title{writing-mode:vertical-rl;min-height:0;font-family:var(--serif);white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:.82rem;line-height:1.1;overflow:hidden}.spine.labelled .spine-title{color:#2a241c;background:#f3ecdf;border-radius:1px;flex:0 auto;max-height:70%;padding:6px 2px;font-size:.72rem}.spine-foot{writing-mode:vertical-rl;letter-spacing:.12em;text-transform:uppercase;opacity:.75;flex:none;max-height:4.5em;font-size:.55rem;overflow:hidden}.shelf-hint{text-align:center}.book{width:100%;max-width:min(760px,100vw - 32px);color:var(--text);background:0 0;border:0;margin:auto;padding:0}.book::backdrop{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#14100c59}.book[open] .book-spread{animation:.28s cubic-bezier(.2,.8,.2,1) book-open}@keyframes book-open{0%{opacity:0;transform:perspective(1200px)rotateY(-10deg)scale(.94)}}.book-spread{background:#4a3426;border:6px solid #4a3426;border-radius:6px;grid-template-columns:1fr 1fr;gap:3px;min-height:420px;display:grid;box-shadow:0 30px 60px #0000004d}.book-left{background:radial-gradient(circle, #0000002e 1px, transparent 1.4px) 0 0 / 12px 12px, color-mix(in srgb, var(--spine) 22%, #f1e6d6);border-radius:2px;place-items:center;padding:28px;display:grid;position:relative;overflow:hidden}.book-cover-img{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.ex-libris{color:#2a241c;text-align:center;outline-offset:-6px;background:#fbf7ef;border:1px solid #e5dccb;outline:1px solid #e5dccb;width:min(100%,250px);padding:22px 18px 16px;transform:rotate(-1.5deg);box-shadow:0 2px 8px #00000026}.ex-libris-head{letter-spacing:.3em;text-transform:uppercase;font-size:.65rem}.ex-libris-mark{font-size:2.6rem;line-height:1.6}.ex-libris-name{font-family:var(--serif,Georgia, serif);font-size:1.3rem;font-style:italic}.ex-libris-foot{color:#6f665a;margin-top:10px;font-size:.68rem}.book-right{--serif:"Newsreader", "Iowan Old Style", Palatino, Georgia, serif;background:var(--surface);border-radius:2px;flex-direction:column;gap:10px;min-width:0;padding:28px 26px 20px;display:flex}.book-meta{align-items:center;gap:10px;display:flex}.book-title{font-family:var(--serif);letter-spacing:-.01em;overflow-wrap:anywhere;font-size:1.9rem;font-weight:400;line-height:1.12}.book-site{font-family:var(--serif);color:var(--text-2);font-style:italic}.book-spacer{border-bottom:1px solid var(--border);flex:1;margin-bottom:8px}.book-read{text-align:center;background:var(--text);color:var(--surface);border-radius:999px;padding:12px;font-weight:500;text-decoration:none;display:block}.book-read:hover{opacity:.88}.book-foot{justify-content:space-between;align-items:center;gap:8px;font-size:.85rem;display:flex}.book-foot a{white-space:nowrap}.book-nav{align-items:center;gap:2px;display:flex}kbd{border:1px solid var(--border);color:var(--muted);border-radius:4px;padding:2px 4px;font:.7rem/1 ui-monospace,monospace}@media (width<=600px){.shelf-row{--row:186px}.spine{height:calc(var(--h) * .8);margin-top:calc(var(--row) - var(--board) - var(--h) * .8)}.shelf-arrange-label,.book-nav kbd{display:none}.book-spread{grid-template-columns:1fr;min-height:0}.book-left{min-height:150px;padding:16px}.ex-libris{padding:12px}.ex-libris-mark{font-size:1.8rem}.book-title{font-size:1.5rem}}
