
/* TOU Library — responsive layout correction */
*, *::before, *::after {
  box-sizing: border-box;
}

.grid, #books {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
}

.book, .tou-dynamic-book {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.book-info, .book-info h3, .book-info small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.cover {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cover img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 600px) {
  .grid, #books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .book-info {
    padding: 12px;
  }

  .book-info h3 {
    font-size: 14px;
    line-height: 1.35;
  }
}

@media (max-width: 360px) {
  .grid, #books {
    grid-template-columns: minmax(0, 1fr);
  }
}
