/* ========== 俱乐部瓜条 - 黑白灰卡片化主题 ========== */
:root {
  --bg: #f4f4f5;
  --bg-soft: #ececee;
  --card: #ffffff;
  --ink: #111113;
  --ink-2: #3f3f46;
  --ink-3: #71717a;
  --line: #e4e4e7;
  --line-dark: #d4d4d8;
  --accent: #18181b;
  --danger: #dc2626;
  --ok: #16a34a;
  --primary: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}

/* 深色模式（蓝灰冷调，与默认白顶栏拉开层次） */
[data-theme="dark"] {
  --bg: #121318;
  --bg-soft: #1a1c23;
  --card: #1e2028;
  --ink: #f2f3f6;
  --ink-2: #c4c7d0;
  --ink-3: #878c9a;
  --line: #2a2d37;
  --line-dark: #3b3f4c;
  --accent: #0a0b0f;
  --primary: #3b82f6;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 4px 18px rgba(0,0,0,.38);
}
[data-theme="dark"] .site-header {
  background: var(--accent); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
[data-theme="dark"] .logo-mark { background: #f4f4f5; color: #111; }
[data-theme="dark"] .main-nav a { color: #d4d4d8; }
[data-theme="dark"] .main-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
[data-theme="dark"] .main-nav a.active { color: #fff; background: rgba(255,255,255,.14); }
[data-theme="dark"] .main-nav .btn-nav { background: #f4f4f5; color: #111; }
[data-theme="dark"] .main-nav .btn-nav:hover { background: #d4d4d8; }
[data-theme="dark"] .main-nav .btn-nav.active { background: #f4f4f5; color: #111; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,.08); color: #d4d4d8; }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,.16); color: #fff; }
[data-theme="dark"] .nav-avatar { background: rgba(255,255,255,.14); color: #d4d4d8; }
[data-theme="dark"] .post-card { background: var(--card); }
[data-theme="dark"] .post-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.5); }
[data-theme="dark"] .search-bar input { background: var(--card); }
[data-theme="dark"] .badge-top { background: #f4f4f5; color: #111; }
[data-theme="dark"] .badge-featured { background: #3a3415; color: #fde68a; border-color: #5b521f; }
[data-theme="dark"] .side-title-icon { background: #f4f4f5; color: #111; }

/* 主题切换平滑过渡 */
body, .post-card, .search-bar input, .side-card, .detail-card, .auth-card, .publish-card,
textarea, input, select, .theme-toggle, .comment-item {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.container { flex: 1; width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--card);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--ink-3); padding: 7px 12px; border-radius: 8px; font-size: 14px;
  transition: background .15s, color .15s;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.main-nav a.active { color: var(--ink); background: var(--bg-soft); }
.main-nav .btn-nav { background: var(--ink); color: var(--card); font-weight: 600; }
.main-nav .btn-nav:hover { background: var(--ink-2); }
.main-nav .btn-nav.active { background: var(--ink); color: var(--card); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.theme-toggle {
  border: 0; background: var(--bg-soft); color: var(--ink-3);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--line); color: var(--ink); }

/* ---------- Hero / 搜索 ---------- */
.hero { padding: 20px 0 6px; text-align: center; }
.hero .hero-title { font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.search-bar { display: flex; gap: 8px; max-width: 480px; margin: 14px auto 12px; }
.search-bar input {
  flex: 1; padding: 11px 16px; border: 1px solid var(--line-dark); border-radius: 10px;
  font-size: 15px; background: var(--card); outline: none;
}
.search-bar input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.search-bar button {
  padding: 0 22px; background: var(--ink); color: #fff; border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}

/* 顶栏图标按钮 */
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; color: var(--ink-2);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav-icon:hover { background: var(--bg-soft); color: var(--ink); }
.nav-icon .icon { font-size: 18px; }

/* 圈子页 */
.circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.circle-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); text-decoration: none; transition: all .15s;
}
.circle-card:hover { border-color: var(--line-dark); background: var(--bg-soft); }
.circle-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--bg-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--ink-2);
}
.circle-icon-img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; display: block; }
.circle-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.circle-name { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.circle-count { font-size: 12px; color: var(--ink-3); }
.circle-arrow { color: var(--ink-3); font-size: 18px; flex-shrink: 0; }

/* 搜索页 */
.search-hero { padding: 16px 0 4px; }
.search-bar.search-page { max-width: 640px; margin: 6px auto 12px; }
.search-hero .cat-tabs { margin-top: 10px; }
.pager { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 22px 0 8px; }
.pager .btn-mini.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 640px) {
  .circle-grid { grid-template-columns: 1fr; }
}
.cat-tabs {
  display: flex; flex-wrap: nowrap; gap: 8px; align-items: center;
  justify-content: flex-start; padding: 2px 2px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  text-align: left;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a {
  flex-shrink: 0; white-space: nowrap;
  padding: 6px 16px; border-radius: 999px; background: var(--bg-soft);
  color: var(--ink-2); font-size: 14px; border: 1px solid var(--line);
}
.cat-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 卡片列表 ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; padding: 22px 0 10px;
}
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.card-cover { aspect-ratio: 16/9; background: #111; position: relative; overflow: hidden; }
.card-cover img, .card-cover video { width: 100%; height: 100%; object-fit: cover; }
.play-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 30px; background: rgba(0,0,0,.25); pointer-events: none;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.cat-chip {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2);
  padding: 2px 10px; border-radius: 999px; font-size: 12px;
}
.time { color: var(--ink-3); font-size: 12px; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.card-excerpt { font-size: 13px; color: var(--ink-3); flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 10px; }
.comments-count { font-size: 12px; }

/* ---------- 详情 ---------- */
.detail-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px; margin: 24px 0 18px;
}
.detail-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.detail-title { font-size: 24px; font-weight: 800; margin: 12px 0 6px; line-height: 1.4; }
.detail-author { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.detail-author .author-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ink-3), var(--line-dark)); color: var(--ink-2);
}
.detail-author .author-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-author .author-avatar .ic { width: 22px; height: 22px; }
.detail-author > a { font-size: 15px; font-weight: 600; color: var(--ink); }
.detail-content { padding: 18px 0 6px; font-size: 15px; color: var(--ink-2); white-space: normal; }
.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding-top: 16px; }
.media-item { border-radius: 10px; border: 1px solid var(--line); background: #000; width: 100%; }

/* ---------- 评论 ---------- */
.comments { margin-bottom: 30px; }
.section-title { font-size: 18px; font-weight: 700; margin: 8px 0 14px; }
.section-title .count { color: var(--ink-3); font-size: 14px; font-weight: 400; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.comment-form textarea {
  padding: 12px 14px; border: 1px solid var(--line-dark); border-radius: 10px;
  font-size: 14px; font-family: inherit; resize: vertical; outline: none; background: var(--card);
}
.comment-form textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
#comment-msg { font-size: 13px; color: var(--ok); }
.login-hint { color: var(--ink-3); font-size: 14px; margin-bottom: 16px; }
.login-hint a { color: var(--ink); font-weight: 600; text-decoration: underline; }
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.comment-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.comment-user { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.comment-avatar {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ink-3), var(--line-dark)); color: var(--ink-2);
}
.comment-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.comment-avatar .ic { width: 12px; height: 12px; }
.comment-content { font-size: 14px; color: var(--ink-2); }

/* ---------- 表单卡片（登录/注册/发布） ---------- */
.auth-card, .publish-card {
  max-width: 480px; margin: 40px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 32px;
}
.publish-card { max-width: 720px; }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.auth-form input, .auth-form select, .auth-form textarea {
  padding: 10px 14px; border: 1px solid var(--line-dark); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff;
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}
.auth-form textarea { resize: vertical; }
.req { color: var(--danger); }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--ink-3); text-align: center; }
.auth-switch a { color: var(--ink); font-weight: 600; }
.form-tip { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 8px; }

/* 上传区 */
.upload-zone {
  border: 2px dashed var(--line-dark); border-radius: 12px; padding: 26px 14px;
  text-align: center; color: var(--ink-3); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--ink); background: var(--bg-soft); }
.media-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.media-thumb { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4/3; display:flex; align-items:center; justify-content:center; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb.uploading { background: var(--bg-soft); color: var(--ink-3); font-size: 12px; }
.thumb-name { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 10px; padding: 2px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thumb-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.7); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}

/* ---------- 按钮 / 徽章 / 提示 ---------- */
.btn-primary {
  background: var(--ink); color: #fff; border: 0; border-radius: 10px;
  padding: 11px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-danger { background: var(--danger); color: #fff; border: 0; border-radius: 10px; padding: 11px 22px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-mini { display: inline-block; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-family: inherit; }
.btn-mini.ok { background: #ecfdf3; color: var(--ok); border-color: #bbf7d0; }
.btn-mini.danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.badge-approved { background: #ecfdf3; color: var(--ok); border: 1px solid #bbf7d0; }
.badge-rejected { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.empty { text-align: center; color: var(--ink-3); padding: 60px 20px; font-size: 14px; }
.empty.small { padding: 20px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 24px 0 40px; }
.pagination a { padding: 7px 13px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.pagination a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 全站公告横条（hybbs 风格） ---------- */
.notice-wrap { display: flex; flex-direction: column; gap: 6px; padding: 14px 0 0; }
/* 黑白模式（设置页） */
.theme-radio-group { display: flex; gap: 6px; }
.theme-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.theme-radio input { accent-color: var(--ink); }
/* 公告铃铛头 */
.notice-bell { color: var(--accent); }
/* 圈子板块详情页 */
.circle-page-head { padding: 18px 2px 6px; }
.circle-page-title { font-size: 22px; font-weight: 700; margin: 8px 0 4px; }
.circle-page-desc { color: var(--ink-2); font-size: 13px; }

/* 圈子页头部：头像 + 介绍 */
.cat-head { display: flex; align-items: center; gap: 16px; padding: 22px 2px 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.cat-head-avatar { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: var(--brand-weak, #f0eefe); color: var(--brand, #6c5ce7); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; overflow: hidden; }
.cat-head-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-head-info { min-width: 0; }
.cat-head-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.cat-head-desc { color: var(--ink-2); font-size: 13px; margin: 0 0 6px; }
.cat-head-meta { color: var(--ink-3, #999); font-size: 12px; margin: 0; }
.hot-item.active { background: var(--line); color: var(--ink); }
.notice-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  text-decoration: none; transition: all .15s ease; max-width: 760px;
}
.notice-bar:hover { border-color: var(--line-dark); background: var(--bg-soft); }
.notice-icon { color: #e0483e; font-size: 14px; flex-shrink: 0; display: inline-flex; }
.notice-title { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-bar:hover .notice-title { color: var(--ink); }
.notice-time { margin-left: auto; font-size: 12px; color: var(--ink-3); flex-shrink: 0; }

/* ---------- 后台公告管理辅助样式 ---------- */
.check-line { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--bg-soft); color: var(--ink-3); }
.tag.ok { background: rgba(22,163,74,.12); color: #16a34a; }

/* ---------- 后台 ---------- */
.admin-body { background: #fafafa; }
.admin-container { padding-top: 22px; padding-bottom: 40px; }
.admin-welcome { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
/* ---------- 后台仪表盘 六宫格 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.stat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.stat-card::after {
  content: ''; position: absolute; right: -34px; top: -34px; width: 100px; height: 100px;
  border-radius: 50%; background: radial-gradient(circle, var(--stat-soft) 0%, transparent 70%);
  opacity: .55; pointer-events: none;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.09); border-color: var(--line-dark); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
  background: linear-gradient(135deg, var(--stat-c1), var(--stat-c2));
  box-shadow: 0 6px 14px var(--stat-shadow);
}
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-num { font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.stat-label { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.stat-flag {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  font-size: 10px; font-weight: 600; color: var(--stat-fg);
  background: var(--stat-soft2); padding: 2px 8px; border-radius: 999px;
}
/* 六宫格主题色 */
.stat-c-amber  { --stat-c1:#f59e0b; --stat-c2:#ea580c; --stat-shadow:rgba(245,158,11,.35); --stat-soft:#fde68a; --stat-soft2:#fef3c7; --stat-fg:#b45309; }
.stat-c-green  { --stat-c1:#22c55e; --stat-c2:#15803d; --stat-shadow:rgba(34,197,94,.35); --stat-soft:#bbf7d0; --stat-soft2:#dcfce7; --stat-fg:#15803d; }
.stat-c-blue   { --stat-c1:#3b82f6; --stat-c2:#1d4ed8; --stat-shadow:rgba(59,130,246,.35); --stat-soft:#bfdbfe; --stat-soft2:#dbeafe; --stat-fg:#1d4ed8; }
.stat-c-violet { --stat-c1:#8b5cf6; --stat-c2:#6d28d9; --stat-shadow:rgba(139,92,246,.35); --stat-soft:#ddd6fe; --stat-soft2:#ede9fe; --stat-fg:#6d28d9; }
.stat-c-cyan   { --stat-c1:#06b6d4; --stat-c2:#0e7490; --stat-shadow:rgba(6,182,212,.35); --stat-soft:#a5f3fc; --stat-soft2:#cffafe; --stat-fg:#0e7490; }
.stat-c-rose   { --stat-c1:#f43f5e; --stat-c2:#be123c; --stat-shadow:rgba(244,63,94,.35); --stat-soft:#fecdd3; --stat-soft2:#ffe4e6; --stat-fg:#be123c; }
[data-theme="dark"] .stat-flag { background: rgba(255,255,255,.1); }
/* 次要统计条 */
.stat-minor {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px;
  background: var(--card); border: 1px dashed var(--line-dark); border-radius: 12px;
  padding: 9px 16px; font-size: 12px; color: var(--ink-3); margin-bottom: 20px;
}
.stat-minor b { color: var(--ink-2); font-weight: 700; font-size: 13px; }
.stat-minor a { color: inherit; transition: color .15s; }
.stat-minor a:hover { color: var(--ink); }
.stat-minor .warn { color: var(--danger); font-weight: 600; }
.stat-minor-sp { opacity: .4; }
.stat-minor .stat-mint { color: #0d9488; }
[data-theme="dark"] .stat-minor .stat-mint { color: #2dd4bf; }
/* 后台仪表盘 双栏面板 */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.dash-panel { margin-bottom: 0; }
.dash-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dash-panel-head .section-title { margin-bottom: 0; }
.dash-more { font-size: 12px; color: var(--ink-3); }
.dash-more:hover { color: var(--ink); }
/* 近7日趋势图 */
.trend-chart { display: flex; align-items: flex-end; gap: 8px; height: 132px; padding-top: 6px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.trend-bar-wrap {
  flex: 1; width: 100%; max-width: 40px;
  display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, transparent 0%, var(--line) 100%);
  border-radius: 8px 8px 4px 4px; overflow: hidden;
}
.trend-bar {
  width: 100%; min-height: 2px;
  background: linear-gradient(180deg, var(--stat-c1, #8b5cf6), var(--stat-c2, #6d28d9));
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 4px 10px rgba(139,92,246,.25);
  transition: height .3s ease;
}
.trend-num { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.trend-day { font-size: 11px; color: var(--ink-3); }
/* 最新操作日志 */
.dash-logs { list-style: none; margin: 0; padding: 0; }
.dash-logs li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-bottom: 1px dashed var(--line);
  font-size: 13px; min-width: 0;
}
.dash-logs li:last-child { border-bottom: none; }
.dash-log-action { flex-shrink: 0; font-weight: 600; color: var(--ink-2); }
.dash-log-detail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.dash-log-time { flex-shrink: 0; font-size: 11px; color: var(--ink-4, var(--ink-3)); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 12px; }
  .stat-icon { width: 38px; height: 38px; font-size: 20px; border-radius: 11px; }
  .stat-num { font-size: 20px; }
  .stat-minor { gap: 6px 12px; padding: 8px 12px; }
  .dash-grid { grid-template-columns: 1fr; }
}
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-nav a { padding: 8px 16px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.admin-nav a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.admin-post { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.admin-post-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.admin-post-head h3 { font-size: 16px; }
.admin-post-meta { font-size: 12px; color: var(--ink-3); margin: 6px 0 10px; }
.admin-post-content { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; white-space: pre-wrap; }
.admin-post-media { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-post-media a { font-size: 13px; background: var(--bg-soft); padding: 4px 10px; border-radius: 8px; }
.review-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-form input[type=text], .review-form input[type=password], .review-form input[type=number] { padding: 9px 12px; border: 1px solid var(--line-dark); border-radius: 9px; font-size: 14px; outline: none; flex: 1; min-width: 160px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.admin-table th { background: var(--bg-soft); text-align: left; padding: 11px 14px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.td-title a { font-weight: 600; }
.td-title a:hover { text-decoration: underline; }
.td-ops { display: flex; gap: 6px; align-items: center; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { padding: 6px 8px; border: 1px solid var(--line-dark); border-radius: 7px; font-size: 13px; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.filter-bar { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-bar a { padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.filter-bar a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.muted { color: var(--ink-3); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--card); color: var(--ink-2); text-align: center; padding: 22px 16px; font-size: 13px; margin-top: 30px; border-top: 1px solid var(--line); }
.site-footer .footer-sub { color: var(--ink-3); font-size: 12px; margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .header-inner { height: 52px; }
  .logo-text { font-size: 16px; }
  .main-nav a { padding: 6px 8px; font-size: 13px; }
  .hero .hero-title { font-size: 19px; }
  .post-grid { grid-template-columns: 1fr; }
  .detail-card { padding: 20px 18px; }
  .detail-title { font-size: 20px; }
  .auth-card { margin: 24px 12px; padding: 24px 20px; }
  .admin-table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 9px 10px; }
  .publish-card { margin: 16px 12px; padding: 24px 18px; }
  .setting-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label action" "value value";
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    padding: 15px 0;
  }
  .setting-label { grid-area: label; width: auto; font-size: 12px; }
  .setting-value { grid-area: value; font-size: 13px; line-height: 1.6; }
  .setting-action { grid-area: action; }
  .setting-action:empty { display: none; }
  .profile-avatar { width: 68px; height: 68px; font-size: 34px; }
  /* 手机端整体铺白：取消灰色背景上的独立卡片，内容直接平铺 */
  body { background: var(--card); }
  .container { padding-left: 14px; padding-right: 14px; }
  .post-card, .feed-card, .detail-card, .auth-card, .publish-card, .admin-card, .side-card, .comment-item {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .publish-card { margin: 0; padding: 20px 0; max-width: none; }
  .auth-card { margin: 0; padding: 26px 0; }
  .detail-card { padding: 18px 0; }
  .admin-card { padding: 16px 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
  .comment-item { padding: 14px 0; }
  .post-grid { padding: 18px 0; gap: 16px; }
  .feed-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .side-card { padding: 16px 0; }
  .cat-tabs { padding-left: 0; padding-right: 0; }
  .search-bar { margin-left: 0; margin-right: 0; }
  .home-layout { gap: 0; }
}

/* ---------- 后台侧边栏布局（抽屉式） ---------- */
.admin-body { background: var(--bg); }
.admin-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: var(--accent); color: #fff; z-index: 45;
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 8px;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.admin-menu-btn {
  width: 38px; height: 38px; border: 0; background: transparent; color: #fff;
  border-radius: 9px; cursor: pointer; font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.admin-menu-btn:hover { background: rgba(255,255,255,.12); }
.admin-topbar-title { font-size: 15px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-topbar-user {
  font-size: 13px; color: #d4d4d8; padding: 6px 10px; border-radius: 8px;
  max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-topbar-user:hover { background: rgba(255,255,255,.1); color: #fff; }

.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 250px;
  background: var(--accent); color: #d4d4d8; z-index: 60;
  transform: translateX(-100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.admin-sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.45); }
.admin-sidebar-close {
  position: absolute; top: 9px; right: 9px; width: 32px; height: 32px;
  border: 0; background: rgba(255,255,255,.08); color: #d4d4d8; border-radius: 8px;
  font-size: 15px; cursor: pointer; line-height: 1; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.admin-sidebar-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.admin-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px; color: #fff; font-weight: 700; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: #fff; color: #111;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.admin-menu { display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; flex: 1; }
.admin-menu a {
  color: #d4d4d8; font-size: 14px; padding: 11px 14px; border-radius: 9px;
  display: flex; align-items: center; gap: 8px; transition: background .15s, color .15s;
}
.admin-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu a.active { background: #fff; color: #111; font-weight: 600; }
.admin-badge {
  margin-left: auto; background: #dc2626; color: #fff; font-size: 11px;
  min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 6px; font-weight: 700;
}
.admin-sidebar-foot {
  padding: 12px 10px 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 2px;
}
.admin-sidebar-foot a { color: #a1a1aa; font-size: 13px; padding: 8px 14px; border-radius: 9px; transition: background .15s, color .15s; }
.admin-sidebar-foot a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-foot-user { padding: 2px 14px 6px; font-size: 12px; color: #71717a; }
.admin-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.admin-overlay.show { opacity: 1; visibility: visible; }
.admin-main { padding: 68px 24px 40px; max-width: 1080px; margin: 0 auto; min-width: 0; }
.admin-main-head { margin-bottom: 18px; }
.admin-main-head h1 { font-size: 22px; font-weight: 800; }
.admin-section { scroll-margin-top: 70px; }
body.no-scroll { overflow: hidden; }

@media (max-width: 768px) {
  .admin-main { padding: 62px 14px 32px; }
  .admin-topbar-user { max-width: 100px; }
}

/* ---------- 移动端底部导航 ---------- */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 640px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0));
    font-size: 11px; color: var(--ink-3);
  }
  .mobile-bottom-nav a span { font-size: 19px; line-height: 1.3; }
  .mobile-bottom-nav a.active { color: var(--ink); font-weight: 600; }
  body { padding-bottom: 58px; }
}


/* ---------- 首页双栏布局与热门瓜条 ---------- */
.home-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }
.home-main { min-width: 0; }
.home-side { position: sticky; top: 74px; }
.side-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 14px;
}
.side-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.side-title-icon {
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; letter-spacing: .5px;
}
.hot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; border-radius: 10px; transition: background .15s;
}
.hot-item:hover { background: var(--bg-soft); }
.hot-rank {
  width: 22px; height: 22px; border-radius: 7px; background: var(--bg-soft);
  color: var(--ink-3); font-size: 12px; font-weight: 700; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.hot-rank.top { background: var(--ink); color: #fff; }
.hot-title {
  flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hot-metrics { display: flex; gap: 10px; flex-shrink: 0; font-size: 11px; color: var(--ink-3); }
.hot-metric { display: inline-flex; align-items: center; gap: 3px; }

@media (max-width: 920px) {
  .home-layout { grid-template-columns: minmax(0,1fr); }
  .home-side { position: static; order: 2; }
}

/* ---------- 卡片列表细节 ---------- */
.post-card:hover { border-color: var(--line-dark); }
.card-cover img, .card-cover video { transition: transform .25s ease; }
.post-card:hover .card-cover img, .post-card:hover .card-cover video { transform: scale(1.04); }
.media-count-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0,0,0,.62); color: #fff; font-size: 11px;
  padding: 2px 9px; border-radius: 999px; backdrop-filter: blur(4px);
  pointer-events: none;
}
.badge-top { background: #18181b; color: #fff; border: 0; }
.badge-featured { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.stats { display: inline-flex; align-items: center; gap: 6px; }
.stats .st { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- 发布页：图文混排插入按钮 ---------- */
.thumb-insert {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 6px; font-size: 11px; padding: 2px 9px; cursor: pointer;
  transition: background .15s;
}
.thumb-insert:hover { background: rgba(0,0,0,.8); }
.form-tip code {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 0 5px; border-radius: 5px; font-size: 12px;
}

/* ---------- 图文混排详情 ---------- */
.detail-content .media-item { margin: 10px 0; width: 100%; }
.detail-content img.media-item { border-radius: 12px; }

/* ---------- 首页帖子列表：信息流卡片 ---------- */
.bbs-list { display: flex; flex-direction: column; gap: 12px; padding: 18px 0 8px; }
.feed-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.feed-card:hover { border-color: var(--line-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.05); }
[data-theme="dark"] .feed-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.feed-link { display: block; padding: 5px 16px 14px; text-decoration: none; }
.feed-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.feed-title {
  font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.feed-card:hover .feed-title { color: var(--accent); }
.feed-body { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.feed-excerpt {
  flex: 1; min-width: 0; font-size: 13px; line-height: 1.65; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feed-body.has-cover .feed-excerpt { -webkit-line-clamp: 2; }
.feed-thumb {
  width: 108px; height: 78px; border-radius: 10px; overflow: hidden; background: #111;
  position: relative; flex-shrink: 0; display: block;
}
.feed-thumb img, .feed-thumb video { width: 100%; height: 100%; object-fit: cover; }
.feed-play { position: absolute; inset: 0; display: block; }
.feed-play::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-left: 10px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; opacity: .9;
}
.feed-thumb .media-count-badge { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 6px; }
.feed-meta {
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
  font-size: 12px; color: var(--ink-3); flex-wrap: wrap;
}
.feed-author a { color: var(--ink-2); text-decoration: none; }
.feed-author a:hover { color: var(--accent); }
.feed-author::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 5px; vertical-align: 1px; }
.feed-stat { display: inline-flex; align-items: center; gap: 3px; }
.feed-stat .ic { width: 13px; height: 13px; color: var(--ink-3); }

@media (max-width: 640px) {
  .feed-thumb { width: 92px; height: 68px; }
  .feed-title { font-size: 14px; }
  .feed-meta { gap: 8px; }
  .feed-link { padding: 12px 13px; }
}

/* 卡片通用（个人主页等仍使用卡片列表） */
.avatar-dot {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex-shrink: 0;
  background: linear-gradient(135deg, var(--ink-3), var(--line-dark));
}
.card-foot .author { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.card-foot .author a { color: var(--ink-2); }
.card-foot .author a:hover { color: var(--accent); }

/* 修复：hidden 属性不被自定义 display 覆盖（回复取消按钮） */
.reply-to[hidden] { display: none !important; }

/* ---------- 富文本编辑器（发布页） ---------- */
.rich-toolbar {
  display: flex; gap: 6px; margin-bottom: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 6px 8px;
}
.rich-toolbar button {
  min-width: 34px; height: 30px; padding: 0 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); border-radius: 7px; font-size: 13px; cursor: pointer;
}
.rich-toolbar button:hover { border-color: var(--line-dark); background: var(--bg-soft); }
.rich-toolbar .toolbar-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; display: inline-block; vertical-align: middle; }
.rich-toolbar #btn-add-image, .rich-toolbar #btn-add-video { color: var(--accent); }
.rich-editor {
  min-height: 180px; max-height: 420px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 0 0 10px 10px;
  padding: 12px 14px; font-size: 14px; line-height: 1.7; color: var(--ink);
  outline: none;
}
.rich-editor:focus { border-color: var(--accent); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; }
.rich-editor img.rich-img { display: block; width: 100%; max-width: 100%; max-height: 320px; border-radius: 6px; border: 1px solid var(--line); }
.rich-editor .rich-img-wrap { position: relative; display: inline-block; max-width: 55%; margin: 4px 8px 4px 0; vertical-align: middle; }
.rich-editor .rich-img-del { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; line-height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 14px; text-align: center; cursor: pointer; padding: 0; }
.rich-editor div { margin: 4px 0; }
.rich-editor ul { padding-left: 20px; margin: 6px 0; }
.rich-editor li { margin: 2px 0; }

/* ---------- 举报页：原因卡片选择 ---------- */
.reason-label { font-size: 14px; font-weight: 700; margin: 4px 0 10px; color: var(--ink); }
.report-picker { position: relative; margin-bottom: 12px; }
.report-picker-btn {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line-dark); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; color: var(--ink-2); background: var(--card);
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color .15s ease;
}
.report-picker-btn:hover { border-color: var(--ink); }
.report-picker-btn.report-picker-error { border-color: #e0483e; box-shadow: 0 0 0 3px rgba(224,72,62,.12); }
.report-picker-arrow { color: var(--ink-3); font-size: 13px; }
.report-picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14); overflow: hidden;
  list-style: none; margin: 0; padding: 6px;
}
.report-picker-list li {
  padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; transition: background .12s ease;
}
.report-picker-list li:hover { background: var(--bg-soft); color: var(--ink); }
.report-picker-list li + li { margin-top: 2px; }
.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.reason-item {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; color: var(--ink-2); background: var(--card);
  transition: all .15s ease;
}
.reason-item input { position: absolute; opacity: 0; pointer-events: none; }
.reason-item:has(input:checked) {
  border-color: var(--accent); background: var(--bg-soft); color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.reason-item:hover { border-color: var(--line-dark); }
@media (max-width: 480px) { .reason-grid { grid-template-columns: 1fr; } }

/* ---------- 详情页互动栏（点赞/踩/收藏/举报） ---------- */
.interact-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--line);
}
.interact-group { display: inline-flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.interact-group .interact-btn { border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.interact-group .interact-btn:last-child { border-right: 0; }
.interact-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-size: 13px; cursor: pointer;
  transition: all .15s ease; text-decoration: none; line-height: 1;
}
.interact-btn .ic { width: 16px; height: 16px; }
.interact-btn:hover { border-color: var(--line-dark); color: var(--ink); }
.interact-btn.like.active { color: #e0483e; border-color: rgba(224,72,62,.4); background: rgba(224,72,62,.08); }
.interact-btn.dislike.active { color: #3e7be0; border-color: rgba(62,123,224,.4); background: rgba(62,123,224,.08); }
.interact-btn.fav.active { color: #d9a514; border-color: rgba(217,165,20,.45); background: rgba(217,165,20,.1); }
.interact-btn.report { margin-left: auto; color: var(--ink-3); border-style: dashed; }
.interact-btn.report:hover { color: #e0483e; border-color: rgba(224,72,62,.5); }
#interact-msg { margin: 4px 0 0; }

/* ---------- 评论操作（回复/举报） ---------- */
.comment-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.reply-btn, .comment-report {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 3px 6px; margin: 0;
  font-size: 12px; color: var(--ink-3); cursor: pointer; text-decoration: none; border-radius: 6px;
}
.reply-btn:hover, .comment-report:hover { background: var(--bg-soft); color: var(--ink); }
.comment-report:hover { color: #e0483e; }
.reply-btn .ic, .comment-report .ic { width: 14px; height: 14px; }
.reply-to {
  background: var(--bg-soft); border: 1px dashed var(--line-dark);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.reply-to .btn-mini { margin-left: auto; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; letter-spacing: 2px; }
.code-btn { white-space: nowrap; flex-shrink: 0; }
.comment-children { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.comment-item.child { background: transparent; border: none; border-radius: 0; padding: 8px 0; }

/* ================= 第一批：瓜币 / 经验 / 头衔 ================= */
.nav-wallet {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 5px 10px; border: 1px solid var(--line-dark); border-radius: 999px;
  color: var(--ink-2); font-size: 13px; text-decoration: none; font-variant-numeric: tabular-nums;
}
.nav-wallet:hover, .nav-wallet.active { color: #d9a514; border-color: rgba(217,165,20,.5); background: rgba(217,165,20,.08); }

.rank-badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #2b2b2b, #111); color: #fff;
  font-size: 12px; font-weight: 600; vertical-align: 1px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.12);
}
.rank-badge:hover { text-decoration: none; }
button.rank-badge { font-family: inherit; line-height: inherit; cursor: pointer; }
button.rank-badge:hover { filter: brightness(1.18); }

/* 头衔说明弹窗 */
.modal-box-wide { max-width: 460px; }
.rank-modal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-modal-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.rank-modal-item.current { border-color: rgba(217,165,20,.55); background: rgba(217,165,20,.06); }
.rank-modal-item-head { display: flex; align-items: center; gap: 8px; }
.rank-modal-tag { font-size: 11px; line-height: 1.4; color: #d9a514; border: 1px solid rgba(217,165,20,.5); border-radius: 999px; padding: 0 6px; }
.rank-modal-exp { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-modal-how { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }

.wallet-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wallet-stat {
  flex: 1; min-width: 120px; padding: 14px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); text-align: center;
}
.wallet-label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.wallet-value { display: block; font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.wallet-signin { margin: 14px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.rank-line { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.rank-progress { height: 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.rank-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d9a514, #f0c33c); transition: width .3s; }

.rank-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.rank-tabs .btn-mini.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.rank-top { display: inline-flex; width: 24px; height: 24px; border-radius: 8px; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; }
.rank-top-1 { background: linear-gradient(135deg, #f0c33c, #d9a514); }
.rank-top-2 { background: linear-gradient(135deg, #c9cdd4, #9aa0aa); }
.rank-top-3 { background: linear-gradient(135deg, #d99a6c, #c07a4a); }
.rank-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); background: var(--bg); color: var(--ink-3); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.rank-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rank-user-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.coin-plus { color: #2f9e63; }
.coin-minus { color: #e0483e; }

.tip-modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); padding: 16px;
}
.tip-modal {
  width: 100%; max-width: 380px; background: var(--bg); border: 1px solid var(--line-dark);
  border-radius: 16px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.tip-modal h3 { margin: 0 0 6px; font-size: 17px; }
.tip-modal .muted { margin: 6px 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.tip-btn.disabled { opacity: .45; cursor: not-allowed; }

/* 修复：显式 display 会覆盖 hidden 属性，统一强制隐藏 */
[hidden] { display: none !important; }

/* 顶栏签到 */
.nav-signin { display: inline-flex; margin: 0; padding: 0; }
.nav-signin .btn-nav { background: transparent; border: none; cursor: pointer; font: inherit; }
.nav-signed { opacity: .55; cursor: default; }
.nav-user { display: inline-flex; align-items: center; gap: 6px; }
.nav-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; overflow: hidden;
}

/* 用户头像图片：铺满圆形容器 */
.avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* ================= 用户主页 ================= */
.user-head {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; margin-bottom: 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
}
.user-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); color: var(--ink-3);
  border: 1px solid var(--line); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.user-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.user-info { min-width: 0; }
.user-info h1 { margin: 0 0 4px; font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ================= 个人中心：设置列表 + 弹窗 ================= */
.profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; margin: 2px 0 16px; gap: 10px; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-3);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden;
}
.profile-avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.profile-avatar-actions .inline-form { display: inline-flex; margin: 0; padding: 0; }
.profile-avatar-actions .btn-mini.danger { background: var(--danger-bg, rgba(239,68,68,.12)); color: var(--danger, #ef4444); }
.avatar-preview-wrap { display: flex; justify-content: center; padding: 8px 0 14px; }
.avatar-preview {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.setting-list { display: grid; gap: 0; }
.setting-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 2px; border-bottom: 1px dashed var(--line);
}
.setting-row:last-child { border-bottom: 0; }
/* 主页背景色设置块（系统设置外观区） */
.color-setting { padding: 16px 2px; border-bottom: 1px dashed var(--line); }
.color-setting:last-child { border-bottom: 0; }
.color-setting-head { display: flex; flex-direction: column; gap: 4px; }
.color-setting-head .setting-label { width: auto; font-size: 13px; color: var(--ink-3); }
.color-setting-sub { font-size: 11px; color: var(--ink-3); }
.color-setting-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.color-preview { display: inline-block; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; background-color: transparent; }
.color-setting-input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.color-setting-row .btn-mini { flex-shrink: 0; }
.color-setting .color-preset { margin: 10px 0 0; }
.setting-label { width: 92px; flex-shrink: 0; font-size: 13px; color: var(--ink-3); }
.setting-sub { flex: 1; min-width: 0; font-size: 11px; color: var(--ink-3); }
.setting-value { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.setting-action { flex-shrink: 0; }
.setting-action .btn-mini { display: inline-flex; align-items: center; gap: 4px; }
.section-desc { font-size: 12px; color: var(--ink-3); margin: -4px 0 10px; }
/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--line-dark); cursor: pointer; transition: background .2s;
}
.switch-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.setting-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); padding: 16px;
}
.modal-mask.open { display: flex; }
.modal-box {
  width: 100%; max-width: 400px; max-height: 90vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line-dark);
  border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close {
  background: none; border: 0; cursor: pointer; padding: 4px 8px;
  font-size: 20px; line-height: 1; color: var(--ink-3); border-radius: 6px;
}
.modal-close:hover { color: var(--ink); background: var(--bg-soft); }

/* 打赏自己的瓜条：禁用态提示 */
.tip-btn.tip-self { opacity: .45; cursor: not-allowed; }

/* 数字验证码输入框美化 */
.captcha-row {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0;
}
.captcha-question {
  flex-shrink: 0; min-width: 88px; text-align: center;
  padding: 8px 10px;
  background: var(--bg-soft);
  border: 1px dashed var(--line-dark);
  border-radius: 10px;
  font-family: "Courier New", Consolas, monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
  color: var(--ink);
  user-select: none;
}
.captcha-input {
  flex: 1; min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px; font-family: "Courier New", Consolas, monospace;
  font-weight: 700; letter-spacing: 4px; text-align: center;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.captcha-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.captcha-input::placeholder { color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.captcha-tip { flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
/* 红点徽标 */
.badge-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger, #ef4444); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1;
}
/* 站内消息 */
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.msg-head .auth-title { margin-bottom: 0; }
.msg-list { border-top: 1px solid var(--line); }
.msg-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .15s ease;
}
.msg-item:hover { background: var(--bg-soft); }
.msg-item.unread { background: rgba(59,130,246,.05); }
[data-theme="dark"] .msg-item.unread { background: rgba(59,130,246,.12); }
.msg-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
/* 消息左侧头像（圆形，与类型图标统一为 40px） */
.msg-avatar {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; display: block;
}
.msg-avatar-sys {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.msg-review { background: #3b82f6; }
.msg-comment { background: #22c55e; }
.msg-reply { background: #8b5cf6; }
.msg-tip { background: #f59e0b; }
.msg-follow { background: #3b82f6; }
.msg-system { background: #64748b; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.msg-title-text { flex-shrink: 0; min-width: 0; }
.msg-content { font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; word-break: break-all; }
.msg-time { flex-shrink: 0; font-size: 11px; color: var(--ink-3); margin-top: 3px; font-variant-numeric: tabular-nums; }
/* 草稿箱 */
.draft-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.draft-item:last-child { border-bottom: none; }
.draft-main { flex: 1; min-width: 0; }
.draft-title { font-size: 15px; font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-title:hover { text-decoration: underline; }
.draft-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.draft-actions { flex-shrink: 0; display: flex; gap: 8px; align-items: center; }
.auth-title .count { font-size: 14px; color: var(--ink-3); font-weight: 400; margin-left: 4px; }
/* 评论锚点高亮 */
.comment-flash { animation: commentFlash 2.6s ease; border-radius: 10px; }
@keyframes commentFlash {
  0%, 55% { background: rgba(250, 204, 21, .28); box-shadow: 0 0 0 3px rgba(250, 204, 21, .18); }
  100% { background: transparent; box-shadow: none; }
}

/* 消息列表：评论原文引用 */
.msg-quote {
  display: block; margin-top: 5px;
  padding: 7px 10px;
  background: var(--bg-soft);
  border-left: 3px solid var(--line-dark);
  border-radius: 8px;
  font-size: 13px; line-height: 1.5;
  color: var(--ink-2);
  word-break: break-word;
}
.msg-item.unread .msg-quote { border-left-color: var(--accent, #f59e0b); }

/* 消息弹窗：查看对方信息并直接回复 */
.rm-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rm-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.rm-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.rm-origin {
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--bg-soft);
  border-radius: 10px;
  font-size: 14px; line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.rm-goto-row { margin-bottom: 12px; }
.rm-goto-row .btn-mini { color: var(--primary, #2563eb); }
.rm-text {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; margin-top: 6px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px; line-height: 1.6;
  font-family: inherit;
  resize: vertical; min-height: 72px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rm-text:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.rm-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; }
.rm-msg { margin-top: 8px; font-size: 13px; color: var(--ok, #16a34a); min-height: 0; }
.rm-msg.err { color: #dc2626; }

/* ================= 第二批：互动（评论点赞 / 楼中楼 / @提及 / 编辑标记） ================= */
.comment-like-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 3px 6px; margin: 0;
  font-size: 12px; color: var(--ink-3); cursor: pointer; border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.comment-like-btn:hover { background: var(--bg-soft); color: #e0483e; }
.comment-like-btn.active { color: #e0483e; }
.comment-like-btn.active .ic { fill: currentColor; }
.comment-like-btn .ic { width: 14px; height: 14px; }
.edited-mark { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.comment-content .mention {
  color: var(--accent, #4a6cf7); font-weight: 600; text-decoration: none;
}
[data-theme="dark"] .comment-content .mention { color: #7ea0ff; }
.user-bio { margin: 6px 0 0; font-size: 13px; color: rgba(0,0,0,.72); }
[data-theme="dark"] .user-bio { color: rgba(255,255,255,.8); }

/* 用户主页统计卡 */
.user-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 18px;
}
.user-stats .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center;
}
.user-stats .stat strong { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.user-stats .stat span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* 主页背景色预设 */
.color-preset { display: flex; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.color-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line-dark); cursor: pointer; padding: 0;
}
.color-dot:hover { transform: scale(1.12); }

/* 站内消息分类 Tab 与系统消息查看弹窗 */
.msg-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.msg-tab { padding: 5px 14px; border-radius: 999px; font-size: 13px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; }
.msg-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.vm-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.vm-content { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.vm-time { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }

/* ============ 用户主页新版式 ============ */
.user-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 16px 16px 18px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .18);
}
.user-hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.user-hero-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-size: 18px;
}
.user-hero-back:hover { background: rgba(255,255,255,.3); }
.user-hero-actions { display: flex; gap: 8px; }
.uh-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; cursor: pointer; font-size: 13px; padding: 7px 14px;
  border-radius: 999px; text-decoration: none; line-height: 1.4;
  transition: opacity .15s, transform .1s;
}
.uh-btn:active { transform: scale(.96); }
.uh-btn-ghost { background: rgba(255,255,255,.16); color: #fff; }
.uh-btn-ghost:hover { background: rgba(255,255,255,.28); }
.uh-btn-light { background: #fff; color: #2563eb; }
.uh-btn-light:hover { opacity: .92; }
.uh-btn-solid { background: #fff; color: #2563eb; font-weight: 600; }
.uh-btn-solid:hover { opacity: .92; }
.uh-btn-solid.active { background: rgba(255,255,255,.2); color: #fff; }
.user-hero-body { display: flex; align-items: center; gap: 14px; padding: 0 4px; }
.user-hero-avatar img, .user-hero-avatar .avatar-placeholder {
  width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  object-fit: cover;
}
.user-hero-info { min-width: 0; flex: 1; }
.user-hero-name { margin: 0 0 6px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.user-hero-bio { margin: 0; font-size: 13px; line-height: 1.6; opacity: .92; word-break: break-word; }
.user-hero-bio.muted { opacity: .7; }
.user-hero-stats {
  display: flex; margin-top: 16px; gap: 4px;
  background: rgba(255,255,255,.16); border-radius: 12px; padding: 10px 6px;
}
.uh-stat { flex: 1; text-align: center; color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.uh-stat strong { font-size: 17px; font-weight: 700; }
.uh-stat span { font-size: 12px; opacity: .85; }
.user-tabs {
  display: flex; margin: 16px 0 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px;
}
.user-tabs a {
  flex: 1; text-align: center; padding: 9px 0; font-size: 14px;
  color: var(--ink-2); text-decoration: none; border-radius: 9px;
}
.user-tabs a.active { background: var(--primary); color: #fff; font-weight: 600; }
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-item {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.user-item-avatar img, .user-item-avatar .avatar-placeholder { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.user-item-main { min-width: 0; flex: 1; }
.user-item-name { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.user-item-name:hover { color: var(--primary); }
.user-item-bio { margin: 3px 0 0; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-about-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.about-row { display: flex; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.about-row:last-child { border-bottom: 0; }
.about-label { width: 72px; color: var(--ink-3); flex-shrink: 0; }
.about-value { color: var(--ink); word-break: break-word; }
.about-value.muted { color: var(--ink-3); }
.tip-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tip-modal { background: var(--card); border-radius: 14px; width: 100%; max-width: 340px; padding: 20px; }
.tip-modal h3 { margin: 0 0 6px; font-size: 16px; }
.tip-modal .form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.tip-modal input[type="number"] { width: 100%; margin-top: 8px; }
.empty.full { margin: 12px 0; padding: 40px 16px; }
.btn-mini { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.btn-mini:hover { color: var(--primary); border-color: var(--primary); }


/* 设置入口列表项（个人中心） */
.setting-entry { display: flex; align-items: center; gap: 10px; padding: 10px 0; text-decoration: none; color: inherit; }
.setting-entry + .setting-entry { border-top: 1px solid var(--line); }
.setting-entry:hover .setting-entry-label { color: var(--primary); }
.setting-entry-label { font-size: 15px; font-weight: 600; }
.setting-entry-desc { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3); text-align: right; }
.setting-entry-arrow { font-size: 20px; color: var(--ink-3); line-height: 1; }

/* 个人中心背景图 */
.profile-hero {
  position: relative;
  margin: -30px -32px 18px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  min-height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
}
.profile-hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.03) 38%,
    color-mix(in srgb, var(--card) 40%, transparent) 68%,
    var(--card) 100%);
  pointer-events: none;
}
.profile-hero .profile-user-card {
  position: relative; z-index: 1;
  padding-top: 72px;
  padding-bottom: 18px;
}
.profile-hero .profile-user-avatar .avatar-photo {
  border: 3px solid var(--card);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
@media (max-width: 640px) {
  .profile-hero { margin: -24px -18px 16px; min-height: 150px; }
  .profile-hero .profile-user-card { padding-top: 52px; }
}

/* 个人中心展示页（新） */
.profile-user-card { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.profile-user-avatar { flex-shrink: 0; width: 60px; height: 60px; margin-left: 4px; }
.profile-user-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.profile-user-info { flex: 1; min-width: 0; }
.profile-user-name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-user-name .rank-badge { font-size: 10px; padding: 2px 8px; }
.profile-user-bio { font-size: 12px; color: var(--ink-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-user-edit { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 16px; text-decoration: none; }
.profile-user-edit:hover { background: var(--line); color: var(--ink); }

/* 统计行 */
.profile-stats { display: flex; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stat { flex: 1; text-align: center; padding: 14px 4px; text-decoration: none; color: inherit; }
.profile-stat + .profile-stat { border-left: 1px solid var(--line); }
.profile-stat-num { display: block; font-size: 20px; font-weight: 700; }
.profile-stat-label { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* 功能菜单 */
.profile-menu { padding-top: 6px; }
.profile-menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: inherit; }
.profile-menu-icon { flex-shrink: 0; width: 24px; text-align: center; color: var(--ink-2); font-size: 16px; }
.profile-menu-label { flex: 1; min-width: 0; font-size: 14px; }
.profile-menu-count { flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
.profile-menu-arrow { flex-shrink: 0; font-size: 18px; color: var(--ink-2); margin-left: 4px; }

/* 底部操作 */
.profile-foot { display: flex; gap: 10px; justify-content: center; padding: 18px 0 4px; flex-wrap: wrap; }

/* 编辑资料页 */
.edit-list { margin-bottom: 4px; }
.edit-list-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: inherit; cursor: pointer; }
.edit-list-icon { flex-shrink: 0; width: 24px; text-align: center; color: var(--ink-2); font-size: 16px; }
.edit-list-label { flex: 0 0 auto; font-size: 14px; }
.edit-list-value { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-list-arrow { flex-shrink: 0; font-size: 18px; color: var(--ink-2); margin-left: 4px; }
.mini-avatar { display: inline-block; width: 32px; height: 32px; vertical-align: middle; }
.mini-avatar .avatar-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.edit-avatar-wrap { display: flex; align-items: flex-start; gap: 16px; }
.edit-avatar-actions { flex: 1; min-width: 0; }
.edit-avatar-actions .auth-form { padding: 0; margin: 0; }
.bg-preview-wrap {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); margin-bottom: 14px; font-size: 13px;
}
.bg-preview { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.edit-info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.edit-info-row:last-child { border-bottom: 0; }
.edit-info-label { font-size: 13px; color: var(--ink-3); }
.edit-info-value { font-size: 13px; color: var(--ink); text-align: right; }

/* 设置独立页面 */
.settings-head { margin-bottom: 12px; }
.settings-back { display: inline-block; font-size: 13px; color: var(--ink-3); text-decoration: none; margin-bottom: 4px; }
.settings-back:hover { color: var(--primary); }
