/* 顶栏：电脑上带完整导航；手机上只留品牌，导航挪到底部一排 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* 底色铺满整行，内容仍对齐页面主体宽度 */
  padding: 12px max(18px, calc((100% - var(--page)) / 2 + 18px));
  background: var(--bg-glass);
  backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand__avatar { width: auto; height: 40px; }
.brand__name { font-size: 20px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.brand__name b { color: var(--zi); }

.topnav { display: none; gap: 4px; }
.topnav a {
  flex: none;
  padding: 6px 12px;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.topnav a:hover { border-color: var(--mo); }
.topnav a[aria-current="page"] { border-color: var(--mo); background: var(--huang); box-shadow: var(--pop-small); }

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: flex;
  height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom);
  border-top: var(--line);
  background: var(--card);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-small);
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;  /* 手机字号调大时也别折成两行 */
  text-decoration: none;
}
.tabbar svg { width: 26px; height: 26px; }
.tabbar a[aria-current="page"] { background: var(--huang); }

/* 顶部导航 7 项，窄于 1100px 放不下一行，改用底部导航 */
@media (min-width: 1100px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
}
