:root{color-scheme:light;--ink:#23382e;--muted:#506157;--paper:#faf5e9;--card:#fffcf4;--line:#d9d3c3;--amber:#f5be7f;--rose:#a44c3c;--shade:0 12px 34px #23382e12;font:100%/1.55 system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink)}.wrap{width:min(72rem,calc(100% - 2rem));margin:auto}a{color:inherit;text-underline-offset:.24em}a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #a44c3c;outline-offset:3px}.skip{position:absolute;top:-8rem;padding:1rem;background:var(--card);z-index:10}.skip:focus{top:0}.site{background:var(--card);border-bottom:1px solid var(--line)}.header,.footer,nav,.actions,.checks{display:flex;flex-wrap:wrap;gap:.7rem 1.2rem;align-items:center}.header,.footer{justify-content:space-between;padding:1rem 0}.wordmark{font:700 2rem Georgia,serif;text-decoration:none}.wordmark span{color:var(--rose)}nav a{font-weight:650;text-decoration:none;padding:.35rem .15rem}nav a[aria-current],nav a:hover{text-decoration:underline;text-decoration-thickness:.17rem}.footer{border-top:1px solid var(--line);margin-top:3rem;color:var(--muted);font-size:.9rem}main{min-height:65vh;padding:2.5rem 0 0}.hero{background:radial-gradient(ellipse at 90% 10%,#466559,transparent 62%),var(--ink);color:#fffaee;display:grid;grid-template-columns:1.35fr 1fr;gap:2rem;align-items:center;border-radius:1.5rem;padding:clamp(1.5rem,5vw,4.5rem);box-shadow:var(--shade)}.hero .eyebrow{color:var(--amber)}h1,h2,h3{font-family:Georgia,serif;line-height:1.09;margin:0 0 .75rem;overflow-wrap:anywhere}h1{font-size:clamp(2.5rem,7vw,5.8rem);letter-spacing:-.045em}h2{font-size:clamp(1.65rem,4vw,2.4rem)}h3{font-size:1.25rem}.hero p:not(.eyebrow){max-width:36ch;font-size:1.15rem}.eyebrow{color:var(--rose);text-transform:uppercase;font-size:.78rem;font-weight:800;letter-spacing:.16em;margin:0 0 .7rem}.hero-books{height:14rem;display:flex;justify-content:center;align-items:end;gap:.42rem;border-bottom:.6rem solid #d99964;border-radius:.4rem}.hero-books span{writing-mode:vertical-rl;display:grid;place-items:center;width:clamp(2rem,5vw,3.5rem);height:80%;font:700 1rem Georgia,serif;letter-spacing:.1em;border-radius:.35rem .35rem 0 0;background:#f5be7f;color:var(--ink);box-shadow:inset .3rem 0 #0002}.hero-books span:nth-child(2){height:92%;background:#e3a69b}.hero-books span:nth-child(3){height:73%;background:#f4e3ae}.hero-books span:nth-child(4){height:88%;background:#9cc3ad}.hero-books span:nth-child(5){height:62%;background:#efab78}.tiles,.results{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr));margin:1rem 0 1.5rem}.tile,.panel,.book{padding:1.2rem;background:var(--card);border:1px solid var(--line);border-radius:1rem;box-shadow:var(--shade);min-width:0;overflow-wrap:anywhere}.tile{text-decoration:none;display:block}.tile:hover,.tile:focus-visible{border-color:var(--rose)}.tile p,.book p{margin:.35rem 0;color:var(--muted)}.tile strong{font-family:Georgia,serif;font-size:1.55rem}.lead,.small{color:var(--muted)}.small{font-size:.88rem}.filters{display:flex;flex-wrap:wrap;gap:.7rem;align-items:end;margin:1rem 0}.filters>label{flex:1 1 9rem}.filters>.query{flex:3 1 16rem}label{display:block;font-weight:650}input:not([type=checkbox]),select,textarea{display:block;width:100%;margin-top:.25rem;border:1px solid #8f9a90;background:#fffdf8;color:var(--ink);border-radius:.5rem;padding:.58rem .72rem;font:inherit;min-height:2.75rem}button,.button{border:1px solid transparent;border-radius:.55rem;background:var(--ink);color:white;font:inherit;font-weight:700;padding:.58rem .95rem;min-height:2.75rem;text-decoration:none;cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}.secondary{border-color:#8f9a90;color:var(--ink);background:var(--card)}.hero button{background:var(--amber);color:var(--ink)}.hero input{margin:0}.hero .filters{align-items:stretch}.hero .filters input{flex:1 1 12rem;width:auto}.book .actions{margin-top:1rem}.cover{float:left;width:3.2rem;height:4.6rem;object-fit:cover;border-radius:.25rem;margin:0 .7rem .3rem 0}.editions{clear:both;margin-top:.8rem}.editions ul,.shelf{list-style:none;padding:0}.editions li{margin:.4rem 0}.shelf{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr));gap:.55rem;border-bottom:.55rem solid #b78355;padding:0 .4rem}.spine{background:#f0c28f;border-left:.4rem solid #b78355;border-radius:.4rem .4rem 0 0;padding:.6rem;overflow-wrap:anywhere}.spine:nth-child(even){background:#d4dfc9}.spine>.secondary{width:100%;text-align:left}.spine .actions{gap:.3rem;margin-top:.3rem}.journal-nav{margin:1.25rem 0}.review{white-space:pre-wrap}dialog{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:1rem;width:min(30rem,calc(100% - 2rem));padding:1.4rem}dialog::backdrop{background:#14251caa}.checks{margin:.85rem 0}dialog select,dialog textarea{margin-bottom:.85rem}[hidden]{display:none!important}@media(max-width:43rem){.hero{grid-template-columns:1fr}.hero-books{height:7rem}.header nav{gap:.3rem .85rem}.header{gap:.2rem}main{padding-top:1.2rem}}

.wordmark{display:inline-flex;align-items:center;gap:.55rem;line-height:1.15}.wordmark img{width:2.75rem;height:2.75rem}
.v3-heart-field{border:0;margin:0;padding:0;min-width:0}.v3-heart-field legend{font-weight:650;padding:0}.v3-heart-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:.2rem}.v3-heart-buttons button{display:grid;place-items:center;background:transparent;color:#793b22;border:1px solid transparent;border-radius:.55rem;min-height:44px;min-width:44px;padding:0;cursor:pointer}.v3-heart-buttons button:hover{background:#f0e0cd}.v3-heart-buttons .v3-clear{padding:.3rem .55rem;text-decoration:underline;font-size:.85rem}.v3-heart-status{display:block;margin:.15rem 0 .55rem;color:var(--muted)}
.v3-heart{--heart-size:1.65rem;display:inline-block;position:relative;width:var(--heart-size);height:var(--heart-size);color:#954422;vertical-align:middle}.v3-heart svg{display:block;width:var(--heart-size);height:var(--heart-size)}.v3-heart-fill{position:absolute;inset:0 auto 0 0;width:0;overflow:hidden}.v3-filled{fill:#ad532b}.v3-outline{position:absolute;inset:0;fill:none;stroke:currentColor;stroke-width:1.8}.v3-rating-display{display:flex;align-items:center;gap:.12rem}.v3-rating-display .v3-heart{--heart-size:1.15rem}.v3-rating-display span:last-child{margin-inline-start:.45rem}
.v3-shelf{list-style:none;padding:.8rem;margin:1rem 0;display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:.65rem;background:#f1e2ca;border-radius:.85rem  .85rem .3rem .3rem;border-bottom:.65rem solid #7c5139;box-shadow:inset 0 -4px 12px #66403120}.v3-slot{display:grid;align-content:start;min-width:0;text-align:center;gap:.3rem}.v3-shelf-book,.v3-empty-spine{position:relative;display:grid;place-items:center;justify-self:center;width:min(100%,6rem);height:clamp(6.25rem,12vw,9rem);overflow:hidden;border-radius:.22rem .48rem .48rem .22rem;border:1px solid #765341;box-shadow:inset .3rem 0 #1d181725,2px 3px 4px #4f342938}.v3-shelf-book{padding:.35rem;background:#375746;color:#fffaf2;cursor:pointer}.v3-slot:nth-child(even) .v3-shelf-book{background:#874d36}.v3-empty-spine{width:min(78%,3.2rem);background:repeating-linear-gradient(180deg,#d8c3a6 0 6px,#cfb799 6px 8px,#d8c3a6 8px 14px,#e3cfb4 14px 129px);opacity:.78}.v3-slot:nth-child(even) .v3-empty-spine{height:clamp(6.25rem,12vw,9rem);background:#cdbc9e}.v3-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#29261e;border-left:4px solid #201a19a0}.v3-spine-title{font:700 .8rem/1.15 Georgia,serif;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden}.v3-slot-number{font-size:.75rem;color:#664633}.v3-slot-controls{display:grid;gap:.2rem}.v3-slot-controls select,.v3-slot-controls button{font-size:.78rem;padding:.25rem .2rem;min-width:0;width:100%;min-height:36px}.v3-slot-controls button:disabled{opacity:.65}
@media(max-width:69rem){.v3-shelf{grid-template-columns:repeat(5,minmax(0,1fr))}.v3-slot-controls{max-width:8rem;margin-inline:auto;width:100%}}
@media(max-width:38rem){.v3-shelf{gap:.35rem;padding:.55rem .4rem}.v3-slot-controls select,.v3-slot-controls button{min-height:44px}.v3-slot-number{font-size:.7rem}}
@media(forced-colors:active){.v3-filled{fill:ButtonText}.v3-outline{stroke:ButtonText}.v3-heart-buttons button:hover{border-color:ButtonText}}

/* Keep the five targets together. Clearing is a separate action. */
.v3-heart-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 44px));
  gap: .1rem;
  justify-content: start;
  margin-block: .2rem .65rem;
}
.v3-heart-buttons button:not(.v3-clear) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.v3-heart-buttons .v3-clear {
  grid-column: 1 / -1;
  justify-self: start;
}

