/* Books&Moods — sticky bottom nav + responsive adjustments */

.bm-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--bm-z-nav);
  height: calc(var(--bm-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bm-chrome-bg);
  border-top: 1px solid var(--bm-border-chrome);
  display: flex;
}

body[data-player-active] .bm-bottom-nav {
  bottom: 0;
  transform: translateY(0);
}

.bm-bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--bm-chrome-text-muted);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bm-bottom-nav__item[aria-current="page"] { color: var(--bm-accent); }
.bm-bottom-nav__item svg { width: 22px; height: 22px; }

@media (min-width: 1100px) {
  .bm-bottom-nav { display: none; }
  body { padding-bottom: 0; }
  body[data-player-active] { padding-bottom: var(--bm-player-height); }
}

/* ---- Grid helpers -------------------------------------------------------*/
.bm-grid {
  display: grid;
  gap: var(--bm-space-6);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .bm-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .bm-grid { grid-template-columns: repeat(4, 1fr); } }

.bm-section { padding: var(--bm-space-12) 0; }
@media (min-width: 900px) { .bm-section { padding: var(--bm-space-16) 0; } }

/* Never allow horizontal scroll from any component at small widths.
   `overflow-x:hidden` on the document scrolling root is deliberately avoided:
   standalone iOS/Android web-app containers can treat the root scrollport
   differently from a normal browser tab. `clip` blocks horizontal paint
   overflow without turning html/body into an overflow scrolling container. */
html, body { overflow-x: clip; }
.bm-container, .bm-grid, table { max-width: 100%; }

@media (max-width: 480px) {
  .bm-auth-card { margin: var(--bm-space-6) var(--bm-space-4); padding: var(--bm-space-6); }
}
