:root {
  --paper: #eeede6;
  --ink: #292d26;
  --muted: #696c61;
  --line: #c9cabd;
  --accent: #9c432c;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #a55a35;
  outline-offset: 5px;
}
.site-header {
  height: 96px;
  margin: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.site-header a {
  text-decoration: none;
}
.wordmark {
  font-weight: 600;
}
.wordmark span {
  font-weight: 400;
  color: var(--muted);
  margin-left: 12px;
}
main {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 42% 58%;
  padding: 64px 6% 100px;
  align-items: start;
}
.intro {
  position: sticky;
  top: 60px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 0 0 24px;
}
h1 {
  font:
    normal clamp(50px, 6.3vw, 90px)/1 Georgia,
    serif;
  letter-spacing: -5px;
  margin: 0 0 28px;
}
h1 span {
  color: var(--accent);
}
.intro-copy {
  font:
    20px/1.6 Georgia,
    serif;
}
.count {
  color: var(--muted);
  font-size: 13px;
  margin: 24px 0 34px;
}
.view-switch {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  width: 250px;
  margin-bottom: 28px;
}
.view-switch button {
  background: none;
  border: 0;
  padding: 0 0 12px;
  color: var(--muted);
}
.view-switch [aria-pressed="true"] {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.search-label {
  display: block;
  font-size: 12px;
  margin-bottom: 10px;
}
#search {
  width: 250px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 0 12px;
  color: var(--ink);
}
.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12px;
}
.filter input {
  accent-color: var(--ink);
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 48px;
}
.collection {
  min-width: 0;
  padding: 8px 12px;
}
.shelf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0 12px;
}
.spine {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--width);
  min-height: var(--height);
  border: 0;
  border-radius: 2px 4px 4px 2px;
  background: var(--book);
  color: var(--type);
  padding: 9px 18px 9px 24px;
  transform: translateX(var(--offset));
  box-shadow:
    inset 0 2px 1px #ffffff38,
    inset 0 -3px 2px #0003,
    2px 4px 4px #292d2624;
  text-align: left;
  transition:
    transform 0.22s,
    box-shadow 0.22s;
  z-index: 1;
}
.spine::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 4px;
  border-left: 1px solid #ffffff40;
  border-right: 1px solid #0002;
}
.spine-title {
  font-family: Georgia, serif;
  font-size: clamp(15px, 1.7vw, 23px);
  line-height: 1.12;
  flex: 1;
}
.spine:nth-child(3n) .spine-title {
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: clamp(14px, 1.5vw, 20px);
}
.spine-author {
  font-size: 10px;
  max-width: 100px;
  line-height: 1.3;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.spine:hover,
.spine:focus-visible {
  transform: translateX(calc(var(--offset) - 14px)) rotate(0deg);
  box-shadow:
    inset 0 2px 1px #fff3,
    inset 0 -3px 2px #0003,
    8px 10px 12px #292d262b;
  z-index: 2;
}
.shelf.index {
  gap: 0;
  padding: 0;
}
.index .spine {
  width: 100%;
  min-height: 72px;
  transform: none;
  background: none;
  color: var(--ink);
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin: 0;
}
.index .spine::before {
  display: none;
}
.index .spine-title,
.index .spine:nth-child(3n) .spine-title {
  font:
    18px/1.3 Georgia,
    serif;
  text-transform: none;
  letter-spacing: 0;
}
.index .spine-author {
  max-width: 115px;
}
.index .spine:hover {
  color: var(--accent);
}
dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  background: #252c23ed;
  color: #eeede2;
  padding: 100px max(6%, calc((100vw - 1000px) / 2)) 36px;
  overflow-y: auto;
}
dialog::backdrop {
  background: #20261ec9;
  backdrop-filter: blur(3px);
}
dialog[open] {
  animation: open-book 0.22s ease-out;
}
.close {
  position: fixed;
  right: 5%;
  top: 30px;
  border: 1px solid #b3b8a75c;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  background: #293026;
  color: inherit;
  font-size: 32px;
  font-weight: 200;
}
.detail {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 60px;
  align-items: center;
  max-width: 950px;
  margin: 20px auto 60px;
}
.cover-wrap {
  position: relative;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 2/3;
  margin: auto;
  box-shadow: 10px 18px 36px #0005;
  background: var(--book, #dbcdb1);
  color: var(--type, #292d26);
}
.cover-fallback {
  height: 100%;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 8px double #0002;
}
.cover-fallback span {
  font:
    36px/1.08 Georgia,
    serif;
}
.cover-fallback small {
  font-size: 14px;
}
#cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #252c23;
}
h2 {
  font:
    normal clamp(30px, 4vw, 56px)/1.08 Georgia,
    serif;
  letter-spacing: -1.5px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.author {
  font:
    italic 23px/1.4 Georgia,
    serif;
  margin: 0 0 28px;
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 20px;
  padding: 26px 0;
  border-top: 1px solid #a6af964d;
  margin: 0 0 20px;
}
dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: #b8c0ac;
  margin-bottom: 8px;
}
dd {
  margin: 0;
  font-size: 14px;
}
.book-copy {
  min-width: 0;
}
.book-copy a {
  display: inline-block;
  margin-top: 8px;
}
.book-navigation {
  max-width: 950px;
  margin: auto;
  border-top: 1px solid #a6af964d;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.book-navigation button {
  color: inherit;
  background: none;
  border: 0;
  padding: 12px 0;
}
.book-navigation button:disabled {
  opacity: 0.3;
  cursor: default;
}
.book-navigation span {
  font-size: 12px;
  color: #b8c0ac;
}
body.modal-open {
  overflow: hidden;
}
@keyframes open-book {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 700px) {
  .site-header {
    height: 72px;
    margin: 0 6%;
  }
  .wordmark span {
    display: none;
  }
  main {
    display: block;
    padding: 32px 6% 60px;
  }
  .intro {
    position: static;
  }
  h1 {
    font-size: 58px;
    letter-spacing: -3px;
    margin-bottom: 15px;
  }
  .eyebrow {
    margin-bottom: 16px;
  }
  .intro-copy {
    font-size: 17px;
    margin: 0;
  }
  .intro-copy br {
    display: none;
  }
  .count {
    margin: 14px 0 24px;
  }
  .view-switch {
    width: 100%;
    margin-bottom: 20px;
  }
  #search {
    width: 100%;
  }
  .filter {
    margin-top: 16px;
  }
  .hint {
    margin: 22px 0 32px;
  }
  .hint br {
    display: none;
  }
  .collection {
    padding: 0 0 0 4px;
  }
  .shelf {
    padding: 0 4px;
  }
  .spine {
    gap: 8px;
    padding: 10px 12px 10px 22px;
    min-height: 48px;
  }
  .spine-title {
    font-size: 17px;
  }
  .spine-author {
    font-size: 9px;
    max-width: 75px;
  }
  .spine:nth-child(3n) .spine-title {
    font-size: 15px;
  }
  dialog {
    padding: 88px 7% 26px;
  }
  .detail {
    display: block;
    margin: 0 auto 32px;
  }
  .cover-wrap {
    width: 145px;
    margin: 0 auto 30px;
  }
  .cover-fallback {
    padding: 18px 14px;
  }
  .cover-fallback span {
    font-size: 22px;
  }
  .cover-fallback small {
    font-size: 10px;
  }
  .book-copy .eyebrow {
    font-size: 10px;
  }
  h2 {
    font-size: 34px;
    letter-spacing: -1px;
  }
  .author {
    font-size: 21px;
  }
  .book-navigation span {
    display: none;
  }
  .close {
    top: 20px;
    width: 44px;
    height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Keep long titles inside the fallback jacket at every screen size. */
.cover-fallback {
  overflow: hidden;
}
.cover-fallback span {
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
}
.cover-fallback small {
  margin-top: 16px;
  flex-shrink: 0;
}
/* Local photographs and generated illustrations retain their spine proportions. */
.spine.has-artwork {
  padding: 0;
  min-height: 0;
  height: auto;
  flex-shrink: 0;
  aspect-ratio: var(--spine-ratio);
  background: none;
  box-shadow: 2px 4px 5px #292d2633;
  overflow: hidden;
  border-radius: 1px;
}
.spine.has-artwork::before {
  display: none;
}
.has-artwork .spine-title,
.has-artwork .spine-author {
  display: none;
}
.spine-artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.index .has-artwork {
  aspect-ratio: auto;
  min-height: 72px;
  box-shadow: none;
  padding: 16px 0;
}
.index .has-artwork .spine-title,
.index .has-artwork .spine-author {
  display: block;
}
.index .spine-artwork {
  display: none;
}
.artwork-count {
  max-width: 250px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.artwork-credit {
  color: #b8c0ac;
  font-size: 12px;
  line-height: 1.5;
}
.artwork-credit a {
  margin: 0;
}
.collection {
  width: 100%;
  max-width: 500px;
  justify-self: center;
}

@media (max-width: 600px) {
  .shelf:not(.index) .spine { transform: none; }
}
