/* layout.css —— 布局骨架与响应式 */
#app { min-height: 100vh; }

#view {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}

.page { padding: 16px; min-height: 100vh; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-top: 6px;
}

.page-head__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-head__hello { font-size: 18px; font-weight: 700; }

.page-head__ledger {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* 底部导航栏（移动端） */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  transition: color 0.15s;
}

.tabbar__item.is-active { color: var(--primary); }

.tabbar__icon { font-size: 22px; line-height: 1; }

.tabbar__label { font-size: 11px; }

/* 桌面端：内容居中加宽，导航仍底部但限宽居中 */
@media (min-width: 768px) {
  #view {
    max-width: 820px;
    padding-bottom: 40px;
  }
  .page { padding: 24px 28px; }
  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    max-width: 820px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  /* 桌面端把底栏换成顶部悬浮胶囊 */
  .tabbar {
    top: 16px;
    bottom: auto;
    height: 52px;
    padding-bottom: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    width: calc(100% - 48px);
    box-shadow: var(--shadow);
  }
  #view { padding-top: 84px; }
}

@media (min-width: 1100px) {
  #view { max-width: 960px; }
  .tabbar { max-width: 720px; }
}