/* The fill moves behind a stationary outline. Both layers have the same size. */
.v3-heart-buttons .v3-heart-fill {
  inset: 0;
  width: 100%;
  clip-path: inset(0 100% 0 0);
}
.v3-heart-buttons .v3-heart[data-fill="half"] .v3-heart-fill {
  clip-path: inset(0 50% 0 0);
}
.v3-heart-buttons .v3-heart[data-fill="full"] .v3-heart-fill {
  clip-path: inset(0);
}
@media (prefers-reduced-motion: no-preference) {
  .v3-heart-buttons .v3-heart-fill { transition: clip-path 140ms ease-out; }
}

/* Keep rating announcements for assistive technology, without visual instructions. */
.v3-heart-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Make the book-and-vine mark recognizable in the header. */
.wordmark img { width: 3.5rem; height: 3.5rem; flex: none; }
.bookflip-build { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.v3-rating-display .v3-heart[data-fill="full"] .v3-heart-fill { width: 100%; }
.v3-rating-display .v3-heart[data-fill="half"] .v3-heart-fill { width: 50%; }

.discover-section{margin:2.2rem 0;padding:clamp(1rem,3vw,1.65rem);border:1px solid var(--line);border-radius:1.15rem;background:var(--card)}
.discover-section h2{margin:0 0 .55rem;font:700 clamp(1.4rem,4vw,2.05rem)/1.15 Georgia,serif}
.discover-ranking,.indexed-editions{padding-inline-start:1.7rem}
.discover-ranking li,.indexed-editions li{padding:.6rem 0;border-bottom:1px solid var(--line)}
.discover-section li p{margin:.25rem 0;color:var(--muted)}
.discover-ranking:empty{display:none}

.book-heading{display:flex;align-items:flex-start;gap:.75rem;margin-bottom:.5rem;min-width:0}
.book-heading h3,.book-heading p{margin:0;overflow-wrap:anywhere}
.book-tile{position:relative;display:grid;place-items:center;flex:0 0 3rem;width:3rem;height:4.4rem;overflow:hidden;border-radius:.2rem .45rem .45rem .2rem;background:#e6d4b8;border:1px solid #c1a886;color:#633b28}
.book-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.book-tile-placeholder{font-size:1.5rem}
[data-save-book][aria-pressed=true]{background:#724630;color:white;border-color:#724630}
.book-save-status{flex-basis:100%;margin:0;font-size:.875rem}
.book-save-status:empty{display:none}

.bf-shelf-help { color: var(--muted); font-size: .9rem; }
.bf-bookcase.v3-shelf {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0;
  position: relative; isolation: isolate; max-width: 48rem;
  padding: 0; border: clamp(.5rem,1.7vw,1rem) solid #784828;
  border-radius: .55rem .55rem .2rem .2rem;
  background: repeating-linear-gradient(93deg,#482b21 0,#523125 7px,#573429 11px,#482b21 34px);
  box-shadow: inset 0 0 1.3rem #140b06e0, 0 .4rem .75rem #42291638;
}
.bf-cell.v3-slot {
  display: grid; align-content: end; min-height: clamp(5.8rem,18vw,12rem);
  padding: .34rem clamp(.12rem,1vw,.72rem) 0; gap: 0;
  border-bottom: .7rem solid #9d6039; box-shadow: inset 0 -5px 6px #2f1c16;
}
.bf-cell:is(:nth-child(5n),:last-child) { border-right: 0; }
.bf-cell:nth-child(n+6) { border-bottom-color: #865033; }
.bf-bookcase .v3-shelf-book, .bf-bookcase .v3-empty-spine {
  height: clamp(4.75rem,15vw,10rem); min-height: 44px; width: min(100%,7rem);
  border-radius: .16rem .38rem .2rem .12rem;
}
.bf-bookcase .v3-shelf-book { padding: .25rem .25rem .25rem .42rem; touch-action: none; user-select: none; cursor: grab; transition: translate .16s ease, box-shadow .16s ease; }
.bf-spine-title { overflow: hidden; max-width: 100%; overflow-wrap: anywhere; font: bold clamp(.57rem,1.5vw,.9rem)/1.14 Georgia,serif; }
.bf-shelf-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #2b211d; pointer-events: none; }
.bf-bookcase .v3-empty-spine { width: min(55%,2.8rem); opacity: .65; }
.bf-bookcase .v3-slot:nth-child(even) .v3-empty-spine { height: clamp(4.2rem,13vw,9rem); }
.bf-bookcase .bf-destination { background: #fed29b42; outline: 2px dashed #ffdbad; outline-offset: -3px; }
.bf-bookcase .bf-grabbed, .bf-bookcase .bf-picked { z-index: 3; box-shadow: 0 .55rem 1rem #100802bd; }
.bf-bookcase .bf-grabbed { pointer-events: none; transition: none; }
.bf-bookcase .bf-picked { translate: 0 -.3rem; }
.bf-settle { animation: bf-slide-in .22s ease-out; }
@keyframes bf-slide-in { from { translate: 0 -.55rem; } to { translate: 0 0; } }
@media (hover:hover) { .bf-bookcase .v3-shelf-book:hover:not(.bf-grabbed) { translate: 0 -.16rem; } }
@media (prefers-reduced-motion:reduce) { .bf-bookcase .v3-shelf-book { transition: none; animation: none; } }
