/* Sidra 微信：单一全局页面样式。无手机外壳、无页面级模糊、无旧层覆盖。 */
.wechat-app {
  --wechat-side: clamp(18px, 4.8vw, 28px);
  --wechat-line: rgba(203,203,203,.46);
  --wechat-card: rgba(255,255,255,.92);
  --wechat-muted: #98989e;
  --wechat-ink: #303035;
  --wechat-shadow: 0 7px 20px rgba(0,0,0,.055), 0 2px 5px rgba(0,0,0,.035);
  color: #202024;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  -webkit-tap-highlight-color: transparent;
}

.wechat-app [hidden] { display: none !important; }
.wechat-app button,
.wechat-app input { font: inherit; }
.wechat-app button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.wechat-app input {
  user-select: text;
  -webkit-user-select: text;
}
.wechat-app svg { display: block; fill: currentColor; }
.wechat-app .sidra-global-page-group {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.wechat-symbol-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 导航栏严格复用 Sidra 全局结构：关机图标 + 单一主标题 + 右侧图标。 */
.wechat-header.sidra-app-navbar {
  width: 100%;
  max-width: 760px;
  align-self: center;
  flex: 0 0 auto;
  padding-right: var(--wechat-side);
  padding-left: var(--wechat-side);
}
.wechat-nav-leading { max-width: calc(100% - 45px); }
.wechat-header-action { position: relative; }
.wechat-header-action svg { width: 16px; height: 16px; }
.wechat-action-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1.5px solid rgba(255,255,255,.96);
  border-radius: 50%;
  background: var(--logo-color);
  pointer-events: none;
}

/* 页面切换不再保留滑入旧层，点击 Dock 后直接切换当前内容。 */
.wechat-pages {
  position: relative;
  width: 100%;
  max-width: 760px;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  align-self: center;
  overflow: hidden;
}
.wechat-page {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}
.wechat-page-scroll {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--wechat-side) max(94px, calc(82px + env(safe-area-inset-bottom)));
}

