/* ==========================================================================
   wechat-mobile.css — 移动端（≤768px）：底部四 Tab + 页面栈
   ========================================================================== */

@media (max-width: 768px) {

  .app { flex-direction: column; }

  /* 页面容器：每个 Tab 一个 page，聊天页全屏覆盖 */
  .page-stack { position: relative; flex: 1; overflow: hidden; }
  .page {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    background: var(--bg-page); transition: transform .26s ease; will-change: transform;
  }
  .page.out-left { transform: translateX(-28%); }
  .page.in-right { transform: translateX(100%); }
  .page.cover { z-index: 30; }

  /* Tab 页内容 */
  .tab-page { display: none; flex-direction: column; height: 100%; }
  .tab-page.active { display: flex; }

  /* 底部 Tab 栏 */
  .tabbar {
    flex: none; height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-nav); border-top: 1px solid var(--line);
    display: flex;
  }
  .tabbar .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 10px; color: var(--text-desc); position: relative; cursor: pointer;
  }
  .tabbar .tab svg { width: 26px; height: 26px; }
  .tabbar .tab.active { color: var(--wx-green); }
  .tabbar .tab .badge {
    position: absolute; top: 2px; left: 50%; margin-left: 2px;
  }

  /* 桌面专属元素在移动端隐藏 */
  .desktop-only { display: none !important; }
  /* 聊天页移动端 */
  .chat-header .nav-right { display: flex; }
}

@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}
