/* Targeted responsive and icon corrections; existing page theme and module layout retained. */
:root { color-scheme: light; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 0; overflow-x: clip; }
body:has(> .bottom-navigation), body:has(> .bottom-nav) { padding-bottom: max(92px, calc(77px + env(safe-area-inset-bottom, 0px))) !important; }
*, *::before, *::after { box-sizing: border-box; }
main, section, article, .panel, .card, .welcome, .search-panel { min-width: 0; }
img, video, canvas, iframe { max-width: 100%; }
img { height: auto; }
input, textarea, select, button { max-width: 100%; font-family: inherit; }
input, textarea, select { min-width: 0; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #22764e; outline-offset: 3px; }
.rsu-ui-icon { display: inline-block; flex: none; width: 23px; height: 23px; max-width: 100%; vertical-align: middle; }
.nav-icon .rsu-ui-icon, .bottom-nav a > .rsu-ui-icon { width: 23px; height: 23px; }
.bottom-navigation, .bottom-nav { gap: 0 !important; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; padding-bottom: max(7px, env(safe-area-inset-bottom, 0px)) !important; scrollbar-width: thin; }
.bottom-navigation a, .bottom-nav a { flex: 1 0 55px; min-width: 55px; text-align: center; overflow-wrap: anywhere; }
.bottom-navigation a .nav-icon { display:flex; align-items:center; justify-content:center; min-height:26px; }
.bottom-navigation a.active .nav-icon { padding: 3px 8px; }
.bottom-nav a > span:first-child { display:block; margin-bottom:4px; }
/* Wide tables keep their own scrollbars instead of overflowing the entire page. */
.table-container, .table-wrapper, .table-responsive, .table-scroll, .users-table, .books-table { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
table { max-width:100%; }
@media (max-width: 900px) {
  .search-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  main { max-width: calc(100% - 24px); }
  .cards, .book-grid, .books-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important; }
}
@media (max-width: 600px) {
  body { min-width: 0; }
  main { width: calc(100% - 24px) !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
  header { padding-left: 14px !important; padding-right: 14px !important; }
  header h1 { font-size: clamp(21px, 5.5vw, 28px) !important; overflow-wrap: anywhere; }
  h2 { overflow-wrap: anywhere; }
  .search-form { grid-template-columns: minmax(0, 1fr) !important; }
  .login-box, .card, .panel, .search-panel { max-width: 100%; }
  .login-box, .search-panel { padding-left: 16px !important; padding-right:16px !important; }
  .cards, .book-grid, .books-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .bottom-navigation a, .bottom-nav a { font-size: 11px !important; }
  .bottom-navigation, .bottom-nav { justify-content:flex-start; }
}
@media (max-width: 380px) {
  .bottom-navigation a, .bottom-nav a { flex: 1 0 59px; }
  input, select, textarea { font-size: 16px; }
  .login-box, .card { padding-left: 14px; padding-right:14px; }
}
@media (min-width: 1500px) {
  .bottom-navigation, .bottom-nav { justify-content:center; }
  .bottom-navigation a, .bottom-nav a { flex: 0 1 170px; }
}
