[hidden],
.hidden {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  touch-action: manipulation;
  font-family: "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

.common-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  font: inherit;
}

/* ---- 带返回按钮的页面顶栏（以 scene 页为标准） ---- */
.sg-page-header {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  margin-bottom: 1.25rem;
}

.sg-page-header--end-auto {
  grid-template-columns: 2.75rem 1fr auto;
}

.sg-back-btn {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sg-back-btn img {
  display: block;
  width: 70%;
  height: auto;
}

.sg-header-title-img {
  display: block;
  width: min(28.6vw, 267px);
  height: auto;
  margin: 0 auto;
}

/* ---- 非微信环境提示 ---- */
.sg-wechat-only {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #d9ecff 0%, #b8d9ff 100%);
}

.sg-wechat-only__panel {
  width: 100%;
  max-width: 20rem;
  padding: 2rem 1.5rem;
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.94);
  text-align: center;
  box-shadow: 0 16px 40px rgb(18 58 122 / 0.12);
}

.sg-wechat-only__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #123a7a;
}

.sg-wechat-only__sub {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
}

body.sg-wechat-blocked .home-swiper,
body.sg-wechat-blocked .home-profile-btn,
body.sg-wechat-blocked .home-find-btn-wrap,
body.sg-wechat-blocked .scene-shell,
body.sg-wechat-blocked .sign-shell,
body.sg-wechat-blocked .profile-shell {
  visibility: hidden;
  pointer-events: none;
}

/* ---- 通用头像 ---- */
.sg-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sg-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-avatar__fallback {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1d4ed8;
}
