.bookshelf {
  --columns: 5;
  --cover-height: 130px;
  max-width: 900px;
  margin: 2rem auto;
}

.bookshelf[data-grid="7"] {
  --columns: 7;
  --cover-height: 100px;
}

.books-toolbar,
.books-layout,
.books-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.books-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.books-count,
.books-page {
  color: #666;
  font-size: 0.9rem;
}

.bookshelf button {
  border: 1px solid #cbd3db;
  border-radius: 5px;
  background: #fff;
  color: #333;
  padding: 0.35rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.bookshelf button[aria-pressed="true"] {
  background: #5c7a99;
  border-color: #5c7a99;
  color: #fff;
}

.bookshelf button:disabled {
  opacity: 0.4;
  cursor: default;
}

.bookshelf button:focus-visible,
.bookshelf a:focus-visible {
  outline: 2px solid #5c7a99;
  outline-offset: 4px;
}

.bookshelf .gr_custom_container_1788931927 {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 24px 16px;
}

.bookshelf .gr_custom_each_container_1788931927 {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.bookshelf .gr_custom_book_container_1788931927 {
  width: 100%;
  height: var(--cover-height);
}

.bookshelf .gr_custom_book_container_1788931927 a {
  display: block;
  height: 100%;
}

.bookshelf .gr_custom_book_container_1788931927 img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  margin: auto;
  object-fit: contain;
}

.bookshelf .gr_custom_rating_1788931927 {
  min-height: 18px;
  line-height: 1;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #666;
}

.bookshelf .gr_custom_title_1788931927,
.bookshelf .gr_custom_review_1788931927 {
  display: none;
}

.book-review-preview {
  position: fixed;
  z-index: 1100;
  width: min(24rem, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 1rem 1.15rem;
  border: 1px solid #cbd3db;
  border-radius: 8px;
  background: #fff;
  color: #333;
  box-shadow: 0 4px 20px #0002;
  font-size: 1rem;
  line-height: 1.45;
  text-align: left;
}

.book-review-preview[hidden] {
  display: none;
}

.book-review-preview p {
  margin: 0.5rem 0 0;
  white-space: pre-line;
}

.bookshelf .gr_custom_header_1788931927,
.bookshelf .gr_custom_container_1788931927 > br,
.bookshelf .gr_custom_container_1788931927 > center,
.bookshelf .gr_custom_container_1788931927 > noscript,
.bookshelf [hidden] {
  display: none;
}

.books-pagination {
  justify-content: center;
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .bookshelf,
  .bookshelf[data-grid="7"] {
    --columns: 3;
    --cover-height: 110px;
  }
}

@media (max-width: 420px) {
  .bookshelf,
  .bookshelf[data-grid="7"] {
    --columns: 2;
  }
}
