/* 青藤社区 · 小红书式图文流主题（全量重写） */
:root {
  --grad: linear-gradient(135deg, #637BFF, #A87BFF);
  --red: #5B8DEF;
  --red-dark: #8B7FF0;
  --bg: #f4f6fd;
  --card: #ffffff;
  --ink: #333333;
  --ink-2: #666666;
  --ink-3: #999999;
  --line: #eeeeee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.4; }
p { margin: 0 0 8px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
}
.brand {
  font-size: 21px; font-weight: 900; letter-spacing: .5px;
  color: var(--red); white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.brand::before {
  content: "🌌"; font-size: 20px;
  background: none; width: auto; height: auto; border-radius: 0;
}
.searchbar {
  flex: 1; min-width: 0; display: flex; align-items: center;
  background: #f2f2f4; border-radius: 999px;
  padding: 0 6px 0 16px; height: 38px;
}
.searchbar input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--ink); min-width: 0;
}
.searchbar button {
  border: 0; background: var(--red); color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 13px; line-height: 1; flex: none;
}
.topnav { display: flex; align-items: center; gap: 8px; }
@media (max-width: 480px) {
  .brand { font-size: 17px; letter-spacing: 0; }
  .brand::before { font-size: 17px; }
  .topbar-inner { gap: 8px; padding: 10px 10px; }
  .topnav .btn { padding: 6px 10px; font-size: 13px; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13px; line-height: 1.4; white-space: nowrap;
}
.btn:hover { border-color: #ddd; }
.btn-primary { background: linear-gradient(135deg,#5B8DEF,#8B7FF0); border-color: transparent; color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--red-dark); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { background: #fff; border-color: #d3ddff; color: var(--red); }

/* ---------- 布局 ---------- */
.layout {
  max-width: 1080px; margin: 0 auto;
  padding: 12px 12px 96px;
  display: flex; gap: 16px; align-items: flex-start;
}
.content { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex: none; display: none; }
@media (min-width: 960px) { .sidebar { display: block; } }
.footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 20px 0 110px; }
@media (min-width: 960px) { .footer { padding-bottom: 30px; } }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card-title { font-size: 16px; font-weight: 700; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--red); font-size: 13px; }
.hint { color: var(--ink-3); font-size: 12px; }

/* ---------- 信息流 tab ---------- */
.tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; white-space: nowrap; } .tabs::-webkit-scrollbar { display: none; }
.tabs-x {
  display: flex; gap: 26px; justify-content: center;
  background: transparent; margin: 2px 0 12px;
}
.tabs .tab {
  border: 0; background: none; padding: 8px 2px;
  font-size: 16px; color: var(--ink-2); font-weight: 600;
  position: relative;
}
.tabs .tab.active { color: var(--ink); font-weight: 800; }
.tabs .tab.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 22px; height: 3px; border-radius: 2px; background: var(--red);
}

/* ---------- 笔记瀑布流 ---------- */
.masonry { column-count: 2; column-gap: 10px; }
@media (min-width: 768px) { .masonry { column-count: 3; } }
@media (min-width: 1200px) { .masonry { column-count: 4; } }
.note {
  break-inside: avoid; margin: 0 0 10px;
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.note-cover-link { display: block; position: relative; }
img.note-cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #eee; }
.note-cover.fallback {
  width: 100%; aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 900; color: rgba(255,255,255,.94);
  font-family: "Noto Serif SC", serif;
}
.f0 { background: linear-gradient(135deg, #ffb199, #ff2442); }
.f1 { background: linear-gradient(135deg, #a1c4fd, #3b6fd4); }
.f2 { background: linear-gradient(135deg, #84fab0, #2f9e6e); }
.f3 { background: linear-gradient(135deg, #fbc2eb, #a855a0); }
.f4 { background: linear-gradient(135deg, #f6d365, #e8892c); }
.f5 { background: linear-gradient(135deg, #89f7fe, #3aa2c9); }
.note-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.note-body { padding: 10px 12px 12px; }
.note-title {
  font-size: 14px; font-weight: 600; line-height: 1.45; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-title a { color: var(--ink); }
.note-meta { display: flex; align-items: center; justify-content: space-between; }
.note-author { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.note-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-like { border: 0; background: none; color: var(--ink-3); font-size: 12px; display: flex; align-items: center; gap: 3px; }
.note-like.on { color: var(--red); }

/* ---------- 帖子详情 ---------- */
.post-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.post-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.post-head .name { font-weight: 600; color: var(--ink); }
.post-title { font-size: 20px; font-weight: 800; margin: 10px 0 6px; }
.post-excerpt { color: var(--ink-2); }
.post-body { font-size: 15px; word-break: break-word; }
.post-images { display: grid; gap: 6px; margin: 10px 0; border-radius: 10px; overflow: hidden; }
.post-images.n1 { grid-template-columns: 1fr; }
.post-images.n2, .post-images.n4 { grid-template-columns: 1fr 1fr; }
.post-images.n3 { grid-template-columns: 1fr 1fr 1fr; }
.post-images img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; cursor: zoom-in; }
.post-foot { display: flex; gap: 18px; color: var(--ink-3); font-size: 13px; }
.action { border: 0; background: none; color: inherit; font-size: inherit; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.action.on { color: var(--red); }

/* ---------- 头像 / 徽标 / 话题 ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #5B8DEF, #8B7FF0);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.xs { width: 20px; height: 20px; font-size: 11px; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #f0f0f0; color: var(--ink-2); }
.badge.staff { background: #eef2ff; color: #5B8DEF; font-weight: 600; }
.badge.pin { background: var(--red); color: #fff; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.topic-chip {
  background: #eef2ff; color: #5B8DEF;
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
}

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fafafa; outline: none; color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--red); background: #fff;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.upload-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.upload-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* ---------- 评论 / 表格 / 主页 ---------- */
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.replies { margin-left: 46px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.board-list a { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.board-list .cnt { color: var(--ink-3); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-grid b { display: block; font-size: 17px; }
.stat-grid span { font-size: 11px; color: var(--ink-3); }

/* ---------- 状态 / 分页 / 提示 ---------- */
.state { text-align: center; color: var(--ink-3); padding: 44px 0; font-size: 14px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 10px;
  border: 3px solid #eee; border-top-color: var(--red);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; color: var(--ink-3); font-size: 13px; }
.wf-grid .pager { column-span: all; background: #fff; border-radius: 14px; padding: 10px 0; box-shadow: var(--shadow); margin: 4px 0 12px; }
.wf-grid .pager .btn { background: #f2f4fa; border: 0; border-radius: 18px; padding: 7px 18px; color: var(--ink-2); }
.wf-grid .pager .btn:disabled { opacity: .45; }

.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.82); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 99; max-width: 82vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(220,38,60,.92); }

.modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; box-sizing: border-box;
}
.modal[hidden] { display: none; }
.modal-box { background: var(--card); color: var(--ink); border-radius: 14px; max-width: 640px; width: 100%; max-height: 84vh; overflow: auto; padding: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal-box img { border-radius: 10px; }

/* ---------- 底部 tabbar（移动端） ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 960px) { .tabbar { display: none; } }
.tabbar a, .tabbar button {
  flex: 1; border: 0; background: none; padding: 8px 0 9px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 10.5px; color: var(--ink-3);
}
.tabbar .ic { font-size: 21px; line-height: 1; color: #6b7385; display: flex; align-items: center; justify-content: center; }
.tabbar a.active { color: var(--red); font-weight: 600; }
.tabbar a.active .ic { filter: none; color: var(--red); }
.tabbar .fab {
  flex: none; width: 46px; height: 32px; margin-top: 7px;
  background: var(--red); border-radius: 10px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; box-shadow: 0 3px 8px rgba(255,36,66,.35);
}

/* ---------- 星空社区 · 设计稿对齐样式 ---------- */
/* 首页：单列大卡片流 */
.sq-feed { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 0 90px; }
@media (min-width: 960px) { .sq-feed { padding-bottom: 30px; } }
.sq-card {
  background: var(--card); border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(91,141,239,.06);
}
.sq-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sq-board {
  font-size: 12px; color: #5B8DEF; background: #eef2ff;
  padding: 1px 8px; border-radius: 999px; font-weight: 600;
}
.sq-time { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.sq-title { font-size: 16.5px; margin: 0 0 8px; }
.sq-title a { color: var(--ink); }
.sq-main { display: flex; gap: 12px; align-items: flex-start; }
.sq-cover {
  width: 132px; height: 92px; object-fit: cover;
  border-radius: 12px; flex-shrink: 0; background: #eef2ff;
}
.sq-cover.fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
}
.sq-cover.fallback.f0 { background: linear-gradient(135deg,#5B8DEF,#8B7FF0); }
.sq-cover.fallback.f1 { background: linear-gradient(135deg,#7BA3F5,#9F8FF2); }
.sq-cover.fallback.f2 { background: linear-gradient(135deg,#8B7FF0,#B48CF2); }
.sq-cover.fallback.f3 { background: linear-gradient(135deg,#5FA8EF,#7B8DF5); }
.sq-cover.fallback.f4 { background: linear-gradient(135deg,#6E8BF5,#A07BF0); }
.sq-cover.fallback.f5 { background: linear-gradient(135deg,#5B8DEF,#6EC1F0); }
.sq-excerpt {
  margin: 0; font-size: 13.5px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sq-foot { display: flex; align-items: center; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.sq-act { color: var(--ink-3); }
.note-like { border: 0; background: none; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.note-like.on { color: #5B8DEF; }

/* 板块页：图标网格卡 */
.bcard {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 16px; padding: 14px;
  box-shadow: 0 2px 10px rgba(91,141,239,.06);
}
.bcard-ic {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: linear-gradient(135deg,#eef3ff,#f2efff);
}
.bcard-tx { display: flex; flex-direction: column; line-height: 1.3; }
.bcard-tx span { font-size: 12px; color: var(--ink-3); }

/* 消息中心 */
.msg-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 1px 6px rgba(91,141,239,.05); margin-bottom: 8px;
}
.msg-tx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msg-tx strong { font-size: 14px; }
.msg-tx span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-tx em { font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.msg-time { font-size: 12px; color: var(--ink-3); flex-shrink: 0; }

/* ============================================================
   星空社区 · 设计稿深度还原层（覆盖上方默认样式）
   ============================================================ */

/* ---------- 全局：蓝紫渐变背景 + 装饰光斑 ---------- */
body {
  background: linear-gradient(168deg, #f3f5ff 0%, #f7f6ff 48%, #f4f6ff 100%) fixed;
  min-height: 100vh;
}
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0;
}
body::before {
  width: 300px; height: 300px; right: -90px; top: -70px;
  background: radial-gradient(circle at 38% 38%, rgba(109,124,246,.5), rgba(139,127,240,.16) 70%);
  filter: blur(4px);
}
body::after {
  width: 360px; height: 360px; left: -140px; bottom: 2%;
  background: radial-gradient(circle at 42% 42%, rgba(150,124,246,.34), rgba(109,168,240,.12) 72%);
  filter: blur(8px);
}
#app { position: relative; z-index: 1; }

/* ---------- 顶栏：无边界玻璃感，两行结构 ---------- */
.topbar { background: rgba(244,246,253,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 0; }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px 0; justify-content: space-between; }
.brand { font-size: 22px; font-weight: 900; color: var(--ink); }
.searchbar {
  width: calc(100% - 32px); max-width: 1048px; margin: 10px auto 4px;
  display: flex; align-items: center;
  background: rgba(255,255,255,.92); border-radius: 999px;
  padding: 0 6px 0 18px; height: 44px; min-width: 0;
  box-shadow: 0 4px 18px rgba(91,141,239,.10);
}
.searchbar input { font-size: 14.5px; }
.searchbar button {
  background: var(--grad);
  width: 32px; height: 32px; border-radius: 50%;
  box-shadow: 0 3px 10px rgba(91,141,239,.35);
}
.topnav .btn { border-radius: 999px; }
.topnav .btn-primary { background: var(--grad); border: 0; box-shadow: 0 3px 12px rgba(91,141,239,.35); }
@media (max-width: 480px) {
  .brand { font-size: 19px; }
  .topbar-inner { padding: 10px 14px 0; }
}

/* ---------- 主按钮统一渐变 ---------- */
.btn-primary {
  background: var(--grad);
  border: 0;
  box-shadow: 0 4px 14px rgba(91,141,239,.35);
}

/* ---------- 首页 feed tab：居中大字 + 渐变下划线 ---------- */
.tabs {
  justify-content: center; gap: 22px;
  margin: 4px 0 14px;
}
.tabs .tab { font-size: 15.5px; padding: 6px 2px; position: relative; color: var(--ink-3); }
.tabs .tab.active { color: var(--ink); font-weight: 800; }
.tabs .tab.active::after {
  left: 50%; transform: translateX(-50%); width: 22px;
  height: 3.5px; border-radius: 4px;
  background: linear-gradient(90deg, #6D9BF6, #8B7FF0);
}

/* ---------- 帖子卡片：大圆角悬浮卡 ---------- */
.sq-feed { padding-top: 2px; }
.sq-card { border-radius: 20px; padding: 15px 16px; box-shadow: 0 6px 22px rgba(91,141,239,.09); }
.sq-cover { border-radius: 14px; }
.sq-board { background: #edf1ff; }

/* ---------- 版块卡：竖排图标网格 ---------- */
.bcard {
  flex-direction: column; align-items: flex-start; gap: 14px;
  border-radius: 20px; padding: 18px 16px;
  box-shadow: 0 6px 22px rgba(91,141,239,.09);
}
.bcard-ic {
  width: 50px; height: 50px; border-radius: 15px; font-size: 25px;
  background: linear-gradient(135deg, #e8f0ff, #f0ecff);
}
.bcard-tx strong { font-size: 16.5px; display: block; margin-bottom: 2px; }
.bcard-tx span { font-size: 12.5px; }

/* ---------- 分区页专属 ---------- */
.page-title {
  text-align: center; font-size: 24px; font-weight: 900;
  margin: 6px 0 14px;
}
.pill-search {
  display: flex; align-items: center;
  background: rgba(255,255,255,.92); border-radius: 999px;
  padding: 12px 18px; font-size: 14px; color: var(--ink-3);
  box-shadow: 0 4px 18px rgba(91,141,239,.10);
  margin-bottom: 16px;
}
.enter-btn {
  display: flex; align-items: center; justify-content: center;
  margin: 22px auto 8px; max-width: 420px;
  padding: 14px 0; border-radius: 999px;
  background: var(--grad);
  color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 2px;
  box-shadow: 0 8px 22px rgba(109,124,246,.45);
}

/* ---------- 详情页：三格统计条 ---------- */
.stat-strip { display: flex; border-radius: 20px; padding: 14px 8px; box-shadow: 0 6px 22px rgba(91,141,239,.09); }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-size: 17px; font-weight: 800; color: var(--ink); background: none; border: 0; padding: 0; }
.stat-num.on { color: #6D9BF6; }
.stat span { font-size: 12px; color: var(--ink-3); }

/* ---------- 详情页：底部回复栏 ---------- */
.reply-bar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 70; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.97); border-radius: 999px;
  padding: 7px 7px 7px 18px;
  box-shadow: 0 8px 28px rgba(91,141,239,.22);
  max-width: 560px; margin: 0 auto;
}
.reply-bar .rb-input { flex: 1; font-size: 14px; color: var(--ink-3); }
.rb-send {
  border: 0; padding: 9px 20px; border-radius: 999px;
  background: var(--grad);
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(109,124,246,.4);
}
@media (min-width: 960px) { .reply-bar { bottom: 24px; } }

/* ---------- 消息中心：分段胶囊 + 白卡列表 ---------- */
.seg-tabs {
  display: flex; background: rgba(255,255,255,.95); border-radius: 999px;
  padding: 4px; margin: 4px 0 14px;
  box-shadow: 0 4px 18px rgba(91,141,239,.10);
}
.seg {
  flex: 1; border: 0; background: none; padding: 8px 0;
  border-radius: 999px; font-size: 14px; color: var(--ink-3); text-align: center;
}
.seg.active {
  background: var(--grad);
  color: #fff; font-weight: 700;
  box-shadow: 0 3px 10px rgba(109,124,246,.35);
}
#msgList { display: flex; flex-direction: column; gap: 10px; }
.msg-item { border-radius: 16px; box-shadow: 0 4px 16px rgba(91,141,239,.08); }

/* ---------- 发布页：居中标题 + chip 选板块 ---------- */
.editor-card { max-width: 560px; margin: 8px auto 0; border-radius: 22px; box-shadow: 0 8px 28px rgba(91,141,239,.10); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; padding: 7px 16px; border-radius: 999px;
  background: #edf1ff; color: #5B7BD5; font-size: 13.5px;
}
.chip.active { background: var(--grad); color: #fff; font-weight: 700; }
.chip:disabled { opacity: .6; }
.editor-card input[type="text"], .editor-card textarea, .editor-card select {
  border-radius: 12px; border-color: #e6ebf7; background: #fbfcff;
}

/* ---------- 底部 tabbar：悬浮光斑 + 凸起发布键 + 激活胶囊 ---------- */
.tabbar {
  border-top: 0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 -6px 24px rgba(91,141,239,.10);
}
.tabbar a, .tabbar button { color: #9aa3b8; }
.tabbar a.active { color: #3D6BFF; font-weight: 600; }
.tabbar a[data-tab].active { background: none; box-shadow: none; margin: 0; padding: 2px 0; }
.tabbar a[data-tab].active .ic { filter: none; }
.tabbar .fab {
  width: auto; height: auto; border-radius: 0; margin-top: 0;
  background: none; font-size: inherit; border: 0;
  box-shadow: none;
}

/* ---------- 评论卡 / 通用卡 ---------- */
.card { border-radius: 18px; }
textarea, input, select { border-radius: 12px; }

/* ============================================================
   星空社区 v1.2 · 新页面组件（个人主页/设置/资源/关于/登录）
   ============================================================ */

/* ---------- 通用菜单列表 ---------- */
.menu-list { padding: 4px 0; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; font-size: 15px; color: var(--ink);
  border-bottom: 1px solid #f2f5fb; cursor: pointer;
}
.menu-item:last-child { border-bottom: 0; }
.mi-ic { color: #4a5573; display: flex; align-items: center; justify-content: center; width: 24px; }
.mi-name { flex: 1; }
.mi-arrow { margin-left: auto; color: #c3cad9; font-size: 18px; }
.menu-item .switch { margin-left: auto; }

/* ---------- 开关 ---------- */
.switch {
  width: 44px; height: 26px; border-radius: 999px;
  background: #e3e8f5; position: relative; flex: none;
  transition: background .2s;
}
.switch i {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: left .2s;
}
.switch.on { background: var(--grad); }
.switch.on i { left: 21px; }

/* ---------- 个人主页 v2 ---------- */
.profile-v2 { border-radius: 22px; }
.pv-head { display: flex; align-items: center; gap: 14px; }
.pv-info { flex: 1; min-width: 0; }
.pv-info h1 { font-size: 20px; margin: 0 0 2px; }
.pv-edit { flex: none; border-radius: 999px; padding: 8px 16px; }
.pv-stats {
  display: flex; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid #f0f3fa;
}
.pv-stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.pv-stat b { font-size: 19px; font-weight: 800; }
.pv-stat span { font-size: 12px; color: var(--ink-3); }

/* ---------- 资源专区 ---------- */
.res-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px; border-radius: 18px;
}
.res-icon {
  width: 54px; height: 54px; border-radius: 14px; flex: none;
  object-fit: cover; background: #eef2ff;
}
.res-icon.lg { width: 68px; height: 68px; }
.res-icon-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: linear-gradient(135deg, #e8f0ff, #f0ecff);
}
.res-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-tx strong { font-size: 15.5px; }
.res-cat {
  align-self: flex-start; font-size: 11px; color: #5B8DEF;
  background: #edf1ff; padding: 1px 8px; border-radius: 999px; margin-top: 2px;
}
.res-detail { border-radius: 22px; }
.res-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f3fa; }
.res-meta a { display: flex; align-items: center; gap: 8px; }
.dl-btn {
  width: 100%; margin-top: 18px; padding: 13px 0;
  border-radius: 999px; font-size: 16px; font-weight: 700;
}
.dz-icon {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed #b9c6ef; border-radius: 16px; background: #fbfcff;
  padding: 18px 0; font-size: 15px; color: var(--ink-2); cursor: pointer;
}

/* ---------- 关于 / 游客提示 / 登录 ---------- */
.about-card { text-align: center; border-radius: 22px; padding: 28px 20px; }
.about-logo {
  width: 72px; height: 72px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; border-radius: 22px;
  background: linear-gradient(135deg, #e8f0ff, #f0ecff);
}
.about-sec { text-align: left; background: #f8faff; border-radius: 14px; padding: 12px 14px; margin: 14px 0; }
.about-sec p { margin: 6px 0 0; }
.logout-btn {
  width: 100%; margin: 16px 0 8px; padding: 13px 0;
  border-radius: 999px; border: 1.5px solid #c9d4f5;
  background: rgba(255,255,255,.9); color: #5B7BD5;
  font-size: 15.5px; font-weight: 700;
}
.guest-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(90, 100, 160, .35); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.guest-card {
  background: #fff; border-radius: 24px; padding: 28px 22px;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(60,70,140,.3);
}
.guest-card h2 { margin: 4px 0 6px; font-size: 19px; }
.oauth-row { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.oauth-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1.5px solid #e4e9f7; background: #fbfcff; border-radius: 14px;
  padding: 10px 22px; font-size: 12px; color: var(--ink-2);
}
.oauth-btn span { font-size: 22px; }
.auth-card .seg-tabs { margin: 12px 0 4px; }

/* 资源板块入口横幅 */
.res-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #e8f0ff, #f0ecff);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 14px; color: #4a6fd4; font-weight: 600;
}

/* ============================================================
   星空社区 v1.3 · 14 页定稿逐页还原
   ============================================================ */

/* ---------- 顶栏：左菜单 + 居中标题 + 右头像 ---------- */
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 46px; gap: 10px;
}
.nav-menu {
  border: 0; background: none; font-size: 21px; color: var(--ink);
  padding: 4px 8px; cursor: pointer; line-height: 1;
}
.nav-title { font-size: 19px; font-weight: 900; color: var(--ink); letter-spacing: 1px; }
.topnav { display: flex; align-items: center; min-width: 34px; justify-content: flex-end; }
.topnav .avatar, .topnav img { width: 32px; height: 32px; border-radius: 50%; }
.nav-login { border-radius: 999px; padding: 6px 18px; }

/* ---------- 抽屉菜单 ---------- */
.drawer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 95; pointer-events: none; }
.drawer-mask {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(80,88,150,.32);
  opacity: 0; transition: opacity .25s;
}
.drawer-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 272px;
  background: linear-gradient(180deg, #f2f5ff, #f6f2ff);
  box-shadow: 8px 0 32px rgba(60,70,140,.18);
  transform: translateX(-100%); transition: transform .25s;
  padding: 18px 14px; overflow-y: auto;
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-mask { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; font-size: 17px; padding: 6px 8px 16px; }
.drawer-logo { font-size: 26px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px; color: var(--ink); font-size: 15px;
}
.drawer-nav a:active, .drawer-nav a:hover { background: rgba(109,124,246,.1); }
.drawer-nav a .cnt { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* ---------- 登录页：四版式 ---------- */
.auth-page { max-width: 420px; margin: 4px auto 0; padding: 4px 2px 24px; }
.auth-back {
  border: 0; background: none; font-size: 26px; color: var(--ink);
  line-height: 1; padding: 6px 10px 6px 0; cursor: pointer;
}
.auth-big-title { font-size: 26px; font-weight: 900; margin: 10px 0 18px; }
.auth-panel { border-radius: 22px; padding: 22px 18px; box-shadow: 0 8px 28px rgba(91,141,239,.10); }
.auth-panel input {
  border-radius: 999px; background: #f4f6fd; border: 1px solid #eef1fa;
  padding: 12px 16px; font-size: 15px;
}
.auth-panel .form-row label { font-size: 13px; }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 76px !important; }
.pw-eye {
  position: absolute; right: 10px; bottom: 9px;
  border: 0; background: none; color: var(--ink-3); font-size: 12px; cursor: pointer;
}
.auth-submit {
  width: 100%; padding: 13px 0; border-radius: 999px;
  font-size: 16px; font-weight: 700; letter-spacing: 4px;
}
.auth-agree { text-align: center; font-size: 12px; color: var(--ink-3); margin: 12px 0 0; }
.auth-agree a { color: #5B7BD5; }
.auth-alt {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 26px; font-size: 15px;
}
.auth-alt a { color: var(--ink); font-weight: 600; }
.alt-sep { width: 1px; height: 14px; background: #d4daea; }
.auth-tip-card {
  background: rgba(255,255,255,.85); border-radius: 16px;
  padding: 26px 0; text-align: center; font-size: 16px; color: var(--ink);
  box-shadow: 0 4px 16px rgba(91,141,239,.08); margin-bottom: 26px;
}
.oauth-brand-row { display: flex; gap: 14px; margin: 8px 0 6px; }
.oauth-brand {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 0;
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.oauth-brand .ob-ic { font-size: 18px; }
.oauth-brand.wx { background: #07C160; box-shadow: 0 5px 16px rgba(7,193,96,.35); }
.oauth-brand.qq { background: #12B7F5; box-shadow: 0 5px 16px rgba(18,183,245,.35); }
.sms-code-btn { border-radius: 999px; white-space: nowrap; }

/* ---------- 设置页：独立卡片条目 ---------- */
.set-item {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; margin-bottom: 10px; border-radius: 18px;
  font-size: 15px; cursor: pointer;
}
.set-item .mi-arrow { margin-left: auto; color: #c3cad9; font-size: 18px; text-decoration: none; }
.set-item .switch { margin-left: auto; }

/* ---------- 发布页：顶部操作行 + 底部工具栏 ---------- */
.editor-top-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 12px; gap: 10px;
}
.editor-title { font-size: 20px; font-weight: 900; margin: 0; }
.ed-cancel { border: 0; background: none; color: var(--ink-2); font-size: 15px; }
.ed-publish { border-radius: 999px; padding: 9px 26px; letter-spacing: 2px; }
.editor-toolbar {
  display: flex; gap: 8px; margin: 12px 0 4px;
  background: rgba(255,255,255,.95); border-radius: 16px; padding: 10px;
  box-shadow: 0 4px 16px rgba(91,141,239,.08);
}
.tool-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 0; background: none; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
}
.tool-btn span { font-size: 19px; }

/* ---------- 消息中心：下划线 tabs ---------- */
.msg-tabs { justify-content: space-around; margin-bottom: 12px; }

/* ---------- 分区页排序 tabs ---------- */
.board-sort-tabs { justify-content: flex-start; gap: 26px; margin: 0 0 12px; }
.board-sort-tabs .tab { font-size: 15px; }

/* ---------- 游客提示 v2 ---------- */
.guest-head { display: flex; align-items: center; gap: 12px; }
.guest-logo {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: linear-gradient(135deg, #e8f0ff, #f0ecff);
}
.guest-head b { font-size: 18px; }
.guest-skip {
  width: 100%; padding: 12px 0; border-radius: 999px;
  border: 1.5px solid #c9d4f5; background: #fff;
  color: #5B7BD5; font-size: 15.5px; font-weight: 700;
}

/* ============================================================
   星空社区 v1.4 · UI 方向稿（feishu 方案）对齐
   ============================================================ */

/* ---------- 发布按钮：渐变圆形加号 ---------- */
.tabbar .fab {
  border-radius: 50%;
  width: 54px; height: 54px; margin-top: -22px;
}

/* ---------- 首页顶栏：社区名 + 搜索/铃铛图标 ---------- */
.nav-ic {
  border: 0; background: none; font-size: 20px; line-height: 1;
  padding: 4px; cursor: pointer; position: relative; color: var(--ink);
}
.nav-ic .dot {
  position: absolute; top: 0; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d6a; border: 1.5px solid #fff;
}
.topnav.multi { gap: 6px; }

/* ---------- 首页资源卡片（混排） ---------- */
.feed-res {
  display: flex; align-items: center; gap: 12px;
  border-radius: 18px; padding: 13px 14px; margin-bottom: 10px;
  background: #fff; box-shadow: 0 6px 22px rgba(99,123,255,.09);
}
.feed-res .res-icon { width: 52px; height: 52px; }
.feed-res .fr-dl {
  border: 0; border-radius: 999px; padding: 7px 16px;
  background: var(--grad); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 3px 10px rgba(99,123,255,.35); flex: none;
}
.fr-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-tx strong { font-size: 15px; }
.fr-tags { display: flex; gap: 6px; }
.fr-tag {
  font-size: 10.5px; color: #637BFF; background: #eef1ff;
  padding: 1px 7px; border-radius: 999px;
}
.fr-dlcnt { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 资源详情 v2 ---------- */
.res-hero {
  display: flex; align-items: center; gap: 14px;
  border-radius: 20px; padding: 18px 16px; background: #fff;
  box-shadow: 0 6px 22px rgba(99,123,255,.09);
}
.res-hero .res-icon { width: 72px; height: 72px; border-radius: 18px; }
.res-hero h1 { font-size: 20px; margin: 0 0 4px; }
.res-shot-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px;
  scrollbar-width: none;
}
.res-shot {
  width: 150px; height: 220px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #aab4d8; background: linear-gradient(160deg, #eef1ff, #f3edff);
}
.res-fileinfo {
  border-radius: 18px; padding: 14px 16px; background: #fff;
  box-shadow: 0 6px 22px rgba(99,123,255,.09);
  display: flex; flex-direction: column; gap: 8px; font-size: 13.5px;
}
.res-badge {
  display: inline-block; font-size: 11px; padding: 2px 10px;
  border-radius: 999px; background: #e8f9ef; color: #18a058;
}
.res-comments { display: flex; flex-direction: column; gap: 10px; }
.rc-item {
  display: flex; gap: 10px; background: #fff; border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 4px 16px rgba(99,123,255,.07);
}
.rc-body { flex: 1; min-width: 0; font-size: 14px; }
.rc-body .name { font-weight: 700; font-size: 13.5px; margin-right: 6px; }
.rc-sub { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.rc-reply-btn { border: 0; background: none; color: #637BFF; font-size: 12px; padding: 0; }
.res-favbar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 70; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.97); border-radius: 999px;
  padding: 8px; box-shadow: 0 8px 28px rgba(99,123,255,.22);
  max-width: 560px; margin: 0 auto;
}
.res-favbar .rf-input {
  flex: 1; border: 0; background: none; font-size: 14px;
  padding: 6px 4px 6px 14px; min-width: 0; outline: none;
}
.rf-btn {
  border: 0; background: none; font-size: 18px; padding: 6px 8px;
  position: relative; cursor: pointer;
}
.rf-btn .cnt { font-size: 11px; color: var(--ink-3); vertical-align: top; margin-left: 2px; }
.rf-btn.on { filter: hue-rotate(0deg); }
.rf-btn.on .ic { transform: scale(1.08); }
.rf-send {
  border: 0; padding: 9px 18px; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 700;
}

/* ---------- 发布页双标签 ---------- */
.pub-tabs {
  display: flex; background: rgba(255,255,255,.95); border-radius: 999px;
  padding: 4px; margin: 6px auto 14px; max-width: 420px;
  box-shadow: 0 4px 18px rgba(99,123,255,.10);
}
.pub-tabs .seg { font-size: 15px; padding: 9px 0; }

/* ---------- 个人主页 v3：渐变头图 ---------- */
.pf-hero {
  border-radius: 20px; overflow: hidden; background: #fff;
  box-shadow: 0 8px 28px rgba(99,123,255,.12);
}
.pf-banner {
  height: 92px;
  background: linear-gradient(120deg, #637BFF, #A87BFF);
  position: relative;
}
.pf-main { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -34px; }
.pf-main .avatar, .pf-main img.avatar { border: 3px solid #fff; border-radius: 50%; }
.pf-id { flex: 1; min-width: 0; padding-bottom: 4px; }
.pf-id h1 { font-size: 19px; margin: 0; }
.pf-id .bio { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.pf-edit { margin: 0 16px 12px; display: flex; justify-content: flex-end; }
.pf-edit .btn { border-radius: 999px; padding: 7px 18px; }
.pf-stats { display: flex; padding: 10px 8px 14px; border-top: 1px solid #f0f3fa; margin: 12px 0 0; }
.pf-tabs { display: flex; margin-top: 12px; }
.pf-tabs .tab { flex: 1; text-align: center; }

/* ---------- 消息中心：通知/私聊 + 五分类 ---------- */
.msg-seg { display: flex; gap: 14px; margin: 0 0 10px; }
.msg-seg .seg-btn {
  border: 0; background: none; font-size: 16px; font-weight: 800;
  color: var(--ink-3); padding: 6px 2px; position: relative; cursor: pointer;
}
.msg-seg .seg-btn.active { color: var(--ink); }
.msg-seg .seg-btn.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 22px; height: 3.5px; border-radius: 4px; background: var(--grad);
}
.msg-tabs2 { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.msg-tabs2 .tab { flex: none; font-size: 13.5px; padding: 6px 12px; }
.msg-tabs2 .tab.active { color: #637BFF; }
.msg-tabs2 .tab.active::after { left: 50%; transform: translateX(-50%); width: 18px; background: var(--grad); }
.chip-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ff4d6a; margin-left: 4px; vertical-align: top;
}
.item-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff4d6a; margin-top: 6px; }

/* ============================================================
   v1.5 星空社区 App 视觉稿还原（六页定稿）
   ============================================================ */
:root { --hero-grad: linear-gradient(135deg, #2F6BFF 0%, #4A5CFF 45%, #9B4DFF 100%); }
.avatar.xxs { width: 22px; height: 22px; font-size: 11px; border-radius: 50%; }
.avatar.md { width: 52px; height: 52px; font-size: 20px; border-radius: 50%; }
.avatar.xl { width: 76px; height: 76px; font-size: 28px; border-radius: 50%; }

/* 隐藏旧壳：每页自带渐变头 */
.topbar, .footer, .layout .sidebar { display: none !important; }
.layout { max-width: 640px; margin: 0 auto; padding: 0 0 84px; }
.content { padding: 0 12px; }

/* ---------- 渐变头部 ---------- */
.app-hero {
  margin: 0 -12px; padding: 26px 18px 18px;
  background: var(--hero-grad); color: #fff;
  border-radius: 0 0 24px 24px;
}
.app-hero.slim { padding: 20px 16px 16px; border-radius: 0 0 20px 20px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-tt h1 { margin: 0; font-size: 26px; letter-spacing: 1px; }
.hero-tt p { margin: 4px 0 0; font-size: 12.5px; opacity: .85; }
.hero-acts { display: flex; gap: 16px; font-size: 20px; }
.hero-acts a { position: relative; opacity: .95; }
.hero-acts .dot { position: absolute; top: 0; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: #ff4d6a; border: 1.5px solid #fff; }
.hero-title-c { margin: 0; font-size: 19px; font-weight: 700; }

/* ---------- 首页金刚区 ---------- */
.kk-wrap { margin: -8px 0 0; position: relative; z-index: 2; }
.kk-card {
  background: #fff; border-radius: 20px; padding: 18px 8px 10px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 4px;
  box-shadow: 0 6px 18px rgba(47,91,255,.10);
}
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); }
.kk-ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #f3f5fa; color: #4a5573;
}
.kk-ic.c-blue, .kk-ic.c-green, .kk-ic.c-sky, .kk-ic.c-orange,
.kk-ic.c-yellow, .kk-ic.c-indigo, .kk-ic.c-pink, .kk-ic.c-blue2 {
  background: #f3f5fa; color: #4a5573;
}

/* ---------- 首页标签 + 瀑布流 ---------- */
.home-tabs { margin: 16px 2px 12px; border-bottom: 0; }
.home-tabs .tab { font-size: 16.5px; color: var(--ink-2); font-weight: 600; }
.home-tabs .tab.active { color: var(--ink); }
.home-tabs .tab.orange.active { color: #ff8a3d; }
.wf-grid { columns: 2; column-gap: 12px; }
.wf-grid .state { columns: 1; }
.wf-card {
  break-inside: avoid; margin: 0 0 12px; background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); display: block;
}
.wf-cover { display: block; position: relative; }
.wf-cover img { width: 100%; min-height: 120px; object-fit: cover; }
.wf-cover-ph { width: 100%; height: 130px; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: rgba(255,255,255,.85); }
.wf-play { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.wf-title { display: block; padding: 10px 12px 4px; font-weight: 600; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.wf-foot { display: flex; align-items: center; gap: 6px; padding: 6px 12px 12px; font-size: 12px; color: var(--ink-3); }
.wf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-acts { display: flex; gap: 10px; align-items: center; }
.wf-acts button { border: 0; background: none; color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 0; }
.wf-acts a { display: inline-flex; align-items: center; gap: 3px; }
.wf-res { padding: 18px 14px 16px; text-align: center; }
.wf-res-ic { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 22px; background: linear-gradient(135deg,#e8efff,#d7e5ff); font-size: 38px; overflow: hidden; }
.wf-res-ic img { width: 100%; height: 100%; object-fit: cover; }
.wf-res-name { display: block; font-size: 16px; margin-bottom: 12px; color: var(--ink); }
.wf-res-dl { display: inline-block; padding: 7px 22px; border-radius: 20px; background: #3D6BFF; color: #fff; font-size: 13.5px; }
.wf-card.rank { text-align: left; padding: 14px; }
.wf-card.rank .wf-res-ic { width: 56px; height: 56px; margin: 0 0 10px; border-radius: 16px; font-size: 26px; }
.wf-rank-dl { display: block; margin-top: 8px; color: #ff8a3d; font-size: 12.5px; font-weight: 600; }

/* ---------- 分区页 ---------- */
.bd-search {
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 22px; padding: 10px 16px; color: var(--ink-3);
}
.bd-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 14px; }
.bd-tabs { display: flex; gap: 18px; overflow-x: auto; margin: 0 -12px 4px; padding: 14px 14px 10px; scrollbar-width: none; background: linear-gradient(180deg, #eef1ff 0%, var(--bg) 100%); }
.bd-tab { flex: none; border: 0; background: none; font-size: 15px; color: var(--ink-2); font-weight: 600; padding: 4px 2px; position: relative; }
.bd-tab.active { color: var(--ink); }
.bd-tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -6px; width: 20px; height: 3.5px; border-radius: 4px; background: #3D6BFF; }
.bd-feed { margin-top: 10px; }
.bd-post { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.bd-post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bd-post-name { font-weight: 600; font-size: 14px; }
.bd-post-board { font-size: 11.5px; color: #3D6BFF; background: #eaf0ff; border-radius: 12px; padding: 2px 9px; font-weight: 600; }
.bd-post-more { margin-left: auto; color: var(--ink-3); }
.bd-post-main { display: flex; gap: 12px; }
.bd-post-tx { flex: 1; min-width: 0; }
.bd-post-tx h3 { font-size: 16.5px; margin: 0 0 4px; line-height: 1.4; }
.bd-post-tx p { margin: 0; font-size: 13px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-post-thumb { width: 92px; height: 70px; border-radius: 12px; object-fit: cover; flex: none; }
.bd-post-foot { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); align-items: center; }
.bd-post-foot b { font-weight: 500; color: var(--ink-2); }
.bd-post-foot .note-like { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; padding: 0; }
.bd-post-foot a { display: inline-flex; gap: 4px; align-items: center; }
.bd-res { display: flex; gap: 12px; background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); align-items: flex-start; }
.bd-res-ic { flex: none; width: 72px; height: 72px; border-radius: 18px; background: linear-gradient(135deg,#3D6BFF,#5A8BFF); color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bd-res-ic img { width: 100%; height: 100%; object-fit: cover; }
.bd-res-tx { flex: 1; min-width: 0; }
.bd-res-tx strong { font-size: 16px; }
.bd-res-tx p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bd-res-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bd-res-cnt { font-size: 12px; color: var(--ink-3); }
.bd-res-btn { background: #3D6BFF; color: #fff; border-radius: 18px; padding: 7px 18px; font-size: 13.5px; font-weight: 600; }
.fr-tag { display: inline-block; font-size: 11px; border-radius: 8px; padding: 2px 8px; background: #eef1f6; color: var(--ink-2); font-weight: 600; }
.fr-tag.blue { background: #eaf0ff; color: #3D6BFF; }
.fr-tag.yellow { background: #fff6dc; color: #c78a00; }
.fr-tag.gray { background: #f0f2f6; color: var(--ink-2); }

/* ---------- 消息中心 ---------- */
.msg2-tabs { display: flex; gap: 16px; overflow-x: auto; margin: 0 -12px 12px; padding: 14px 16px 12px; background: #fff; border-radius: 0 0 16px 16px; scrollbar-width: none; }
.msg2-tabs .tab { flex: none; border: 0; background: none; font-size: 15px; color: var(--ink-2); font-weight: 600; padding: 4px 2px; position: relative; }
.msg2-tabs .tab.active { color: var(--ink); }
.msg2-tabs .tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -4px; width: 20px; height: 3.5px; border-radius: 4px; background: #3D6BFF; }
.msg2-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 20px; padding: 18px 16px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(80,100,200,.06); position: relative; }
.msg2-sysic { flex: none; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,#4A7BFF,#9B4DFF); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.msg2-sysic.dm { background: linear-gradient(135deg,#4A5CFF,#7B4DFF); }
.msg2-tx { flex: 1; min-width: 0; }
.msg2-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.msg2-top strong { font-size: 15.5px; }
.msg2-time { font-size: 12px; color: var(--ink-3); flex: none; }
.msg2-tx p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.msg2-tx em { font-style: normal; display: block; color: var(--ink-3); }
.msg2-dot { position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #ff4d4f; color: #fff; font-size: 14px; text-align: center; line-height: 22px; transform: translateY(-50%); }

/* ---------- 个人主页 ---------- */
.pf-hero2 { margin: 0 -12px; padding: 18px 20px 58px; background: var(--hero-grad); color: #fff; }
.pf2-top { display: flex; justify-content: flex-end; min-height: 26px; }
.pf2-gear { font-size: 20px; opacity: .9; }
.pf2-main { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.pf2-main .avatar { border: 3px solid rgba(255,255,255,.85); border-radius: 50%; }
.pf2-id h1 { margin: 0; font-size: 21px; }
.pf2-id .bio { font-size: 13px; opacity: .88; margin-top: 3px; }
.pf2-stats { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.pf2-stat { display: flex; flex-direction: column; color: #fff; }
.pf2-stat b { font-size: 21px; }
.pf2-stat span { font-size: 11.5px; opacity: .82; margin-top: 2px; }
.pf2-stat.follow { margin-left: auto; }
.pf2-follow { border: 0; background: #fff; color: #3D6BFF; font-weight: 700; font-size: 14.5px; border-radius: 22px; padding: 9px 26px; }
.pf2-follow.ghost { display: inline-block; background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.7); text-decoration: none; }
.pf2-panel { margin: -40px 0 0; background: #fff; border-radius: 22px 22px 0 0; padding: 18px 14px 20px; position: relative; }
.pf2-profile-card { display: flex; align-items: center; gap: 12px; background: #f6f8ff; border-radius: 16px; padding: 13px 14px; margin-bottom: 16px; }
.pf2-pc-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg,#4A7BFF,#9B4DFF); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.pf2-pc-tx { flex: 1; display: flex; flex-direction: column; }
.pf2-pc-tx strong { font-size: 15.5px; }
.pf2-pc-tx span { font-size: 12px; color: var(--ink-3); }
.pf2-pc-arrow { font-size: 12.5px; color: var(--ink-3); }
.pf2-tabs { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.pf-res { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(80,100,200,.05); }
.pf-res-ic { flex: none; width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg,#5A8BFF,#9B4DFF); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pf-res-ic img { width: 100%; height: 100%; object-fit: cover; }
.pf-res-tx { flex: 1; min-width: 0; }
.pf-res-name { display: flex; align-items: center; gap: 8px; }
.pf-res-name strong { font-size: 15.5px; }
.pf-res-ver { font-size: 12px; color: #3D6BFF; margin-top: 3px; display: block; }
.pf-res-tx p { margin: 4px 0; font-size: 13px; color: var(--ink-2); }
.pf-res-dl { font-size: 12.5px; color: var(--ink-3); display: block; text-align: right; }
.pf-res-dl b { color: var(--ink); }

/* ---------- 我的：长页面上下滑动 ---------- */
.pf-page { padding-bottom: 6px; }
.pf-hero2 { padding-bottom: 72px; }
.pf2-top { align-items: center; min-height: 30px; }
.pf2-follow { border: 0; background: #fff; color: #3D6BFF; font-weight: 700; font-size: 13.5px; border-radius: 999px; padding: 7px 20px; }
.pf2-follow.ghost { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.75); }
.pf2-stats { gap: 0; justify-content: space-between; }
.pf2-stat { flex: 1; align-items: flex-start; }

.pf-mini {
  position: fixed; left: 0; right: 0; top: var(--tb-h, 0px); z-index: 48;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #eef1fa;
  transform: translateY(-110%); opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .18s ease;
}
.pf-mini.on { transform: none; opacity: 1; pointer-events: auto; box-shadow: 0 6px 18px rgba(60,80,160,.08); }
.pf-mini-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 9px; padding: 8px 14px; }
.pf-mini-in strong { font-size: 15px; }
.pf-mini .avatar { width: 30px; height: 30px; flex: none; }
.pf-mini-sp { flex: 1; }
.pf-mini-btn { font-size: 12.5px; color: #3D6BFF; border: 1px solid rgba(61,107,255,.4); border-radius: 999px; padding: 4px 12px; }

.pf-recent { background: linear-gradient(180deg,#f7faff,#fff); border: 1px solid #e9f0ff; border-radius: 16px; padding: 12px 12px 10px; margin-bottom: 14px; }
.pf-recent-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pf-recent-hd strong { font-size: 14.5px; }
.pf-recent-more { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; padding: 0; }
.pf-recent-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pf-recent-row::-webkit-scrollbar { display: none; }
.pf-rc { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pf-rc-ic { width: 52px; height: 52px; border-radius: 15px; background: #fff; box-shadow: 0 3px 10px rgba(80,100,200,.12); display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; }
.pf-rc-ic img { width: 100%; height: 100%; object-fit: cover; }
.pf-rc-nm { font-size: 11.5px; color: var(--ink-2); width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-quick { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 4px; margin-bottom: 14px; }
.pf-q { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); position: relative; }
.pf-q + .pf-q::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.pf-q:active { opacity: .6; }
.pf-q-ic { font-size: 21px; line-height: 1; }

.pf-block { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px 6px; margin-bottom: 14px; }
.pf-block-hd { font-size: 14.5px; font-weight: 800; margin: 0 6px 8px; }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pf-gi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 12px; }
.pf-gi:active { opacity: .6; }
.pf-gi-ic { width: 44px; height: 44px; border-radius: 14px; background: #f3f5fa; color: #4a5573; display: flex; align-items: center; justify-content: center; }
.pf-gi-tx { font-size: 11.5px; color: var(--ink-2); text-align: center; }
.pf-gi-ic-plain { background: #fff; color: #4a5573; box-shadow: inset 0 0 0 1px #eef1fa; }
.pf-gi-ic .pf-brand { width: 100%; height: 100%; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px; font-weight: 800; letter-spacing: 1px; }

/* ---------- 帮助中心 / 官方客服弹窗 ---------- */
.faq-list { max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.faq-item summary { font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; float: right; color: var(--ink-3); }
.faq-item[open] summary::after { content: "－"; }
.faq-item p { margin: 8px 0 2px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.service-box { background: #f6f8ff; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.service-box p { margin: 0 0 6px; }
.service-box p:last-child { margin: 0; }

.pf-hot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 2px 8px; }
.pf-hot-c { display: flex; gap: 10px; align-items: center; background: #f8faff; border-radius: 14px; padding: 10px; min-width: 0; }
.pf-hot-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg,#5A8BFF,#9B4DFF); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; overflow: hidden; }
.pf-hot-ic img { width: 100%; height: 100%; object-fit: cover; }
.pf-hot-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pf-hot-tx strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-hot-tx span { font-size: 11px; color: var(--ink-3); }

.pf-block-content { padding: 2px 12px 10px; }
.pf-block-content .pf2-tabs { margin: 0 -12px 12px; padding: 0 8px; }
.pf-foot { text-align: center; color: #b7bdcc; font-size: 11.5px; padding: 18px 0 4px; }

.pf-top {
  position: fixed; right: 14px; bottom: 88px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.97); color: #3D6BFF; font-size: 18px; line-height: 1;
  box-shadow: 0 6px 18px rgba(80,100,200,.2);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s;
}
.pf-top.on { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 960px) { .pf-top { bottom: 30px; } }

/* ---------- 发布页 ---------- */
.pub-hero { border-radius: 0 0 0 0; padding-bottom: 46px; }
.pub-cancel { border: 0; background: none; color: #fff; font-size: 15px; }
.pub-submit-top { border: 0; background: #fff; color: #3D6BFF; font-weight: 700; border-radius: 20px; padding: 8px 22px; font-size: 14.5px; }
.pub-panel { margin: -32px 0 0; background: #fff; border-radius: 20px 20px 0 0; padding: 14px 14px 22px; position: relative; }
.pub-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.pub-tabs .seg { flex: 1; border: 0; background: none; font-size: 15.5px; font-weight: 600; color: var(--ink-2); padding: 10px 0; position: relative; }
.pub-tabs .seg.active { color: #3D6BFF; }
.pub-tabs .seg.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: #3D6BFF; }
.pub-page .editor-top-row { display: none; }
.pub-group { background: #f7f9ff; border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.pg-title { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.pg-arrow { color: var(--ink-3); }
.pg-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.pg-row:last-child { margin-bottom: 0; }
.pg-row label { flex: none; width: 64px; font-size: 13.5px; color: var(--ink); padding-top: 9px; }
.pg-row input, .pg-row textarea { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; background: #fff; outline: none; }
.pg-row input:focus, .pg-row textarea:focus { border-color: #3D6BFF; }
.pg-file { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.pg-file-ic { flex: none; width: 54px; height: 54px; border-radius: 13px; background: #3D6BFF; color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.pg-file-ic img { width: 100%; height: 100%; object-fit: cover; }
.pg-file-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-file-tx strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-file-size { font-size: 12px; color: var(--ink-3); }
.pg-file-limit { font-size: 11.5px; color: #3D6BFF; }
.pg-file-btn { flex: none; border: 0; background: #3D6BFF; color: #fff; border-radius: 18px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; }
.pg-shots { display: flex; gap: 10px; overflow-x: auto; }
.pg-shot { flex: none; width: 96px; height: 72px; border-radius: 12px; background: #e8ebf2; border: 0; position: relative; overflow: hidden; }
.pg-shot img { width: 100%; height: 100%; object-fit: cover; }
.pg-shot.add { color: var(--ink-3); font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pg-shot-rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; }
.pub-submit { width: 100%; border: 0; background: linear-gradient(135deg,#2F6BFF,#4A5CFF); color: #fff; font-size: 16.5px; font-weight: 700; border-radius: 26px; padding: 14px 0; margin-top: 6px; }

/* ---------- 资源详情 ---------- */
.rd-hero { border-radius: 0 0 0 0; padding-bottom: 54px; }
.rd-back { border: 0; background: none; color: #fff; font-size: 22px; line-height: 1; }
.rd-report { border: 0; background: none; font-size: 19px; cursor: pointer; }
.rd-report:active { opacity: .6; }
.rd-card { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(80,100,200,.06); }
.rd-card.shots { padding: 12px; }
.rd-head { display: flex; gap: 14px; align-items: flex-start; }
.rd-icon { flex: none; width: 76px; height: 76px; border-radius: 20px; background: linear-gradient(135deg,#3D6BFF,#5A8BFF); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rd-icon img { width: 100%; height: 100%; object-fit: cover; }
.rd-head-tx { flex: 1; min-width: 0; }
.rd-head-tx h1 { font-size: 18.5px; margin: 2px 0 8px; }
.rd-os { margin-left: auto; flex: none; }
.rd-meta { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.rd-meta-row { display: flex; align-items: center; gap: 18px; font-size: 14px; margin-bottom: 8px; }
.rd-meta-row b { font-weight: 600; }
.rd-meta-row.sub { font-size: 12.5px; color: var(--ink-3); gap: 10px; flex-wrap: wrap; }
.rd-up { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.rd-up:active { opacity: .55; }
.rd-up .avatar { flex: none; }
.rd-up .avatar img { width: 100%; height: 100%; object-fit: cover; }
.rd-up-arrow { margin-left: 1px; font-size: 15px; line-height: 1; color: var(--ink-3); }
.rd-ok { font-style: normal; margin-left: auto; color: #2fa452; font-weight: 600; }
.res-shot-strip { display: flex; gap: 10px; overflow-x: auto; }
.res-shot { flex: none; width: 128px; height: 84px; border-radius: 12px; background: linear-gradient(135deg,#e8efff,#dbe7ff); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.rd-intro-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rd-intro-head h3 { margin: 0; font-size: 16.5px; }
.rd-intro-report { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--ink-3); cursor: pointer; }
.rd-intro-report:active { opacity: .55; }
.rd-dlbtn { width: 100%; border: 0; margin-top: 14px; background: linear-gradient(135deg,#2F6BFF,#4A5CFF); color: #fff; font-size: 16.5px; font-weight: 700; border-radius: 26px; padding: 13px 0; }
.rd-dl-cnt { font-weight: 400; font-size: 13px; opacity: .85; }
.rd-cm-title { margin: 0 0 12px; font-size: 16.5px; }

/* ---------- 底部导航 v2 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: space-around;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar a[data-tab] { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 2px 0; }
.tabbar a .ic { font-size: 21px; line-height: 1.2; }
.tabbar a.active { color: #3D6BFF; font-weight: 600; }
.tabbar .fab {
  flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
}
.tabbar .fab span {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 50%;
  background: linear-gradient(135deg,#4A7BFF,#9B4DFF); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(74,92,255,.42); border: 4px solid #fff;
}

/* ============================================================
   v1.8 严格对齐效果图：标签行左右分组 + 头部白色线条图标
   ============================================================ */
.hero-acts a { color: #fff; display: inline-flex; }
.hero-acts svg { display: block; }
.home-tabs { display: flex; align-items: baseline; justify-content: space-between; }
.home-tabs .ht-left { display: flex; gap: 22px; }
.home-tabs .tab { font-size: 16.5px; color: var(--ink-2); font-weight: 600; position: relative; }
.home-tabs .tab.active { color: var(--ink); }
.home-tabs .tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -6px; width: 20px; height: 3.5px; border-radius: 4px; background: #3D6BFF; }
.home-tabs .tab.orange { color: #ff8a3d; font-weight: 700; }
.home-tabs .tab { border: 0; background: none; padding: 2px 0; }

/* ---------- 头像直接上传 ---------- */
.avatar-upload {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: #f6f8ff; border: 1.5px dashed #b9c6f5; border-radius: 16px;
  padding: 12px 16px; transition: opacity .2s;
}
.avatar-upload img, .avatar-upload .avatar-ph {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #4A7BFF, #9B4DFF);
}
.avatar-up-tip { font-size: 13px; color: var(--ink-3); line-height: 1.6; }

/* ---------- 应用选择弹窗（App 内从已装应用上传） ---------- */
.pg-file-btns { display: flex; flex-direction: column; gap: 8px; flex: none; }
.pg-file-btn.ghost { background: #eef3ff; color: #3D6BFF; }
.app-picker-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 90; background: rgba(20,25,45,.45);
  display: flex; align-items: flex-end;
}
.app-picker {
  width: 100%; max-height: 72vh; background: #fff;
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.ap-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; font-size: 16.5px; font-weight: 700;
}
.ap-close { color: var(--ink-3); font-size: 15px; padding: 2px 6px; }
.ap-list { overflow-y: auto; padding: 0 12px 18px; }
.ap-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px;
  border-radius: 14px; cursor: pointer;
}
.ap-item:active { background: #f2f5fc; }
.ap-item img, .ap-ph {
  width: 44px; height: 44px; border-radius: 12px; flex: none; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: #f0f2f8;
}
.ap-tx { min-width: 0; }
.ap-tx strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tx span { font-size: 12px; color: var(--ink-3); }
.pg-file-btn.ghost { background: #3D6BFF; color: #fff; }
.ap-tip { padding: 28px 12px; text-align: center; color: var(--ink-3); font-size: 14px; }

/* 资源详情：真实截图与放大浏览 */
.res-shot { object-fit: cover; cursor: zoom-in; }
.shot-viewer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; background: rgba(8,12,28,.94); display: flex; align-items: center; justify-content: center; }
.sv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: #fff; font-size: 15px; }
.sv-close { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; }
.sv-img { max-width: 94vw; max-height: 76vh; object-fit: contain; border-radius: 8px; }
.sv-nav { position: absolute; bottom: 34px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 20px; }
.sv-nav button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.sv-nav button:disabled { opacity: .25; }

/* ============================================================
   v1.21 帮助中心 / 客服中心（整页样板）
   ============================================================ */
body.no-tab .tabbar { display: none !important; }
body.no-tab .layout { padding-bottom: 0 !important; }
.content.hp-wrap, .content.cs-wrap { padding: 0 !important; }

.hp-page { min-height: 100vh; background: #fff; }
.hp-hd {
  position: sticky; top: 0; z-index: 30; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-bottom: 1px solid #f0f1f4;
}
.hp-hd h1 { margin: 0; font-size: 16.5px; font-weight: 600; color: #1b1f2a; letter-spacing: .2px; }
.hp-back {
  position: absolute; left: 4px; top: 0; width: 44px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; color: #23262e; cursor: pointer;
}
.hp-back:active { opacity: .5; }

.hp-body { padding-bottom: 104px; }
.hp-sec {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 16px 12px; font-size: 16px; font-weight: 700; color: #17181c;
}
.hp-sec::before, .cs-sec::before {
  content: ""; width: 3.5px; height: 16px; border-radius: 3px; background: #22c55e;
}
.hp-list { border-top: 1px solid #f2f3f5; }
.hp-q { border-bottom: 1px solid #f2f3f5; }
.hp-q > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 15px 16px; font-size: 14.5px; color: #23262e; line-height: 1.55;
}
.hp-q > summary::-webkit-details-marker { display: none; }
.hp-q > summary .q { flex: 1; min-width: 0; }
.hp-q > summary .ar { flex: none; display: flex; color: #c2c7d2; transition: transform .2s; }
.hp-q[open] > summary .ar { transform: rotate(90deg); color: #9aa1af; }
.hp-q[open] > summary { color: #1b1f2a; font-weight: 600; }
.hp-q > p { margin: 0; padding: 0 16px 15px; font-size: 13.5px; color: #6b7280; line-height: 1.78; }
.hp-q > p::before {
  content: ""; display: block; height: 1px; background: #f4f5f7; margin: 0 0 11px;
}

.hp-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 640px; margin: 0 auto;
  display: flex; gap: 12px; padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #f0f1f4;
}
.hp-act {
  flex: 1; height: 45px; border-radius: 23px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff; text-decoration: none;
}
.hp-act.blue { background: linear-gradient(135deg,#3d9bff,#1f84f5); box-shadow: 0 6px 14px rgba(31,132,245,.22); }
.hp-act.green { background: linear-gradient(135deg,#2fc07a,#1ea866); box-shadow: 0 6px 14px rgba(30,168,102,.22); }
.hp-act:active { transform: translateY(1px); opacity: .92; }

/* 客服中心 */
.cs-page { min-height: 100vh; background: #f3f4f6; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.cs-welcome { display: flex; align-items: center; gap: 6px; padding: 16px 16px 14px; background: #fff; }
.cs-w-tx { flex: 1; min-width: 0; }
.cs-hi { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: .3px; color: #1e9bf0; }
.cs-wel { margin: 5px 0 9px; font-size: 16.5px; font-weight: 600; color: #56bdf2; }
.cs-time { margin: 0; font-size: 13px; color: #8a90a0; }
.cs-art { flex: none; width: 112px; height: 88px; display: flex; align-items: center; justify-content: center; }

.cs-warn {
  display: flex; gap: 6px; padding: 11px 14px; font-size: 12.8px; line-height: 1.65;
  color: #a8621b; background: #fff8e6; border-top: 1px solid #fbeed0; border-bottom: 1px solid #fbeed0;
}
.cs-card { background: #fff; margin-top: 10px; padding-bottom: 18px; }
.cs-sec { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; font-size: 16px; font-weight: 700; color: #17181c; }
.cs-entries { display: flex; justify-content: space-around; align-items: flex-start; padding: 8px 0 2px; }
.cs-entry {
  width: 44%; display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none; color: #3f4552; font-size: 13.5px;
}
.cs-entry:active { opacity: .7; }
.cs-ic { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cs-ic.blue { background: #6cb8f0; box-shadow: 0 8px 16px rgba(108,184,240,.34); }
.cs-ic.orange { background: #f5964f; box-shadow: 0 8px 16px rgba(245,150,79,.32); }
.cs-tip { margin: 0; padding: 2px 16px 4px; font-size: 13.5px; color: #6b7280; line-height: 1.85; }

/* ============================================================
   深色模式（body.dark）
   ============================================================ */
body.dark {
  --bg: #0f1117;
  --card: #181b24;
  --ink: #e6e8ef;
  --ink-2: #a0a6b5;
  --ink-3: #6f7585;
  --line: #262a36;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  background: #0f1117;
  color: #e6e8ef;
}
body.dark .topbar,
body.dark .tabbar,
body.dark .nav-drawer,
body.dark .drawer {
  background: #14171f;
  border-color: #262a36;
}
body.dark .card,
body.dark .msg2-card,
body.dark .pf-block,
body.dark .pf2-panel,
body.dark .set-item,
body.dark .menu-item,
body.dark .res-card,
body.dark .wf-card,
body.dark .bcard {
  background: #181b24;
  color: #e6e8ef;
  border-color: #262a36;
}
body.dark input,
body.dark textarea,
body.dark select {
  background: #1c2029;
  color: #e6e8ef;
  border-color: #2a2f3c;
}
body.dark input::placeholder,
body.dark textarea::placeholder { color: #6f7585; }
body.dark .btn:not(.btn-primary):not(.btn-danger) {
  background: #222632;
  color: #d6d9e2;
  border-color: #2f3542;
}
body.dark .muted,
body.dark .small { color: #8f96a6; }
body.dark .logout-btn { background: #181b24; color: #e6e8ef; border-color: #2a2f3c; }
body.dark .msg2-tabs,
body.dark .pf2-tabs { background: transparent; }
body.dark .tab.active { color: #fff; }

/* 账号信息行 */
.set-row-line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: 14px;
}
.set-row-line:last-of-type { border-bottom: 0; }
.set-row-line b { color: var(--ink); font-weight: 600; }

/* ============================================================
   旧内核兜底：不支持 gap 时的间距方案
   （安卓老系统 WebView 的 flex gap 需要 Chrome 84+）
   ============================================================ */
@supports not (gap: 1px) {
  /* 我的服务 8 宫格 / 快捷 4 图标 / 首页宫格：图标与文字间距 */
  .pf-gi > span + span { margin-top: 6px; }
  .pf-q  > span + span { margin-top: 6px; }
  .kk-item > * + * { margin-top: 6px; }

  /* 首页宫格：用内边距模拟 grid gap */
  .kk-card { padding: 12px 6px 4px; }
  .kk-item { padding: 7px 2px 9px; }

  /* 两列表单 */
  .grid2 > * { margin-bottom: 10px; }

  /* 横向排布元素间距 */
  .row > * + * { margin-left: 8px; }
  .topnav > * + * { margin-left: 8px; }
  .topbar-inner > * + * { margin-left: 8px; }
  .post-head > * + * { margin-left: 8px; }
  .post-foot > * + * { margin-left: 18px; }
  .sq-foot > * + * { margin-left: 18px; }
  .pf2-stats > * + * { margin-left: 10px; }
  .seg-tabs > * + * { margin-left: 6px; }
  .chip-row > * + * { margin-left: 6px; margin-bottom: 6px; }
  .res-meta > * + * { margin-left: 10px; }
  .pf-quick > * + * { margin-left: 0; }

  /* 竖向列表 */
  #msgList > * + * { margin-top: 10px; }
  .sq-feed > * + * { margin-top: 12px; }
  .menu-list > * + * { margin-top: 0; }
}

/* emoji 图标在旧系统上的对齐兜底 */
.pf-gi-ic, .pf-q-ic, .kk-ic {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 资源图标首字占位 ---------- */
.res-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: inherit;
  color: #fff; font-weight: 600; line-height: 1; font-size: 24px;
  box-sizing: border-box; overflow: hidden;
}
.rd-icon .res-ph { font-size: 30px; }
.res-icon.res-ph, .wf-res-ic .res-ph, .bd-res-ic .res-ph,
.pf-res-ic .res-ph, .pf-hot-ic .res-ph, .pf-rc-ic .res-ph, .res-icon-ph .res-ph {
  font-size: 20px;
}
