/* ============================================================
   X 互关平台 · 浅色主题 + 左右两栏
   ============================================================ */

:root {
  /* ---- 色板（约定：蓝=外链CTA / 黑=内部状态 / 绿=完成 / ghost=次要）---- */
  --bg: #f7f9fa;
  --card: #ffffff;
  --border: #eff3f4;
  --text: #0f1419;
  --muted: #536471;
  --blue: #1d9bf0;
  --blue-dark: #1a8cd8;
  --blue-soft: rgba(29, 155, 240, 0.1);
  --success: #00a268;
  --success-soft: rgba(0, 186, 124, 0.1);
  --danger: #f4212e;
  --gold: #e68a00;            /* 悬赏金额主色（橙金，与蓝 CTA 区分）*/
  --pledge-soft: rgba(230, 138, 0, 0.12);

  /* ---- 间距（剔除 14/18/28 奇值，padding 节奏归律）---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-14: 56px;

  /* ---- 字重（封顶 700：800 在 PingFang SC 最高 600/YaHei 最高 700 会合成坍塌）---- */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---- 字号阶梯（CJK 友好，11px 已低于中文舒适下限统一并入 12）---- */
  --fs-xs: 12px;    /* caption / tag / report / placeholder 色 */
  --fs-sm: 13px;    /* meta / handle / count */
  --fs-md: 15px;    /* body 基准 */
  --fs-lg: 18px;    /* section 标题 */
  --fs-xl: 22px;    /* panel / stat 标题 */
  --fs-2xl: 24px;   /* page / main 标题 */
  --fs-stat: 26px;  /* 积分大数字 */

  /* ---- 圆角 ---- */
  --radius: 14px;
  --radius-card: 14px; /* 卡片级，给 .my-pending 兜底（原引用未定义导致方角）*/
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1480px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* 防止 display:flex 等显式规则覆盖 hidden 属性 */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-left: 240px; /* 给左侧边栏让位 */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
img { display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 700; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.15s, opacity 0.15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--block { width: 100%; }

/* ---------- 左侧导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; z-index: 50;
  width: 240px; height: 100vh;
  background: rgba(255, 255, 255, 0.96); /* 提高不透明度，增强深色壁纸下文字对比稳定性 */
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.nav__inner {
  display: flex; flex-direction: column; gap: 16px;
  height: 100%; padding: 20px 14px 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: var(--fw-bold); font-size: 20px; color: var(--text);
  margin-right: 0; padding: 4px 10px;
}
.logo__icon { width: 24px; height: 24px; color: var(--text); flex-shrink: 0; }
.nav__tabs { display: flex; flex-direction: column; gap: 2px; }
.nav__tab {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--muted);
  text-align: left;
  transition: color 0.15s, background 0.15s;
}
.nav__icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav__tab-text { white-space: nowrap; }
.nav__tab:hover { color: var(--text); background: rgba(15, 20, 25, 0.06); }
.nav__tab.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
/* user 区容器化：避免沉底时孤立无依 */
.nav__user { min-width: 0; margin-top: auto; padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; }
.nav__points { font-size: 15px; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* 登录后导航用户区：头像 + 用户名（点击跳「我的」） */
.nav__me {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px;
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  cursor: pointer; text-align: left; font: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.nav__me:hover { background: rgba(29,155,240,0.06); border-color: var(--border); }
.nav__me-info { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.nav__me-name {
  font-size: 14px; font-weight: 700; color: var(--text); max-width: 150px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav__me-meta {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav__me .card__avatar, .nav__me .card__avatar-img {
  width: 36px; height: 36px; font-size: 15px; flex: none;
}
.nav__login {
  display: inline-block;
  font-size: 15px; font-weight: 700; color: #fff;
  padding: 9px 18px; border-radius: var(--radius-pill); background: var(--blue);
  transition: background 0.15s; white-space: nowrap;
}
.nav__login:hover { background: var(--blue-dark); }

/* ---------- 名单布局（表单移除后单栏，认领后自动上墙）---------- */
.layout { display: block; }
.main { min-width: 0; }

/* ---------- 左栏面板 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.panel__title { font-size: 20px; font-weight: var(--fw-bold); }
.panel__sub { font-size: 14px; color: var(--muted); margin-top: 6px; margin-bottom: 18px; }
.addform { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
  padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 15px; font-weight: 400;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.field input::placeholder { color: #99a4ad; }
.panel__hint { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.panel__hint code { color: var(--blue); }

/* ---------- 右栏 ---------- */
.main__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.main__head-left { min-width: 0; flex: 1 1 260px; }
.main__title { font-size: 24px; font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.main__sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.search {
  flex: 0 0 auto; width: 280px; max-width: 100%;
  padding: 10px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search::placeholder { color: #99a4ad; }

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
}
.grid__loading, .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  animation: pop 0.3s var(--ease) backwards;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }

.card__avatar, .card__avatar-img {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: var(--fw-bold); color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  margin-bottom: 4px; object-fit: cover;
}
.card__name {
  font-size: 15px; font-weight: 700; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__handle { font-size: 13px; color: var(--muted); }
.card__follow {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 700;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.card__follow:hover { transform: translateY(-1px); background: var(--blue-dark); }

@keyframes pop {
  0% { opacity: 0; transform: scale(0.96) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- 已关注分组（可折叠） ---------- */
.followed-group { margin-top: 22px; }
.followed-group__head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--card); color: var(--muted);
  font-size: 14px; transition: background 0.15s, color 0.15s;
}
.followed-group__head:hover { background: var(--bg); color: var(--text); }
.followed-group__arrow { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s var(--ease); }
.followed-group:not(.is-collapsed) .followed-group__arrow { transform: rotate(90deg); }
.followed-group__count { font-size: 13px; font-weight: 600; color: var(--muted); }
.followed-group.is-collapsed .followed-group__body { display: none; }

/* 卡片"标记已关注"按钮（未关注=灰描边，已关注=绿色） */
.card__mark {
  margin-top: 4px; padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: transparent; border: 1px solid var(--border); transition: all 0.15s;
}
.card__mark:hover { color: var(--text); border-color: #d6dcdf; }
.card__mark.is-on { color: #00a268; border-color: rgba(0, 186, 124, 0.4); background: rgba(0, 186, 124, 0.08); }

/* 已关注卡片：弱化背景而非全局透明度，保留文字/头像可读性 */
.card.is-followed { background: var(--bg); border-color: var(--border); }
.card.is-followed .card__follow { opacity: 0.55; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 24px 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.footer__copy { color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: #fff; padding: 11px 18px; border-radius: var(--radius-pill);
  font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { background: var(--danger); }

/* ---------- 响应式 ---------- */
/* 网格列数自适应（名单一排 8 个起，逐级收敛）：
   >1280 单栏+8列 · 1100-1280 6列 · 880-1100 5列 · 640-880 4列 · ≤640 2列 */
@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 880px) {
  /* 小屏：顶部只留 logo + 登录/认领，tabs 下沉到底部 fixed tab bar（触摸目标 ≥44px）*/
  .nav {
    position: sticky; top: 0; left: auto;
    width: 100%; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top);
  }
  .nav__inner { flex-direction: row; align-items: center; gap: 10px; height: 56px; padding: 0 16px; }
  .logo { font-size: var(--fs-lg); padding: 0; margin-right: auto; gap: 8px; }
  .logo__icon { width: 20px; height: 20px; }
  /* 底部 fixed tab bar */
  .nav__tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    flex-direction: row; gap: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
  }
  .nav__tab {
    flex: 1; flex-direction: column; justify-content: center; gap: 2px;
    padding: 6px 0; min-height: 44px; border-radius: 0;
    font-size: var(--fs-xs);
  }
  .nav__icon { width: 22px; height: 22px; }
  /* user 区：login 实心 + claim ghost 横排 */
  .nav__user { margin-top: 0; padding: 0; background: transparent; border: none; display: flex; gap: 6px; align-items: center; }
  .nav__points, .nav__login { font-size: var(--fs-sm); }
  .nav__login { padding: 7px 14px; }
  .nav__me { padding: 2px; gap: 7px; }
  .nav__me .card__avatar, .nav__me .card__avatar-img { width: 30px; height: 30px; font-size: 12px; }
  .nav__me-name { max-width: 90px; }
  .nav__me-meta { display: none; }
  body { padding-left: 0; padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .main__head { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 14px; }
  .card__avatar, .card__avatar-img { width: 56px; height: 56px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   v2 (P0)：视图切换 / 任务 / 认领 / 我的
   ============================================================ */

/* ---------- 视图 ---------- */
.view { display: none; padding: 28px 32px 56px; }
.view.is-active { display: block; }
/* 取消 list 视图的 padding 特例，让所有视图内外边距一致，切换时不跳动 */

/* ---------- 页头 ---------- */
.page-head { margin-bottom: 20px; }
.page-title { font-size: 24px; font-weight: var(--fw-bold); letter-spacing: -0.01em; }
.page-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
/* main__count 改为 chip，和标题文字有清晰分隔；空值时不占位 */
.main__count {
  display: inline-flex; align-items: center;
  margin-left: 8px; padding: 2px 10px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  background: var(--blue-soft); border-radius: 999px;
  vertical-align: middle;
}
.main__count:empty { display: none; }

/* ---------- 进度条 ---------- */
.progress { margin-bottom: 20px; }
.progress__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.progress__text { font-size: 14px; font-weight: 700; color: var(--text); }
.progress__tip { font-size: 12px; color: var(--muted); }
.progress__track { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress__bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  transition: width 0.5s var(--ease);
}

/* ---------- 任务网格 / 卡片 ---------- */
.grid--tasks { grid-template-columns: repeat(3, 1fr); }
.task-card { padding: 20px; }
.task-card.is-done { opacity: 0.6; }
.task-done {
  margin-top: 8px; padding: 8px 18px; border-radius: var(--radius-pill);
  background: var(--text); color: #fff; font-size: 13px; font-weight: 700;
  transition: transform 0.15s, opacity 0.15s;
}
.task-done:hover:not(:disabled) { transform: translateY(-1px); opacity: 0.9; }
.task-done:disabled { cursor: default; }
.task-done.is-done { background: var(--success); }
.task-done.is-waiting { background: var(--muted); opacity: 0.75; }
.task-done.is-invalid { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--muted); }

/* ---------- 我的页 · 身份+进度卡（深度重构）---------- */
.me-card { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.me-card__head { display: flex; align-items: center; gap: 14px; }
.me-card__avatar .card__avatar,
.me-card__avatar .card__avatar-img { width: 64px; height: 64px; font-size: 26px; flex: none; }
.me-card__id { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.me-card__name { font-size: 19px; font-weight: var(--fw-bold); }
.me-card__level {
  display: inline-flex; align-self: flex-start; padding: 2px 10px;
  border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700;
  color: var(--blue); background: var(--blue-soft);
}
.me-card__followers { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); color: var(--muted); align-self: flex-start; }
.me-card__followers-num { color: var(--text); font-weight: 700; }
.me-card__refresh {
  margin-left: 6px; padding: 2px 10px; border: none; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; color: var(--blue); background: var(--blue-soft);
  cursor: pointer; transition: opacity 0.15s;
}
.me-card__refresh:hover:not(:disabled) { opacity: 0.75; }
.me-card__refresh:disabled { color: var(--muted); background: transparent; cursor: not-allowed; }
.me-card__points { margin-left: auto; text-align: right; display: flex; flex-direction: column; line-height: 1.1; }
.me-card__points strong { font-size: 28px; font-weight: var(--fw-bold); color: var(--blue); }
.me-card__points span { font-size: var(--fs-xs); color: var(--muted); }
/* 进度条（等级蓝 / 任务绿，复用 .progress__track/.progress__bar） */
.me-progress { display: flex; flex-direction: column; gap: 7px; }
.me-progress__label { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.me-progress__label span:last-child { color: var(--text); font-weight: 700; }
.progress__bar--task { background: linear-gradient(90deg, var(--success), #00c47a); }
/* 登出弱化为文字链接，避免与主操作并列误触 */
.me-card__logout { align-self: center; padding: 4px 14px; font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; transition: color 0.15s; }
.me-card__logout:hover { color: var(--danger); }
.stat { font-size: 14px; color: var(--muted); }
.stat strong { display: block; font-size: 26px; font-weight: var(--fw-bold); color: var(--blue); }

/* /me 三栏布局：左身份卡+绑邮箱 / 中编辑档案 / 右积分明细，桌面铺满一屏 */
.me-layout { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(260px, 320px); gap: 20px; align-items: start; }
.me-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.me-layout .me-card,
.me-layout .profile-edit,
.me-layout .me-points { max-width: none; margin: 0; }
.me-layout .addform { max-width: none; }
@media (max-width: 1100px) {
  .me-layout { grid-template-columns: 1fr 1fr; }
  .me-layout > .me-points { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .me-layout { grid-template-columns: 1fr; }
}

/* 积分明细列表 */
.points-log { display: flex; flex-direction: column; margin-top: 4px; }
.points-log__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.points-log__row:last-child { border-bottom: none; }
.points-log__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.points-log__reason { font-size: 14px; color: var(--text); font-weight: 600; }
.points-log__time { font-size: var(--fs-xs); color: var(--muted); }
.points-log__delta { font-size: 15px; font-weight: var(--fw-bold); flex: none; }
.points-log__row.is-up .points-log__delta { color: var(--success); }
.points-log__row.is-down .points-log__delta { color: var(--danger); }
.empty-mini { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 0; }

/* ---------- 认领先 ---------- */
.claim { max-width: 560px; margin: 0 auto; }
.claim__step { display: flex; flex-direction: column; gap: 14px; }
.claim__box { text-align: center; background: var(--bg); border: 1px dashed var(--blue); border-radius: var(--radius); padding: 18px; }
.claim__label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.claim__code { font-size: 26px; font-weight: var(--fw-bold); color: var(--blue); letter-spacing: 1px; }
.claim__sample { margin-top: 10px; font-size: 14px; color: var(--text); }
.claim__how { margin: 4px 0; padding-left: 20px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.claim__how strong { color: var(--text); }

/* ---------- ghost 按钮 ---------- */
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn--ghost:hover { color: var(--text); border-color: #d6dcdf; }

/* ---------- nav / 任务 移动端 ---------- */
@media (max-width: 640px) {
  .nav__inner { gap: 8px; }
  .nav__points, .nav__login { font-size: var(--fs-xs); }
  .grid--tasks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .grid--tasks { grid-template-columns: 1fr; }
  .logo__text { display: none; }
}

/* ---------- 帖子广场 ---------- */
.post-form { margin-bottom: 18px; }
.post-form__form { display: flex; gap: 10px; }
.post-form__input {
  flex: 1; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.post-form__input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.post-form__hint { margin-top: 10px; font-size: 12px; color: var(--muted); }
.plaza__sort { display: flex; gap: 8px; margin-bottom: 16px; }
.sortbtn {
  padding: 6px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); transition: all 0.15s;
}
.sortbtn.is-active { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.plaza { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  animation: pop 0.3s var(--ease) backwards;
}
.post:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }
.post__img { width: 100%; height: 200px; object-fit: cover; background: var(--bg); }
.post__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post__text {
  font-size: 14px; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post__meta { font-size: 12px; color: var(--muted); }
.post__actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.post__actions .card__follow { padding: 6px 12px; font-size: 12px; }
.post__count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.post.is-helped { border-color: rgba(0, 186, 124, 0.4); }

/* ---------- P1 悬赏 escrow ---------- */
.pledge-picker { display: flex; gap: 8px; margin-top: 10px; }
.pledge-opt {
  flex: 1; text-align: center; padding: 8px 6px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); font-size: 13px; color: var(--muted);
  cursor: pointer; transition: all 0.15s; user-select: none;
}
.pledge-opt.is-active { border-color: var(--gold); background: var(--pledge-soft); color: var(--gold); font-weight: 600; }
.pledge-custom { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pledge-mult { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text); }
.pledge-mult > span { min-width: 36px; color: var(--muted); }
.seg { display: flex; gap: 4px; }
.seg button {
  padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--card); font-size: 12px; color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.seg button.is-active { background: var(--gold); color: #fff; border-color: var(--gold); }
.pledge-total { font-size: 12px; color: var(--gold); font-weight: 600; }

.pledge-badge {
  align-self: flex-start; display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; background: var(--pledge-soft); color: var(--gold);
}
.pledge-badge.is-closed { background: var(--border); color: var(--muted); }
.post__helps { display: flex; flex-wrap: wrap; gap: 6px; }
.help-act { padding: 5px 11px !important; font-size: 12px !important; margin-top: 0 !important; }
.post__noplege { font-size: 11px; color: var(--muted); }

/* ---------- 发帖人待确认 ---------- */
.my-pending { background: var(--blue-soft); border: 1px solid var(--blue); border-radius: var(--radius-card); padding: 16px 18px; margin-bottom: 16px; }
.my-pending__head { margin-bottom: 12px; }
.my-pending__title { font-size: 15px; font-weight: var(--fw-bold); color: var(--text); }
.my-pending__count { font-size: 13px; color: var(--blue); margin-left: 4px; }
.my-pending__sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.my-pending__list { display: flex; flex-direction: column; gap: 10px; }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: var(--radius-pill); padding: 8px 12px; }
.pending-row__info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pending-row .card__avatar,
.pending-row .card__avatar-img { width: 36px; height: 36px; font-size: 15px; flex-shrink: 0; }
.pending-row .card__avatar-img { object-fit: cover; }
.pending-row__who { display: flex; flex-direction: column; min-width: 0; }
.pending-row__who strong { font-size: 13px; color: var(--text); }
.pending-row__post { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-row__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pending-row__actions .card__follow { padding: 5px 10px; font-size: 12px; }
.pending-row__actions .task-done { margin-top: 0; padding: 5px 12px; font-size: 12px; }
@media (max-width: 600px) { .pending-row { flex-direction: column; align-items: stretch; } }

@media (max-width: 900px) {
  .plaza { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .plaza { grid-template-columns: 1fr; }
  .post-form__form { flex-direction: column; }
}

/* ---------- 档案编辑 ---------- */
.profile-edit { max-width: 560px; margin: 20px auto 0; }
.field textarea {
  padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 15px; font-weight: 400; resize: vertical;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-soft); }
.field textarea::placeholder { color: #99a4ad; }

/* ---------- 领域徽章 / 发现 ---------- */
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.card__bio { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; padding: 0 4px; }
.tag-badge {
  display: inline-block; padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; background: var(--blue-soft); color: var(--blue);
}
.tag-badge--ai { background: rgba(29, 155, 240, 0.12); color: #1a8cd8; }
.tag-badge--go { background: rgba(0, 186, 124, 0.12); color: #00a268; }
.tag-badge--ec { background: rgba(255, 138, 0, 0.14); color: #d97700; }
.tag-badge--design { background: rgba(120, 81, 169, 0.14); color: #7b4faa; }
.tag-badge--other { background: var(--border); color: var(--muted); }
.tags-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tagfilter {
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--card); border: 1px solid var(--border); cursor: pointer; transition: all 0.15s;
}
.tagfilter.is-active { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }

/* ---------- 个人档案页 ---------- */
.card__handle--link { cursor: pointer; transition: color 0.15s; }
.card__handle--link:hover { color: var(--blue); }
.profile-view { max-width: 560px; margin: 20px auto; }
.pv-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; text-align: center; box-shadow: var(--shadow-sm);
}
.pv-card .card__avatar, .pv-card .card__avatar-img { width: 96px; height: 96px; font-size: 36px; margin: 0 auto; }
.pv-card__name { font-size: 22px; font-weight: var(--fw-bold); margin-top: 12px; }
.pv-card__handle { color: var(--muted); font-size: 14px; }
.pv-card__bio { margin: 14px 0; color: var(--text); line-height: 1.6; font-size: 15px; }
.pv-card__tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.pv-card__stats { display: flex; gap: 32px; justify-content: center; margin: 16px 0; }
.pv-card__stats .stat { font-size: 13px; color: var(--muted); }
.pv-card__stats .stat strong { display: block; font-size: 24px; font-weight: var(--fw-bold); color: var(--blue); }
.pv-card__links { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.pv-card__link { color: var(--blue); font-size: 14px; }
.pv-card__actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.pv-card__claim-tip { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- 认领/登录 tab ---------- */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.authtab {
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.authtab.is-active { color: var(--blue); border-bottom-color: var(--blue); }

/* 侧栏 登录/认领 按钮 */
.nav__user .nav__login { display: block; width: 100%; text-align: center; }
.nav__claim {
  display: block; width: 100%; text-align: center;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  margin-top: 8px; padding: 9px 18px; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 600; transition: color 0.15s, border-color 0.15s;
}
.nav__claim:hover { color: var(--text); border-color: #d6dcdf; }

/* ---------- 区块标题（待回关/今日推荐） ---------- */
.section-head { margin: 24px 0 14px; }
.section-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.section-count { font-size: 14px; font-weight: 700; color: var(--blue); }
.section-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.awaiting { margin-bottom: 8px; }
.card__report { margin-top: 6px; font-size: var(--fs-xs); color: #99a4ad; text-decoration: underline; }
.card__report:hover { color: var(--danger); }

/* ============================================================
   第三批：转化漏斗 + IA
   ============================================================ */

/* ① 名单未登录 banner CTA（main__head 上方，登录后 hidden） */
.list-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; padding: 16px 20px;
  background: var(--blue-soft); border: 1px solid var(--blue);
  border-radius: var(--radius-card);
}
.list-banner__text { min-width: 0; }
.list-banner__text strong { display: block; font-size: var(--fs-md); color: var(--text); }
.list-banner__text span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ② 空状态 CTA（带主按钮，替代纯文字死链） */
.empty-cta { grid-column: 1 / -1; text-align: center; padding: 48px 0; }
.empty-cta__text { color: var(--muted); font-size: var(--fs-md); margin-bottom: 16px; }

/* ⑤ profile 面包屑返回 */
.pv-card__back { display: block; text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 14px; transition: color 0.15s; }
.pv-card__back:hover { color: var(--blue); }

@media (max-width: 560px) {
  .list-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .list-banner .btn { width: 100%; }
}
