/* Functional mobile repairs only. Preserve the owner's original scale,
 * control dimensions, typography and single-row toolbar design. */
.app-container { height: 100dvh; }
.main-content { min-height: 0; overscroll-behavior-y: contain; }
#login-modal-overlay { overflow-y: auto; padding: 16px; }
#login-modal-overlay .login-modal {
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-shrink: 0;
}
#login-error { overflow-wrap: anywhere; }
.bol-input-overlay { max-width: calc(100vw - 16px); }
.nav-login { border: 0; background: transparent; font: inherit; padding: 0; }
#user-pill { font: inherit; }
body:has(#login-modal-overlay.active) { overflow: hidden; }
@media (hover: none) {
  .notation-section:hover { transform: none; }
}
@media (max-width: 768px) {
  html .quick-entry-bar { bottom: calc(12px + env(safe-area-inset-bottom, 0px) + var(--keyboard-inset, 0px)); }
  .main-content { scroll-padding-bottom: calc(var(--qe-bar-height, 180px) + 24px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Wrap the existing compact controls instead of shrinking the entire page. */
@media (max-width: 768px) {
  .lib-toolbar-controls { flex-wrap: wrap; }
  .lib-toolbar-controls .lib-search-box { flex: 1 0 100%; min-width: 0; }
  .lib-toolbar-controls .lib-filters { flex-wrap: wrap; }
}
