/* ============================================================
   校园墙 · 黑灰白设计系统（移动端优先）
   ============================================================ */
:root {
  --ink: #191919;
  --ink-2: #3f3f46;
  --gray: #71717a;
  --gray-2: #a1a1aa;
  --line: #e7e7ea;
  --bg: #f4f4f5;
  --card: #ffffff;
  --soft: #fafafa;
  --gold-1: #f6c453;
  --gold-2: #dfa116;
  --gold-text: #5c4300;
  --purple-1: #7c3aed;
  --purple-2: #9333ea;
  --red: #dc2626;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15px;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.topbar-in {
  max-width: 880px; margin: 0 auto; padding: 0 16px; height: 52px;
  display: flex; align-items: center; gap: 16px;
}
.logo { color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.topnav { display: none; margin-left: auto; align-items: center; gap: 4px; }
.topnav a {
  color: var(--gray); font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.topnav a:hover { color: var(--ink); text-decoration: none; background: var(--soft); }
.topnav a.on { color: var(--ink); font-weight: 700; }
.topnav a.king-link { color: var(--gold-text); font-weight: 700; }

/* ---------- 布局 ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 14px 12px 32px; }
.foot {
  text-align: center; color: var(--gray-2); font-size: 12px;
  padding: 10px 16px 30px; max-width: 880px; margin: 0 auto;
}
.page-title { font-size: 20px; font-weight: 800; margin: 4px 2px 12px; }
.section-title { font-size: 16px; font-weight: 700; margin: 16px 2px 10px; }

/* ---------- Flash 提示 ---------- */
.flash {
  padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; font-size: 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink);
}
.flash.ok { border-left-color: var(--ink); }
.flash.err { border-left-color: var(--red); color: var(--red); }
.flash.warn { border-left-color: var(--gold-2); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.card h2 { font-size: 18px; margin-bottom: 8px; }
.card h3 { font-size: 16px; margin-bottom: 8px; }

/* ---------- 公告 ---------- */
.ann-card { border-left: 5px solid var(--ink); }
.ann-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.ann-title { font-size: 16px; font-weight: 700; }
.ann-item { padding: 8px 0; border-top: 1px dashed var(--line); }
.ann-item:first-of-type { border-top: none; }
.ann-more { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ann-more summary {
  cursor: pointer; color: var(--ink-2); font-size: 14px; font-weight: 600;
  min-height: 40px; display: flex; align-items: center; list-style: none;
}
.ann-more summary::-webkit-details-marker { display: none; }
.ann-more summary::after { content: "▾"; margin-left: 6px; color: var(--gray); }
.ann-more[open ] summary::after { content: "▴"; }
.ann-all-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 600; }

/* ---------- 广告位 ---------- */
.adslot { border: 1.5px dashed var(--gray-2); background: var(--soft); text-align: center; box-shadow: none; }
.adslot img { max-width: 100%; border-radius: 10px; }
.adslot .ad-tag { font-size: 11px; color: var(--gray); letter-spacing: 3px; margin-bottom: 4px; }
.adslot .ad-text { font-size: 16px; margin-top: 6px; font-weight: 600; }

/* ---------- 帖子卡片 ---------- */
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.post-head .spacer { flex: 1; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex: none;
}
.avatar.anon { background: #e4e4e7; color: var(--gray); }
.avatar.big { width: 56px; height: 56px; font-size: 24px; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; vertical-align: middle; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.author-name { font-weight: 700; font-size: 15px; }
.meta { color: var(--gray); font-size: 12px; }
.content { white-space: pre-wrap; word-break: break-word; margin: 8px 0; font-size: 15px; }
.post-img { max-width: 100%; border-radius: 12px; margin: 6px 0; display: block; }
.stats {
  color: var(--gray); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap;
  align-items: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px;
}
.stats .detail-link { margin-left: auto; font-weight: 600; color: var(--ink-2); }
.heat { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.cat-tag {
  background: var(--bg); color: var(--ink-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 9px; font-size: 12px; white-space: nowrap;
}

/* ---------- 徽章 ---------- */
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700;
  display: inline-block; line-height: 1.5; white-space: nowrap;
}
.badge.vip { background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); color: var(--gold-text); }
.badge.svip { background: linear-gradient(90deg, var(--purple-1), var(--purple-2)); color: #fff; }
.badge.king { background: var(--ink); color: var(--gold-1); }
.badge.admin { background: #e2e8f0; color: #475569; }
.badge.anon { background: #f1f1f3; color: var(--gray); }
.badge.pin { background: var(--ink); color: #fff; }
.badge.status { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.pin-tag { color: var(--ink); font-size: 12px; font-weight: 800; }

/* ---------- 胶囊条 / 标签 ---------- */
.chips {
  display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; flex-wrap: nowrap;
  padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips a, .chips .chip {
  padding: 7px 15px; border-radius: 999px; background: var(--card); flex: none;
  border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; white-space: nowrap;
  min-height: 36px; display: inline-flex; align-items: center;
}
.chips a:hover { text-decoration: none; }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.chips .sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a {
  padding: 7px 15px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
  min-height: 36px; display: inline-flex; align-items: center;
}
.tabs a:hover { text-decoration: none; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }

/* 后台横滑标签栏 */
.sectabs {
  display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; margin-bottom: 12px;
  padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.sectabs::-webkit-scrollbar { display: none; }
.sectabs a {
  flex: none; padding: 8px 14px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; white-space: nowrap;
  min-height: 38px; display: inline-flex; align-items: center;
}
.sectabs a:hover { text-decoration: none; }
.sectabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.sectabs.king-tabs a.on { background: var(--ink); color: var(--gold-1); border-color: var(--ink); }

/* ---------- 表单 ---------- */
form .row { margin-bottom: 14px; }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; background: var(--card); color: var(--ink); min-height: 44px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font-size: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; font-size: 14px; word-break: break-all;
}
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row input { flex: 1; }
.captcha-img {
  height: 44px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; flex: none;
}
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.radio-row label { display: inline-flex; gap: 5px; align-items: center; font-size: 14px; color: var(--ink); margin-bottom: 0; }

/* 发帖：分类胶囊单选 */
.chip-radios { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-radio { position: relative; margin: 0; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-radio span {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 14px; min-height: 40px; font-weight: 600;
}
.chip-radio input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--ink); }

/* 发帖：身份选择卡 */
.choice-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.choice-card {
  position: relative; flex: 1 1 200px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; background: var(--card); margin: 0; font-weight: 400;
}
.choice-card input { position: absolute; opacity: 0; top: 10px; right: 10px; }
.choice-card .choice-title { font-weight: 700; font-size: 15px; color: var(--ink); display: block; margin-bottom: 2px; }
.choice-card .choice-desc { font-size: 12px; color: var(--gray); display: block; line-height: 1.5; }
.choice-card:has(input:checked) { border-color: var(--ink); background: var(--soft); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--ink); }

/* 上传框 */
.upload-box {
  border: 1.5px dashed var(--gray-2); border-radius: 12px; padding: 14px;
  background: var(--soft); display: block; cursor: pointer; margin: 0; font-weight: 400;
}
.upload-box .up-title { font-weight: 700; color: var(--ink); font-size: 14px; display: block; margin-bottom: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff;
  border: 1px solid var(--ink); padding: 10px 20px; border-radius: 999px; font-size: 14px;
  cursor: pointer; min-height: 42px; font-weight: 600; line-height: 1.3; text-align: center;
}
.btn:hover { background: #000; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.small { padding: 6px 14px; font-size: 13px; min-height: 36px; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: var(--card); color: var(--red); border: 1px solid var(--red); }
.btn.danger:hover { background: #fef2f2; }
.btn.gold {
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); color: var(--gold-text);
  border: 1px solid var(--gold-2);
}
.btn.gold:hover { filter: brightness(1.05); background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 表格（桌面）/ 卡片列表（移动端 .dtable） ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--gray); font-weight: 600; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 统计网格 ---------- */
.grid, .stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.stat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 10px; text-align: center;
}
.stat-box b { font-size: 24px; color: var(--ink); display: block; line-height: 1.25; }
.stat-box .stat-label { font-size: 13px; color: var(--ink-2); }
.stat-box .stat-sub { font-size: 12px; color: var(--gray); display: block; margin-top: 2px; }

/* ---------- 个人中心 ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-head .p-name { font-size: 20px; font-weight: 800; }
.profile-head .p-points { margin-left: auto; text-align: right; }
.profile-head .p-points b { font-size: 26px; display: block; line-height: 1.2; }
.profile-head .p-points span { font-size: 12px; color: var(--gray); }
.info-list { margin-top: 6px; }
.info-row {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; align-items: baseline;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--gray); flex: none; width: 86px; }
.info-row .v { flex: 1; word-break: break-word; }
.invite-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.invite-card .inv-code { font-size: 24px; font-weight: 800; letter-spacing: 2px; color: var(--gold-1); }
.invite-card .small { color: #d4d4d8; }
.mgmt-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mgmt-card {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px; font-weight: 700; min-height: 52px;
}
.mgmt-card:hover { text-decoration: none; border-color: var(--ink); }
.mgmt-card .go { margin-left: auto; color: var(--gray); }
.mgmt-card.king-mgmt { background: var(--ink); color: var(--gold-1); border-color: var(--ink); }
.post-status { font-size: 12px; color: var(--gray); margin: -6px 4px 12px; }

/* ---------- 签到 / 积分时间线 ---------- */
.hero-card { text-align: center; padding: 26px 16px; }
.hero-card .hero-points { font-size: 42px; font-weight: 800; line-height: 1.15; }
.hero-card .hero-label { color: var(--gray); font-size: 13px; margin-bottom: 12px; }
.checked-pill {
  display: inline-flex; align-items: center; padding: 10px 22px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
  font-weight: 700; min-height: 42px;
}
.timeline { list-style: none; }
.timeline li {
  position: relative; padding: 10px 0 10px 20px; border-bottom: 1px solid var(--line);
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 18px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ink);
}
.timeline li:last-child { border-bottom: none; }
.timeline .delta { font-weight: 800; min-width: 44px; }
.timeline .delta.neg { color: var(--gray); }
.timeline .reason { flex: 1; }
.timeline .time { color: var(--gray); font-size: 12px; }

/* ---------- 会员中心 ---------- */
.tier-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.tier-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; }
.tier-card .tier-name { font-size: 18px; font-weight: 800; }
.tier-card.vip-tier { border-color: var(--gold-2); }
.tier-card.vip-tier .tier-name { color: var(--gold-text); }
.tier-card.svip-tier { border-color: var(--purple-1); }
.tier-card.svip-tier .tier-name { color: var(--purple-1); }
.price-grid { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: 8px; }
.price-row { display: grid; grid-template-columns: 52px repeat(5, 1fr); }
.price-row > div {
  padding: 9px 4px; text-align: center; font-size: 13px;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
}
.price-row > div:last-child { border-right: none; }
.price-row:last-child > div { border-bottom: none; }
.price-row.head > div { background: var(--soft); color: var(--gray); font-weight: 600; }
.price-row .lvl { font-weight: 800; display: flex; align-items: center; justify-content: center; }
.price-row .lvl.vip-l { color: var(--gold-text); background: #fffbeb; }
.price-row .lvl.svip-l { color: var(--purple-1); background: #faf5ff; }
.record-list { }
.record-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.record-row:last-child { border-bottom: none; }
.record-row .r-main { flex: 1; min-width: 140px; }
.status-pill { font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 700; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.status-pill.ok { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-pill.bad { background: var(--card); color: var(--red); border-color: var(--red); }

/* ---------- 评论 / 详情 ---------- */
.comment { border-top: 1px solid var(--line); padding: 10px 0; }
.comment:first-of-type { border-top: none; }
.quote {
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 12px;
}

/* ---------- 空状态 ---------- */
.empty {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center; padding: 38px 20px; margin-bottom: 12px; color: var(--gray);
}
.empty .empty-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.empty .empty-icon svg { width: 40px; height: 40px; color: var(--gray-2); }
.empty .empty-title { color: var(--ink); font-weight: 700; font-size: 16px; margin-bottom: 4px; }

/* ---------- 后台 ---------- */
.admin-banner {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.admin-banner .b-title { font-size: 17px; font-weight: 800; }
.admin-banner .b-sub { font-size: 12px; color: var(--gray); margin-top: 2px; }
.king-banner {
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; border-bottom: 3px solid var(--gold-2);
}
.king-banner .b-title { font-size: 17px; font-weight: 800; color: var(--gold-1); }
.king-banner .b-sub { font-size: 12px; color: #d4d4d8; margin-top: 2px; }
.admin-zone { border: 1px solid var(--line); }
.king-zone { border: 1.5px solid var(--ink); }
.item-card {
  border-top: 1px solid var(--line); padding: 12px 0;
}
.item-card:first-of-type { border-top: none; }
.heat-input { width: 150px !important; display: inline-block; min-height: 36px !important; padding: 6px 10px !important; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { max-width: 420px; margin: 26px auto 0; }
.auth-head { text-align: center; margin-bottom: 14px; }
.auth-head .auth-logo { font-size: 22px; font-weight: 800; }
.auth-head .auth-sub { color: var(--gray); font-size: 13px; margin-top: 2px; }

/* ---------- 悬浮发帖按钮 ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; z-index: 50;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28); font-size: 32px; line-height: 1; font-weight: 300;
}
.fab:hover { text-decoration: none; background: #000; }
.fab:active { transform: scale(.94); }

/* ---------- 底部导航（移动端） ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; height: 56px; color: var(--gray); font-size: 11px; min-width: 0;
  position: relative;
}
.bottomnav a:hover { text-decoration: none; }
.bottomnav a .bn-icon { font-size: 20px; line-height: 1.2; filter: grayscale(1); opacity: .55; }
.bottomnav a.on { color: var(--ink); font-weight: 700; }
.bottomnav a.on .bn-icon { filter: none; opacity: 1; }
.bn-badge {
  position: absolute; top: 5px; left: calc(50% + 3px);
  background: #dc2626; color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 999px; padding: 0 4px;
}
body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

/* ---------- 消息（私信 / 邮件） ---------- */
.tab-badge {
  display: inline-block; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  line-height: 16px; text-align: center; border-radius: 999px; padding: 0 4px;
  vertical-align: 2px;
}
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.check-row input[type="checkbox"] { margin-top: 3px; flex: none; }
.conv-row { align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.conv-row:hover { text-decoration: none; }
.conv-preview {
  display: block; max-width: 46vw; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dm-list { display: flex; flex-direction: column; gap: 10px; }
.dm-row { display: flex; flex-direction: column; align-items: flex-start; }
.dm-row.mine { align-items: flex-end; }
.dm-bubble {
  background: var(--soft); border: 1px solid var(--line); color: var(--ink);
  border-radius: 14px; padding: 8px 12px; max-width: 82%;
  font-size: 14px; word-break: break-word;
}
.dm-row.mine .dm-bubble { background: var(--ink); color: #fff; border-color: var(--ink); }
.dm-time { font-size: 11px; color: var(--gray); margin-top: 3px; }
.dm-form { display: flex; gap: 8px; }
.dm-form input { flex: 1; }
.mail-body { margin-top: 12px; font-size: 15px; line-height: 1.7; white-space: pre-line; word-break: break-word; }
.mail-unread { color: var(--ink); }

/* ---------- 在线状态 / 好友 / 拉黑 ---------- */
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #a1a1aa; vertical-align: 1px;
}
.dot.on { background: #22c55e; }
.social-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 12px;
}

/* ---------- 生日礼物弹窗 ---------- */
.bday-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.bday-modal {
  background: var(--card); border-radius: 18px; padding: 24px 20px;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.bday-emoji { font-size: 44px; line-height: 1.2; }
.bday-title { font-size: 19px; font-weight: 800; margin: 6px 0 8px; }
.bday-modal p { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }

/* ---------- 小游戏 ---------- */
.game-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.game-card {
  display: flex; flex-direction: column; gap: 4px; color: inherit;
}
.game-card:hover { text-decoration: none; }
.game-icon { font-size: 34px; line-height: 1.2; }
.game-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.game-card .go { color: var(--gold-text); font-weight: 700; font-size: 13px; margin-top: 4px; }
.game-head { display: flex; align-items: center; gap: 12px; }
.game-head .btn { margin-left: auto; }
.game-frame {
  width: 100%; height: 78vh; border: 1px solid var(--line);
  border-radius: 14px; background: #000; display: block;
}

/* ---------- 小工具 ---------- */
.small { font-size: 12px; color: var(--gray); }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }

/* ---------- 会员中心 · 第一期 ---------- */
.remain-pill {
  display: inline-block; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.benefit-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.benefit-item {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--soft); border: 1px solid var(--line);
  border-left: 4px solid var(--gold-2); border-radius: 12px; padding: 10px 12px;
}
.benefit-item b { font-size: 14px; }
.benefit-item span { color: var(--gray); font-size: 13px; }
.planned-box {
  margin-top: 12px; border: 1.5px dashed var(--gray-2); border-radius: 12px;
  padding: 10px 12px; color: var(--gray); background: #fff;
}
.planned-box b { color: var(--ink-2); font-size: 14px; }
.tier-price { font-size: 22px; font-weight: 800; margin-top: 4px; }
.tier-card.vip-tier .tier-price { color: var(--gold-text); }
.tier-card.svip-tier .tier-price { color: var(--purple-1); }
.qr-img {
  max-width: 220px; width: 100%; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
}

/* ---------- 桌面端 ---------- */
@media (min-width: 768px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  body { padding-bottom: 0; }
  .fab { bottom: 28px; right: max(28px, calc((100vw - 880px) / 2 + 28px)); }
  .wrap { padding: 20px 16px 40px; }
  .grid, .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .mgmt-grid { grid-template-columns: 1fr 1fr; }
  .sectabs { flex-wrap: wrap; overflow-x: visible; }
}

/* ---------- 移动端表格 → 卡片 ---------- */
@media (max-width: 767px) {
  .dtable { display: block; }
  .dtable tr:first-child { display: none; }
  .dtable tr {
    display: block; border: 1px solid var(--line); border-radius: 14px;
    padding: 10px 12px; margin-bottom: 10px; background: var(--card);
  }
  .dtable td {
    display: flex; gap: 10px; border-bottom: none; padding: 4px 0;
    font-size: 13px; align-items: baseline; word-break: break-word;
  }
  .dtable td::before {
    content: attr(data-label); color: var(--gray); flex: none; width: 64px; font-size: 12px;
  }
  .dtable td.no-label::before { content: none; }
}

/* ---------- red packets (festive exception: red + gold) ---------- */
.feed-actions { margin: 0 0 10px; }
.rp-card {
  margin-top: 12px; border-radius: 14px; padding: 14px;
  background: linear-gradient(135deg, #c0272d, #a31219);
  color: #ffe9b8; border: 1px solid #e8b64c;
  box-shadow: 0 2px 10px rgba(163, 18, 25, .25);
}
.rp-head { display: flex; align-items: center; gap: 8px; }
.rp-avatar { background: #7d0d12; color: #ffe9b8; }
.rp-sender { font-weight: 700; color: #fff3d6; }
.rp-kind { font-size: 12px; color: #ffd97a; }
.rp-blessing { font-size: 17px; font-weight: 700; color: #ffe9b8; margin: 10px 0 4px; }
.rp-meta { font-size: 12px; color: #f5cf8e; }
.rp-state {
  margin-top: 10px; text-align: center; padding: 8px; border-radius: 10px;
  background: rgba(0,0,0,.18); color: #ffe9b8; font-weight: 600;
}
.rp-state.got { background: rgba(255, 217, 122, .25); color: #fff3d6; }
.rp-grab-btn {
  margin-top: 10px; width: 100%; padding: 10px; border: none; cursor: pointer;
  border-radius: 10px; font-size: 16px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffd97a, #e8a91c); color: #7d0d12;
}
.rp-grab-btn:hover { filter: brightness(1.06); }
.rp-card.rp-finished, .rp-card.rp-expired { filter: grayscale(.35); opacity: .85; }
.rp-grabs { margin-top: 10px; border-top: 1px dashed rgba(255, 217, 122, .5); padding-top: 8px; }
.rp-grab-row { display: flex; gap: 8px; font-size: 12px; color: #ffe9b8; padding: 2px 0; }
.rp-grab-desc { color: #ffd97a; font-weight: 700; }
.rp-grab-at { margin-left: auto; color: #f5cf8e; }
.dm-packet { margin: 8px 0; }
.dm-packet-form { margin-top: 12px; }
.dm-packet-form summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* ---------- avatar review ---------- */
.pending-avatar-note {
  display: flex; gap: 10px; align-items: center; margin-bottom: 12px;
  padding: 10px; border: 1px dashed var(--line, #ddd); border-radius: 10px;
  background: var(--card2, #fafafa);
}
.avatar-review-row { display: flex; gap: 14px; flex-wrap: wrap; }
.avatar-compare { display: flex; align-items: center; gap: 10px; }
.avatar-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.avatar-arrow { font-size: 20px; color: var(--gray, #999); }
.avatar-review-meta { flex: 1; min-width: 180px; }

/* ---------- 顶栏图标按钮（首页：搜索 / 站内邮件） ---------- */
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--ink); flex: none;
}
.icon-btn:hover { background: var(--soft); text-decoration: none; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-badge {
  position: absolute; top: 2px; right: 0;
  background: var(--ink); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 999px; padding: 0 4px; border: 1.5px solid #fff;
}

/* ---------- 公告弹窗（黑白简约） ---------- */
.ann-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ann-modal {
  background: #fff; border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 22px 20px; max-width: 340px; width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.ann-modal-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  border: 1px solid var(--ink); border-radius: 999px; padding: 1px 10px; margin-bottom: 10px;
}
.ann-modal-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.ann-modal-body {
  font-size: 14px; color: var(--ink-2); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 16px;
}
.ann-modal-link {
  display: block; text-align: center; margin-top: 12px;
  font-size: 13px; color: var(--ink-2); text-decoration: underline;
}

/* ---------- 生日选择（黑白三段下拉） ---------- */
.bday-selects { display: flex; gap: 8px; }
.bday-selects select { flex: 1; min-width: 0; }

/* ---------- 消息：互动分类入口（抖音式） ---------- */
.notif-cats { padding: 6px 16px; }
.notif-cat {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); color: var(--ink); min-height: 52px;
}
.notif-cat:last-child { border-bottom: none; }
.notif-cat:hover { text-decoration: none; }
.notif-cat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--ink); color: var(--ink);
}
.notif-cat-icon svg { width: 19px; height: 19px; }
.notif-cat-name { font-weight: 700; font-size: 15px; flex: 1; }
.notif-cat-go { color: var(--gray-2); font-size: 20px; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.conv-time { flex: none; }
.conv-row .r-main { min-width: 0; }
.notif-excerpt { display: block; word-break: break-word; }

/* ---------- 时间线帖子卡（推特/微博式） ---------- */
.tl-item {
  display: flex; gap: 10px; background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.tl-left { flex: none; }
.tl-main { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.tl-tags { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; flex: none; }
.tl-sub {
  color: var(--gray); font-size: 12px; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-main .content { margin: 6px 0 4px; }
.tl-main .post-img { width: 100%; border-radius: 12px; }
.tl-actions {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 9px; margin-top: 10px;
  color: var(--gray); font-size: 13px;
}
.tl-act { display: inline-flex; gap: 5px; align-items: center; color: var(--gray); }
a.tl-act:hover { color: var(--ink); text-decoration: none; }
.tl-act svg { width: 15px; height: 15px; flex: none; }
.tl-actions .heat { margin-left: auto; }

/* ---------- 评论点赞 ---------- */
.comment-actions { margin-top: 2px; }
.clike-btn {
  background: none; border: none; cursor: pointer; font-size: 13px;
  color: var(--gray); padding: 4px 6px; border-radius: 999px; line-height: 1.4;
}
.clike-btn:hover { background: var(--soft); }
.clike-btn.on { color: var(--red); font-weight: 700; }
.clike-count { font-size: 13px; color: var(--gray); padding: 4px 6px; display: inline-block; }

/* ---------- tools （实用工具） ---------- */
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.file-row:last-child { border-bottom: none; }
.file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-name { font-weight: 600; word-break: break-all; }
.tool-qr svg { max-width: 240px; width: 100%; height: auto; }
.cover-img { max-width: 100%; border-radius: 8px; }
.img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.img-grid img { width: 100%; border-radius: 8px; display: block; }
