:root {
  color-scheme: light;
  --paper: #eee3cc;
  --ink: #3a271d;
  --muted-ink: #68503b;
  --brass: #95652d;
  --oak: #bc814d;
  --walnut: #5c341e;
  --gold: #f1dcaa;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='310' height='144'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018 .37' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' filter='url(%23g)' d='M0 0h310v144H0z'/%3E%3C/svg%3E");
  font: 1rem/1.5 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, #fff8e7 0%, transparent 67%),
    repeating-linear-gradient(90deg, #7d532507 0 1px, transparent 1px 5px),
    var(--paper);
}

.masthead {
  border-bottom: 1px solid #b59367;
  background: linear-gradient(180deg, #fbf1dc, #ead8b7);
  box-shadow: 0 1px #fff7e2, 0 4px 17px #77552b14;
}
.masthead-inner, .library { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  color: #38433b;
  font: bold 1.45rem/1 Georgia, serif;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  aspect-ratio: 1;
  border: 1px solid #244847;
  border-radius: 7px;
  background: linear-gradient(#3c6860, #224d4d);
  box-shadow: inset 0 1px #faf3cb66, 0 1px 2px #5c371640;
  color: var(--gold);
}
.brand-mark svg { width: 20px; }
.masthead-note { color: var(--muted-ink); font-size: .8rem; text-align: right; }

.library { padding-block: clamp(1.7rem, 4.5vw, 4.5rem) 1.5rem; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 1.2rem clamp(1.35rem, 3vw, 2.25rem); }
h1 { margin: 0; font: normal clamp(2.55rem, 6vw, 5rem)/.99 Georgia, serif; letter-spacing: -.057em; text-wrap: balance; text-shadow: 0 1px #fff9e7; }
.library-heading p { margin: .85rem 0 0; color: var(--muted-ink); font-size: clamp(.9rem, 2vw, 1.075rem); }
.compass { flex: none; width: clamp(4rem, 9vw, 6.8rem); color: var(--brass); transform: rotate(13deg); }

.cabinet {
  --lip: clamp(1.85rem, 4vw, 2.55rem);
  position: relative;
  isolation: isolate;
  padding: .75rem;
  border-radius: 9px 9px 7px 7px;
  border: 1px solid #60351e;
  background:
    linear-gradient(90deg, #673b22, #c38b52 1%, #9c5c32 2%, transparent 8% 92%, #86502e 98%, #bf8550 99%, #66391e),
    linear-gradient(#c38a50, #89512c 40%, #704026 85%, #b67b47);
  box-shadow: inset 0 1px #f5cd8b, inset 0 -2px 2px #462514a0, 0 18px 33px -16px #442617a8, 0 3px 5px #5e3c2340;
}
.cabinet::before, .shelf::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.cabinet::before { inset: 0; z-index: -1; border-radius: inherit; background: var(--grain); mix-blend-mode: soft-light; opacity: .45; }
.shelf {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  align-items: end;
  list-style: none;
  margin: 0;
  padding: clamp(1.6rem, 4vw, 2.9rem) 1.2rem var(--lip);
  column-gap: 1.5rem;
  row-gap: 1.5rem;
  border-radius: 3px;
  background-color: var(--oak);
  background-image: var(--grain), radial-gradient(ellipse at 48% 8%, #efbc8060, #582f1790), linear-gradient(#81502f, #cb925b 40%, #b17c4d 83%, #704224);
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 10px 19px #351b13a0, inset 7px 0 15px #3c211549, inset -7px 0 15px #3c211549;
}
.shelf::after {
  inset: auto 0 0;
  height: var(--lip);
  z-index: -1;
  border-radius: 0 0 3px 3px;
  border-top: 1px solid #ffd69b;
  background: var(--grain), linear-gradient(#a46b40 0, #dba169 15%, #bb7c48 21%, #aa6a3d 37%, #99592f 85%, #6e3c23 100%);
  background-blend-mode: soft-light, normal;
  box-shadow: 0 2px 3px #3d210fbb, 0 -9px 17px #47221233;
}
.slot { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }

.volume {
  --cloth: #345951;
  --lining: #1b3934;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  width: 100%;
  max-width: clamp(12.65rem, 29vw, 15.5rem);
  aspect-ratio: 4 / 5.4;
  border-radius: 2px 5px 5px 2px;
  background: var(--cloth);
  box-shadow: 4px 0 0 -1px #d6c4a3, 6px 1px 0 -1px var(--lining), 10px 9px 12px #321b13a6, -5px 3px 8px #4c2c1c28;
  color: #fff2cd;
  text-align: center;
  text-decoration: none;
  transform-origin: bottom center;
  transition: transform .26s cubic-bezier(.2,.65,.3,1), box-shadow .26s;
}
.volume:focus-visible, .wordmark:focus-visible { outline: 3px solid #fff4c0; outline-offset: 4px; }
.wordmark:focus-visible { outline-color: #315b56; }
.volume:focus-visible { transform: translateY(-.45rem) rotate(-1deg); }
@media (hover: hover) { .volume:hover { transform: translateY(-.45rem) rotate(-1deg); } }
.volume:active { transform: translateY(-.12rem); }

.cover-art, .cover-frame, .volume::before, .volume::after { position: absolute; pointer-events: none; }
.cover-art {
  inset: 0;
  z-index: -3;
  overflow: hidden;
  border-radius: inherit;
}
.cover-art > img, .cover-art > .canva-layers { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-art > img { object-position: right center; }
.cover-art > .canva-layers:not([data-action]), .cover-art .painted-b { visibility: hidden; }
.volume::before {
  content: "";
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background: linear-gradient(0deg, var(--lining) 2%, var(--cloth) 16%, color-mix(in srgb, var(--lining), transparent 25%) 35%, transparent 65%);
}
.volume::after {
  content: "";
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(90deg, #22160e88, #fff1c332 3%, #0005 5%, transparent 9% 98%, #fff2c442);
  box-shadow: inset 0 1px #ffefc77a, inset 0 -1px #201407a1;
}
.cover-frame { z-index: 1; inset: 5px 5px 5px 8px; border: 1px solid #f9dda6a6; border-radius: 0 3px 3px 0; }
.cover-copy { display: grid; position: relative; gap: .3rem; width: 100%; padding: .85rem .75rem 1rem .95rem; text-shadow: 0 2px 4px #15110a, 0 0 9px #15110a8c; }
.cover-kicker { color: #fff1cc; font-size: clamp(.7rem, 1.2vw, .8rem); font-weight: 650; }
.cover-title { font: bold clamp(1.6rem, 3.25vw, 2rem)/1.04 Georgia, serif; letter-spacing: -.032em; text-wrap: balance; }
.cover-details { margin-top: .35rem; font-size: .83rem; color: #fff0cb; }
.library-note { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: clamp(1.3rem, 3.4vw, 2rem) 0 0; color: var(--muted-ink); font-size: .9rem; text-align: center; }
.library-note svg { width: 1.3rem; flex: none; color: var(--brass); }

@media (max-width: 700px) {
  .masthead-inner, .library { width: min(100% - 1.5rem, 32rem); }
  .library-heading { margin-inline: .4rem; }
  .compass { width: clamp(2.6rem, 11vw, 4rem); }
  .cabinet { padding: .48rem; }
  .shelf { padding-inline: 1rem; }
  .library-note { font-size: .8rem; }
}
@media (max-width: 340px) {
  .compass { display: none; }
  .cover-copy { padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .volume { transition: none; }
  .volume:is(:hover, :focus-visible, :active) { transform: none; }
  .cover-art > .canva-layers { display: none; }
}
