.page-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  filter: blur(92px);
  z-index: 0;
  pointer-events: none;
}

.glow-top {
  top: -70px;
  left: -70px;
  background: rgba(255, 196, 118, 0.34);
}

.glow-bottom {
  right: -80px;
  bottom: 40px;
  background: rgba(255, 145, 121, 0.22);
}

.app-frame {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.app-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.82) 0%, rgba(255, 248, 241, 0.92) 100%);
  border: 0;
  border-radius: var(--radius-shell);
  box-shadow: none;
  backdrop-filter: blur(16px);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  min-height: 100%;
  height: 100%;
}

.app-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 10px calc(10px + var(--safe-bottom));
  overflow: hidden;
}

.app-top {
  display: grid;
  gap: 14px;
  flex: 0 0 auto;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.app-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-content::-webkit-scrollbar {
  display: none;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.page {
  display: none;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.page.is-active {
  display: flex;
}

.section-card,
.empty-card,
.mini-list {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}

.section-card,
.empty-card,
.mini-list {
  border-radius: var(--radius-card);
}

.section-card {
  padding: 15px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.section-header h2,
.empty-card h3 {
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 800;
}

.feed-section {
  padding-bottom: 12px;
}

.feed-state {
  display: grid;
  gap: 12px;
}

.bottom-nav {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  background: #ffffff;
  border: 1px solid rgba(20, 87, 54, 0.09);
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(31, 41, 36, 0.09);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  z-index: 2;
  flex: 0 0 auto;
}

.nav-item {
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px 9px;
  border-radius: 18px;
  color: var(--text-faint);
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
  position: relative;
  border: 1px solid transparent;
}

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

.nav-item span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-item[data-page="saved"] {
  display: none;
}

.nav-item:hover {
  color: #5f6d63;
}

.nav-item.is-active {
  background: rgba(15, 91, 52, 0.08);
  border-color: rgba(15, 91, 52, 0.08);
  color: #0f5b34;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: #ff6b00;
  transform: translateX(-50%);
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 768px) {
  .app-frame {
    padding: 10px;
  }

  .app-shell {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(153, 110, 73, 0.12);
  }

  .app-screen {
    padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
    gap: 12px;
  }
}
