#cover-shelf {
  --shelf-gutter: clamp(22px, 6.2vw, 124px);
  --shelf-height: clamp(180px, 18.5vw, 295px);
  --shelf-gap: clamp(22px, 2.3vw, 48px);
  min-width: 0;
  width: 100%;
}

.shelf-track {
  display: flex;
  align-items: flex-start;
  scroll-snap-type: x mandatory;
  width: 100%;
  margin: 0;
  padding: 18px 0 12px;
  overflow-x: auto;
  overflow-anchor: none;
  overscroll-behavior-x: contain;
  list-style: none;
  scrollbar-width: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.shelf-track::-webkit-scrollbar {
  display: none;
}
.shelf-track.is-dragging {
  scroll-snap-type: none;
}
.shelf-batch {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: center;
  align-items: start;
  gap: var(--shelf-gap);
  padding: 0 var(--shelf-gutter);
  scroll-snap-align: start;
}
.shelf-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, calc(var(--shelf-height) * 0.73));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.shelf-track.is-dragging,
.shelf-track.is-dragging .shelf-choice {
  cursor: grabbing;
}
.shelf-binding {
  display: block;
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 4;
  border-radius: 2px 3px 2px 1px;
  box-shadow:
    1px 1px 0 #a29480,
    2px 2px 0 #ece1c9,
    3px 3px 0 #ad9e87,
    4px 4px 0 #e8dac1,
    5px 5px 0 #968973,
    6px 7px 7px -3px #33291c5c,
    9px 13px 18px -12px #30220c73;
}
.shelf-binding img,
.shelf-binding .cover-lettering {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  -webkit-user-drag: none;
}
.shelf-binding::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: '';
  pointer-events: none;
  background: linear-gradient(
    to right,
    #21180f38,
    #ffffff26 1%,
    transparent 2.5%,
    #21180f12 3.3%,
    transparent 4.3%
  );
}
.shelf-title {
  text-align: center;
  align-self: stretch;
  margin-top: 17px;
  font: 500 clamp(16px, 1.25vw, 22px)/1.45 var(--studio-serif, serif);
  letter-spacing: 0.07em;
  overflow-wrap: anywhere;
}
.shelf-choice:hover .shelf-title {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}
.shelf-controls {
  margin-top: clamp(8px, 1.25vw, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
#cover-shelf.controls-visible .shelf-controls,
#cover-shelf:focus-within .shelf-controls {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .collection-scene:hover .shelf-controls {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-controls {
    transition: none;
  }
}
.shelf-arrow {
  width: 35px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-card-surface);
  box-shadow:
    -4px -4px 10px #ffffffb3,
    5px 6px 12px #31525217;
  color: inherit;
  font: 400 15px/1 var(--studio-latin, Georgia, serif);
  cursor: pointer;
}
.shelf-arrow[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
}
.shelf-arrow:hover:not([aria-disabled='true']) {
  background: var(--ui-hover-surface);
}
.shelf-range {
  font: 500 15px/1 var(--studio-latin, Georgia, serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.09em;
}
@media (max-width: 700px) {
  #cover-shelf {
    --shelf-gutter: clamp(20px, 6vw, 38px);
    --shelf-height: clamp(170px, 54vw, 248px);
    --shelf-gap: clamp(20px, 5.5vw, 32px);
  }
  .shelf-title {
    margin-top: 14px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  #cover-shelf {
    --shelf-height: clamp(160px, 50vh, 240px);
  }
}

.shelf-batch > :only-child {
  grid-column: 3;
}
@media (max-width: 700px) {
  .shelf-batch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .shelf-batch > :only-child {
    grid-column: 2;
  }
  .shelf-title {
    font-size: 14px;
    margin-top: 9px;
  }
}
