@font-face {
  font-family: 'Caveat';
  src: url('https://fonts.gstatic.com/s/caveat/v23/WnznHAc5bAfYB2QRah7pcpNvOx-pjfJ9eIWpYQ.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #292927;
  --muted: #666762;
  --paper: #fff;
  --margin: clamp(1.35rem, 5.4vw, 6rem);
  --scene-height: clamp(26rem, 71svh, 48rem);
  --height: calc(var(--scene-height) * .47);
  --serif: 'Iowan Old Style', 'Baskerville', 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
a { color: inherit }
:focus-visible { outline: 2px solid #805c37; outline-offset: 5px }
.mast { margin: 0 var(--margin); padding-top: clamp(1.6rem, 4vh, 3rem); }
.wordmark, h1.title { font: normal clamp(2.5rem, 4.7vw, 4.5rem)/1.01 var(--serif); letter-spacing: -.046em; }
.wordmark { font-size: clamp(2rem, 3.6vw, 3.15rem); display: inline-block; text-decoration: none; }
.shelf-main { display: flex; flex-direction: column; justify-content: center; padding-top: clamp(1.5rem, 5svh, 3rem); min-height: calc(90svh - 6rem) }
.scroller { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.track {
  display: flex;
  align-items: flex-end;
  position: relative;
  isolation: isolate;
  width: max-content;
  min-width: 100%;
  height: var(--scene-height);
  /* The spines meet the photographed top plane, just behind its folded front lip. */
  padding: 0 calc(var(--scene-height) * .205) calc(var(--scene-height) * .291);
}
.track::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-image: url("/art/folded-steel-shelf.webp") 0 330 fill / 0 calc(var(--scene-height) * .351) / 0 stretch;
  mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 87%, transparent 100%),
              linear-gradient(to right, transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
  mask-composite: intersect;
}
.book {
  position: relative;
  isolation: isolate;
  display: block;
  flex: none;
  width: calc(var(--height) * var(--h) * var(--r));
  height: calc(var(--height) * var(--h));
  --lean: var(--angle, 0deg);
  transform: rotate(var(--lean));
  transform-origin: var(--foot, center) bottom;
  /* Leave room for the top edge on the side the book leans toward. */
  --overhang: calc(var(--height) * var(--h) * sin(var(--lean, 0deg)));
  margin-left: max(0px, calc(-1 * var(--overhang)));
  margin-right: max(0px, var(--overhang));
  transition: transform .18s ease-out;
  text-decoration: none;
}
/* Only the first candidate in an adjacent run leans, even across shelf pages. */
.may-lean + .may-lean { --lean: 0deg; }
/* A diffuse wall shadow follows each spine, while the tight lower shadow puts its weight on the steel. */
.book::before, .book::after { content: ""; position: absolute; pointer-events: none; z-index: -1; }
.book::before { inset: 1% -14% 0 20%; border-radius: 3px; background: #332d2426; transform: translate(5px, 2px); filter: blur(5px); }
.book::after { left: 0; right: -16%; bottom: -1px; height: 4px; border-radius: 50%; background: #312b2390; filter: blur(1.2px); }
.book img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 2px;
  filter: saturate(.85) contrast(.96) brightness(.99) drop-shadow(1px 0 1px #28231c4d);
}
@media (hover: hover) { .book:hover { transform: translateY(-8px) rotate(var(--lean, 0deg)); z-index: 1; } }
.book:focus-visible { z-index: 1; }
.fallback-spine { display: flex; justify-content: center; align-items: center; writing-mode: vertical-rl; height: 100%; width: 100%; background: #d7ccb6; color: #292319; font: 600 clamp(.8rem, 2vh, 1.25rem) var(--serif); }
.more { display: block; color: var(--muted); margin: 1rem var(--margin); font-size: .9rem }
.reading { --seal-size: clamp(6.75rem, 12vw, 10rem); --seal-radius: calc(var(--seal-size) / 2); margin: clamp(2.5rem, 6vh, 5rem) auto 5rem; }
.display-shelf {
  width: min(100%, 38rem);
  margin: 0 auto;
  text-align: center;
  padding: calc(var(--seal-radius) + .25rem) var(--margin) 1rem;
  background: linear-gradient(to bottom, #ededeb, #f9f9f8 45%, #d2d2d0 53%, #f9f9f8 72%, white) center bottom / 100% 1rem no-repeat;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.stamped-cover { position: relative; isolation: isolate; display: block; width: fit-content; max-width: 70%; margin-inline: auto; }
.book-seal {
  display: block;
  width: var(--seal-size);
  height: auto;
  opacity: .93;
  filter: brightness(.76) saturate(1.12);
  transform: rotate(var(--seal-angle));
  pointer-events: none;
}
.stamped-cover .book-seal {
  position: absolute;
  z-index: 2;
  left: var(--seal-x);
  top: var(--seal-y);
  transform: translate(-50%, -50%) rotate(var(--seal-angle));
}
.reading-copy > .book-seal { margin-top: 1rem; margin-left: clamp(0px, calc(var(--seal-x) - var(--seal-size)), 100%); }
.cover-art { position: relative; z-index: 1; display: block; max-height: clamp(12rem, 31svh, 20rem); max-width: 100%; width: auto; box-shadow: 3px 2px 5px #26241e24; }
.reading-copy { width: min(32rem, calc(100% - 2 * var(--margin))); margin: 2rem auto 0; }
.reading .title { margin: 0; font-size: clamp(2.25rem, 4vw, 3.5rem); text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.author { margin: .45rem 0 0; color: var(--muted); font: italic 1.3rem/1.4 var(--serif); text-align: center; }
.reading-meta { display: grid; justify-items: center; gap: .35rem; margin: 1.25rem 0 0; text-align: center; }
.stars { display: inline-flex; gap: .14em; font: 1rem/1.25 var(--serif); }
.star { position: relative; color: #ccc; }
.star::after { content: '★'; position: absolute; inset: 0; width: var(--fill); overflow: hidden; color: var(--ink); }
.read-date { font-size: .88rem; }
.read-date, .reading h2, .sample { color: var(--muted); }
.reading section { margin-top: 2.25rem; }
.reading h2 { font: normal .88rem/1.5 var(--sans); margin: 0 0 .5rem; }
.reading section p, .reading blockquote { font: 1.2rem/1.6 var(--serif); margin: 0 0 1rem; white-space: pre-line; overflow-wrap: anywhere; }
.sample { text-align: center; font-size: .85rem; }
@media (max-width: 620px) {
  :root { --scene-height: clamp(27rem, 66svh, 38rem); --height: calc(var(--scene-height) * .54); }
  .shelf-main { min-height: calc(88svh - 5rem) }
  .track { padding-right: calc(var(--scene-height) * .26); }
}
@media (prefers-reduced-motion: reduce) { .book { transition: none } }
.scroller::-webkit-scrollbar { display: none; }
.more[hidden] { display: none; }

.more.auto-load:not(:focus-visible) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.passage { margin: 0 0 1.6rem; }
.reading .personal-note p {
  font: 400 clamp(1.5rem, 1.35rem + .6vw, 1.75rem)/1.4 'Caveat', 'Bradley Hand', cursive;
}
.reading .passage blockquote { font-style: italic; margin: 0; }
.passage figcaption { margin-top: .35rem; color: var(--muted); font-size: .82rem; }

.loan-status { margin: .35rem 0 0; text-align: center; font-size: .85rem; color: var(--muted); }

.figurine-divider {
  flex: none; position: relative; width: calc(var(--height) * .64);
  margin: 0 calc(var(--height) * .035);
}
.miniatures {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  gap: calc(var(--height) * .018); z-index: 1;
}
.mini { display: block; position: relative; isolation: isolate; }
.mini::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 6%; right: -12%; bottom: -3%; height: 12%;
  background: radial-gradient(ellipse, rgb(52 50 46 / .41), rgb(69 68 65 / .16) 38%, transparent 73%);
  transform: skewX(-18deg); filter: blur(.8px);
}
.mini img {
  display: block; width: auto; height: 100%;
  filter: saturate(.84) contrast(.96) drop-shadow(4px 3px 3px rgb(55 54 50 / .24));
}
.mini-eevee { height: calc(var(--height) * .34); }
.mini-umbreon { height: calc(var(--height) * .40); }
.shelf-note {
  position: absolute; z-index: 2; top: calc(100% + var(--scene-height) * .004);
  left: 48%; width: clamp(3rem, var(--height) * .24, 5rem); margin: 0;
  line-height: 0; transform: translateX(-50%) rotate(-3deg); transform-origin: 50% 0;
  filter: drop-shadow(1px 2px 1px #39332933);
}
.shelf-note img { display: block; width: 100%; height: auto; filter: grayscale(.93) brightness(1.19) contrast(1.12); }

.mast:has(+ .reading) {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-inline: 0;
  padding: clamp(1rem, 2.5vh, 2rem) var(--margin) .8rem;
  background: var(--paper);
}
.cover-column .reading-meta { display: none; }
@media (min-width: 52rem) {
  body:has(.cover-column) {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .reading:has(.cover-column) { width: 100%; min-height: 0; margin: 0; }
  .reading article:has(.cover-column) {
    width: min(84rem, 90%);
    height: 100%;
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 6rem);
  }
  .cover-column { align-self: center; }
  .cover-column .display-shelf { width: 100%; padding-inline: 0; }
  .cover-column .stamped-cover { max-width: 78%; }
  .cover-column .cover-art { max-height: min(58svh, 36rem); }
  .cover-column .reading-meta { display: grid; }
  .cover-column + .reading-copy {
    width: 100%;
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    padding: clamp(1rem, 3vh, 3rem) .6rem 4rem 0;
  }
  .cover-column + .reading-copy .reading-meta { display: none; }
  .cover-column + .reading-copy :is(.title, .author, .loan-status) { text-align: left; }
}
