:root{--ink:#f6ecdb;--muted:#b6a087;--brass:#dfae62;--brass-deep:#b3822f;--wood-back:#1d140e;--panel:#251a13;--line:#ffffff14;--danger:#e2705f;--serif:"Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;--sans:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{font-family:var(--sans);color:var(--ink);-webkit-font-smoothing:antialiased;background-color:#150e0a;background-image:repeating-linear-gradient(90deg,#ffffff04 0 2px,#0000 2px 7px),radial-gradient(130% 100% at 50% -20%,#402d1f 0%,#26190f 45%,#150e0a 100%)}h1,h2,h3{margin:0;font-weight:600}p{margin:0}button{font:inherit;color:inherit;cursor:pointer}input,select{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--brass);outline-offset:2px}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.app{max-width:1200px;margin:0 auto;padding:0 1.5rem 5rem}.toolbar{z-index:20;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:.9rem 1.5rem;margin-bottom:1.75rem;padding:1.5rem 0 1rem;display:flex;position:sticky;top:0}.toolbar:after{content:"";position:absolute;inset:auto 0 .55rem}.brand h1{font-family:var(--serif);letter-spacing:.005em;font-size:1.75rem}.brand p{letter-spacing:.13em;text-transform:uppercase;color:var(--muted);margin-top:.2rem;font-size:.72rem}.toolbar-controls{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.segmented{border:1px solid var(--line);background:#00000047;border-radius:999px;align-items:center;gap:.1rem;padding:.25rem .3rem;display:flex}.segmented-label{letter-spacing:.12em;text-transform:uppercase;color:#b6a087cc;white-space:nowrap;padding:0 .5rem 0 .45rem;font-size:.65rem}.segmented button{white-space:nowrap;color:var(--muted);background:0 0;border:0;border-radius:999px;padding:.34rem .8rem;font-size:.85rem;transition:background .15s,color .15s}.segmented button:hover{color:var(--ink);background:#ffffff0d}.segmented button.active{background:linear-gradient(to bottom, #eec278, var(--brass-deep));color:#2a1c0c;font-weight:600;box-shadow:0 1px 2px #00000059}.search-field{align-items:center;display:flex;position:relative}.search-field svg{color:#b6a087b3;pointer-events:none;position:absolute;left:.6rem}.search,.field input,.field select{border:1px solid var(--line);background:#0000004d;border-radius:9px;padding:.52rem .7rem;transition:border-color .15s,background .15s}.search{width:12.5rem;padding-left:2.15rem}.search:hover,.field input:hover,.field select:hover{border-color:#ffffff29}.search:focus,.field input:focus,.field select:focus{border-color:#dfae628c;outline:none}.search::placeholder,.field input::placeholder{color:#b6a087a6}.primary{background:linear-gradient(to bottom, #eec278, var(--brass-deep));color:#2c1d0c;border:0;border-radius:9px;align-items:center;gap:.4rem;padding:.52rem 1rem;font-weight:600;transition:filter .15s,transform .1s;display:inline-flex;box-shadow:inset 0 1px #ffffff38,0 2px 8px -2px #0000008c}.primary:hover{filter:brightness(1.06)}.primary:active{transform:translateY(1px)}.primary.large{padding:.72rem 1.5rem;font-size:1rem}.ghost{border:1px solid var(--line);color:var(--muted);background:#ffffff0a;border-radius:9px;align-items:center;gap:.4rem;padding:.45rem .75rem;font-size:.85rem;text-decoration:none;transition:background .15s,color .15s,border-color .15s;display:inline-flex}.ghost:hover{color:var(--ink);background:#ffffff17;border-color:#ffffff24}.ghost.danger:hover{color:var(--danger);border-color:#e2705f59}.danger{color:var(--danger)}.danger.solid{background:#e2705f24;border:1px solid #e2705f61;border-radius:8px;padding:.4rem .7rem;font-size:.8rem}.danger.solid:hover{background:#e2705f38}.link{color:var(--brass);text-underline-offset:2px;background:0 0;border:0;padding:0;text-decoration:underline}.icon-button{border:1px solid var(--line);width:2rem;height:2rem;color:var(--muted);background:#ffffff0d;border-radius:50%;place-items:center;padding:0;transition:background .15s,color .15s,border-color .15s,opacity .15s;display:grid}.icon-button:hover:not(:disabled){color:var(--ink);background:#ffffff1c}.icon-button.danger:hover:not(:disabled){color:var(--danger);background:#e2705f29;border-color:#e2705f59}.icon-button:disabled{opacity:.3;cursor:default}.icon-button.small{width:1.85rem;height:1.85rem}.icon-button.floating{z-index:2;position:absolute;top:.9rem;right:.9rem}.library{grid-template-columns:repeat(12,1fr);align-items:start;gap:1.75rem;display:grid}.library>.empty-state,.library>.hint,.library>.add-shelf,.library>.new-shelf-form{grid-column:1/-1}.shelf.span-12{grid-column:span 12}.shelf.span-6{grid-column:span 6}.shelf.span-4{grid-column:span 4}.shelf{--row:208px;--board:16px;background:repeating-linear-gradient(90deg,#ffffff05 0 1px,#0000 1px 6px),linear-gradient(90deg,#0006,#0000 5% 95%,#0006),linear-gradient(#2c1f15,#1b120d);border:1px solid #ffffff0f;border-radius:10px;padding:0 1.1rem .5rem;box-shadow:inset 0 14px 28px -16px #000000f2,0 24px 40px -28px #000}.shelf-head{flex-wrap:wrap;align-items:center;gap:.6rem .85rem;padding:1rem .2rem .75rem;display:flex}.shelf-label{flex:1;min-width:0}.shelf-label h2{font-family:var(--serif);letter-spacing:.01em;text-overflow:ellipsis;white-space:nowrap;font-size:1.12rem;overflow:hidden}.shelf-label.initial h2{color:var(--brass);font-size:1.9rem;line-height:1}.shelf-label p{letter-spacing:.12em;text-transform:uppercase;color:#b6a087bf;margin-top:.15rem;font-size:.65rem}.shelf-rename{width:min(22rem,100%);font-family:var(--serif);background:#00000073;border:1px solid #dfae6299;border-radius:7px;padding:.28rem .5rem;font-size:1.1rem}.shelf-actions{opacity:.55;flex-wrap:wrap;align-items:center;gap:.3rem;margin-left:auto;transition:opacity .2s;display:flex}.shelf:hover .shelf-actions,.shelf:focus-within .shelf-actions{opacity:1}.author-avatar{object-fit:cover;background:#00000073;border:1px solid #dfae6266;border-radius:50%;width:44px;height:44px;box-shadow:0 2px 8px -2px #000}.author-avatar.fallback{font-family:var(--serif);color:var(--brass);place-items:center;font-size:1.15rem;display:grid}.shelf-books{background-repeat:repeat-y;background-size:100% var(--row);background-image:linear-gradient(to bottom, transparent calc(100% - var(--board)), #0a0603 calc(100% - var(--board)), #c08f4a calc(100% - var(--board) + 3px), #9c6b34 calc(100% - var(--board) + 7px), #7d5228 calc(100% - 5px), #40290f calc(100% - 2px), #0000008c 100%);flex-wrap:wrap;align-items:flex-end;display:flex}.shelf-empty{width:100%;height:var(--row);padding-bottom:var(--board);color:#b6a08780;align-items:center;padding-left:.3rem;font-size:.85rem;font-style:italic;display:flex}.shelf.dropping{border-color:#dfae628c;box-shadow:inset 0 0 0 1px #dfae6259,inset 0 14px 28px -16px #000c,0 0 0 3px #dfae6224,0 24px 40px -28px #000}.shelf.dropping .shelf-books{background-color:#dfae620f}.book{height:var(--row);padding:0 2px var(--board);background:0 0;border:0;align-items:flex-end;display:flex}.book-body{height:var(--height,165px);transform:rotate(var(--lean,0deg));transform-origin:bottom;border-radius:2px 4px 4px 2px;transition:transform .22s cubic-bezier(.2,.8,.3,1),box-shadow .22s;display:block;position:relative;box-shadow:0 8px 10px -7px #000000e6,0 1px 2px #0000008c}.book-body:after{content:"";pointer-events:none;background:radial-gradient(at 50% 0,#0000008c,#0000 72%);height:7px;position:absolute;inset:auto 1px -3px}.book:hover .book-body,.book:focus-visible .book-body{transform:translateY(-14px)rotate(0)scale(1.03);box-shadow:0 22px 26px -14px #000000e6,0 0 0 1px #dfae6266}.book:hover{z-index:3}.book[draggable=true]{cursor:grab}.book[draggable=true]:active{cursor:grabbing}.book-cover{object-fit:contain;background:#2c1f16;border-radius:2px 4px 4px 2px;width:auto;min-width:58px;max-width:140px;height:100%;display:block}.book-gutter{pointer-events:none;background:linear-gradient(90deg,#0000006b,#00000014 58%,#ffffff21 92%,#0000);border-radius:2px 0 0 2px;width:10px;position:absolute;inset:0 auto 0 0}.book-cloth{width:var(--width,78px);background:linear-gradient(145deg, var(--cloth-top,#54356b), var(--cloth-bottom,#2c2c34));border-radius:2px 4px 4px 2px;flex-direction:column;justify-content:center;gap:.4rem;height:100%;padding:.7rem .45rem;display:flex;box-shadow:inset 0 0 0 1px #ffffff1a,inset 0 0 0 4px #0000001a}.book-cloth-title{font-family:var(--serif);text-align:center;color:#ffffffeb;-webkit-line-clamp:5;-webkit-box-orient:vertical;font-size:.7rem;line-height:1.28;display:-webkit-box;overflow:hidden}.book-cloth-author{letter-spacing:.07em;text-align:center;text-transform:uppercase;text-overflow:ellipsis;white-space:nowrap;color:#ffffff94;font-size:.55rem;overflow:hidden}.empty-state{text-align:center;flex-direction:column;align-items:center;gap:.85rem;padding:3.5rem 1rem 4rem;display:flex}.empty-shelf{background:linear-gradient(#0000004d,#0000);border-bottom:16px solid #8d6130;border-radius:4px;width:min(360px,80%);height:96px;margin-bottom:1.25rem;box-shadow:0 16px 26px -18px #000}.empty-state h2{font-family:var(--serif);font-size:1.55rem}.empty-state p{max-width:46ch;color:var(--muted);line-height:1.6}.add-shelf{color:var(--muted);background:0 0;border:1px dashed #ffffff24;border-radius:10px;align-self:center;padding:.75rem 1.4rem;font-size:.9rem;transition:color .15s,border-color .15s}.add-shelf:hover{color:var(--ink);border-color:#dfae6280}.new-shelf-form{flex-wrap:wrap;align-self:center;gap:.5rem;display:flex}.new-shelf-form input{border:1px solid var(--line);background:#0000004d;border-radius:9px;padding:.52rem .7rem}@media (760px<width<=1080px){.shelf.span-4{grid-column:span 6}}.overlay{top:var(--vvt,0px);height:var(--vvh,100dvh);z-index:40;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background:#080503bd;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr);place-items:center;padding:1.25rem;display:grid;position:fixed;left:0;right:0}.dialog{background:linear-gradient(#2e2017,#1f1510);border:1px solid #ffffff1a;border-radius:16px;flex-direction:column;width:min(720px,100%);min-width:0;max-width:100%;min-height:0;max-height:min(88%,800px);padding:1.25rem 1.4rem 1.4rem;display:flex;position:relative;box-shadow:0 40px 70px -30px #000}.dialog-head{justify-content:space-between;align-items:center;margin-bottom:1.1rem;display:flex}.dialog-head h2{font-family:var(--serif);font-size:1.35rem}.dialog-row{flex-wrap:wrap;gap:.75rem;margin-bottom:1rem;display:flex}.field{flex-direction:column;gap:.32rem;display:flex}.field select,.field input{width:100%;min-width:0}.field>span{letter-spacing:.12em;text-transform:uppercase;color:#b6a087cc;font-size:.65rem}.field.grow{flex:1;min-width:12rem}.field.narrow{max-width:6.5rem}.results{flex-direction:column;flex:auto;gap:.25rem;min-height:0;margin:0 -.4rem;padding:0 .4rem;display:flex;overflow-y:auto}.hint{color:var(--muted);padding:.6rem .2rem;font-size:.9rem;line-height:1.55}.hint.error{color:var(--danger)}.hint.centered{text-align:center;padding:3.5rem 0}.result{text-align:left;background:0 0;border:1px solid #0000;border-radius:11px;align-items:center;gap:.85rem;padding:.5rem;transition:background .12s,border-color .12s;display:flex}.result:hover{border-color:var(--line);background:#ffffff0d}.result-cover{object-fit:cover;background:#3a2a1d;border-radius:2px 3px 3px 2px;width:44px;height:64px;box-shadow:0 3px 8px -2px #0009}.result-cover.fallback{background:linear-gradient(145deg,#4b3624,#2c1f16)}.result-text{flex-direction:column;flex:1;gap:.15rem;min-width:0;font-size:.88rem;display:flex}.result-text strong{font-family:var(--serif);text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:600;overflow:hidden}.result-text>span{text-overflow:ellipsis;white-space:nowrap;color:var(--muted);overflow:hidden}.result-meta{align-items:center;gap:.5rem;font-size:.75rem;display:flex}.chip{letter-spacing:.02em;color:var(--brass);background:#dfae6221;border:1px solid #dfae623d;border-radius:999px;padding:.1rem .5rem;font-size:.7rem}.result-add{width:1.9rem;height:1.9rem;color:var(--brass);background:#ffffff0f;border-radius:50%;flex:none;place-items:center;transition:background .12s,color .12s;display:grid}.result:hover .result-add{background:var(--brass);color:#2c1d0c}.manual{border-top:1px solid var(--line);flex-wrap:wrap;align-items:flex-end;gap:.75rem;margin-top:.6rem;padding-top:1rem;display:flex}.manual-actions{gap:.4rem;display:flex}.dialog-foot{border-top:1px solid var(--line);margin-top:.95rem;padding-top:.85rem}.added-count{letter-spacing:.12em;text-transform:uppercase;color:var(--brass);font-size:.65rem}.added-list{flex-direction:column;gap:.25rem;max-height:6rem;margin:.5rem 0 0;padding:0;font-size:.85rem;list-style:none;display:flex;overflow-y:auto}.added-list li{color:var(--muted);justify-content:space-between;gap:.6rem;display:flex}.added-list span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dialog.details{grid-template-columns:200px 1fr;gap:1.75rem;width:min(680px,100%);padding:1.75rem;display:grid}.details-cover{justify-content:center;align-items:flex-start;min-height:290px;display:flex}.details-cover img{object-fit:contain;border-radius:3px 6px 6px 3px;width:100%;max-height:420px;box-shadow:0 18px 34px -16px #000,0 0 0 1px #ffffff14}.details-cover .book-cloth{border-radius:3px 6px 6px 3px;width:100%;height:300px;padding:2rem 1.1rem;box-shadow:0 18px 34px -16px #000,inset 0 0 0 1px #ffffff1a}.details-cover .book-cloth .book-cloth-title{-webkit-line-clamp:8;font-size:1.1rem}.details-body{flex-direction:column;gap:1.15rem;min-width:0;display:flex}.details-body h2{font-family:var(--serif);padding-right:2.25rem;font-size:1.6rem;line-height:1.22}.details-author{align-items:center;gap:.8rem;display:flex}.details-author-photo{object-fit:cover;border:1px solid #dfae6266;border-radius:50%;width:54px;height:54px;box-shadow:0 3px 10px -3px #000}.details-author-name{font-size:.98rem}.details-meta{color:var(--muted);margin-top:.2rem;font-size:.8rem}.details-fields{flex-wrap:wrap;gap:.75rem;display:flex}.details-actions{flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:auto;display:flex}.confirm{color:var(--muted);flex-wrap:wrap;align-items:center;gap:.5rem;font-size:.8rem;display:flex}@media (width<=760px){.app{padding:0 .85rem 4rem}.toolbar{align-items:stretch;gap:.7rem;margin-bottom:1.25rem;padding:1.1rem 0 .9rem}.brand h1{font-size:1.5rem}.toolbar-controls{gap:.45rem;width:100%;min-width:0}.segmented{scrollbar-width:none;order:3;justify-content:space-between;width:100%;max-width:100%;overflow-x:auto}.segmented::-webkit-scrollbar{display:none}.search-field{flex:1;min-width:7rem}.ghost.compact .button-label{display:none}.ghost.compact{padding:.5rem .6rem}.search{width:100%}.shelf.span-4{grid-column:span 6}.shelf.span-6{grid-column:span 12}.shelf.span-4{--row:132px;--board:11px;padding:0 .45rem .3rem}.shelf.span-4 .book{padding-left:1px;padding-right:1px}.shelf.span-4 .book-body{height:min(var(--height,165px), 108px)}.shelf.span-4 .book-cover{min-width:38px;max-width:70px}.shelf.span-4 .book-cloth{width:calc(var(--width,78px) * .68);padding:.4rem .3rem}.shelf.span-4 .book-cloth-title{-webkit-line-clamp:3;font-size:.55rem}.shelf.span-4 .shelf-books{padding:0}.shelf.span-4 .shelf-label h2{font-size:.95rem}.shelf.span-4 .shelf-label.initial h2{font-size:1.5rem}.library{gap:1.2rem}.shelf{--row:172px;--board:13px;border-radius:8px;padding:0 .7rem .35rem}.shelf-head{padding:.8rem .1rem .6rem}.shelf-label h2{font-size:1.02rem}.shelf-actions{opacity:1}.book-body{height:min(var(--height,165px), 150px)}.book-cover{min-width:44px;max-width:104px}.book-cloth{width:calc(var(--width,78px) * .82);padding:.55rem .35rem}.book-cloth-title{-webkit-line-clamp:4;font-size:.62rem}.overlay{align-items:flex-end;padding:0}.dialog{border-bottom:0;border-radius:18px 18px 0 0;width:100%;height:100%;max-height:100%;padding:.9rem 1rem 1rem}.dialog-head{margin-bottom:.7rem}.dialog-head h2{font-size:1.15rem}.dialog-row{gap:.5rem;margin-bottom:.7rem}.dialog-row .field{min-width:0}.dialog-row .field.grow{flex-basis:100%}.results{min-height:4rem}.result{padding:.4rem}.result-cover{width:38px;height:56px}.dialog-foot{margin-top:.6rem;padding-top:.6rem}.added-list{max-height:3.2rem}.details.dialog{height:auto;overflow-y:auto}.dialog.details{grid-template-columns:116px 1fr;gap:1rem;padding:1.25rem 1rem}.details-cover{min-height:0}.details-cover .book-cloth{height:168px;padding:1rem .5rem}.details-cover .book-cloth .book-cloth-title{font-size:.8rem}.details-body h2{padding-right:2rem;font-size:1.3rem}.details-body{gap:.9rem}}@media (height<=560px){.dialog-head{margin-bottom:.4rem}.dialog-head h2{font-size:1rem}.dialog-row{flex-wrap:nowrap;margin-bottom:.5rem}.dialog-row .field select,.field input{width:100%;min-width:0}.field>span{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.dialog-row .field{flex:40%;min-width:0}.dialog-row .field.grow{flex:60%;min-width:0}.manual{margin-top:.4rem;padding-top:.6rem}.added-list{max-height:2.4rem}}.booting{min-height:100vh;font-family:var(--serif);color:var(--muted);place-items:center;font-size:1.1rem;display:grid}.login{place-items:center;min-height:100vh;padding:1.5rem;display:grid}.login-card{text-align:left;background:linear-gradient(#2e2017,#1f1510);border:1px solid #ffffff17;border-radius:16px;flex-direction:column;gap:.9rem;width:min(380px,100%);padding:2rem 1.9rem 2.1rem;display:flex;box-shadow:0 40px 70px -32px #000}.login-card h1{font-family:var(--serif);font-size:1.9rem}.login-intro{color:var(--muted);margin-bottom:.6rem;font-size:.9rem}.login-shelf{background:linear-gradient(#0000 calc(100% - 10px),#c08f4a calc(100% - 10px),#7d5228 calc(100% - 4px),#40290f 100%);align-items:flex-end;gap:4px;height:74px;margin-bottom:1.1rem;padding-bottom:10px;display:flex}.login-book{border-radius:2px 3px 3px 2px;width:20px;box-shadow:0 4px 8px -4px #000,inset 0 0 0 1px #ffffff1f}.login-book:first-child{background:linear-gradient(150deg,#7c2d2a,#4f1c1a);height:56px}.login-book:nth-child(2){background:linear-gradient(150deg,#1f4d5a,#12303a);height:64px}.login-book:nth-child(3){background:linear-gradient(150deg,#8a5a24,#5d3812);height:48px}.login-book:nth-child(4){background:linear-gradient(150deg,#3f5233,#26331e);height:60px}.login-card .primary{justify-content:center;margin-top:.5rem}.login-card .primary:disabled{opacity:.65;cursor:default}.banner{border-radius:10px;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:1.25rem;padding:.6rem .9rem;font-size:.88rem;display:flex}.banner.error{color:#f0b3a8;background:#e2705f1f;border:1px solid #e2705f52}@media (width<=760px){.shelf-label h2{overflow-wrap:anywhere;white-space:normal}.login-card{padding:1.6rem 1.3rem 1.8rem}}
