/* ==================================================================
   社群人脉 · 新版首页 V2 样式（按客户效果图 1:1 复刻）
   所有展示型卡片/图片容器圆角统一 8px（--v2-r）；
   仅胶囊控件（搜索框、按钮、tabBar 图标）保留大圆角/圆形。
   class 全部 v2- 前缀，不污染旧版首页，便于整段回退。
   ================================================================== */
:root {
  --v2-r: 8px;
  --v2-bg: #f2f3f7;
  --v2-purple: #6b5bf5;
  --v2-blue: #3d6bff;
  --v2-text: #1b1f2a;
  --v2-sub: #8b91a5;
  --v2-radius-pill: 999px;
}

.v2-home {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #e9e8ff 0, #f2f3f7 220px) no-repeat,
    var(--v2-bg);
  padding-bottom: 6px;
}

/* ---------- 顶部品牌区 ---------- */
.v2-top { padding: 12px 14px 4px; }
.v2-brand { display: flex; align-items: center; gap: 7px; min-height: 44px; }
.v2-logo {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: var(--v2-r);
  background: linear-gradient(135deg, #7c6bff, #5a4bf0);
  color: #fff; font-size: 24px; font-weight: 800; font-style: italic;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(91, 75, 240, .22);
}
/* LOGO 图片（后台「网站配置」上传）：铺满方块并裁成方形，圆角继承父级 */
.v2-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--v2-r); display: block; }
.v2-brand-txt { flex: 1 1 auto; min-width: 0; }
.v2-brand-name { font-size: 19px; font-weight: 800; letter-spacing: .5px; line-height: 1.2; }
.v2-brand-sub { font-size: 10.5px; color: #8a90a6; line-height: 1.35; margin-top: 2px; white-space: nowrap; }
.v2-msg {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(31, 45, 92, .08);
}
.v2-publish {
  height: 34px; flex: 0 0 auto; padding: 0 13px;
  border-radius: var(--v2-radius-pill);
  background: linear-gradient(100deg, #6b5bf5, #7d6bff);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
  box-shadow: 0 4px 12px rgba(107, 91, 245, .28);
}
.v2-capsule {
  width: 74px; height: 30px; flex: 0 0 74px;
  border-radius: 18px; background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 0, 0, .06);
  display: flex; align-items: center; justify-content: space-evenly;
  color: #2b2f3a; font-size: 12px; font-weight: 700;
}
.v2-capsule i { width: 1px; height: 14px; background: rgba(0, 0, 0, .1); }
.v2-capsule span { line-height: 1; }
.v2-cap-o { width: 13px; height: 13px; border: 2px solid #2b2f3a; border-radius: 50%; position: relative; }
.v2-cap-o::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #2b2f3a; }

/* ---------- 搜索框 ---------- */
.v2-search {
  margin-top: 12px; height: 48px; padding: 0 5px 0 14px;
  background: #fff; border-radius: var(--v2-radius-pill);
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 2px 10px rgba(31, 45, 92, .05);
}
.v2-search-ic { display: flex; flex: 0 0 auto; }
.v2-search input {
  flex: 1 1 auto; min-width: 0; border: none; background: transparent;
  font-size: 13px; color: var(--v2-text); -webkit-appearance: none;
}
.v2-search input::-webkit-input-placeholder { color: #a3a9bb; }
.v2-search-btn {
  height: 36px; padding: 0 17px; flex: 0 0 auto;
  border-radius: var(--v2-radius-pill);
  background: linear-gradient(100deg, #6b5bf5, #7d6bff);
  color: #fff; font-size: 13px; font-weight: 700;
}

.v2-body { padding: 0 14px 16px; }

/* ---------- 3 帧轮播 banner ---------- */
.v2-banner {
  height: 176px; border-radius: var(--v2-r); margin-top: 12px;
  padding: 16px 16px 0; position: relative; overflow: hidden; color: #fff;
}
.v2-bn-blue { background: linear-gradient(120deg, #4b7bff, #748dff); }
.v2-bn-orange { background: linear-gradient(120deg, #fb983a, #fbb33d); }
.v2-bn-green { background: linear-gradient(120deg, #3cd59c, #63e1b1); }
.v2-banner::after {
  content: ''; position: absolute; width: 170px; height: 170px;
  right: -60px; top: -70px; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.v2-bn-tag {
  position: relative; z-index: 2; display: inline-block;
  padding: 3px 11px; font-size: 11px; border-radius: var(--v2-radius-pill);
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .3);
}
.v2-bn-count { position: absolute; right: 14px; top: 16px; font-size: 13px; opacity: .8; z-index: 2; }
.v2-bn-title { position: relative; z-index: 2; font-size: 27px; font-weight: 800; margin-top: 14px; letter-spacing: 1px; }
.v2-bn-sub { position: relative; z-index: 2; font-size: 13px; margin-top: 5px; opacity: .96; }
.v2-bn-btn {
  position: relative; z-index: 2; margin-top: 14px; height: 34px; padding: 0 18px;
  background: #fff; color: #2a2f3d; font-size: 13px; font-weight: 700;
  border-radius: var(--v2-radius-pill); box-shadow: 0 3px 8px rgba(0, 0, 0, .08);
}
.v2-bn-dots { position: absolute; bottom: 13px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.v2-bn-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); cursor: pointer; }
.v2-bn-dots i.on { background: #fff; }

/* ---------- 身份双入口（参考图箭头所指） ---------- */
.v2-role {
  margin-top: 12px; padding: 5px; border-radius: var(--v2-r);
  background: #e9eaf4; display: flex; gap: 5px;
}
.v2-role-cell {
  flex: 1 1 0; min-width: 0; padding: 9px 10px 10px;
  border-radius: var(--v2-r); cursor: pointer; text-align: center;
  transition: background .18s, box-shadow .18s;
}
.v2-role-cell.on { background: #fff; box-shadow: 0 2px 9px rgba(31, 45, 92, .09); }
.v2-role-t { font-size: 13.5px; font-weight: 700; color: #8d92a6; white-space: nowrap; }
.v2-role-cell.on .v2-role-t { color: #5b4bf0; }
.v2-role-s { font-size: 11px; color: #a2a7b7; margin-top: 3px; white-space: nowrap; }
.v2-role-cell.on .v2-role-s { color: #6b5bf5; }

/* ---------- 四宫格（两套） ---------- */
.v2-grid {
  margin-top: 12px; display: grid;
  grid-template-columns: 1fr 1fr; grid-template-rows: 76px 76px; gap: 8px;
}
.v2-grid a { position: relative; overflow: hidden; display: block; border-radius: var(--v2-r); color: #fff; padding: 12px; }
.v2-g-purple { background: linear-gradient(120deg, #7361ef, #8c6bf5); grid-row: span 2; padding: 16px 14px !important; }
.v2-g-purple2 { background: linear-gradient(120deg, #7465ef, #8e74f5); }
.v2-g-indigo { background: linear-gradient(120deg, #5f68f5, #7b6cf7); }
.v2-g-orange { background: linear-gradient(120deg, #f5873e, #fba13f); }
.v2-g-teal { background: linear-gradient(120deg, #16b39b, #26c9ae); }
.v2-g-title { position: relative; z-index: 2; font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.v2-g-title.sm { font-size: 15px; }
.v2-g-sub { position: relative; z-index: 2; font-size: 11.5px; margin-top: 6px; opacity: .92; line-height: 1.45; }
.v2-g-sub.sm { font-size: 10.5px; margin-top: 3px; }
.v2-g-ic {
  position: absolute; right: 12px; top: 52px; width: 48px; height: 48px;
  border-radius: 50%; background: rgba(255, 255, 255, .13);
  display: flex; align-items: center; justify-content: center;
}
.v2-g-ic.sm { width: 38px; height: 38px; right: 8px; top: 16px; }
.v2-g-foot { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 10px; }
.v2-g-btn {
  display: inline-block; background: #fff; color: #5b4bf0;
  font-size: 12px; font-weight: 700; padding: 7px 15px;
  border-radius: var(--v2-radius-pill);
}
.v2-g-note { font-size: 10.5px; line-height: 1.4; opacity: .92; }
/* 社群模块下架时，让右侧小卡占满整列（与左侧大卡等高） */
.v2-g-full { grid-row: span 2; }

/* ---------- 分类宫格（两套，雇主 10 / 人才 9） ---------- */
.v2-cats {
  margin-top: 10px; background: #fff; border-radius: var(--v2-r);
  padding: 14px 6px 16px; display: grid; grid-template-columns: repeat(5, 1fr);
  row-gap: 15px; column-gap: 2px;
}
.v2-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.v2-cat-ic {
  width: 46px; height: 46px; border-radius: var(--v2-r);
  display: flex; align-items: center; justify-content: center;
}
.v2-cat-n { font-size: 12px; color: #3b4050; white-space: nowrap; }

/* ---------- 找任务模块 ----------
   这一行没有卡片背景，内容容易直接顶到 .v2-body 的 14px 边界，
   视觉上比上方白卡更宽；这里再外收 10px + 内收 8px，
   使内容与分类卡片的图标区（约 34~379）大致对齐，窄屏也不挤压。 */
.v2-tasks { margin-top: 14px; }
.v2-tasks-head {
  display: flex; align-items: flex-start;
  margin: 0 10px; padding: 0 8px; min-width: 0;
}
.v2-tns {
  flex: 1 1 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 2px;
  padding: 0 2px 4px; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.v2-tns::-webkit-scrollbar { display: none; }
/* 六个模块快捷入口：点选只切下方列表，不跳页。
   选中态 = 紫色方块 + 白图标 + 蓝字 + 小横条；未选中全部置灰。 */
.v2-tn {
  display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0; padding: 0; border: 0; background: none; cursor: pointer;
  color: #9aa0b4; font-size: 10.5px; font-family: inherit; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.v2-tn-bx {
  width: 36px; height: 36px; border-radius: var(--v2-r);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, box-shadow .18s ease;
}
.v2-tn svg { flex: 0 0 auto; }
.v2-tn-t { line-height: 1.2; }
.v2-tn-bar { width: 14px; height: 3px; border-radius: 2px; background: transparent; }
.v2-tn.on { color: #3d6bff; font-weight: 800; }
.v2-tn.on .v2-tn-t { font-size: 12px; }
.v2-tn.on .v2-tn-bx {
  background: linear-gradient(135deg, #7361ef, #8a6bf6);
  box-shadow: 0 4px 10px rgba(115, 97, 239, .25);
}
.v2-tn.on .v2-tn-bar { background: #6b5bf5; }

/* 内联列表：加载中 / 空态 / 查看全部 */
.v2-list-tip {
  margin-top: 10px; background: #fff; border-radius: var(--v2-r);
  padding: 22px 14px; text-align: center; color: #9aa0b4; font-size: 12.5px;
}
.v2-list-tip a { color: #3d6bff; font-weight: 700; }
.v2-mod-more {
  display: block; margin-top: 10px; padding: 9px 0; text-align: center;
  color: #6b7280; font-size: 12px; background: rgba(255, 255, 255, .72);
  border-radius: var(--v2-r); text-decoration: none;
}
.v2-mod-more:hover { color: #3d6bff; }

.v2-task {
  margin-top: 10px; background: #fff; border-radius: var(--v2-r);
  padding: 14px 14px 15px;
}
.v2-tk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-tk-tag {
  background: #e9f1ff; color: #2f6bff; font-size: 11.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
}
.v2-tk-tag.gray { background: #eef1f8; color: #5f6b8c; }
.v2-tk-title { font-size: 16px; font-weight: 800; margin-top: 10px; color: #1b1f2a; }
.v2-tk-desc {
  font-size: 12.5px; color: #8b91a5; line-height: 1.7; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.v2-tk-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; font-size: 11px; color: #9aa0b4; }
.v2-tk-meta span { display: inline-flex; align-items: center; gap: 3px; }
.v2-tk-meta svg { flex: 0 0 auto; }
.v2-tk-r { flex-wrap: wrap; justify-content: flex-end; }
.v2-star { color: #f2a63b; font-style: normal; }
.v2-tk-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.v2-tk-price { color: #f0444a; font-size: 25px; font-weight: 800; line-height: 1; }
.v2-tk-price small { font-size: 15px; margin-right: 1px; }
.v2-tk-btn {
  height: 38px; padding: 0 22px; border-radius: var(--v2-radius-pill);
  background: linear-gradient(100deg, #3d6bff, #5b83ff);
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(61, 107, 255, .22);
}
/* 非「找任务」模块的紧凑卡（人脉 / 社群 / 资讯 / 工具）：按钮只是标签，不能真跳 */
.v2-sc .v2-tk-btn {
  display: inline-flex; align-items: center; height: 34px; padding: 0 18px; font-size: 13px;
}
.v2-sc .v2-tk-title { font-size: 15.5px; margin-top: 8px; }
.v2-sc .v2-tk-desc { -webkit-line-clamp: 2; }
.v2-sc-note { color: #8b91a5; font-size: 12.5px; }

/* ---------- 资讯内联卡：左文右图 ----------
   左栏标题 2 行 + 摘要 2 行 + 元信息，右栏 96×72 缩略图（垂直居中）。
   封面缺失时缩略图保留分类底色 + 分类首字，视觉上仍是「有图」的格子。 */
.v2-nw { display: flex; align-items: center; gap: 12px; }
.v2-nw-main { flex: 1 1 auto; min-width: 0; }
.v2-nw-title {
  font-size: 15.5px; font-weight: 800; color: #1b1f2a; line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v2-nw-desc {
  font-size: 12.5px; color: #8b91a5; line-height: 1.65; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v2-nw-meta {
  display: flex; align-items: center; gap: 5px; margin-top: 9px;
  font-size: 11px; color: #9aa0b4; white-space: nowrap; overflow: hidden;
}
.v2-nw-cat { font-weight: 700; }
.v2-nw-dot { color: #c9cedb; }
.v2-nw-src { overflow: hidden; text-overflow: ellipsis; }
.v2-nw-views { margin-left: auto; padding-left: 8px; flex: 0 0 auto; }
.v2-nw-thumb {
  position: relative; flex: 0 0 96px; width: 96px; height: 72px;
  border-radius: var(--v2-r); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.v2-nw-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.v2-nw-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .95); font-size: 26px; font-weight: 800;
  background-image: radial-gradient(circle at 74% 16%, rgba(255, 255, 255, .40), transparent 62%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

/* ---------- 人脉名片卡 ----------
   头像（行业色渐变圆 + 人形图标）+ 姓名 + 置顶标 + 公司·职位 + 标签 + 地区/浏览 + 看名片。
   卡片留白比通用卡松一点，靠虚线分隔和胶囊按钮做出「名片」的精致感。 */
.v2-pc { transition: box-shadow .16s ease, transform .16s ease; }
.v2-pc:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(40, 40, 80, .08); }
.v2-pc-top { display: flex; align-items: center; gap: 11px; }
.v2-pc-av {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(40, 40, 80, .14);
}
.v2-pc-av svg { display: block; }
.v2-pc-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-pc-name {
  font-size: 16px; font-weight: 800; color: #1b1f2a; line-height: 1.25;
  display: flex; align-items: center; gap: 6px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-pc-top-tag {
  flex: 0 0 auto; font-style: normal; font-size: 9.5px; font-weight: 700;
  color: #b8781f; background: linear-gradient(135deg, #fff2d6, #ffe6b8);
  border-radius: 4px; padding: 1px 5px; letter-spacing: .3px;
}
.v2-pc-sub {
  font-size: 12px; color: #8b91a5; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.v2-pc-tag {
  font-size: 11px; color: #5b6b8c; background: #f1f4fa;
  border-radius: 5px; padding: 2.5px 7px;
}
.v2-pc-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 11px; padding-top: 10px;
  border-top: 1px dashed #eef1f7;
}
.v2-pc-loc {
  display: inline-flex; align-items: center; gap: 3px; flex: 1 1 auto; min-width: 0;
  font-size: 11.5px; color: #9aa0b4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2-pc-loc svg { flex: 0 0 auto; }
.v2-pc-nums { flex: 0 0 auto; font-size: 11px; color: #b1b6c6; }
.v2-pc-btn {
  flex: 0 0 auto; height: 27px; padding: 0 13px; border-radius: var(--v2-radius-pill);
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; color: #3d6bff;
  background: #eef3ff; border: 1px solid #dde7ff;
}
.v2-pc:active .v2-pc-btn { background: #e2ebff; }

/* ---------- 微客工具宫格 ----------
   直接复用「生活工具」频道页的 .tool-card（图标块 / 名称 / 说明 / 去使用），
   这里只负责两列排列与阴影收一档，保证和上面的内容卡同一视觉重量。 */
.v2-tools {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px;
}
.v2-tools .tool-card { box-shadow: 0 2px 10px rgba(40, 40, 80, .05); }
/* 说明行数不同（1 行 / 2 行）时，把「去使用」压到卡片底部，同一排两个按钮才对得齐 */
.v2-tools .tool-card .tool-tag { margin-top: auto; }
.v2-tools .tool-card .tool-name { font-size: 14.5px; }
/* 说明固定 2 行：窄屏（320）下不写死会出现 3 行，同排两张卡高度就不一致了 */
.v2-tools .tool-card .tool-desc {
  font-size: 11px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v2-tools .tool-card .tool-tag { font-size: 10px; padding: 2px 7px; }

.v2-footnote { text-align: center; color: #b1b6c6; font-size: 10.5px; padding: 14px 0 4px; }

/* ---------- 5 项 tabBar ----------
   模块管理关掉某个频道时，对应 Tab 不渲染；这里用 flex:1 让剩下的 Tab
   自动等分铺满（原来是 grid 固定 5 列，少一项会在右边留空档）。 */
.tabbar.v2-tabbar { display: flex; }
.tabbar.v2-tabbar .v2-tab { flex: 1 1 0; min-width: 0; }
.v2-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8a90a6; font-size: 10.5px; }
.v2-tab-ic { display: flex; height: 23px; align-items: center; }
.v2-tab.on { color: #3d6bff; font-weight: 700; }

/* ---------- 占位页（功能开发中） ---------- */
.v2-coming { min-height: 100vh; background: var(--v2-bg); }
.v2-coming-nav {
  height: 50px; background: #fff; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; font-size: 15px; font-weight: 700;
}
.v2-coming-nav a { display: flex; }
.v2-coming-body { display: flex; flex-direction: column; align-items: center; padding: 64px 24px 0; text-align: center; }
.v2-coming-ic {
  width: 76px; height: 76px; border-radius: var(--v2-r);
  background: #ece9ff; display: flex; align-items: center; justify-content: center;
}
.v2-coming-t { font-size: 19px; font-weight: 800; margin-top: 20px; }
.v2-coming-s { font-size: 13px; color: var(--v2-sub); line-height: 1.8; margin-top: 10px; }
.v2-coming-btn {
  margin-top: 24px; height: 40px; line-height: 40px; padding: 0 28px;
  border-radius: var(--v2-radius-pill); background: var(--v2-purple);
  color: #fff; font-size: 14px; font-weight: 700;
}

/* ---------- 窄屏适配（<=375px） ---------- */
@media (max-width: 375px) {
  .v2-tasks-head { margin: 0 2px; padding: 0 4px; }
  .v2-tn-bx { width: 32px; height: 32px; }
  .v2-tn-bx svg { width: 19px; height: 19px; }
  .v2-tn { font-size: 9.5px; }
  .v2-tn.on .v2-tn-t { font-size: 11px; }
}

/* ---------- 窄屏适配（<=360px） ---------- */
@media (max-width: 360px) {
  .v2-brand-sub { font-size: 9.5px; }
  .v2-publish { padding: 0 9px; font-size: 12.5px; }
  .v2-capsule { width: 62px; flex-basis: 62px; }
  .v2-bn-title { font-size: 23px; }
  .v2-g-title { font-size: 16px; }
  .v2-g-title.sm { font-size: 13.5px; }
  .v2-role-t { font-size: 12px; }
  .v2-cat-n { font-size: 11px; }
  .v2-tk-meta { font-size: 10px; }
  .v2-tasks-head { margin: 0; padding: 0 2px; }
  .v2-tn { font-size: 9px; gap: 3px; }
  .v2-tn.on .v2-tn-t { font-size: 10.5px; }
  .v2-tn-bx svg { width: 18px; height: 18px; }
  /* 资讯卡：窄屏把缩略图收小一档，正文才不至于被挤成 6 个字一行 */
  .v2-nw { gap: 10px; }
  .v2-nw-thumb { flex: 0 0 80px; width: 80px; height: 60px; }
  .v2-nw-ph { font-size: 22px; }
}
