.library-main-wrapper { width: 100%; max-width: 100%; padding-left: 0; padding-right: 0; box-sizing: border-box; }
.library-main-wrapper main { width: 100%; max-width: 100%; box-sizing: border-box; }
.library-main-wrapper main .filters,
.library-main-wrapper main #book-filters,
.library-main-wrapper main #book-table { width: 100%; max-width: 100%; box-sizing: border-box; }

.library-main-wrapper main h1 { text-align: center; }
.library-main-wrapper main .filters { display: flex; flex-direction: column; align-items: center; }
.library-main-wrapper main .filters .filters-row { justify-content: center; }
.library-main-wrapper main > a[href*="reset"] { display: block; text-align: center; margin-bottom: 1rem; }

.page { max-width: 900px; margin: 0 auto; padding: 1rem; }
header { border-bottom: 1px solid #ccc; margin-bottom: 1rem; }
header nav { display: flex; gap: 1rem; align-items: center; }
header nav a { text-decoration: none; color: #333; }
.language-switcher { margin-left: auto; }
.language-switcher a { margin-left: 0.5rem; }
.language-switcher a.active { font-weight: bold; }
.cookie-consent-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #f0f0f0; padding: 1rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 -2px 8px rgba(0,0,0,0.1); }
.cookie-consent-banner p { margin: 0; flex: 1; }
.cookie-consent-banner a, .cookie-consent-banner button { padding: 0.25rem 0.75rem; }
.filters { margin-bottom: 1rem; }
.filters-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: stretch; }
.filters-row-main { margin-bottom: 0.5rem; }
.filters-row-main input[type="text"],
.filters-row-main input[type="search"],
.filters-row-main input:not([type]),
.filters-row-main select { height: 2.25rem; display: inline-flex; align-items: center; box-sizing: border-box; margin: 0; padding: 0.375rem 0.75rem; border: 1px solid #ced4da; border-radius: 0.25rem; font-size: 1rem; }
.hidden { display: none !important; }
.filters-row-checkboxes label { height: 2.25rem; display: inline-flex; align-items: center; box-sizing: border-box; margin: 0; padding-left: 0; gap: 0.5rem; cursor: pointer; }
.filters-row-checkboxes label input[type="checkbox"] { width: auto; height: auto; }
.book-star-col { width: 2rem; text-align: center; vertical-align: middle; }
.book-star { text-decoration: none; font-size: 1.25rem; color: #6c757d; }
.book-star:hover { color: #fd7e14; }
.book-star:focus { outline: none; }
.book-list { width: 100%; border-collapse: collapse; }
.book-list th, .book-list td { border: 1px solid #ddd; padding: 0.5rem; text-align: left; vertical-align: middle; }
.book-list .book-author-col { max-width: 11rem; }
.book-list th.book-resume-col,
.book-list td.book-resume-cell { min-width: 18rem; width: 35%; }
.book-resume-text {
  line-height: 1.4;
  word-wrap: break-word;
  white-space: normal;
}
.book-list tr.book-unavailable td { background-color: #e9ecef; color: #6c757d; }
.book-list .status-available { color: #198754; font-weight: 500; }
.book-list tr.book-unavailable td.status-unavailable { color: #dc3545; font-weight: 500; }
.book-list .status-unavailable { color: #dc3545; font-weight: 500; }

/* Mobile-friendly layout */
@media (max-width: 768px) {
  .library-main-wrapper { padding-left: 0.75rem; padding-right: 0.75rem; }
  .library-main-wrapper main h1 { font-size: 1.5rem; margin-bottom: 0.75rem; }
  .library-main-wrapper main .filters .filters-row { flex-direction: column; align-items: stretch; }
  .library-main-wrapper main .filters .filters-row-main input[type="text"],
  .library-main-wrapper main .filters .filters-row-main input:not([type]),
  .library-main-wrapper main .filters .filters-row-main select { width: 100%; min-height: 2.75rem; font-size: 16px; }
  .library-main-wrapper main .filters .filters-row-checkboxes { flex-direction: column; align-items: flex-start; }
  .library-main-wrapper main .filters .filters-row-checkboxes label { min-height: 2.75rem; padding: 0.25rem 0; }
  .library-main-wrapper main .filters .filters-row-checkboxes label input[type="checkbox"] { min-width: 1.25rem; min-height: 1.25rem; }
  .book-list-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -0.75rem; }
  .book-list { font-size: 0.875rem; min-width: 600px; }
  .book-list th, .book-list td { padding: 0.4rem 0.35rem; }
  .book-list .book-cover-cell { width: 64px; }
  .book-list .book-cover-thumb { width: 64px; height: 91px; }
  .book-list .book-cover-placeholder { width: 64px; height: 91px; }
  .book-list .book-author-col { max-width: 7rem; }
  .book-list th.book-resume-col,
  .book-list td.book-resume-cell { min-width: 10rem; width: 28%; }
  .book-star-col { min-width: 2.5rem; }
  .book-star { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2.5rem; padding: 0.25rem; }
}

@media (max-width: 576px) {
  .library-main-wrapper { padding-left: 0.5rem; padding-right: 0.5rem; }
  .library-main-wrapper main h1 { font-size: 1.35rem; }
  .book-list-wrapper { margin: 0 -0.5rem; }
}