/* ==================================================================
   首页 v2 · 水感邀请榜（hm2- 独立命名空间，与其他页面隔离）
   全部用切好的 PNG 作 background-image，不手写渐变拟合卡片水纹。
   --u 复刻设计稿自适应：min(100vw,430px)/26.875
   ================================================================== */
.hm2-page {
  /* 全屏背景：自带顶部"马上润·发现项目"与水花，锁定整屏不形变 */
  background: #7cd8ee url('/assets/bg_home_main.jpg') center top / 100% 100% no-repeat !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
.page-content.hm2-content {
  --u: calc(min(100vw, 430px) / 26.875);
  position: relative;
  min-height: 100%;
  padding: 0 calc(1.05 * var(--u)) 0 !important;
  box-sizing: border-box;
  /* 关键2：底部 TabBar 遮挡 —— 滑到底合规声明完整露出 */
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
}

/* 关键1：顶部安全区 —— 避开背景自带标题/水滴铃铛，状态栏不撞头。
   24px 是纯浅蓝水花区起点，保证电池/WiFi 图标落在该区，绝不压字 */
.hm2-topspace {
  height: calc(max(env(safe-area-inset-top, 0px), 24px) + 5.1 * var(--u));
  pointer-events: none;
}

/* 搜索框：轻量半透明。关键4：不用 backdrop-blur（千元机卡顿），
   纯半透明白近似毛玻璃，帧率拉满 */
.hm2-search {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: calc(.5 * var(--u));
  height: calc(2.45 * var(--u));
  padding: 0 calc(.8 * var(--u));
  border-radius: calc(1.25 * var(--u));
  background: rgba(255, 255, 255, .65);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 2px 8px rgba(20, 90, 120, .12);
  margin-bottom: calc(.7 * var(--u));
}
.hm2-search-ico { width: calc(1.1 * var(--u)); height: calc(1.1 * var(--u)); color: rgba(12, 74, 100, .65); flex: none; }
.hm2-search input {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: 0; outline: none;
  font-size: calc(.9 * var(--u)); color: #083344;
}
.hm2-search input::placeholder { color: rgba(12, 74, 100, .5); }
.hm2-search-clear {
  width: calc(1.2 * var(--u)); height: calc(1.2 * var(--u)); flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(120, 180, 200, .18); color: rgba(12, 74, 100, .6);
}
.hm2-search-clear svg { width: calc(.85 * var(--u)); height: calc(.85 * var(--u)); }

/* 分类胶囊栏 */
.hm2-filters {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: calc(.5 * var(--u));
  margin-bottom: calc(.8 * var(--u));
  overflow-x: auto; scrollbar-width: none;
}
.hm2-filters::-webkit-scrollbar { display: none; }
.hm2-filter {
  flex: none;
  height: calc(1.85 * var(--u));
  padding: 0 calc(.95 * var(--u));
  border-radius: calc(1 * var(--u));
  font-size: calc(.78 * var(--u)); font-weight: 600;
  color: #0c4a64;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: 0 1px 4px rgba(20, 90, 120, .1);
}
.hm2-filter.active {
  color: #fff;
  background: linear-gradient(180deg, #5fd4e8 0%, #2aa8cf 100%);
  border-color: rgba(255, 255, 255, .7);
  box-shadow: 0 3px 8px rgba(20, 140, 180, .35), inset 0 1px 2px rgba(255, 255, 255, .6);
}

/* 核心卡片：邀请冲榜（底图自带奖杯+金水边），高度定死防变形 */
.hm2-leaderboard {
  position: relative; z-index: 2;
  height: calc(6.35 * var(--u));
  border-radius: calc(1.1 * var(--u));
  background: url('/assets/card_leaderboard.png') center center / 100% 100% no-repeat;
  box-shadow: 0 6px 18px rgba(12, 90, 130, .22);
  overflow: hidden;
  margin-bottom: calc(.8 * var(--u));
  display: flex; align-items: center;
  padding: 0 calc(.6 * var(--u));
  box-sizing: border-box;
}
/* 左侧标题：pl 避开底图左边的金杯 */
.hm2-lb-title {
  position: relative; z-index: 2;
  padding-left: calc(5.1 * var(--u));
  display: flex; flex-direction: column; justify-content: center;
  flex: 0 0 auto;
}
.hm2-lb-name {
  font-size: calc(1.02 * var(--u)); font-weight: 800; line-height: 1.1;
  background: linear-gradient(180deg, #b8860b, #8a5a00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hm2-lb-sub {
  font-size: calc(.6 * var(--u)); font-weight: 700; letter-spacing: .1em;
  color: rgba(138, 90, 0, .8); transform: scale(.9); transform-origin: left center;
}
/* 中间 Top3 领奖台 */
.hm2-podium {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; gap: calc(.35 * var(--u));
  margin-left: auto; margin-right: calc(.4 * var(--u));
}
.hm2-podium-cell { display: flex; flex-direction: column; align-items: center; width: calc(2.35 * var(--u)); }
.hm2-p1 { transform: translateY(calc(-.25 * var(--u))); }
.hm2-avatar {
  width: calc(1.75 * var(--u)); height: calc(1.75 * var(--u));
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eaf7ff, #a9d6ee 70%, #6fb6d6);
  border: 2px solid #d9e6ef;
  box-shadow: 0 2px 6px rgba(0, 50, 80, .2);
}
.hm2-p1 .hm2-avatar { width: calc(2 * var(--u)); height: calc(2 * var(--u)); border-color: #ffd98a; box-shadow: 0 3px 8px rgba(180, 120, 0, .35); }
.hm2-p3 .hm2-avatar { border-color: #d99b6a; }
.hm2-pod-name { font-size: calc(.55 * var(--u)); color: #0c4a64; line-height: 1.2; margin-top: calc(.1 * var(--u)); white-space: nowrap; }
.hm2-pod-count {
  font-size: calc(.55 * var(--u)); font-weight: 700; color: #7a4a00;
  background: rgba(255, 236, 190, .9); border-radius: calc(.3 * var(--u));
  padding: 0 calc(.2 * var(--u)); line-height: 1.3;
}
.hm2-p1 .hm2-pod-count { background: rgba(255, 214, 130, .95); color: #5a3600; }
/* 右侧去冲榜按钮 */
.hm2-lb-btn {
  position: relative; z-index: 2; flex: 0 0 auto;
  height: calc(1.55 * var(--u)); padding: 0 calc(.55 * var(--u));
  border-radius: calc(.8 * var(--u));
  background: linear-gradient(180deg, #ffd97a, #f0a93a);
  border: 1px solid rgba(255, 245, 210, .9);
  color: #fff; font-size: calc(.7 * var(--u)); font-weight: 800;
  text-shadow: 0 1px 2px rgba(150, 90, 0, .5);
  box-shadow: 0 3px 8px rgba(180, 110, 0, .35), inset 0 1px 2px rgba(255, 255, 255, .6);
  display: inline-flex; align-items: center; gap: calc(.1 * var(--u));
}
.hm2-lb-btn span { font-size: calc(.6 * var(--u)); }

/* 项目列表 */
.hm2-list {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: calc(.65 * var(--u));
}
/* 关键3：项目卡片高度定死 + overflow-hidden + 名称单行截断，防止长名撑高变形。
   直接用 PNG 底图，不手写渐变拟合水纹 */
.hm2-project {
  position: relative;
  height: calc(6.2 * var(--u));
  border-radius: calc(1.1 * var(--u));
  background: url('/assets/card_project_item.png') center center / 100% 100% no-repeat;
  box-shadow: 0 5px 14px rgba(12, 90, 130, .18);
  overflow: hidden;
  display: flex; align-items: center;
  padding: 0 calc(.7 * var(--u));
  gap: calc(.55 * var(--u));
  box-sizing: border-box;
  cursor: pointer;
}
.hm2-project:active { transform: scale(.99); }
/* 金牌角标 */
.hm2-proj-badge {
  width: calc(2.5 * var(--u)); height: calc(2.5 * var(--u));
  flex: none; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 40, 70, .25));
}
/* 项目图标 */
.hm2-proj-icon {
  width: calc(3.85 * var(--u)); height: calc(3.85 * var(--u));
  flex: none; border-radius: calc(.75 * var(--u));
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(10, 60, 90, .22);
}
/* 项目信息 */
.hm2-proj-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.hm2-proj-name {
  font-size: calc(1.05 * var(--u)); font-weight: 800; color: #082f42;
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 热度标签：微透明暖橙 */
.hm2-heat {
  display: inline-flex; align-items: center; gap: calc(.15 * var(--u));
  align-self: flex-start;
  height: calc(1.15 * var(--u)); padding: 0 calc(.4 * var(--u));
  margin-top: calc(.2 * var(--u));
  border-radius: calc(.6 * var(--u));
  background: rgba(245, 158, 11, .15);
  border: 1px solid rgba(245, 158, 11, .22);
  color: #d97706;
  font-size: calc(.62 * var(--u)); font-weight: 700;
  white-space: nowrap;
}
.hm2-heat svg { width: calc(.7 * var(--u)); height: calc(.7 * var(--u)); }
/* 右箭头 */
.hm2-proj-arrow {
  width: calc(1.5 * var(--u)); height: calc(1.5 * var(--u));
  flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .75);
  color: #0c6a8a;
  box-shadow: 0 1px 4px rgba(20, 90, 120, .15);
}
.hm2-proj-arrow svg { width: calc(.9 * var(--u)); height: calc(.9 * var(--u)); }

/* 底部合规声明 */
.hm2-disclaimer {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: calc(.5 * var(--u));
  margin-top: calc(.9 * var(--u));
  padding: calc(.7 * var(--u)) calc(.8 * var(--u));
  border-radius: calc(.8 * var(--u));
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .72);
}
.hm2-shield { width: calc(1.2 * var(--u)); height: calc(1.2 * var(--u)); color: #0a8bab; flex: none; margin-top: calc(.1 * var(--u)); }
.hm2-disclaimer-text { display: flex; flex-direction: column; gap: calc(.15 * var(--u)); min-width: 0; }
.hm2-disclaimer-text b { font-size: calc(.72 * var(--u)); color: #0c4a64; }
.hm2-disclaimer-text span { font-size: calc(.62 * var(--u)); color: rgba(12, 74, 100, .75); line-height: 1.45; }

/* 非前三名角标占位（数字） */
.hm2-proj-badge-n {
  display: grid; place-items: center;
  font-size: calc(.95 * var(--u)); font-weight: 800; color: #0c6a8a;
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
}

/* ==================================================================
   v3 · 硬性契约锁死（用户逐条要求，全部 !important）
   单层卡片：水枕 PNG 即唯一容器，禁止任何外层背景壳。
   高度/宽度/背景/内部布局/图标尺寸/文字全部最高优先级锁定。
   ================================================================== */
/* 1. 彻底删除任何外层壳：仅列表容器本身（不碰项目卡本体、不碰搜索/分类/声明） */
.hm2-list {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}
/* 2. 项目卡：单层、90px、100%宽、PNG 铺满 */
.hm2-project {
  height: 90px !important;
  width: 100% !important;
  background: url('/assets/card_project_item.png') no-repeat center / 100% 100% !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* 冲榜卡：单层、96px、100%宽、PNG 铺满 */
.hm2-leaderboard {
  height: 96px !important;
  width: 100% !important;
  background: url('/assets/card_leaderboard.png') no-repeat center / 100% 100% !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* 3. 内部元素：左侧图标组 flex 整体居中，不绝对定位 */
.hm2-proj-left { flex: 0 0 auto !important; display: flex !important; align-items: center !important; gap: 8px !important; }
.hm2-project .hm2-proj-badge,
.hm2-project .hm2-proj-icon {
  flex: 0 0 auto !important;
  align-self: center !important;
  object-fit: contain !important;
}
.hm2-proj-badge { width: 36px !important; height: 36px !important; }
.hm2-proj-icon {
  width: 56px !important; height: 56px !important;
  border-radius: 16px !important;
  object-fit: cover !important;
}
/* 文字：16px 加粗 deep sky #082f49，禁止发灰 */
.hm2-proj-name {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #082f49 !important;
  -webkit-text-fill-color: #082f49 !important;
  opacity: 1 !important;
}
.hm2-heat {
  margin-top: 4px !important;
  align-self: flex-start !important;
}
/* 右侧箭头单独右对齐、垂直居中 */
.hm2-proj-arrow {
  margin-left: auto !important;
  align-self: center !important;
  flex: 0 0 auto !important;
}

/* ==================================================================
   v4 · 全部固定 px 写死（禁用 --u 动态单位，杜绝真机 WebView 缩放差异）
   ================================================================== */
/* 项目卡：96px 写死，单层水枕，铺满宽 */
.hm2-project,
.project-card {
  height: 96px !important;
  width: 100% !important;
  padding: 0 16px !important;
  background: url('/assets/card_project_item.png') no-repeat center / 100% 100% !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* 冲榜卡：96px 写死 */
.hm2-leaderboard,
.rank-card {
  height: 96px !important;
  width: 100% !important;
  padding: 0 16px !important;
  background: url('/assets/card_leaderboard.png') no-repeat center / 100% 100% !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* 左侧图标组：奖牌 + 项目图标，水平排列垂直居中，gap 8px */
.hm2-proj-left {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
/* 奖牌 32x32 */
.hm2-proj-badge {
  width: 32px !important; height: 32px !important;
  flex: 0 0 32px !important;
  align-self: center !important;
  object-fit: contain !important;
}
/* 项目图标 56x56 圆角16，垂直居中不穿模（96-56=40，上下各20px留白） */
.hm2-proj-icon {
  width: 56px !important; height: 56px !important;
  flex: 0 0 56px !important;
  border-radius: 16px !important;
  align-self: center !important;
  object-fit: cover !important;
}
/* 文字 flex-col 靠左 */
.hm2-proj-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
}
.hm2-proj-name {
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #082f49 !important;
  -webkit-text-fill-color: #082f49 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
.hm2-heat {
  margin-top: 4px !important;
  align-self: flex-start !important;
  font-size: 12px !important;
}
/* 右箭头右对齐垂直居中 */
.hm2-proj-arrow {
  margin-left: auto !important;
  align-self: center !important;
  flex: 0 0 auto !important;
}
