/* ==========================================================================
   太湖搭子 · 全站样式（单文件，移动端优先）
   设计约束：原生 CSS，无预处理器、无框架、无外部字体与图标库
   ========================================================================== */

:root {
  /* 品牌色：活力橙，基准 #F97316。
     分两档用：--brand 只做填充与装饰（logo、色块、进度条），
     --brand-dark 承担所有「橙色文字」（链接、次级标题、hover）——
     白底上 #F97316 的对比度只有 2.8:1，当正文色太浅，而 #C2410C 有 5.2:1。
     实心按钮的白字压在渐变上，所以渐变末端压到 --brand-dark，避免半截发灰。 */
  --brand-1: #f97316;
  --brand-2: #ea580c;
  --brand-grad: linear-gradient(135deg, #f97316 0%, #ea580c 55%, #c2410c 100%);
  --brand-grad-soft: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);

  --brand: #f97316;
  --brand-dark: #c2410c;
  --brand-soft: #fff4ed;
  --text: #1b1f24;
  --text-2: #5a6572;
  --text-3: #8b96a3;
  --line: #e4e8ee;
  --bg: #f5f7fa;
  --card: #ffffff;
  --red: #d64545;
  --green: #17795a;          /* 语义绿：在线、成功、正向计数；与橙色品牌刻意区分 */
  --amber: #b8730a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 16px rgba(16, 24, 40, .05);

  /* 版心：手机端自然 100%，桌面端放宽到 1140（详见文末「桌面适配」） */
  --wrap: 1140px;
  --wrap-pad: 14px;
  --side: 300px;
}

* { box-sizing: border-box; }

/* hidden 属性必须优先于组件自身的 display（.guide-layer / .live-bar / .online-orb 都是 flex，
   否则 hidden 会被作者样式覆盖，引导层会对所有访客常驻显示） */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  padding-bottom: 72px;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
img { max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 12px var(--wrap-pad) 28px; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.inline { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------------- 顶部栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(6px);
}
/* Logo：纯 CSS 绘制「双人同行」——两个圆点 + 中间连接线 */
.logo {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 16.5px; color: var(--text);
  letter-spacing: .3px; white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--brand-dark); }
