/* =============================================================
   PAGES
   ============================================================= */
#page-content {
  /* Innerer Scroll-Container zwischen Topbar und Bottomnav. Body laeuft
     als Flex-Column; #page-content bekommt flex:1 und scrollt selber.
     Kein padding-top/-bottom fuer Topbar/Navbar-Clearance noetig — die
     beiden Bars sind echte Flex-Children und nehmen ihren eigenen Platz
     ein. Dadurch ist das Layout immun gegen alle iOS-PWA-Quirks rund um
     position:fixed.                                                       */
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
}
.page { display: none; }
.page.active {
  display: flex;
  flex-direction: column;
  /* flex:1 fuellt kurze Seiten (Dashboard / leeres Quest-Tab) bis runter
     zur Bottomnav; min-height:0 erlaubt das Schrumpfen, sodass laengere
     Inhalte das #page-content scrollen lassen statt aus dem Layout zu
     brechen. */
  flex: 1;
  min-height: 0;
  animation: page-enter var(--dur-slow) var(--ease) both;
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}

/* =============================================================
   MISC
   ============================================================= */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 14px; }
