/* ============================================
   小多成长记 · layout.css
   顶栏 / Tab导航 / 两栏布局 / 底部Tab / 响应式
   ============================================ */

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,247,243,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--ink); white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; flex: none; }

/* Tab 导航（PC/平板） */
.nav-tabs { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.nav-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-tab:hover { background: var(--green-soft-2); color: var(--green-ink); }
.nav-tab.active { background: var(--green-soft); color: var(--green-ink); font-weight: 700; }
.nav-tab .ic { width: 18px; height: 18px; flex: none; }

/* 顶栏右侧 */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-right .icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: background .15s;
}
.top-right .icon-btn:hover { background: var(--line-2); }
.top-right .icon-btn .ic { width: 20px; height: 20px; }

/* 连续打卡胶囊 */
.streak-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 12px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-1);
}
.streak-pill .ic { width: 16px; height: 16px; color: var(--orange); }

/* ---------- 主体 ---------- */
.main { display: flex; flex-direction: column; padding: 20px 0 90px; gap: 0; }
.page { display: block; }

/* 今日页：两栏 */
.today-grid { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 20px; }
.col-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* 页面头：日期 + 问候 */
.page-head { padding-top: 4px; }
.page-head .date { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.page-head .greet { font-size: 24px; font-weight: 800; margin-top: 2px; letter-spacing: .01em; }
.page-head .greet em { font-style: normal; color: var(--green); }

/* ---------- 移动端底部导航 ---------- */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.bottom-nav-inner { display: flex; justify-content: space-around; padding: 6px 8px; }
.bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; border-radius: 12px;
  color: var(--ink-3); font-size: 11px; font-weight: 500;
  min-width: 56px; min-height: 52px; justify-content: center;
}
.bn-item .ic { width: 22px; height: 22px; }
.bn-item.active { color: var(--green-ink); background: var(--green-soft); font-weight: 700; }

/* ---------- 响应式 ---------- */
@media (max-width: 1023px) {
  .today-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .app { padding: 0 14px; }
  .topbar-inner { padding: 0 14px; }
  .nav-tabs { display: none; }         /* PC tab 隐藏 */
  .bottom-nav { display: block; }      /* 底部 tab 出现 */
  .main { padding-bottom: 110px; }
  .page-head .greet { font-size: 21px; }
  .top-right .streak-pill { display: none; }  /* 手机收窄，连击胶囊收进“我的” */
}