.logo-mark {
  position: relative; flex: 0 0 auto;
  width: 30px; height: 16px;
  /* 中间连接线：蓝→绿渐变，长度留出两端圆点 */
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2)) center / 14px 2px no-repeat;
}
.logo-mark::before,
.logo-mark::after {
  content: ''; position: absolute; top: 50%;
  width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
}
.logo-mark::before { left: 0; background: var(--brand-1); box-shadow: 0 0 0 2px rgba(249, 115, 22, .18); }
.logo-mark::after { right: 0; background: var(--brand-2); box-shadow: 0 0 0 2px rgba(251, 146, 60, .22); }
.logo-text { display: inline-flex; flex-direction: column; line-height: 1.15; }
.logo-sub { font-size: 10.5px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
@media (max-width: 420px) {
  .logo-sub { display: none; }
}
.search { flex: 1; min-width: 0; }
.search input {
  width: 100%; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 17px;
  background: var(--bg); font-size: 13.5px; color: var(--text);
}
.search input:focus { outline: none; border-color: var(--brand); background: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
/* 桌面顶部横向导航：移动端不显示，改由底部 tab 栏承担 */
.top-nav { display: none; }
.top-publish { display: none; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--text);
  font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { text-decoration: none; border-color: #cfd6e0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand-grad); border-color: transparent; color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b93a3a; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------------- 卡片与列表 ---------------- */
.panel, .post-card, .auth-card, .act-card, .stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 16px 14px; margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-meta { color: var(--text-3); font-size: 12.5px; margin: 4px 2px 0; }

.post-card { padding: 13px 14px; }
.post-title { display: block; font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.post-title:hover { color: var(--brand-dark); text-decoration: none; }

.route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: 13.5px; margin: 0 0 6px; }
.route i { color: var(--brand-dark); font-style: normal; letter-spacing: -1px; }
.route-lg { font-size: 15px; }
.route-lg span { font-weight: 600; color: var(--text); }

.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin: 0 0 6px; }
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 12px;
}
.tag-soft { background: #eef1f5; color: var(--text-2); margin-right: 4px; }
.progress { color: var(--text-2); }
.progress.full { color: var(--red); }
.by { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin: 0; }
.lv { font-size: 11.5px; color: var(--amber); background: #fff7e8; border-radius: 4px; padding: 1px 5px; }

/* ---------------- 头像 ---------------- */
.avatar-xs { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #dfe5ec; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #dfe5ec; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #dfe5ec; }
/* 一圈极淡的描边：头像底色深浅不一，浅色块在浅底上需要一条边界才显得「成形」 */
.avatar-xs, .avatar, .avatar-lg { box-shadow: 0 0 0 1px rgba(16, 24, 40, .08); }

/* ---------------- 首页 Hero（品牌区） ---------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--brand-grad-soft);
  border: 1px solid #ffedd5;
  border-radius: var(--radius);
  padding: 22px 16px 18px;
  margin-bottom: 14px;
}
.hero::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--brand-grad);
}
.hero h1 {
  font-size: 27px; letter-spacing: 1px; margin-bottom: 6px;
  /* 文字用同色系深一档，保证白底可读 */
  background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--brand-dark);
  display: inline-block;
}
.hero-sub { font-size: 15px; font-weight: 600; color: var(--brand-dark); margin: 0 0 8px; letter-spacing: .5px; }
.hero-desc { color: var(--text-2); font-size: 13px; margin: 0; }
.hero-actions { display: flex; gap: 10px; margin: 14px 0 10px; flex-wrap: wrap; }
.hero-note { font-size: 12.5px; color: var(--text-3); margin: 0; }

/* ---------------- 筛选 ---------------- */
.filters { margin-bottom: 12px; }
.filter-row { margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-block; padding: 5px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 13px;
}
.chip:hover { text-decoration: none; border-color: var(--brand); color: var(--brand-dark); }
.chip.active { background: var(--brand-grad); border-color: transparent; color: #fff; }
.wrap-chips { margin-bottom: 10px; }
.date-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date-row label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.date-row input[type="date"] {
  height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
}

/* ---------------- 空态与分页 ---------------- */
.empty { text-align: center; padding: 34px 16px; color: var(--text-2); background: #fff;
  border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { margin-bottom: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0; }

/* ---------------- 引导层 ---------------- */
.guide-layer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 24, 40, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.guide-box { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 360px; }
.guide-box h3 { margin-bottom: 6px; }

/* ---------------- 表单 ---------------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.narrow { max-width: 380px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 14.5px; color: var(--text); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 115, 22, .18);
}
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 160px; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-field { min-width: 180px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.check input { margin-top: 4px; }
.warn-tip { background: #fff8ec; border: 1px solid #f6e2bd; color: var(--amber);
  border-radius: 9px; padding: 9px 11px; font-size: 13px; }

/* ---------------- 提示条 ---------------- */
.alert { border-radius: 9px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; }
.alert-ok { background: #eaf7f0; border: 1px solid #c6e8d6; color: var(--green); }
.alert-warn { background: #fff8ec; border: 1px solid #f6e2bd; color: var(--amber); }
.alert-err { background: #fdeeee; border: 1px solid #f6cfcf; color: var(--red); }

/* ---------------- 登录注册 ---------------- */
.auth-card { max-width: 420px; margin: 18px auto; padding: 20px 16px; }
.auth-card h1 { text-align: center; }

/* ---------------- 帖子详情 ---------------- */
.detail { position: relative; }
.detail-head { position: relative; margin-bottom: 12px; }
.detail-head h1 { font-size: 20px; padding-right: 30px; }
.more { position: absolute; right: 0; top: 2px; font-size: 22px; line-height: 1; color: var(--text-3); }
.desc { font-size: 14.5px; color: var(--text); background: #fafbfc; border-radius: 10px; padding: 12px; }
.author-card { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.author-name { margin: 0 0 2px; font-weight: 600; }
.contact-box { display: flex; gap: 10px; align-items: baseline; padding: 12px 0; font-size: 14px; }
.contact-box .label { color: var(--text-3); font-size: 12.5px; }
.apply-area { padding: 6px 0 12px; }
.share-area { border-top: 1px solid var(--line); padding-top: 12px; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* 主分享条：复制文案是这站最高频的动作，放在标题下方，手机上不用滚就能看见 */
.share-main { margin: 4px 0 14px; }
.share-main .btn-primary { font-size: 15.5px; padding: 13px 18px; letter-spacing: .5px; }
.share-main-sub { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* 海报预览层（iOS 用长按保存，桌面端直接下载） */
.poster-layer {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(16, 24, 40, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.poster-box { width: 100%; max-width: 340px; }
/* 服务端海报是 1080×1350 的竖图，在 340px 宽的弹层里约 425px 高。
   小屏（iPhone SE 667px）加上提示与按钮会溢出，用 max-height 兜住并保持比例。 */
.poster-box img {
  width: 100%; max-height: 62vh; object-fit: contain;
  border-radius: 12px; display: block; margin: 10px 0;
}
.poster-tip { text-align: center; color: #fff; font-size: 13.5px; margin: 0; }

/* 活动详情：类型行、来源框、右侧卡片 */
.act-kicker { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.tag-past { background: #eef1f5; color: var(--text-3); }
.source-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.source-box .label { color: var(--text-3); font-size: 12.5px; }
.source-box .value { font-weight: 600; }
.source-note { margin-top: 8px; }
.side-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.side-card h2 { font-size: 15px; margin: 0 0 6px; }
.side-list { list-style: none; margin: 10px 0 0; padding: 0; }
.side-list li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-list li:first-child { border-top: none; padding-top: 0; }
.side-list a { color: var(--text); font-weight: 600; font-size: 14px; }
.side-link { display: inline-block; margin-top: 2px; }

/* ---------------- 私信 ---------------- */
.conv-list { list-style: none; margin: 0; padding: 0; }
.conv { display: flex; gap: 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--text); }
.conv:hover { text-decoration: none; background: #fafbfc; }
.conv-main { flex: 1; min-width: 0; }
.conv-name { margin: 0; font-weight: 600; font-size: 14.5px; }
.conv-text { margin: 0; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-time { white-space: nowrap; }
.dot-badge { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  background: var(--red); color: #fff; font-size: 11px; border-radius: 9px; text-align: center; }

.chat-shell { display: flex; flex-direction: column; min-height: calc(100vh - 160px); }
.chat-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.chat-head .back { font-size: 24px; line-height: 1; color: var(--text-2); padding: 0 4px; }
.chat-warn { margin: 10px 0; }
.chat-body { flex: 1; padding: 10px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.msg-row { display: flex; flex-direction: column; max-width: 78%; }
.msg-row.me { align-self: flex-end; align-items: flex-end; }
.msg-row.peer { align-self: flex-start; align-items: flex-start; }
.msg-bubble { padding: 9px 12px; border-radius: 12px; font-size: 14.5px; word-break: break-word; white-space: pre-wrap; }
.msg-row.me .msg-bubble { background: var(--brand-dark); color: #fff; border-bottom-right-radius: 4px; }
.msg-row.peer .msg-bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-row.pending .msg-bubble { opacity: .6; }
.msg-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.day-sep { text-align: center; font-size: 12px; color: var(--text-3); margin: 6px 0; }
.sys-tip { font-size: 12.5px; color: var(--text-3); background: #f1f4f8; border-radius: 8px; padding: 8px 10px; text-align: center; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); background: var(--bg); position: sticky; bottom: 64px; }
.chat-input textarea {
  flex: 1; min-height: 40px; max-height: 120px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; resize: none; font: inherit; font-size: 14.5px;
}

/* ---------------- 个人主页 ---------------- */
.profile-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.profile-main { flex: 1; min-width: 0; }
.profile-main h1 { font-size: 19px; margin-bottom: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.bio { font-size: 13.5px; color: var(--text-2); margin: 6px 0 0; }
.level-bar { position: relative; height: 8px; background: #e9eef5; border-radius: 4px; overflow: visible; margin: 12px 0 26px; }
.level-fill { height: 100%; border-radius: 4px; background: var(--brand-grad); }
.level-text { position: absolute; left: 0; top: 12px; font-size: 12px; color: var(--text-3); }
.self-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.inline-panel { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #fafbfc; }
.badge-wall h2, .footprint h2 { display: flex; align-items: baseline; gap: 8px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge-item {
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px;
  /* 未解锁态原本用 --text-3，11.5px 描述在白底上只有 2.9:1，等于看不清；
     靠虚线边框和浅底表达「未获得」就够了，字必须能读 */
  background: #fafbfc; color: var(--text-2);
}
.badge-item.got { border-style: solid; border-color: #fed7aa; background: #fffaf5; color: var(--text); }
.badge-name { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.badge-desc { display: block; font-size: 11.5px; line-height: 1.5; }
.footprint-map { height: 240px; border-radius: 10px; border: 1px solid var(--line); background: #f0f3f7; margin-bottom: 12px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 10px; }
.tab { padding: 8px 12px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; }
.tab:hover { text-decoration: none; color: var(--brand-dark); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 600; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.plain-list li:last-child { border-bottom: none; }

/* ---------------- 活动日历 ---------------- */
.view-switch { display: flex; gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border-radius: 10px; overflow: hidden; }
.calendar th { font-size: 12px; color: var(--text-3); font-weight: 500; padding: 6px 0; background: #f7f9fc; }
.calendar td { border: 1px solid var(--line); vertical-align: top; height: 62px; padding: 3px; font-size: 11.5px; }
.cal-blank { background: #fafbfc; }
.cal-day { display: block; color: var(--text-3); font-size: 11px; margin-bottom: 2px; }
.cal-cell.has { background: #fffaf5; }
.cal-item { display: block; background: var(--brand-soft); color: var(--brand-dark); border-radius: 4px;
  padding: 1px 3px; margin-bottom: 2px; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.act-card { padding: 13px 14px; }
.act-card h3 a { color: var(--text); }
.act-card h3 a:hover { color: var(--brand-dark); text-decoration: none; }
.act-time { font-size: 12.5px; color: var(--brand-dark); margin: 0 0 4px; }
.act-summary { font-size: 13.5px; color: var(--text-2); }
.act-source { margin: 4px 0; }
.section-title { margin: 20px 0 10px; font-size: 16px; }

/* ---------------- 法务静态页 ---------------- */
.legal-text { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px;
  color: var(--text-2); line-height: 1.85; margin: 0; }

/* ---------------- 页脚 ---------------- */
.footer {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--wrap-pad) 24px;
  font-size: 11.5px; color: var(--text-3); text-align: center;
}
.disclaimer { line-height: 1.7; margin-bottom: 8px; }
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--text-2); margin: 0 0 6px;
}
.footer-brand .logo-mark { width: 22px; height: 12px; background-size: 10px 2px; }
.footer-brand .logo-mark::before,
.footer-brand .logo-mark::after { width: 7px; height: 7px; margin-top: -3.5px; }
.footer-links { margin: 0 0 6px; }
.footer-links a, .footer-beian a { color: var(--text-2); }
.footer-links span { margin: 0 4px; }

/* ---------------- 底部导航 ---------------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.nav-item { flex: 1; text-align: center; font-size: 12px; color: var(--text-3); padding: 4px 0; }
.nav-item:hover { text-decoration: none; color: var(--brand-dark); }
.nav-item.active { color: var(--brand-dark); font-weight: 600; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(8px);
  max-width: 84vw; padding: 10px 16px; border-radius: 10px;
  background: rgba(27, 31, 36, .92); color: #fff; font-size: 13.5px;
  opacity: 0; transition: opacity .2s, transform .2s; z-index: 80; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(176, 48, 48, .95); }
.toast.ok { background: rgba(20, 110, 70, .95); }

/* ---------------- 首页热闹感（补充需求 1/2/3/4/5/6/7/8） ---------------- */
/* 动态提示条：导航栏下方，全宽，浅橙底 */
.live-bar {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: #fff5e8;
  border-bottom: 1px solid #ffe0bd;
  font-size: 13px; color: #8a4c05;
  cursor: pointer;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #e8890c; flex: none;
  box-shadow: 0 0 0 0 rgba(232, 137, 12, .6);
  animation: livePing 2s ease-out infinite;
}
@keyframes livePing {
  0%   { box-shadow: 0 0 0 0 rgba(232, 137, 12, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(232, 137, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 137, 12, 0); }
}
.live-rotate { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.live-rotate > span {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 1; transform: translateY(0);
  transition: opacity .28s ease, transform .28s ease;
}
.live-rotate > span.is-out { opacity: 0; transform: translateY(-6px); }
.live-more { flex: none; font-size: 12px; color: #a35a06; }

/* 首页两栏：移动端单列，桌面端主内容 + 侧栏 */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.home-main { min-width: 0; }
.home-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.side-panel { margin: 0; padding: 13px 13px 14px; }
.side-title { font-size: 14px; margin: 0 0 10px; color: var(--text); }

/* 动态流 */
.feed-sec { }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 2px 8px; }
.feed-head h2 { margin: 0; font-size: 16px; }
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 13px;
}
.feed-kind { font-size: 11.5px; margin: 0 0 5px; color: var(--text-3); letter-spacing: .3px; }
.kind-post { color: var(--brand-dark); }
.kind-act { color: #8a4c05; }
.kind-moment { color: var(--green); }
.feed-act { border-left: 3px solid #ffd9a8; }
.feed-moment { border-left: 3px solid #cfeadb; background: #fbfefc; }
.moment-text { font-size: 14.5px; color: var(--text); margin: 0 0 6px; }
.tag-act { background: #fff3e0; color: #8a4c05; }
.ago { color: var(--text-3); font-size: 11.5px; margin-left: auto; }
.hot-stats { color: var(--text-3); }
.hot-stats b { color: #c2410c; font-weight: 600; }
.feed-more { text-align: center; margin: 14px 0 4px; }

/* 空状态引导卡 */
.guide-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin: 12px 0 4px;
  background: linear-gradient(135deg, #fff7ec, #fff7ed);
  border: 1px dashed #ffd3a1; border-radius: var(--radius);
}
.guide-emoji { font-size: 26px; margin: 0; line-height: 1; }
.guide-body { flex: 1; min-width: 0; }
.guide-title { font-weight: 600; margin: 0 0 2px; font-size: 14.5px; }

/* 头像墙：CSS translateX 无缝滚动 */
.wall { overflow: hidden; margin: 0 0 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wall-track { display: flex; gap: 10px; width: max-content; animation: wallScroll 32s linear infinite; }
.wall-track.is-ready { animation-name: wallScroll; }
/* 真人不足一屏：不滚动，居中平铺，避免同一张脸来回重复 */
.wall-track.is-static { width: 100%; justify-content: center; animation: none; }
.wall:hover .wall-track { animation-play-state: paused; }
.wall-item { flex: none; display: block; }
.wall-item img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; background: #dfe5ec;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .16);
}
@keyframes wallScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 热门路线标签云 */
.cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cloud-tag {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 10px; border-radius: 10px;
  background: #fffaf5; border: 1px solid #fed7aa; color: var(--brand-dark);
  line-height: 1.3;
}
.cloud-tag:hover { text-decoration: none; background: #fff4ed; border-color: #fed7aa; }
.cloud-tag b { font-size: 12.5px; font-weight: 600; }
.cloud-tag span { font-size: 10.5px; color: var(--text-3); }
.cloud-lg { background: #fff7ed; border-color: #fed7aa; }
.cloud-lg b { font-size: 13.5px; }
.cloud-sm b { font-size: 12px; }

/* 侧栏小数据 */
.mini-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-stats li { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.mini-stats b { font-size: 17px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }

/* 右下角在线人数悬浮窗 */
.online-orb {
  position: fixed; right: 14px; bottom: 84px; z-index: 45;
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, .97); color: var(--brand-dark);
  border: 1px solid #fed7aa; box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
  animation: orbBreath 4s ease-in-out infinite;
}
.online-num { font-size: 18px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.online-cap { font-size: 10px; color: var(--text-3); line-height: 1.1; }
@keyframes orbBreath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* 分享按钮脉冲（scale 1.05，每 2 秒一次） */
.btn-pulse { animation: pulseBtn 2s ease-in-out infinite; }
@keyframes pulseBtn {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.share-count-line { font-size: 12.5px; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.share-count-line b { color: #c2410c; }

/* 详情页实时报名标记 */
.live-flag { font-size: 11.5px; color: var(--text-3); }
.live-flag.on { color: var(--green); }
.live-flag.flash { animation: flagFlash .9s ease-out 1; }
@keyframes flagFlash {
  0%   { color: var(--green); transform: scale(1); }
  40%  { color: #0d7a4c; transform: scale(1.12); }
  100% { color: var(--green); transform: scale(1); }
}

/* ---------------- 后台 ---------------- */
body.admin { background: #f3f5f8; padding-bottom: 24px; }
.admin-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line);
}
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
.admin-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; white-space: nowrap; }
.admin-brand .logo-mark { width: 24px; height: 13px; background-size: 11px 2px; }
.admin-brand .logo-mark::before,
.admin-brand .logo-mark::after { width: 7px; height: 7px; margin-top: -3.5px; }
.admin-nav a { font-size: 13.5px; color: var(--text-2); padding: 4px 2px; }
.admin-nav a.active { color: var(--brand-dark); font-weight: 600; border-bottom: 2px solid var(--brand); }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 18px 14px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; font-size: 13.5px; margin: 12px 0; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f7f9fc; font-weight: 600; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.review-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat-card { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--brand-dark); }
.stat-label { font-size: 12.5px; color: var(--text-2); }

/* ---------------- 窄屏适配 ---------------- */
@media (max-width: 420px) {
  .wrap { padding: 10px 10px 24px; }
  .hero h1 { font-size: 19px; }
  .field-row { flex-direction: column; }
  .calendar td { height: 54px; }
  .msg-row { max-width: 86%; }
}

/* 手机/平板详情页：正文与操作区顺序不变，风险提示压到最末（与桌面双栏视觉一致） */
@media (max-width: 999px) {
  .detail { display: flex; flex-direction: column; }
  .detail-main { display: contents; }
  .detail .warn-tip { order: 9; }
}

/* ---------------- 桌面适配 ---------------- */
/* 断点 1000px：手机/平板保持移动端布局；桌面切换为宽版心 + 顶部导航 + 多列 */
@media (min-width: 1000px) {
  /* 版心与顶栏：顶栏背景仍通栏，内容用左右内边距对齐版心 */
  :root { --wrap-pad: 24px; }
  body { font-size: 15.5px; padding-bottom: 24px; }
  .topbar,
  .live-bar {
    padding-left: max(var(--wrap-pad), calc((100vw - var(--wrap)) / 2));
    padding-right: max(var(--wrap-pad), calc((100vw - var(--wrap)) / 2));
  }
  .topbar { gap: 22px; padding-top: 12px; padding-bottom: 12px; }
  .logo { font-size: 19px; }
  .logo-mark { width: 34px; height: 18px; background-size: 16px 2px; }
  .logo-mark::before, .logo-mark::after { width: 10px; height: 10px; margin-top: -5px; }
  .logo-sub { font-size: 11px; }
  .search { flex: 0 1 340px; margin-left: auto; }
  .search input { height: 38px; border-radius: 19px; font-size: 14px; }
  .top-actions .btn { min-height: 38px; }
  .top-publish { display: inline-flex; }

  /* 顶部横向导航（移动端隐藏，底部 tab 栏桌面隐藏） */
  .top-nav { display: flex; align-items: center; gap: 6px; }
  .top-nav a {
    padding: 7px 13px; border-radius: 8px;
    font-size: 14.5px; color: var(--text-2); white-space: nowrap;
  }
  .top-nav a:hover { background: #f4f5f7; color: var(--brand-dark); text-decoration: none; }
  .top-nav a.active { background: var(--brand-grad); color: #fff; font-weight: 600; }
  .bottom-nav { display: none; }
  .online-orb { right: 26px; bottom: 26px; width: 68px; height: 68px; }
  .online-num { font-size: 20px; }
  .toast { bottom: 32px; }

  /* 首页：主内容 + 粘性侧栏 */
  .home-grid { grid-template-columns: minmax(0, 1fr) var(--side); gap: 24px; align-items: start; }
  .home-side { position: sticky; top: 84px; }
  .hero { padding: 34px 32px 28px; margin-bottom: 20px; }
  /* 宽屏下 hero 右侧留白较大，用一层柔光圆点压住视觉重心（纯 CSS，不影响内容） */
  .hero::after {
    content: ''; position: absolute; right: -60px; top: -80px;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
      rgba(249, 115, 22, .20), rgba(251, 146, 60, .16) 55%, rgba(251, 146, 60, 0) 72%);
    pointer-events: none;
  }
  .hero h1 { font-size: 38px; letter-spacing: 2px; }
  .hero-sub { font-size: 17px; }
  .hero-desc { font-size: 14.5px; max-width: 640px; }
  .hero-actions { margin: 20px 0 12px; }

  /* 列表：两列卡片 */
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .list > .list-meta,
  .list > .empty,
  .list > .pager { grid-column: 1 / -1; }
  .post-card, .feed-item, .act-card { padding: 16px 18px; }
  .post-title { font-size: 16.5px; }
  .feed-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .act-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  /* 详情页：正文 + 粘性操作侧栏 */
  .detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 30px; align-items: start;
    padding: 26px 28px;
  }
  .detail-main { min-width: 0; }
  .detail-side { align-self: start; position: sticky; top: 84px; }
  .detail-main .warn-tip { margin-top: 14px; }
  .detail-head h1 { font-size: 24px; padding-right: 34px; }
  .desc { font-size: 15px; padding: 16px; }
  .author-card { border-top: none; padding-top: 0; }
  .apply-area { padding-bottom: 14px; }

  /* 法务长文：行宽控制在可读范围 */
  .legal { max-width: 860px; margin-inline: auto; }

  /* 聊天：桌面固定宽度，消息区更好读 */
  .chat-shell { max-width: 880px; margin-inline: auto; min-height: calc(100vh - 140px); }
  .chat-input { bottom: 0; }

  /* 个人主页：进度条不至于拉成一条长线 */
  .level-bar { max-width: 560px; }
  .footprint-map { height: 320px; }

  /* 表单类页面保持适中行宽，避免输入框横跨整屏 */
  .form { max-width: 720px; }
  .form.inline-form { max-width: none; }
  .auth-card { max-width: 440px; padding: 26px 24px; margin: 40px auto; }

  /* 活动日历：桌面格子更高，能塞下更多条目 */
  .calendar td { height: 84px; }
  .cal-item { font-size: 11px; }

  /* 卡片轻微浮起：桌面有鼠标，可感知的 hover 提升质感 */
  .post-card, .feed-item, .act-card { transition: box-shadow .16s ease, border-color .16s ease; }
  .post-card:hover, .feed-item:hover, .act-card:hover {
    box-shadow: 0 4px 18px rgba(16, 24, 40, .10);
    border-color: #d7dfe9;
  }
  .plain-list li { padding: 13px 6px; }
  .plain-list li:hover { background: #f8fafc; }

  /* 引导层 / 分享图不受影响 */
  .guide-box { max-width: 400px; padding: 24px; }
}

/* ---------------- 打印与动效偏好 ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------- MVP：场景入口 / 动态表单 / 分享 ---------------- */

/* 场景快捷入口：首页 Hero 下方 5 个方块，手机上两列、桌面五列 */
.scene-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 0;
}
@media (min-width: 720px) { .scene-row { grid-template-columns: repeat(5, 1fr); } }
.scene {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--text); line-height: 1.35;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.scene:hover {
  text-decoration: none; border-color: var(--brand); transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, .14);
}
.scene b { font-size: 14px; }
.scene span { font-size: 12px; color: var(--text-3); }
.scene:last-child { background: linear-gradient(180deg, #f7fafd, #fff); }

/* 单选 Chip（发帖页「发布类型」）：隐藏原生 radio，靠 :checked + span 上色 */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-row .chip { cursor: pointer; position: relative; }
.chip-row .chip input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.chip-row .chip span {
  display: inline-block; padding: 6px 14px; border-radius: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px;
  transition: all .16s;
}
.chip-row .chip input:checked + span {
  background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 600;
}
.chip-row .chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 同城 / 线上卡片：没有箭头，用一个右侧小标签说明形态 */
.route-soft { justify-content: space-between; }
.route-tag {
  font-style: normal; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px;
}
.tag-line { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }

/* 发帖成功面板里的文案预览 */
.share-pre {
  white-space: pre-wrap; word-break: break-all;
  background: #f5f7fa; border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7; color: var(--text-2);
  margin: 10px 0 14px; font-family: inherit;
}
.ok-text { color: #1a7f37; }
.warn-text { color: #b45309; }
.safe-top { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; }

/* ---------------- MVP 最终版：人机校验 / 免责声明 ---------------- */

/* 注册页算术题：题面加粗放大，输入框收窄，一眼看出是填空题 */
.field-captcha b { color: var(--text); font-size: 16px; letter-spacing: .5px; }
.field-captcha input { max-width: 150px; }

/* 免责声明块：注册页 / 发帖页 / 详情页共用 */
.legal-box {
  margin: 12px 0 16px; padding: 12px 14px;
  border-radius: 10px; background: #f7f8fa; border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.68; color: var(--text-2);
}
.legal-box b { display: block; margin-bottom: 4px; color: var(--text); font-size: 13px; }
.legal-box p { margin: 0; }
.legal-box strong { color: var(--text); font-weight: 600; }

/* ==========================================================================
   MVP 首页：频道切换 / 搜索框 / 标语轮播 / 跨城特色标识 / 空状态补位
   ========================================================================== */

/* 频道切换：同城默认、跨城特色，做成两个并排 tab */
.scope-tabs { display: flex; gap: 8px; margin: 16px 0 0; }
.scope-tab {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 13.5px; font-weight: 600; transition: all .18s;
}
.scope-tab:hover { text-decoration: none; border-color: var(--brand); color: var(--brand-dark); }
.scope-tab.active { background: var(--brand-grad); border-color: transparent; color: #fff; }
.scope-tab-feature.active { background: linear-gradient(135deg, #f0a04b 0%, #e2664b 100%); }
.scope-tab-feature::after {
  content: '特色'; display: inline-block; margin-left: 5px; padding: 1px 5px;
  font-size: 10px; font-weight: 600; border-radius: 4px;
  background: rgba(240, 160, 75, .16); color: #c26a1c; vertical-align: 1px;
}
.scope-tab-feature.active::after { background: rgba(255, 255, 255, .26); color: #fff; }

/* 跨城频道头部徽标 */
.channel-badge {
  display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #fdf0e0, #fbe3e0); color: #b4592f;
  font-size: 12px; font-weight: 600; letter-spacing: .4px;
}

/* 品牌区搜索框：输入框吃掉剩余宽度，按钮不吃 */
.hero-search { display: flex; gap: 8px; margin: 14px 0 0; }
.hero-search input[type="search"] {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--text);
}
.hero-search input[type="search"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249, 115, 22, .14);
}

/* 标语轮播：一句话占位，切换时淡入 */
.slogan-rotate {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-grad-soft); color: var(--brand-dark);
  font-size: 13px; font-weight: 600; line-height: 1.5;
  border-left: 3px solid var(--brand);
}
.slogan-rotate span { display: inline-block; animation: slogan-in .45s ease both; }
@keyframes slogan-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 场景入口里的「跨城通勤」特殊样式：暖色描边 + 角标 */
.scene-feature {
  border-color: #f0c9a8;
  background: linear-gradient(180deg, #fffaf5, #fff);
}
.scene-feature:hover { border-color: #e2664b; box-shadow: 0 6px 16px rgba(226, 102, 75, .14); }
.scene-tag {
  display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 4px;
  background: #fbe3e0; color: #b4592f; font-size: 10px; font-weight: 600;
  font-style: normal; vertical-align: 1px;
}

/* 空状态补位提示：说明「为什么下面是别的范围的帖子」 */
.fallback-note {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 12px 14px; margin: 0 0 12px;
  border-radius: 10px; background: #fffaf0; border: 1px dashed #f0c9a8;
}
.fallback-note p { margin: 0; font-size: 13px; color: #8a5a2b; }
.sample-hint { margin: 4px 0 10px; }

/* 示例帖：虚线边框 + 淡化标题，避免被当成真实帖子 */
.post-card-sample { border-style: dashed; background: #fcfcfe; }
.post-card-sample .post-title { color: var(--text-2); }
.sample-mark { color: var(--text-3); }

/* 移动端：5 个场景按钮两列排布时，最后一项「全部搭子」占满整行，视觉上收口 */
@media (max-width: 719px) {
  .scene-row .scene:last-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   增强版：首页标签云 / 发帖标签多选
   ========================================================================== */

/* 标签云：17 个预设标签铺成一行行胶囊 */
.tag-cloud {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin: 16px 0 0; padding: 12px 13px;
  border-radius: 12px; background: #fff; border: 1px solid var(--line);
}
.tag-cloud-label {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  margin-right: 2px; letter-spacing: .3px;
}
.tag-pill {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text-2);
  transition: all .16s; white-space: nowrap;
}
.tag-pill:hover {
  border-color: var(--brand); color: var(--brand-dark);
  background: #fffaf5; text-decoration: none;
}

/* 发帖页：勾选式标签。真实 checkbox 藏起来，样式做在 span 上 */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.tag-opt { position: relative; cursor: pointer; }
/* 必须显式重置：.field input 给了 width:100% + padding，会把隐藏的 checkbox 撑开 */
.tag-opt input {
  position: absolute; opacity: 0; width: 0; height: 0;
  padding: 0; border: 0; margin: 0;
}
.tag-opt > span {
  display: inline-block; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--text-2); transition: all .16s; white-space: nowrap;
}
.tag-opt:hover > span { border-color: var(--brand); color: var(--brand-dark); }
.tag-opt input:checked + span {
  background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 600;
}
.tag-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ==========================================================================
   增强版：站内通知（铃铛红点 + 通知中心）
   ========================================================================== */

.notify-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text-2); border: 1px solid transparent; transition: all .16s;
}
.notify-bell:hover { color: var(--brand-dark); background: var(--bg); border-color: var(--line); text-decoration: none; }
.notify-dot {
  position: absolute; top: 1px; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #e2534b; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.notify-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notify-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
}
/* 未读左侧加一条色带，比整块底色更克制 */
.notify-item.unread { border-left: 3px solid var(--brand); background: #f7fdfa; }
.notify-type {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.notify-apply  { background: #fff4ed; color: #c2410c; }
.notify-badge  { background: #fff3e0; color: #b4592f; }
.notify-system { background: #eef0f4; color: var(--text-2); }
.notify-body { flex: 1; min-width: 0; }
.notify-body p { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--text); }

@media (max-width: 719px) {
  .notify-item { padding: 11px 12px; }
  .notify-type { display: none; }   /* 手机上空间紧，类型标签让位给正文 */
}
