.app-shell {
  width: min(100vw, 430px);
  max-width: 100vw;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(47, 125, 77, 0.10), rgba(238, 243, 240, 0) 220px),
    var(--paper);
}

.pages {
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  display: block;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 14px 14px 22px;
  max-width: 100%;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease;
}

.page::-webkit-scrollbar {
  display: none;
}

.page.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .page {
    transition: none;
    transform: none;
  }
}

.page-stack {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.page-stack > * {
  min-width: 0;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.bottom-nav {
  min-height: var(--nav-h);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  background: rgba(255, 255, 255, 0.93);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nav-btn {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 3px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn span {
  font-size: 11px;
  font-weight: 800;
}

.nav-btn.active {
  background: var(--ink);
  color: var(--surface);
}

.nav-btn[data-page="home"].active {
  background: var(--leaf);
}

.nav-btn[data-page="history"].active,
.nav-btn[data-page="forecast"].active {
  background: var(--cold);
}

.nav-btn[data-page="season"].active {
  background: var(--sun);
}
