.book-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(26, 26, 26, .35);
}
.book-modal.is-on { display: block; }
.book-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: #fff;
  color: var(--ink, #1a1a1a);
  padding: 32px 28px;
  box-shadow: -18px 0 40px rgba(26, 26, 26, .08);
  transform: translateX(104%);
}
.book-modal.is-on .book-panel {
  animation: book-in .45s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes book-in { to { transform: translateX(0); } }
.book-x {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  color: var(--ink, #1a1a1a);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.book-x:hover { color: var(--red, #d7193f); }
.book-kicker {
  font-family: var(--mono, ui-monospace, monospace);
  color: var(--red, #d7193f);
  font-size: 14px;
  letter-spacing: .04em;
}
.book-panel h2 {
  margin-top: 14px;
  font-family: var(--wide, "Unbounded", sans-serif);
  font-weight: 800;
  font-size: 40px;
  line-height: .95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.book-lead {
  margin-top: 14px;
  max-width: 28ch;
  color: var(--grey, #6d6466);
  font-size: 16px;
  line-height: 1.45;
}
.book-list { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.book-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(215, 25, 63, .35);
  padding: 16px 18px;
  font-family: var(--wide, "Unbounded", sans-serif);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: inherit;
  text-decoration: none;
}
.book-list a span {
  font-family: var(--mono, ui-monospace, monospace);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--red, #d7193f);
}
.book-list a:hover { background: var(--red, #d7193f); color: #fff; }
.book-list a:hover span { color: #fff; }
button.book-open {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--red, #d7193f);
  text-underline-offset: 3px;
}
button.book-open:hover { color: var(--red, #d7193f); }
@media (max-width: 820px) {
  .book-panel {
    width: 100%;
    padding: calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  }
  .book-panel h2 { font-size: clamp(28px, 8vw, 36px); }
  .book-x {
    top: calc(10px + env(safe-area-inset-top));
    right: 8px;
    min-width: 44px;
    min-height: 44px;
  }
  .book-list a { min-height: 56px; font-size: clamp(18px, 5vw, 22px); }
}
@media (prefers-reduced-motion: reduce) {
  .book-modal.is-on .book-panel { animation: none; transform: none; }
}
