.book-shelf {container: shelf / inline-size}
.shelf-books .shelf-book {
  display: flex;
  flex-direction: column;
}
.shelf-book > a.shelf-entry {
  display: flex;
  flex-direction: column;
  color: var(--s-ink);
  padding: 0;
}
.shelf-entry h2 {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--s-rule);
  text-underline-offset: .15em;
  text-decoration-skip-ink: auto;
}
.shelf-book > .shelf-entry:is(:hover,:focus-visible) h2 {
  color: var(--s-blue);
  text-decoration-color: currentColor;
}
.shelf-entry .shelf-plate {order: -1}
.shelf-book .shelf-actions {margin-top: auto}
.shelf-actions .shelf-read {
  box-sizing: border-box;
  color: var(--s-blue);
  margin: 0;
  padding-block: .42em;
  min-height: 44px;
  text-decoration: none;
}
.shelf-actions [hidden],
.shelf-actions [data-book-resume]:not([hidden]) ~ [data-reader-start] {display: none}
.shelf-actions a:is(:hover,:focus-visible) > :first-child {text-decoration-thickness: 2px}
.shelf-actions a:focus-visible {outline: 2px solid var(--s-blue);outline-offset: 3px}
@media(max-width:43.99em) {
  .book-shelf .shelf-book {padding-block: 1.08em .66em}
  .shelf-book > a.shelf-entry {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-areas: "title art";
    align-items: center;
    gap: .85em;
  }
  .shelf-entry h2 {
    font-size: clamp(1.44em, 5.7vw, 1.88em);
    text-wrap: wrap;
    overflow-wrap: normal;
  }
  .shelf-book.is-edition .shelf-plate, .shelf-book-2 .shelf-plate {
    width: clamp(4.1rem, 18vw, 6.4rem);
    height: auto;
    max-width: 100%;
    aspect-ratio: auto;
  }
  .shelf-book-1 .shelf-plate {width: clamp(6rem,27vw,9.4rem);height:auto;aspect-ratio:auto}
  .shelf-book .shelf-plate img {width:100%;height:auto}
  .shelf-book .shelf-actions {margin-top: .17em}
}
@container shelf (max-width: 16em) {
  .shelf-books .shelf-book {display: flow-root}
  .shelf-book > a.shelf-entry {display: inline}
  .shelf-entry h2 {width: 100%;margin: 0 0 .36em;font-size: 1.4em}
  .shelf-book .shelf-entry .shelf-plate {
    float: right;
    width: clamp(3.9rem, 22cqi, 5.4rem);
    margin: .15em .14em .35em .8em;
  }
  .shelf-book-1 .shelf-entry .shelf-plate {width: clamp(5rem, 29cqi, 6.4rem)}
  .shelf-book .shelf-entry:focus-visible {outline: none}
  .shelf-book .shelf-entry:focus-visible h2,
  .shelf-book .shelf-entry:focus-visible .shelf-plate {outline: 2px solid var(--s-blue);outline-offset: 2px}
  .shelf-book p {margin-block: .3em .15em}
  .shelf-actions {clear: both}
}
@media(forced-colors:active) {
  .shelf-entry h2 {color:LinkText;text-decoration-color:currentColor}
  .shelf-actions a:focus-visible {outline-color:Highlight}
}