/* 搜索栏与全局灰白输入体系一致。 */
.wechat-search-card {
  min-height: 48px;
  display: grid;
  grid-template-columns: 17px minmax(0,1fr) 26px;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 10px 0 14px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-search-card > svg {
  width: 16px;
  height: 16px;
  color: #9a9aa0;
}
.wechat-search-card input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--wechat-ink);
  background: transparent;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.wechat-search-card input::placeholder { color: #b0b0b5; }
.wechat-search-card input::-webkit-search-cancel-button { display: none; }
.wechat-search-clear {
  width: 26px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #b4b4b9;
}
.wechat-search-clear svg { width: 12px; height: 12px; }

/* 桌面同源头像；真实图片存在时彻底移除初始 Logo。 */
.wechat-avatar,
.wechat-profile-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: var(--logo-color);
  background: #fff center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(203,203,203,.24);
}
.wechat-avatar { width: 48px; height: 48px; }
.wechat-avatar.has-custom-image,
.wechat-profile-avatar.has-custom-image {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.wechat-avatar.has-custom-image > .avatar-user-icon,
.wechat-avatar.has-custom-image > .avatar-star,
.wechat-profile-avatar.has-custom-image > .avatar-user-icon,
.wechat-profile-avatar.has-custom-image > .avatar-star {
  display: none;
}

/* 消息 */
.wechat-message-list {
  display: block;
  overflow: hidden;
  margin: 0 0 16px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-message-row {
  position: relative;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-align: left;
}
.wechat-message-row:not(:last-child)::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 74px;
  height: .5px;
  background: var(--wechat-line);
  content: '';
}
.wechat-message-copy,
.wechat-contact-copy,
.wechat-post-author-copy,
.wechat-profile-copy,
.wechat-menu-copy { min-width: 0; }
.wechat-message-title-line,
.wechat-contact-name-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wechat-message-title-line strong,
.wechat-contact-name-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--wechat-ink);
  font-size: 14px;
  line-height: 19px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-pin {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--logo-color);
}
.wechat-pin svg { width: 7px; height: 7px; }
.wechat-message-preview {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--wechat-muted);
  font-size: 10px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-message-meta {
  min-width: 36px;
  display: grid;
  justify-items: end;
  align-self: stretch;
  align-content: space-between;
  padding: 2px 0;
}
.wechat-message-time { color: #a0a0a6; font-size: 9px; line-height: 13px; }
.wechat-unread {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 9px;
  color: #fff;
  background: var(--logo-color);
  font-size: 9px;
  font-style: normal;
}

/* 通讯录 */
.wechat-chip-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0 0 14px;
  padding: 0;
  scrollbar-width: none;
}
.wechat-chip-row::-webkit-scrollbar { display: none; }
.wechat-chip {
  min-width: 60px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0 12px !important;
  border: .5px solid rgba(203,203,203,.42) !important;
  border-radius: 10px;
  color: #85858b !important;
  background: rgba(255,255,255,.76) !important;
  font-size: 11px !important;
}
.wechat-chip.is-active {
  border-color: var(--logo-color) !important;
  color: #fff !important;
  background: var(--logo-color) !important;
}
.wechat-contact-groups { display: grid; gap: 14px; padding-right: 0; }
.wechat-contact-section {
  overflow: hidden;
  margin: 0;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-contact-section-title {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: .5px solid var(--wechat-line);
  color: var(--wechat-muted);
  font-size: 10px;
}
.wechat-contact-section-title strong { color: #727278; font-weight: 500; }
.wechat-contact-row {
  position: relative;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 40px;
  align-items: center;
  padding: 0 7px 0 10px;
}
.wechat-contact-row:not(:last-child)::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 65px;
  height: .5px;
  background: var(--wechat-line);
  content: '';
}
.wechat-contact-main {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  align-items: center;
  gap: 11px;
  padding: 8px 4px;
  text-align: left;
}
.wechat-contact-main .wechat-avatar { width: 44px; height: 44px; }
.wechat-contact-tag {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 6px;
  color: #85858b;
  background: rgba(203,203,203,.20);
  font-size: 8px;
  line-height: 12px;
}
.wechat-contact-copy p {
  overflow: hidden;
  margin: 3px 0 0;
  color: #a0a0a6;
  font-size: 10px;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-contact-call {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px !important;
  color: var(--logo-color) !important;
}
.wechat-contact-call svg { width: 15px; height: 15px; }
.wechat-alpha-rail {
  position: absolute;
  top: 154px;
  right: 4px;
  display: grid;
  gap: 4px;
  color: #9a9aa0;
  font-size: 7px;
  line-height: 1;
  pointer-events: none;
}

/* 发现 */
.wechat-discover-filter {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 14px;
  padding: 5px 7px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-discover-filter > button:not(.wechat-filter-add) {
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  color: #85858b;
  font-size: 11px;
}
.wechat-discover-filter > button.is-active:not(.wechat-filter-add) {
  color: #fff;
  background: var(--logo-color);
}
.wechat-filter-spacer { flex: 1 1 auto; }
.wechat-filter-add {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px !important;
  color: var(--logo-color) !important;
  background: rgba(203,203,203,.17) !important;
}
.wechat-filter-add svg { width: 13px; height: 13px; }
.wechat-feed { display: grid; gap: 12px; }
.wechat-post-card {
  margin: 0;
  padding: 14px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-post-head {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 28px;
  align-items: center;
  gap: 10px;
}
.wechat-post-head .wechat-avatar { width: 42px; height: 42px; }
.wechat-post-author-copy strong,
.wechat-post-author-copy time { display: block; }
.wechat-post-author-copy strong {
  overflow: hidden;
  color: var(--wechat-ink);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-post-author-copy time { margin-top: 2px; color: #a0a0a6; font-size: 9px; line-height: 13px; }
.wechat-post-menu {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #9a9aa0 !important;
}
.wechat-post-menu svg { width: 4px; height: 15px; }
.wechat-post-text {
  margin: 10px 0 11px 52px;
  color: #65656b;
  font-size: 12px;
  line-height: 1.58;
  white-space: pre-line;
}
.wechat-media-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
  margin-left: 52px;
}
.wechat-media-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: .5px solid rgba(203,203,203,.34) !important;
  border-radius: 11px;
  color: var(--logo-color) !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}
.wechat-media-tile svg { width: 22%; height: 22%; }
.wechat-post-actions {
  display: flex;
  gap: 18px;
  margin: 10px 0 0 52px;
}
.wechat-post-actions button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8e8e94;
  font-size: 10px;
}
.wechat-post-actions button[aria-pressed="true"] { color: var(--logo-color); }
.wechat-post-actions svg { width: 13px; height: 13px; }

/* 我 */
.wechat-profile-card {
  overflow: hidden;
  margin: 0 0 14px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-profile-hero {
  min-height: 106px;
  display: grid;
  grid-template-columns: 76px minmax(0,1fr) 35px;
  align-items: center;
  gap: 13px;
  padding: 14px;
}
.wechat-profile-avatar {
  width: 76px;
  height: 76px;
  padding: 0;
}
.wechat-profile-copy h2,
.wechat-profile-copy p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wechat-profile-copy h2 {
  margin: 0;
  color: var(--wechat-ink);
  font-size: 18px;
  line-height: 23px;
  font-weight: 600;
  letter-spacing: -.25px;
}
.wechat-profile-copy p { margin: 5px 0 0; color: #94949a; font-size: 10px; line-height: 15px; }
.wechat-profile-edit {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 9px !important;
  color: #8f8f95 !important;
  background: rgba(203,203,203,.14) !important;
}
.wechat-profile-edit svg { width: 13px; height: 13px; }
.wechat-profile-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border-top: .5px solid var(--wechat-line);
}
.wechat-profile-stats button { min-height: 54px; display: grid; place-content: center; gap: 2px; }
.wechat-profile-stats button + button { border-left: .5px solid var(--wechat-line); }
.wechat-profile-stats strong { color: #3d3d43; font-size: 16px; line-height: 20px; font-weight: 600; }
.wechat-profile-stats span { color: #96969c; font-size: 9px; }
.wechat-badge-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.wechat-badge-grid > button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr);
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 11px 13px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
  text-align: left;
}
.wechat-badge-grid > button > svg { width: 19px; height: 19px; color: var(--logo-color); }
.wechat-badge-grid strong,
.wechat-badge-grid small { display: block; }
.wechat-badge-grid strong { color: #3d3d43; font-size: 12px; line-height: 17px; font-weight: 500; }
.wechat-badge-grid small { margin-top: 2px; color: var(--wechat-muted); font-size: 8px; line-height: 12px; }
.wechat-memo-card {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-memo-card small,
.wechat-memo-card strong { display: block; }
.wechat-memo-card small { color: var(--wechat-muted); font-size: 9px; line-height: 13px; }
.wechat-memo-card strong { margin-top: 3px; color: #47474c; font-size: 12px; line-height: 17px; font-weight: 500; }
.wechat-memo-card > svg { width: 17px; height: 17px; color: var(--logo-color); }
.wechat-menu-card {
  overflow: hidden;
  margin: 0;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: var(--wechat-card);
  box-shadow: var(--wechat-shadow);
}
.wechat-menu-card > button {
  position: relative;
  width: 100%;
  min-height: 59px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 8px;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  text-align: left;
}
.wechat-menu-card > button:not(:last-child)::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 59px;
  height: .5px;
  background: var(--wechat-line);
  content: '';
}
.wechat-menu-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--logo-color);
}
.wechat-menu-icon svg { width: 15px; height: 15px; }
.wechat-menu-copy strong,
.wechat-menu-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wechat-menu-copy strong { color: #38383d; font-size: 13px; line-height: 18px; font-weight: 500; }
.wechat-menu-copy small { margin-top: 2px; color: var(--wechat-muted); font-size: 9px; line-height: 13px; }
.wechat-chevron {
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #b6b6bb;
  border-right: 1.5px solid #b6b6bb;
  transform: rotate(45deg);
}

/* 空态和图片占位均不再使用厚重彩色容器。 */
.wechat-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 24px;
  color: var(--wechat-muted);
  text-align: center;
}
.wechat-empty > svg { width: 38px; height: 38px; margin-bottom: 3px; color: var(--logo-color); }
.wechat-empty strong { color: #4b4b50; font-size: 14px; line-height: 19px; font-weight: 500; }
.wechat-empty span { font-size: 10px; line-height: 15px; }

/* 操作按钮 */
.wechat-fab {
  position: absolute;
  z-index: 8;
  right: max(var(--wechat-side), calc((100% - 760px) / 2 + var(--wechat-side)));
  bottom: max(80px, calc(68px + env(safe-area-inset-bottom)));
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px !important;
  color: #fff !important;
  background: var(--logo-color) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.35);
}
.wechat-fab svg { width: 16px; height: 16px; }
.wechat-dock {
  position: absolute;
  z-index: 7;
  right: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100% - (var(--wechat-side) * 2)), 704px);
  height: 60px;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  overflow: hidden;
  border: .5px solid rgba(203,203,203,.30);
  border-radius: 14px;
  background: rgba(255,255,255,.91);
  box-shadow: var(--wechat-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}
.wechat-dock button {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #96969c;
  font-size: 9px;
}
.wechat-dock button.is-active { color: var(--logo-color); }
.wechat-dock-icon {
  width: 23px;
  height: 21px;
  display: grid;
  place-items: center;
}
.wechat-dock-icon svg { width: 17px; height: 17px; }
.wechat-dock button[data-wechat-tab="messages"] .wechat-dock-icon svg { width: 18px; height: 18px; }
.wechat-dock button i {
  position: absolute;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
}
.wechat-dock button.is-active i { opacity: 1; }

.wechat-message-row:active,
.wechat-contact-main:active,
.wechat-contact-call:active,
.wechat-post-menu:active,
.wechat-post-actions button:active,
.wechat-profile-edit:active,
.wechat-profile-stats button:active,
.wechat-badge-grid > button:active,
.wechat-menu-card > button:active,
.wechat-media-tile:active,
.wechat-filter-add:active,
.wechat-fab:active,
.wechat-dock button:active { opacity: .58; }
.wechat-app button:focus-visible,
.wechat-app input:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(203,203,203,.30);
}

@media (min-width: 700px) {
  .wechat-app { --wechat-side: 28px; }
  .wechat-message-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wechat-message-row:nth-child(even)::after { display: none; }
  .wechat-profile-hero { grid-template-columns: 84px minmax(0,1fr) 38px; }
  .wechat-profile-avatar { width: 84px; height: 84px; }
}

@media (max-width: 380px) {
  .wechat-badge-grid { grid-template-columns: 1fr; }
  .wechat-post-text,
  .wechat-media-grid,
  .wechat-post-actions { margin-left: 0; }
}

@media (max-height: 650px) {
  .wechat-header.sidra-app-navbar { min-height: 48px; margin-bottom: 8px; padding-top: 8px; }
  .wechat-page-scroll { padding-bottom: max(82px, calc(70px + env(safe-area-inset-bottom))); }
  .wechat-dock { height: 54px; }
  .wechat-fab { bottom: max(72px, calc(60px + env(safe-area-inset-bottom))); width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-app *,
  .wechat-app *::before,
  .wechat-app *::after { scroll-behavior: auto !important; }
}
