/* ===== 共享站点外壳：顶部应用栏 + 全局菜单 ===== */
/* 由 common.js 在 body 上注入类名 has-appbar，为顶部栏预留空间，避免遮挡页面内容 */

.wb-appbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  z-index: 9998;
}
.wb-appbar__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #2d2a26;
  text-decoration: none;
  white-space: nowrap;
}
.wb-appbar__brand .logo {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg,#ff8a5b,#ff5e7e);
  color: #fff; font-size: 15px;
  box-shadow: 0 2px 8px rgba(255,94,126,0.35);
}
.wb-appbar__spacer { flex: 1; }
.wb-appbar__btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px;
  border: none; border-radius: 9px;
  background: rgba(0,0,0,0.04);
  color: #2d2a26; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.wb-appbar__btn:active { background: rgba(0,0,0,0.1); }
.wb-appbar__btn .ic { font-size: 1rem; line-height: 1; }

/* 全局菜单抽屉 */
.wb-menu-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s;
  z-index: 9999;
}
.wb-menu-mask.open { opacity: 1; visibility: visible; }
.wb-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 82vw;
  background: #fff;
  box-shadow: -8px 0 30px rgba(0,0,0,0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  z-index: 10000;
  display: flex; flex-direction: column;
}
.wb-menu.open { transform: translateX(0); }
.wb-menu__head {
  padding: 18px 18px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.wb-menu__title { font-weight: 700; font-size: 1rem; color: #2d2a26; }
.wb-menu__close {
  border: none; background: rgba(0,0,0,0.05); color: #666;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.wb-menu__list { overflow-y: auto; padding: 8px 10px 20px; flex: 1; }
.wb-menu__item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 12px; border-radius: 11px;
  color: #2d2a26; text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: background 0.18s;
}
.wb-menu__item:active, .wb-menu__item:hover { background: #f6f6f6; }
.wb-menu__item .mi-ic {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 1.1rem;
  background: #f1f0ee;
}
.wb-menu__item .mi-desc {
  display: block; font-size: 0.7rem; color: #9a9088; font-weight: 400; margin-top: 2px;
}
.wb-menu__cat {
  font-size: 0.68rem; color: #b3a89e; font-weight: 700; letter-spacing: 0.05em;
  padding: 14px 12px 4px;
}
.wb-menu__foot {
  padding: 12px 18px; border-top: 1px solid #eee;
  font-size: 0.7rem; color: #b3a89e; text-align: center;
}

/* 回到顶部的小提示，避免与首页按钮冲突：首页不需要浮动按钮（已有顶栏） */

/* 为顶部栏预留空间（仅在 mobile 优先，桌面端页面本身多为居中卡片，加 padding-top 安全） */
body.has-appbar { padding-top: 52px; }
/* 若页面本身用 flex 居中且占满高度，则把预留改为内边距而非外扩 */
body.has-appbar[style*="overflow:hidden"],
body.has-appbar.overflow-hidden { padding-top: 0; }

/* 全屏/画布类页面：顶部栏浮于内容之上，不加 padding，但保证栏本身背景不透明 */
body.has-appbar.no-appbar-pad { padding-top: 0; }
body.has-appbar.no-appbar-pad .wb-appbar { background: rgba(255,255,255,0.92); }

@media (max-width: 640px) {
  .wb-appbar { height: 50px; }
}
