/* Leave the selected book visible below a guide's sticky navigation. */
[data-shelf-book] {
  scroll-margin-top: 6rem;
}

.abc-return {
  background: #193e33;
  color: #fff;
  font: 600 0.95rem/1.45 system-ui, sans-serif;
}

.abc-return a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.35rem clamp(1rem, 4vw, 3rem);
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.abc-return a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

a.guide-text-link {
  display: inline-block;
  padding-block: 0.4rem;
  color: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.guide-book-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.guide-book-heading img {
  flex: none;
  width: 3.5rem;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 3px 8px rgb(0 0 0 / 18%);
}

.guide-book-heading h2 {
  margin: 0;
  line-height: 1.1;
}

.spotlight .panel[data-shelf-book] .btn {
  margin-top: 0.9rem;
}

.books > .book-card[data-shelf-book],
body:has(> .abc-return) [data-shelf-book] {
  scroll-margin-top: 1rem;
}

@media (max-width: 48rem) {
  [data-shelf-book] {
    scroll-margin-top: 8rem;
  }
}

@media (max-width: 700px) {
  .site-header .site-nav a:is([href="/#discover"], [href="/"]) {
    display: inline-flex;
  }

  .book-grid .book-card > img.book-cover {
    box-sizing: border-box;
    width: 100%;
    height: clamp(10rem, 30vh, 14rem);
    margin: 0;
    padding: 0.6rem;
    object-fit: contain;
  }
}
