/* ==== 全局安全区 + 固定底栏（真机一致） ==== */
:root{
  --vh: 1vh; 
  --footer-h: 110px;
  /* 兼容老 iOS：constant() 兜底；max() 选最大值 */
  --safe-bottom: max(0px, env(safe-area-inset-bottom), constant(safe-area-inset-bottom));
  --footer-total: calc(var(--footer-h) + var(--safe-bottom));
  --primary: #3c5c5d; --secondary: #7faab1; --white: #fff; --card: rgba(251,251,251,.5); 
}

/* 视口高度在 iOS/Safari/PWA 下稳定 */
html, body { height: 100%; margin: 0; }
@supports (height: 100dvh) {
  .page-container { /*min-height: 100dvh;*/ }
}
@supports not (height: 100dvh) {
  html, body { height: -webkit-fill-available; }
  .page-container { min-height: -webkit-fill-available; }
}


/* 固定底栏（用左右 0 + auto 居中，不用 transform） */
.site-footer {
  position: fixed;
  /* ✅ 居中方式更稳，避免 margin-inline:auto + left/right 混用 */
  left: 50%;
  transform: translateX(-50%);
  right: auto;

  bottom: 0; /* 初始贴底，JS 会动态抬高以避开工具栏 */
  width: min(100%, 430px);

  height: calc(var(--footer-h) + var(--safe-bottom));
  background: #fff;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 5px 10px 10px rgba(0, 0, 0, 0.05);
  padding: 10px 8px 15px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-sizing: border-box;
  z-index: 999;
}

/* 主体为底栏让出空间（与总高一致） */
.page-container {
  padding-bottom: var(--footer-total);
}

/* 统一 footer 图标盒尺寸 */
/* 图标更大但不挤压文字 */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 图标靠上 */
  gap: 4px;
  text-decoration: none;
}

.nav-item img,
.nav-icon,
.nav-item .merged-icon {
  width: 45px;   /* ✅ 变大 */
  height: 45px;
  display: block;
  object-fit: contain;
}

.nav-item span {
  color: #3c5c5d;
  font-weight: 600;
  font-size: 11px;  /* 稍微加一点更协调 */
  line-height: 1.2;
}

.nav-item img{ object-fit:contain; }
