/* ===== App Shell — Healing Nature Minimalist Theme ===== */
#app {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ===== Page Container ===== */
.page {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 20px);
  animation: pageIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-primary);
}

.page.active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Page Header ===== */
.page-header {
  padding: calc(52px + var(--safe-top)) 24px 24px;
  background: var(--bg-primary);
}

.page-header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-header .subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-weight: 400;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 32px 24px 14px;
}

/* ===== Bottom Tab Bar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: calc(var(--tab-bar-height) + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  z-index: var(--z-tab-bar);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 18px;
  color: var(--text-muted);
  transition: all var(--transition-normal);
  min-width: 64px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item.active::before {
  content: '';
  position: absolute;
  top: -6px;
  width: 20px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: transform var(--transition-fast);
}

.tab-item:active .tab-icon { transform: scale(0.92); }

.tab-item .tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  text-align: center;
}

.empty-state .empty-icon {
  margin-bottom: 24px;
  opacity: 0.2;
}

.empty-state .empty-icon svg {
  width: 56px;
  height: 56px;
}

.empty-state .empty-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.empty-state .empty-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* ===== Scrollable content ===== */
.scroll-content {
  padding: 0 24px 24px;
}

/* ===== Responsive ===== */
@media (min-width: 431px) {
  body { background: #E2DFD5; }
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

@media (max-width: 360px) {
  .page-header h1 { font-size: 26px; }
}

/* ===== 手绘插画容器 ===== */
.illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.illustration svg {
  display: block;
  max-width: 100%;
  height: auto;
}
