/* ============================================================
   省二校园墙墙 · 全局样式
   Twitter/X 式三栏布局，移动端单栏 + 底部导航
   ============================================================ */

:root {
  --brand:      #4f46e5;
  --brand-2:    #7c3aed;
  --brand-soft: #eef0ff;
  --bg:         #f6f7f9;
  --card:       #ffffff;
  --line:       #e8eaef;
  --text:       #0f172a;
  --text-2:     #475569;
  --muted:      #8892a4;
  --danger:     #e11d48;
  --warn:       #f59e0b;
  --ok:         #10b981;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .10);
  --shadow-lg:  0 12px 40px -12px rgba(16, 24, 40, .22);
  --nav-h:      56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

/* ============================================================
   深色模式（2026-12-03）
   免费开放：更多页 → 设置 → 深色模式切换；防闪脚本在 page_head。
   覆盖变量为主，个别硬编码色用补丁修。
   ============================================================ */
html[data-theme="dark"] {
  --brand-soft: #2a2d52;
  --bg:         #0f1420;
  --card:       #171d2b;
  --line:       #262d3d;
  --text:       #e6eaf2;
  --text-2:     #b3bccd;
  --muted:      #79839a;
  --shadow:     0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  --shadow-lg:  0 12px 40px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
/* 高频硬编码补丁 */
html[data-theme="dark"] .nav-item:hover { background: #1d2432; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2b3446; }
html[data-theme="dark"] .gift-card,
html[data-theme="dark"] .fw-card { background: var(--card); }
html[data-theme="dark"] .gift-card h3,
html[data-theme="dark"] .fw-head h3,
html[data-theme="dark"] .fw-plan b { color: var(--text); }
html[data-theme="dark"] .gift-desc, html[data-theme="dark"] .fw-lead,
html[data-theme="dark"] .fw-body { color: var(--text-2); }
html[data-theme="dark"] .fw-note, html[data-theme="dark"] .fw-count-sub { color: var(--muted); }
html[data-theme="dark"] .fw-plan { background: #101624; border-color: var(--line); }
html[data-theme="dark"] .gift-quick-btn { background: var(--card); border-color: var(--line); color: var(--text-2); }
html[data-theme="dark"] .gift-quick-btn:hover { background: var(--brand-soft); color: var(--brand); }
html[data-theme="dark"] .gift-card input { background: var(--bg); border-color: var(--line); color: var(--text); }
html[data-theme="dark"] .gift-x, html[data-theme="dark"] .fw-x { background: #1d2432; color: var(--text-2); }
html[data-theme="dark"] .fw-count { background: #1b1408; border-color: #6b4a12; }
html[data-theme="dark"] .fw-count-num, html[data-theme="dark"] .fw-count-label { color: #f0a832; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { max-width: 100%; display: block; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection { background: #ddd6fe; }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5d9e2; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9bfcc; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   布局
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 330px;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  align-items: start;
}

.col-left  { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 14px 0; }
.col-main  { min-width: 0; max-width: 100%; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--card); min-height: 100vh; }
.col-right { position: sticky; top: 0; padding: 14px 0 40px; height: 100vh; overflow-y: auto; }

/* ---------------- 左侧导航 ---------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 18px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.3px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  color: #fff; font-size: 19px; font-weight: 800;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6);
  flex: none;
}
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.35; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item:hover { background: var(--brand-soft, #f0f1f5); text-decoration: none; color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.nav-item svg { flex: none; }

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 12px 6px;
}

/* 校区折叠树 */
.tree-section { border-radius: 12px; }
.tree-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.tree-head:hover { background: var(--brand-soft, #f0f1f5); }
.tree-head.active { background: var(--brand-soft); color: var(--brand); }
.tree-head .chev { margin-left: auto; transition: transform .18s ease; color: var(--muted); }
.tree-section.open .chev { transform: rotate(90deg); }
.tree-body { display: none; padding: 2px 0 6px 14px; margin-left: 10px; border-left: 2px solid var(--line); }
.tree-section.open .tree-body { display: block; }
.tree-body a {
  display: block;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--text-2);
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-body a:hover { background: var(--brand-soft, #f0f1f5); text-decoration: none; color: var(--text); }
.tree-body a.active { color: var(--brand); font-weight: 700; background: var(--brand-soft); }

.btn-post {
  margin: 14px 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .65);
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn-post:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(79, 70, 229, .7); }
.btn-post:active { transform: translateY(0) scale(.985); }

/* ---- 每日签到（2026-11-29） ---- */
.checkin-btn {
  margin: 0 0 8px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700; font-size: 13.5px;
  border: 1px dashed #fdba74;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.checkin-btn:hover:not(:disabled) { background: #ffedd5; transform: translateY(-1px); }
.checkin-btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.checkin-btn.is-done {
  background: #ecfdf5; color: #059669; border: 1px solid #6ee7b7;
  cursor: default; opacity: .85;
}

/* ---- 全局弹窗：墙的近况 + 倒计时（2026-11-29） ---- */
.fw-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.fw-mask[hidden] { display: none; }
.fw-card {
  position: relative;
  width: min(420px, 100%);
  max-height: min(84vh, 640px);
  overflow-y: auto;
  background: var(--card, #fff);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .45);
  padding: 22px 22px 18px;
  animation: fw-pop .22s ease;
}
@keyframes fw-pop {
  from { transform: translateY(14px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.fw-x {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: #f1f5f9; color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.fw-x:hover { background: #e2e8f0; }
.fw-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fw-head h3 { margin: 0; font-size: 17px; color: #1e293b; }
.fw-emoji { font-size: 22px; }
.fw-body { font-size: 14px; line-height: 1.75; color: #334155; }
.fw-lead { margin: 0 0 8px; color: #64748b; font-size: 13px; }
.fw-facts { margin: 0 0 12px; padding-left: 20px; }
.fw-facts li { margin: 3px 0; }
.fw-plan {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
}
.fw-plan b { color: #1e293b; }
.fw-plan p { margin: 6px 0 0; }
.fw-note { font-size: 12.5px; color: #94a3b8; }
.fw-count {
  display: flex; align-items: baseline; gap: 6px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px dashed #fdba74; border-radius: 14px;
  padding: 12px 16px; margin-bottom: 12px;
}
.fw-count-num {
  font-size: 34px; font-weight: 800; color: #c2410c;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.fw-count-label { font-size: 15px; font-weight: 700; color: #c2410c; }
.fw-count-sub { font-size: 12px; color: #b45309; margin-left: auto; }
.fw-cta { margin: 0 0 14px; font-size: 13.5px; }
.fw-ok {
  width: 100%; padding: 12px;
  border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-weight: 700; font-size: 15px;
  cursor: pointer;
}
.fw-ok:hover { opacity: .92; }

.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 99px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-top: 6px;
}
.nav-user:hover { background: var(--brand-soft, #f0f1f5); text-decoration: none; }
.nav-user-info { min-width: 0; }
.nav-user-name { font-weight: 700; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-meta { font-size: 12px; color: var(--muted); }

/* ============================================================
   中间栏
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  min-width: 0; max-width: 100%;
}
.topbar-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 10px;
}
.topbar-title { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.topbar-desc { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* 面包屑 */
.crumbs {
  display: flex; align-items: center; gap: 3px; flex-wrap: nowrap;
  padding: 9px 16px 0; min-width: 0; overflow-x: auto;
  font-size: 12.5px; line-height: 1.4; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.crumbs::-webkit-scrollbar { display: none; }
.crumb {
  color: var(--muted); text-decoration: none; white-space: nowrap;
  padding: 2px 1px; border-radius: 5px; transition: color .15s;
}
a.crumb:hover { color: var(--primary, #4f46e5); text-decoration: none; }
.crumb.is-here { color: var(--text); font-weight: 600; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { color: var(--line-strong, #cbd5e1); display: inline-flex; flex: 0 0 auto; opacity: .9; }
/* 详情页/独立页没有 .topbar 包着的，自己给个上边距 */
.col-main > .crumbs { padding: 12px 16px 0; }

.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 8px; scrollbar-width: none; min-width: 0; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border: 0;
  background: none;
  cursor: pointer;
}
.tab:hover { color: var(--text); text-decoration: none; background: var(--bg, #f6f7f9); border-radius: 10px 10px 0 0; }
.tab.active { color: var(--text); }
.tab.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 3px;
  background: var(--brand);
}

/* ---------------- 发帖框（顶部） ---------------- */
.composer-mini {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: text;
}
.composer-mini .hint {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 15px;
  padding-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.composer-mini .mini-actions { display: flex; align-items: center; }

/* ============================================================
   帖子卡片
   ============================================================ */
.post {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.post:hover { background: var(--bg, #fafbfc); }

/* 转发：被别人随机推到你信息流里的帖子，头顶多一行「[某人] 转发了这个帖子」 */
.repost-block { background: #f8fcfa; border-bottom: 1px solid var(--line); }
.repost-block .post { border-bottom: 0; background: transparent; }
.repost-block .post:hover { background: #f1f9f5; }
.repost-strip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 16px 0 70px;
  font-size: 12.5px; color: var(--muted); line-height: 1.4;
}
.repost-strip svg { color: #10b981; flex: none; }
.repost-strip .repost-who { color: #10b981; font-weight: 600; }
.repost-strip .repost-who:hover { text-decoration: underline; }
.repost-strip .repost-when { color: var(--muted); }
@media (max-width: 720px) {
  .repost-strip { padding-left: 16px; }
}

.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  flex: none;
  user-select: none;
  letter-spacing: -.5px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.avatar.xs { width: 26px; height: 26px; font-size: 11px; }

.post-body { flex: 1; min-width: 0; }

.post-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px;
  flex-wrap: wrap;
}
.post-nick { font-weight: 700; color: var(--text); }
.post-nick:hover { text-decoration: none; color: var(--brand); }
.post-handle { color: var(--muted); font-size: 13.5px; }
.post-dot { color: var(--muted); font-size: 12px; }
.post-time { color: var(--muted); font-size: 13px; }
.post-time:hover { text-decoration: underline; }
.post-more {
  margin-left: auto;
  color: var(--muted);
  background: none; border: 0; cursor: pointer;
  padding: 4px 6px; border-radius: 999px; line-height: 0;
}
.post-more:hover { background: var(--brand-soft); color: var(--brand); }

/* 置顶图钉：只有审核员 / 管理员看得到，点了就切置顶 */
.post-pin {
  margin-left: auto;
  color: var(--muted);
  background: none; border: 0; cursor: pointer;
  padding: 4px 6px; border-radius: 999px; line-height: 0;
  transition: background .15s ease, color .15s ease;
}
.post-pin:hover { background: var(--brand-soft); color: var(--brand); }
.post-pin.is-on { background: #eef0ff; color: #4338ca; }
.post-pin + .post-more { margin-left: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 999px;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-mod { background: #ecfdf5; color: #047857; }
.badge-admin { background: #fef2f2; color: #b91c1c; }
.badge-pending { background: #fffbeb; color: #b45309; }
.badge-rejected { background: #fef2f2; color: #b91c1c; }

.cat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f1f3f8;
  color: var(--text-2);
}
.cat-chip::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .85;
}

.post-text {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--text);
}
.post-text a { color: var(--brand); }
.post-title { font-weight: 700; margin: 4px 0 2px; font-size: 15.5px; }

/* 媒体网格 */
.media-grid {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}
.media-grid.n1 { grid-template-columns: 1fr; }
.media-grid.n2 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 > :first-child { grid-row: span 2; }
.media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-item {
  position: relative;
  background: #0b1020;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.media-grid.n1 .media-item { aspect-ratio: auto; max-height: 510px; }
.media-item img, .media-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.media-grid.n1 .media-item img { object-fit: contain; max-height: 510px; background: #0b1020; }

/* ---------- 图片查看器（缩放 + 上下一张） ---------- */
.lb-mask {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(9, 12, 22, .95);
  display: none; touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.lb-mask.is-open { display: block; }

.lb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 56px 64px;
}
.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 8px;
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.lb-img.is-zoomed { cursor: grab; }
.lb-img.is-dragging { cursor: grabbing; }

.lb-bar {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border-radius: 99px;
  background: rgba(20, 24, 38, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}
.lb-btn {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; transition: background .15s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn-txt { font-size: 11.5px; font-weight: 700; letter-spacing: -.2px; }
.lb-close { background: rgba(255, 255, 255, .16); font-size: 18px; }
.lb-close:hover { background: #e11d48; }
.lb-pct {
  min-width: 42px; text-align: center;
  color: #fff; font-size: 12px; font-variant-numeric: tabular-nums;
}
.lb-count { color: rgba(255, 255, 255, .8); font-size: 12.5px; padding: 0 6px; font-variant-numeric: tabular-nums; }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 24, 38, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff; font-size: 26px; line-height: 1; padding-bottom: 4px;
  cursor: pointer; transition: background .15s, transform .15s;
}
.lb-nav:hover { background: rgba(20, 24, 38, .95); }
.lb-nav[hidden] { display: none; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

.lb-hint {
  position: absolute; bottom: 14px; left: 0; right: 0; z-index: 2;
  text-align: center; font-size: 12px;
  color: rgba(255, 255, 255, .55); pointer-events: none;
}

@media (max-width: 720px) {
  .lb-stage { padding: 54px 8px; }
  .lb-hint { display: none; }
  .lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .lb-bar { top: 10px; right: 10px; gap: 4px; padding: 4px 6px; }
  .lb-btn { width: 27px; height: 27px; font-size: 14px; }
  .lb-pct { min-width: 36px; }
}

.file-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg, #fafbfc);
  max-width: 100%;
}
.file-chip:hover { text-decoration: none; border-color: #c7cdfa; background: var(--brand-soft); color: var(--brand); }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 音频附件：一行名字 + 一个播放器（preload=none，不点不耗流量） */
.audio-row {
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg, #fafbfc);
}
.audio-name {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-2);
  margin-bottom: 7px;
}
.audio-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-row audio { width: 100%; height: 36px; display: block; }

/* 操作栏 */
.post-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  margin-left: -8px;
}
.act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
  line-height: 1;
}
.act:hover { text-decoration: none; }
.act svg { transition: transform .15s ease; }
.act-c:hover  { color: #0ea5e9; background: #eff9fe; }
.act-r:hover  { color: #10b981; background: #ecfdf5; }
.act-l:hover  { color: #e11d48; background: #fff1f4; }
.act-v:hover  { color: var(--brand); background: var(--brand-soft); }
.act-d:hover  { color: #e11d48; background: #fff1f3; }
.act.on { color: #e11d48; }
.act.on svg { transform: scale(1.08); }
.act:active svg { transform: scale(.88); }

/* ============================================================
   右栏
   ============================================================ */
.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.side-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.side-card p { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.side-card p:last-child { margin-bottom: 0; }
.side-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.side-list a, .side-list span {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 8px; border-radius: 8px; font-size: 13.5px; color: var(--text-2);
}
.side-list a:hover { background: var(--bg, #f6f7f9); text-decoration: none; color: var(--text); }
.side-list b { font-weight: 700; color: var(--text); }

.mini-post { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-post:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-post-text { font-size: 13px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mini-post-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ============================================================
   通用组件
   ============================================================ */
.container-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px 16px 80px;
}

.page-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

h1.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin: 0 0 6px; }
p.page-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field .tip { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg, #fafbfc);
  font-size: 15px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  background: var(--card, #fff);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .1);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892a4' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .8); }
.btn-ghost { background: var(--card, #fff); border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { background: var(--bg, #f6f7f9); }
.btn-danger { background: var(--danger); }
.btn-ok { background: var(--ok); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  line-height: 1.55;
}
.alert-err  { background: #fff1f4; border-color: #fecdd3; color: #9f1239; }
.alert-ok   { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: var(--brand-soft); border-color: #ddd6fe; color: #3730a3; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.empty svg { opacity: .35; margin-bottom: 12px; }
.empty p { margin: 0; font-size: 14px; }

.divider { height: 1px; background: var(--line); margin: 22px 0; border: 0; }

/* ---------------- 未登录遮罩 ---------------- */
.guest-gate {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 0;
}
.guest-gate-inner {
  padding: 42px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--brand-soft) 100%);
}
.guest-gate h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.guest-gate p { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }
.guest-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------- 底部导航（移动端） ---------------- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
  display: flex;
  height: var(--nav-h);
}
.bn-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  border: 0; background: none;
  cursor: pointer;
}
.bn-item:hover { text-decoration: none; color: var(--text-2); }
.bn-item.active { color: var(--brand); }
.bn-fab { flex: none; width: 64px; display: grid; place-items: center; }
.bn-fab .fab-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .85);
  margin-top: -14px;
  border: 3px solid #fff;
  cursor: pointer;
}

/* ---------------- 悬浮发帖按钮（桌面） ---------------- */
.fab-desktop {
  position: fixed;
  bottom: 28px;
  right: calc(50% - 660px + 20px);
  z-index: 50;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  display: none;
  place-items: center;
  box-shadow: 0 12px 28px -10px rgba(79, 70, 229, .9);
  cursor: pointer;
}

/* ============================================================
   帖子详情页
   ============================================================ */
.detail-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  width: 100%;
  background: none; border: 0; cursor: pointer;
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
}
.detail-back:hover { text-decoration: none; background: var(--bg, #f6f7f9); }

.post-detail { position: relative; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.post-detail .post-head { font-size: 15px; }
.post-detail .post-text { font-size: 18px; line-height: 1.65; margin-top: 12px; }

/* 禁截水印：铺满整张帖子卡，pointer-events 全透，截图会一起拍进去 */
.post-detail[data-no-capture="1"] {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.post-detail[data-no-capture="1"] img,
.post-detail[data-no-capture="1"] video {
  -webkit-user-drag: none; user-drag: none;
}
.cap-wm {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-around; align-items: center;
  transform: rotate(-18deg) scale(1.25);
  pointer-events: none; z-index: 6; overflow: hidden;
  opacity: .09; color: #0f172a;
  font-size: 15px; font-weight: 800; letter-spacing: 3px; white-space: nowrap;
}
.cap-notice {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 10px; padding: 10px 14px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px;
  color: #9a3412; font-size: 12.5px; line-height: 1.7;
}
.act.act-cap.on { color: #b45309; }

.stat-bar {
  display: flex; flex-wrap: wrap; gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.stat-bar b { color: var(--text); font-weight: 700; }

.analytics {
  background: #fafbff;
  border: 1px solid #e0e4ff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
}
.analytics h4 { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: .3px; }
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 12px; }
.analytics-item .v { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.analytics-item .k { font-size: 11.5px; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 38px; margin-top: 12px; }
.spark i { flex: 1; background: linear-gradient(180deg, var(--brand), #c4b5fd); border-radius: 3px 3px 0 0; min-height: 2px; }

.comment {
  display: flex; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
.comment.reply { padding-left: 58px; background: #fcfcfd; }
.comment-body { flex: 1; min-width: 0; }
.comment-text { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin: 3px 0 0; }
.comment-actions { display: flex; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.comment-actions button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: inherit; }
.comment-actions button:hover { color: var(--brand); }
.comment-actions button.c-del:hover { color: #e11d48; }

/* 评论右上角「⋯」（删除 / 举报 / 复制链接） */
.comment-more {
  margin-left: auto;
  color: var(--muted);
  background: none; border: 0; cursor: pointer;
  padding: 0 4px; border-radius: 999px; line-height: 1;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
}
.comment-more:hover { background: var(--brand-soft); color: var(--brand); }
.reply-to { color: var(--brand); font-weight: 600; }

.comment-form {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card, #fff);
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.comment-form .textarea { min-height: 44px; padding: 10px 14px; border-radius: 999px; resize: none; }

/* ============================================================
   发帖页
   ============================================================ */
.compose-wrap { display: flex; gap: 12px; padding: 16px; }
.compose-wrap .textarea {
  border: 0; background: none; font-size: 18px; min-height: 120px; padding: 8px 0; line-height: 1.65;
}
.compose-wrap .textarea:focus { box-shadow: none; background: none; }

.preview-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.preview-thumb {
  position: relative;
  width: 86px; height: 86px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0b1020;
}
.preview-thumb img, .preview-thumb video { width: 100%; height: 100%; object-fit: cover; }
.preview-thumb .rm {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff;
  border: 0; cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.preview-file {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12.5px; color: var(--text-2); background: var(--bg, #fafbfc); max-width: 100%;
}

.compose-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  position: sticky; bottom: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.compose-tools { display: flex; gap: 4px; }
.tool-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0; background: none;
  color: var(--brand);
  display: grid; place-items: center;
  cursor: pointer;
}
.tool-btn:hover { background: var(--brand-soft); }

.char-ring { position: relative; width: 30px; height: 30px; margin-right: 10px; }
.char-ring svg { transform: rotate(-90deg); }
.char-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); font-weight: 700; }

/* ============================================================
   审核区
   ============================================================ */
.review-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.review-tabs .tab-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card, #fff);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.review-tabs .tab-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.review-tabs .tab-pill .n {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  background: rgba(255,255,255,.25); border-radius: 99px; font-size: 11px;
}
.review-tabs .tab-pill:not(.active) .n { background: #eef0f4; color: var(--muted); }

.review-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.review-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.review-item-body { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow-y: auto; }
.review-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.review-meta { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ============================================================
   封禁页
   ============================================================ */
.ban-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
.ban-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #fff1f4;
  color: var(--danger);
  display: grid; place-items: center;
  margin: 0 auto 20px;
}
.ban-title { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 10px; }
.ban-reason {
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 22px 0;
  text-align: left;
  box-shadow: var(--shadow);
}
.ban-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.ban-row:last-child { border-bottom: 0; }
.ban-row span { color: var(--muted); flex: none; }
.ban-row b { font-weight: 700; text-align: right; word-break: break-word; }
.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--danger);
  margin: 8px 0 4px;
}

/* ============================================================
   折叠块（关于页用）
   ============================================================ */
details.fold {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card, #fff);
  margin: 14px 0;
  overflow: hidden;
}
details.fold > summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-2);
  user-select: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: "＋";
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  transition: transform .18s ease;
}
details.fold[open] > summary::after { content: "－"; }
details.fold > summary:hover { background: var(--bg, #fafbfc); }
details.fold .fold-body { padding: 4px 18px 18px; font-size: 14px; line-height: 1.75; color: var(--text-2); }
details.fold .fold-body ol, details.fold .fold-body ul { padding-left: 20px; }
details.fold .fold-body li { margin-bottom: 6px; }

/* ============================================================
   文档页（about / doc）
   ============================================================ */
.doc-page { max-width: 760px; margin: 0 auto; padding: 0 16px 100px; }
.doc-hero {
  padding: 48px 24px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--brand-soft), transparent);
  border-radius: 0 0 24px 24px;
  margin-bottom: 26px;
}
.doc-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin: 0 0 10px; }
.doc-hero p { color: var(--text-2); font-size: 15px; margin: 0; }
.doc-body { background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.doc-body h2 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 30px 0 12px; padding-left: 12px; border-left: 4px solid var(--brand); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 15.5px; font-weight: 700; margin: 20px 0 8px; }
.doc-body p { font-size: 14.5px; line-height: 1.8; color: var(--text-2); margin: 0 0 12px; }
.doc-body ul, .doc-body ol { font-size: 14.5px; line-height: 1.8; color: var(--text-2); padding-left: 22px; }
.doc-body li { margin-bottom: 6px; }
.doc-body strong { color: var(--text); }

.toc {
  background: var(--bg, #fafbfc);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 13.5px;
}
.toc b { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text); }
.toc a { display: block; padding: 3px 0; color: var(--text-2); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; margin: 18px 0; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 20px; }
.tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--card, #fff); border: 3px solid var(--brand);
}
.tl-item.done::before { background: var(--brand); }
.tl-item h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; }
.tl-item p { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
  .app { grid-template-columns: 240px minmax(0, 1fr); }
  .col-right { display: none; }
  .fab-desktop { display: grid; right: 24px; }
}

@media (max-width: 900px) {
  body { font-size: 14.5px; }
  .app {
    display: block;
    padding: 0;
    max-width: 100%;
  }
  .col-left { display: none; }
  .col-main {
    border-left: 0; border-right: 0;
    min-height: auto;
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
  }
  .bottom-nav { display: block; }
  .fab-desktop { display: none; }
  .topbar-head { padding: 10px 14px 8px; }
  .topbar-title { font-size: 16.5px; }
  .post { padding: 12px 14px; gap: 10px; }
  .avatar { width: 38px; height: 38px; font-size: 15px; }
  .post-text { font-size: 14.5px; }
  .post-detail { padding: 14px 16px; }
  .post-detail .post-text { font-size: 16.5px; }
  .container-page { padding: 16px 12px 90px; }
  .page-card { padding: 18px 16px; border-radius: 14px; }
  h1.page-title { font-size: 21px; }
  .doc-hero { padding: 32px 18px 26px; }
  .doc-hero h1 { font-size: 23px; }
  .doc-body { padding: 20px 16px; }
  .comment { padding: 11px 14px; }
  .comment.reply { padding-left: 46px; }
  .tab { padding: 10px 11px; font-size: 13.5px; }
  .review-item { padding: 14px; }
  .media-grid.n3 { grid-template-columns: 1fr 1fr; }
  .media-grid.n3 > :first-child { grid-row: span 1; }
}

/* 移动端：隐藏桌面专用的东西 */
.only-mobile { display: none; }
@media (max-width: 900px) { .only-mobile { display: block; } .only-desktop { display: none !important; } }

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 打印 */
@media print {
  .col-left, .col-right, .bottom-nav, .post-actions, .topbar { display: none; }
}

/* 上传头像（render_avatar 走 <img> 时用） */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 称号与金色用户名 ---------- */
/* 有称号的人，用户名在整站都是金色（无 background-clip 支持时退成纯金棕，保证能看清） */
.nick-gold { color: #b07d0a; font-weight: 800; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nick-gold {
    background-image: linear-gradient(100deg, #9a6b10 0%, #e2ab1f 26%, #f5cf57 48%, #c08a0f 72%, #8a5f0c 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

/* 称号小标签 */
.badge-title {
  background: linear-gradient(180deg, #fff9e8, #fdeecb);
  color: #8a6510;
  border: 1px solid #f0d59a;
}

/* ---------- 赞助者：亮银名字 + 「赞助者」小标签 ---------- */
/* 有称号的（比如冰块）保持金色，只加标签；没有称号的才转亮银 */
.nick-silver { color: #8e97a6; font-weight: 800; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .nick-silver {
    background-image: linear-gradient(100deg, #7b8494 0%, #b3bccb 20%, #e9edf4 42%, #f6f8fc 52%, #aeb7c6 74%, #7b8494 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.nick-sup::after {
  content: "赞助者";
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: .2px;
  vertical-align: 1px;
  border-radius: 4px;
  color: #6b7280;
  background: linear-gradient(180deg, #f7f8fa, #e6e9ee);
  border: 1px solid #d6dbe3;
  -webkit-text-fill-color: #6b7280;   /* 金色用了 background-clip:text，这里要拉回来 */
  text-shadow: none;
  white-space: nowrap;
}

/* 「站长」这枚：金色实心，比普通称号显眼 */
.badge-owner {
  background: linear-gradient(135deg, #f7d97b 0%, #d3a02c 55%, #b8821a 100%);
  color: #fff;
  border: 1px solid #c89020;
  text-shadow: 0 1px 1px rgba(120, 80, 0, .35);
}

/* ---------- 左侧音乐小抽屉（电脑版） ---------- */
.fm-dock {
  position: fixed; left: 0; z-index: 70;
  display: flex; align-items: flex-start;
  transition: top .16s ease;
}
.fm-dock.is-dragging { transition: none; }

.fm-handle {
  width: 26px; height: 86px; flex: 0 0 26px;
  border: 1px solid #d5daea; border-left: 0;
  border-radius: 0 13px 13px 0;
  background: var(--card, #fff); color: #6c7385;
  font: 700 16px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: grab;
  box-shadow: 3px 4px 16px rgba(15, 23, 42, .13);
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.fm-handle:hover { color: var(--brand); border-color: #c7cbe0; background: #fbfbff; }
.fm-dock.is-dragging .fm-handle { cursor: grabbing; }
.fm-dock.is-open .fm-handle { color: var(--brand); border-color: #c7cbe0; }

.fm-clip {
  width: 330px; height: 86px; overflow: hidden;
  pointer-events: none;
}
.fm-dock.is-open .fm-clip {
  pointer-events: auto;
  border-radius: 0 13px 13px 0;
  box-shadow: 6px 10px 30px rgba(15, 23, 42, .18);
}

.fm-panel {
  width: 330px; height: 86px;
  transform: translateX(-104%);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}
.fm-dock.is-open .fm-panel { transform: none; }
.fm-panel iframe { display: block; width: 330px; height: 86px; border: 0; background: var(--card, #fff); }

/* 手机端：把手贴在右边，点开向左弹出播放器 */
@media (max-width: 900px) {
  .fm-dock { left: auto; right: 0; flex-direction: row-reverse; }
  .fm-handle {
    border: 1px solid #d5daea; border-right: 0;
    border-radius: 13px 0 0 13px;
    box-shadow: -3px 4px 16px rgba(15, 23, 42, .13);
  }
  .fm-clip { position: absolute; right: 26px; top: 0; width: min(330px, calc(100vw - 46px)); height: 86px; }
  .fm-dock.is-open .fm-clip { border-radius: 13px 0 0 13px; }
  .fm-panel { width: 100%; transform: translateX(106%); }
  .fm-panel iframe { width: 100%; }
}
@media print { .fm-dock { display: none; } }

/* ============================================================
   Markdown 正文（帖子）
   ============================================================ */
.md-body { font-size: 15px; line-height: 1.8; color: var(--text); word-wrap: break-word; }
.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child { margin-bottom: 0; }
.md-body .md-h { font-weight: 800; letter-spacing: -.3px; margin: 1.05em 0 .5em; line-height: 1.35; }
.md-body .md-h1 { font-size: 22px; border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.md-body .md-h2 { font-size: 19px; border-bottom: 1px solid var(--line); padding-bottom: .25em; }
.md-body .md-h3 { font-size: 17px; }
.md-body .md-h4, .md-body .md-h5, .md-body .md-h6 { font-size: 15.5px; }
.md-body .md-p { margin: .7em 0; }
.md-body .md-list { margin: .6em 0; padding-left: 1.35em; }
.md-body .md-list .md-list { margin: .25em 0; }
.md-body .md-li { margin: .22em 0; }
.md-body ul.md-list { list-style: disc; }
.md-body ol.md-list { list-style: decimal; }
.md-body .md-quote {
  margin: .8em 0; padding: .5em .9em;
  border-left: 3px solid #c7cdf0; background: #f7f8fe; color: var(--text-2);
  border-radius: 0 8px 8px 0;
}
.md-body .md-code {
  background: #f1f3f9; border: 1px solid #e6e9f2; border-radius: 5px;
  padding: 1px 5px; font-size: .9em; font-family: ui-monospace, Menlo, Consolas, monospace;
  color: #be185d;
}
.md-body .md-pre {
  position: relative; margin: .85em 0; padding: 12px 14px; overflow: auto;
  background: #0f172a; color: #e8ecf7; border-radius: 10px;
  font-size: 13px; line-height: 1.65;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.md-body .md-pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.md-body .md-pre-lang {
  position: absolute; top: 0; right: 0; padding: 2px 8px;
  font-size: 11px; color: #94a3b8; background: rgba(255, 255, 255, .07);
  border-radius: 0 9px 0 9px; letter-spacing: .5px;
}
.md-body .md-hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md-body .md-img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: .7em 0; }
.md-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.md-body a:hover { color: #3730a3; }
.md-body .md-task { margin-right: 5px; vertical-align: -1px; }
.md-body .md-table-wrap { overflow-x: auto; margin: .85em 0; }

/* ---------- 正文颜色标签（[#R]…[#E]） ---------- */
.s2w-c { font-weight: inherit; }
.s2w-c-geek {
  font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace;
  font-weight: 600;
  text-shadow: 0 0 6px currentColor;
}
.s2w-c-upd {
  font-weight: 700;
  letter-spacing: .3px;
}
.md-body .md-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md-body .md-table th, .md-body .md-table td {
  border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top;
}
.md-body .md-table th { background: #f6f7fb; font-weight: 700; }
.md-body .md-table tr:nth-child(even) td { background: #fafbfe; }

/* 列表页里的 Markdown：限高 + 底部渐隐，点进帖子看全文 */
.md-clamp {
  max-height: 340px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

/* ============================================================
   发帖页：纯文本 / Markdown 切换
   ============================================================ */
.compose-fmt { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #f2f4fa; border-radius: 999px; padding: 3px; gap: 2px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--text-2); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.seg input:checked + label { background: var(--card, #fff); color: var(--brand); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.fmt-help { border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--brand); cursor: pointer; font-family: inherit; }
.fmt-help:hover { text-decoration: underline; }
.fmt-help-box {
  margin: 0 16px 12px; padding: 12px 14px; background: #f7f8fe;
  border: 1px solid #e3e7f6; border-radius: 12px; font-size: 13px; color: var(--text-2);
}
.fmt-help-box pre {
  margin: 8px 0; padding: 10px 12px; background: var(--card, #fff); border: 1px solid var(--line);
  border-radius: 9px; overflow-x: auto; font-size: 12.5px; line-height: 1.7;
  font-family: ui-monospace, Menlo, Consolas, monospace; color: #334155;
}

/* ============================================================
   发帖页：嵌入网页
   ============================================================ */
.embed-box { margin: 0 16px 14px; border: 1px dashed #cdd5ee; border-radius: 12px; background: #fbfcff; }
.embed-box > summary {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; list-style: none;
}
.embed-box > summary::-webkit-details-marker { display: none; }
.embed-box[open] > summary { border-bottom: 1px dashed #dde3f4; }
.embed-tag {
  margin-left: auto; font-size: 11px; font-weight: 700; color: #b45309;
  background: #fef3c7; padding: 2px 8px; border-radius: 999px;
}
.embed-box-body { padding: 12px 14px 14px; }
.embed-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ============================================================
   帖子里的嵌入卡片
   ============================================================ */
.embed-card {
  margin: 12px 0 2px; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: var(--card, #fff); box-shadow: 0 2px 10px -6px rgba(15, 23, 42, .18);
}
.embed-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #f6f7fb; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.embed-dot { width: 8px; height: 8px; border-radius: 50%; background: #4f46e5; flex: none; }
.embed-host { font-weight: 700; color: var(--text-2); }
.embed-title { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.embed-open { margin-left: auto; color: var(--brand); font-size: 12px; flex: none; }
.embed-open:hover { text-decoration: underline; }
.embed-frame { display: block; width: 100%; border: 0; background: #f8fafc; }

.embed-card-mini {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  text-decoration: none; color: inherit;
}
.embed-card-mini:hover { background: #fafbff; }
.embed-fav {
  width: 30px; height: 30px; flex: none; border-radius: 9px; background: #eef0ff; color: #4338ca;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.embed-mini-txt { display: flex; flex-direction: column; min-width: 0; }
.embed-mini-txt b { font-size: 13.5px; }
.embed-mini-txt span { font-size: 12px; color: var(--muted); }

.embed-note {
  margin: 12px 0 2px; padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.75;
}
.embed-note-wait { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.embed-note-no { background: #fff1f4; border: 1px solid #fecdd3; color: #9f1239; }
.embed-note-url { word-break: break-all; color: var(--muted); font-size: 11.5px; }

/* 审核台：嵌入网页条目 */
.embed-review { margin: 10px 0; padding: 10px 12px; background: #f8f9fd; border-radius: 12px; }
.embed-review-line { display: flex; align-items: center; gap: 10px; }
.embed-h-badge {
  flex: none; font-size: 11px; font-weight: 700; color: var(--text-2);
  background: #e9edf9; padding: 3px 8px; border-radius: 999px;
}

/* ============================================================
   实时在线人数
   ============================================================ */
.online-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #10b981; margin-right: 4px; vertical-align: 1px;
  animation: online-pulse 2s ease-in-out infinite;
}
@keyframes online-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  50%      { opacity: .65; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* ============================================================
   上传 / 下载进度条（app.js 动态插入）
   手机上传 20MB 视频时如果什么都不动，用户会以为卡死 —— 必须给反馈
   ============================================================ */
.prog-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 9999; width: min(360px, calc(100vw - 24px));
  display: none; pointer-events: none;
}
.prog-card {
  pointer-events: auto;
  background: rgba(17, 21, 35, .95); color: #fff;
  border-radius: 14px; padding: 11px 13px;
  box-shadow: 0 14px 38px rgba(9, 12, 22, .38);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: prog-in .18s ease-out;
}
@keyframes prog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.prog-top { display: flex; align-items: center; gap: 8px; }
.prog-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prog-x {
  flex: none; width: 22px; height: 22px; line-height: 1; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 15px; display: grid; place-items: center; padding: 0;
}
.prog-x:hover { background: rgba(255, 255, 255, .26); }
.prog-track {
  height: 6px; margin-top: 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); overflow: hidden;
}
.prog-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width .2s ease;
}
.prog-fill.indet { width: 36% !important; animation: prog-slide 1.1s ease-in-out infinite; }
@keyframes prog-slide { from { margin-left: -36%; } to { margin-left: 100%; } }
.prog-card.is-err .prog-fill { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.prog-card.is-ok  .prog-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.prog-meta {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 6px; font-size: 11.5px; color: rgba(255, 255, 255, .66);
}
.prog-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   移动端细节修正
   ============================================================ */
@media (max-width: 900px) {
  /* iOS 下 <16px 的输入框会触发自动放大，整页被顶歪 */
  input, select, textarea { font-size: 16px; }
  /* 手指点击热区别太小 */
  .btn, .tab, .file-chip, .crumb, .bn-item, .tool-btn { min-height: 36px; }
  .crumb { display: inline-flex; align-items: center; min-height: 28px; }
  /* 卡片贴边太紧，留一点呼吸 */
  .post-detail { padding: 14px 15px; }
  .detail-back { padding: 10px 14px; }
  /* 弹层/抽屉跟着安全区走 */
  .me-edit { margin-top: 10px; }
  /* 进度条躲开底部导航 */
  .prog-wrap { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); }
}
@media (max-width: 420px) {
  .prog-wrap { width: calc(100vw - 18px); }
  .crumbs { font-size: 12px; padding-left: 14px; padding-right: 14px; }
}


/* 信箱未读角标 */
.nav-item { position: relative; }
.nav-badge {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #f43f5e; color: #fff; font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center;
}

/* 公网访问时提示局域网极速入口 */
.nav-lan-tip {
  display: block; margin: 10px 8px 4px; padding: 8px 10px; border-radius: 9px;
  font-size: 11.5px; line-height: 1.5; color: #6366f1;
  background: rgba(99, 102, 241, .08); text-decoration: none;
}
.nav-lan-tip:hover { background: rgba(99, 102, 241, .16); }


/* ============================================================
   移动端抽屉 + 电脑版切换
   ------------------------------------------------------------
   之前手机端把整个 .col-left 直接 display:none，
   结果信箱、免费 NAS、谁赞了我、板块树在手机上全没了。
   现在改成：手机上侧栏变成可滑出的抽屉，桌面端布局依然原样。
   ============================================================ */

/* 抽屉遮罩 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 990;
  background: rgba(15, 23, 42, .42);
  opacity: 0; transition: opacity .24s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.drawer-mask[hidden] { display: none !important; }
html.drawer-open .drawer-mask { opacity: 1; }

/* 悬浮菜单按钮（手机左下角） */
.drawer-fab {
  position: fixed; z-index: 800;
  left: 14px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  width: 46px; height: 46px; border-radius: 50%;
  display: none;                 /* 桌面端不显示，手机端再打开 */
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card); color: var(--brand);
  box-shadow: var(--shadow-lg);
  cursor: pointer; padding: 0;
}
.drawer-fab:active { transform: scale(.94); }

/* 抽屉头部 */
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  position: sticky; top: 0; z-index: 2;
  background: var(--card);
}
.drawer-head-title {
  flex: 1; font-size: 15px; font-weight: 800; letter-spacing: -.2px;
  display: inline-flex; align-items: center; gap: 7px; color: var(--text);
}
.drawer-close {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: var(--card, #f1f3f7); color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.drawer-close:hover { background: #e8eaef; }

/* 电脑版 / 手机版 切换块 */
.view-switch { padding: 10px 14px 4px; }
.view-switch-btn {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 11px 13px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--brand-soft);
  color: var(--brand); font-size: 14px; font-weight: 700; font-family: inherit;
}
.view-switch-btn:hover { background: #e2e6ff; }
.view-switch-ico { flex: none; display: inline-grid; place-items: center; }
.view-switch-tip {
  margin-top: 7px; padding: 0 3px;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
}

/* 底部导航未读角标 */
.bn-item { position: relative; }
.bn-badge {
  position: absolute; top: 4px; left: 50%; margin-left: 5px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}

/* 抽屉面板：桌面端根本不显示，只有手机端才是抽屉 */
.drawer-panel { display: none; }

/* ---- 手机：桌面侧栏收起，改用抽屉 ---- */
@media (max-width: 900px) {
  .col-left { display: none; }
  .drawer-fab { display: grid; }
  .drawer-panel {
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 82vw; max-width: 312px;
    z-index: 1000;
    transform: translateX(-103%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--card);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 36px rgba(15, 23, 42, .22);
    padding: 0 0 20px;
  }
  html.drawer-open .drawer-panel { transform: none; }
  html.drawer-open body { overflow: hidden; }

  /* 抽屉里的导航项要能点得着（原来 .nav-item 有白空间截断，移动端放宽） */
  .drawer-panel .nav-item { font-size: 15px; padding: 12px 12px; }
  .drawer-panel .brand { padding-left: 14px; padding-right: 14px; }
  .drawer-panel .btn-post { margin: 10px 14px; }

  /* 抽屉浮起来时，悬浮按钮别挡路 */
  html.drawer-open .drawer-fab { opacity: 0; pointer-events: none; }
}

/* ---- 电脑版模式：手机屏幕也强制完整桌面布局 ---- */
html.force-desktop .app {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  max-width: 100%;
  padding: 0 10px;
}
html.force-desktop .col-left {
  display: flex !important;
  position: sticky; top: 0; height: 100vh;
  width: auto; max-width: none; z-index: auto;
  transform: none !important;
  box-shadow: none; border-right: 0;
  overflow: visible; padding: 14px 0;
}
html.force-desktop .col-main {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding-bottom: 24px;
  min-height: 100vh;
}
html.force-desktop .bottom-nav { display: none !important; }
html.force-desktop .drawer-panel,
html.force-desktop .drawer-fab,
html.force-desktop .drawer-mask,
html.force-desktop .drawer-head { display: none !important; }
html.force-desktop .only-mobile { display: none !important; }
/* 但「切回手机版」这个按钮必须留着，否则回不去 */
html.force-desktop .view-switch { display: block !important; }
html.force-desktop .view-switch-btn { background: var(--card, #f1f3f7); color: var(--text-2); }
html.force-desktop .view-switch-btn:hover { background: #e8eaef; }

/* 电脑版模式下顶部不再堆面包屑以外的东西 */
html.force-desktop .prog-wrap { bottom: 18px; }

@media (max-width: 420px) {
  .drawer-fab { width: 42px; height: 42px; left: 10px; }
}


/* ============================================================
   投票
   ============================================================ */
.poll-box {
  margin: 14px 0 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfbfe, #f6f7fb);
}
.poll-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.poll-tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 800;
}
.cap-tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  background: #fff7ed; color: #b45309; border: 1px solid #fed7aa;
  font-size: 12px; font-weight: 800;
}
.poll-deadline { font-size: 12.5px; color: var(--warn); font-weight: 700; }
.poll-deadline.is-closed { color: var(--muted); }
.poll-total { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.poll-question { font-size: 15px; font-weight: 700; margin-bottom: 10px; }

.poll-opts { display: flex; flex-direction: column; gap: 8px; }
.poll-opt {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--card);
  font-size: 14.5px;
  overflow: hidden;
}
.poll-opt.is-mine {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.poll-radio {
  flex: none; width: 18px; height: 18px; margin: 0;
  display: grid; place-items: center; cursor: pointer;
}
.poll-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.poll-radio-dot {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid #cbd2e0; background: var(--card);
  display: block; transition: border-color .15s ease, box-shadow .15s ease;
}
.poll-radio input:checked + .poll-radio-dot {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 12px var(--brand);
}
.poll-radio.is-static { cursor: default; }
.poll-label { flex: 1; min-width: 0; word-break: break-word; }

.poll-bar {
  flex: none; width: 92px; height: 6px; border-radius: 999px;
  background: #e8ebf2; overflow: hidden;
}
.poll-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .35s ease;
}
.poll-pct {
  flex: none; min-width: 38px; text-align: right;
  font-size: 12.5px; font-weight: 800; color: var(--brand);
}
.poll-votes {
  flex: none; min-width: 46px; text-align: right;
  font-size: 12px; color: var(--muted);
}
.poll-tip {
  margin-top: 10px; font-size: 12.5px; color: var(--muted);
}
.poll-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.poll-hint { font-size: 12.5px; color: var(--muted); }

/* 发帖页的投票表单 */
.poll-field-label {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); margin: 0 0 5px;
}
.poll-switch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer;
  white-space: nowrap;
}
.poll-compose textarea { min-height: 92px; }

@media (max-width: 560px) {
  .poll-bar { width: 56px; }
  .poll-votes { display: none; }
  .poll-opt { padding: 9px 10px; font-size: 14px; }
}

/* NAS 使用须知 */
.nas-notice {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.nas-notice > summary {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--text-2);
  list-style: none;
}
.nas-notice > summary::-webkit-details-marker { display: none; }
.nas-notice > summary:hover { background: #fafbfd; }
.nas-notice-body {
  padding: 0 15px 14px;
  font-size: 13.5px; line-height: 1.75; color: var(--text-2);
}
.nas-notice-body p { margin: 0 0 9px; }
.nas-notice-body ol.nas-red {
  margin: 0 0 9px; padding-left: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.nas-notice-body ol.nas-red li { color: #b42318; }
.nas-notice-body ol.nas-red b { color: #b42318; }

/* ============================================================
   @ 提及（2026-11-19）
   ============================================================ */
.mention {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  padding: 0 2px;
  border-radius: 4px;
  background: var(--brand-soft);
  transition: background .15s, color .15s;
}
.mention:hover { background: var(--brand); color: #fff; text-decoration: none; }

/* 补全弹层 */
.mention-pop {
  position: absolute;
  z-index: 90;
  max-height: 268px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  font-size: 13.5px;
}
.mention-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.35;
}
.mention-item:hover,
.mention-item.is-active { background: var(--brand-soft); }
.mention-nick {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.mention-user { color: var(--muted); font-size: 12px; }
.mention-you {
  margin-left: auto;
  font-size: 11px;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 0 4px;
}

/* ============================================================
   私信 · 关注列表 · 收藏（2026-11-23）
   ============================================================ */
.dm-list{display:flex;flex-direction:column}
.dm-row{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line,#eef0f4);text-decoration:none;color:inherit}
.dm-row:hover{background:rgba(0,0,0,.02)}
.dm-row-body{flex:1;min-width:0}
.dm-row-head{display:flex;align-items:baseline;gap:8px}
.dm-row-preview{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.dm-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e11d48;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.dm-thread{max-height:62vh;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.dm-empty{color:var(--muted);font-size:13px;text-align:center;padding:30px 10px}
.dm-bubble-row{display:flex;gap:8px;align-items:flex-end;max-width:86%}
.dm-bubble-row.mine{align-self:flex-end;flex-direction:row-reverse}
.dm-bubble{background:var(--card,#f4f5f8);border-radius:14px;padding:8px 12px;font-size:14px;line-height:1.55;word-break:break-word}
.dm-bubble-row.mine .dm-bubble{background:var(--brand,#4f46e5);color:#fff}
.dm-text{white-space:pre-wrap}
.dm-time{font-size:10.5px;opacity:.6;margin-top:4px;text-align:right}
.dm-form{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--line,#eef0f4);align-items:flex-end}
.dm-form textarea{flex:1;resize:none;min-height:40px;max-height:120px;padding:10px 12px;border-radius:12px;border:1px solid var(--line,#dfe3ea);background:var(--bg,#fff);color:inherit;font:inherit;font-size:14px}
.dm-form .btn{flex:none;height:40px;padding:0 14px}
.me-follows{display:flex;flex-direction:column}
.me-follow-row{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line,#eef0f4)}
.me-follow-row .btn{flex:none}
.me-follow-row .btn.on{background:rgba(0,0,0,.05)}
.post-actions .act-s.on{color:#4f46e5}

/* ============================================================
   侧栏搜索框 · 话题云（2026-11-23）
   ============================================================ */
.nav-search{
  position:relative;display:flex;align-items:center;gap:6px;
  margin:2px 12px 10px;padding:0 10px;height:36px;
  border-radius:10px;border:1px solid var(--line,#e6e9f0);
  background:var(--card,#f6f7fa);
}
.nav-search:focus-within{border-color:var(--brand,#4f46e5);background:var(--bg,#fff)}
.nav-search input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  font:inherit;font-size:13.5px;color:var(--text,inherit);height:100%;
}
.nav-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.nav-search input::placeholder{color:var(--muted,#9aa3b2)}
.nav-search button{
  flex:none;display:flex;align-items:center;justify-content:center;
  width:26px;height:26px;border:0;border-radius:8px;cursor:pointer;
  background:transparent;color:var(--muted,#8b93a3);padding:0;
}
.nav-search button:hover{background:var(--brand-soft,rgba(79,70,229,.1));color:var(--brand,#4f46e5)}
.nav-search button svg{width:17px;height:17px}

.tag-cloud{display:flex;flex-wrap:wrap;gap:7px;padding:2px 0 2px}
.tag-cloud a{
  display:inline-flex;align-items:baseline;gap:4px;
  padding:5px 10px;border-radius:999px;text-decoration:none;
  background:var(--card,#f2f3f8);color:var(--text,inherit);
  font-size:12.5px;line-height:1.2;transition:background .15s ease,color .15s ease;
}
.tag-cloud a:hover{background:var(--brand-soft,rgba(79,70,229,.12));color:var(--brand,#4f46e5)}
.tag-cloud a span{font-size:11px;color:var(--muted,#939bab)}
.tag-cloud a:hover span{color:inherit;opacity:.85}

/* ===== 更多页 more.php（2026-12-02）===== */
.more-wrap{padding:18px 20px 60px;max-width:900px}
.more-group{margin-bottom:26px}
.more-group-title{
  font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--muted,#939bab);
  padding:0 2px 10px;text-transform:uppercase;
}
.more-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.more-card{
  display:flex;align-items:center;gap:12px;
  padding:13px 14px;border-radius:13px;text-decoration:none;
  background:var(--card,#f2f3f8);color:var(--text,inherit);
  border:1px solid transparent;transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.more-card:hover{
  background:var(--brand-soft,rgba(79,70,229,.09));
  border-color:var(--brand,#4f46e5);transform:translateY(-1px);
}
.more-card-ico{
  flex:none;width:40px;height:40px;border-radius:11px;
  display:grid;place-items:center;background:var(--brand-soft,rgba(79,70,229,.1));color:var(--brand,#4f46e5);
}
.more-card-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.more-card-body b{font-size:14px;font-weight:650;line-height:1.25}
.more-card-body small{font-size:12px;color:var(--muted,#939bab);line-height:1.35}
.more-card-arrow{flex:none;color:var(--muted,#b6bdcb);display:grid;place-items:center}
.more-card:hover .more-card-arrow{color:var(--brand,#4f46e5)}
.more-lan{
  display:flex;align-items:center;gap:9px;
  margin-top:4px;padding:12px 14px;border-radius:12px;
  background:var(--brand-soft,rgba(79,70,229,.08));color:var(--brand,#4f46e5);
  font-size:13px;text-decoration:none;line-height:1.5;
}
.more-lan:hover{background:var(--brand-soft,rgba(79,70,229,.16))}

/* 帖子 @用户名 后面的积分徽章（2026-12-02）*/
.pts-badge{
  display:inline-flex;align-items:center;gap:2px;
  padding:1px 6px;border-radius:999px;vertical-align:middle;
  background:linear-gradient(135deg,#fff7ed,#fef3c7);
  color:#b45309;font-size:11px;font-weight:700;line-height:1.5;
  white-space:nowrap;
}
.pts-badge svg{flex:none;width:12px;height:12px}

/* ===== 全新私聊 UI（2026-12-02）===== */
.chat-app{display:flex;gap:14px;margin:14px 16px 24px;min-height:620px;height:calc(100vh - 190px);max-height:820px}
.chat-sidebar{
  flex:0 0 270px;display:flex;flex-direction:column;min-width:0;
  background:var(--card,#f2f3f8);border-radius:16px;overflow:hidden;
}
.chat-side-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:15px 16px;font-weight:700;font-size:14px;border-bottom:1px solid rgba(127,127,127,.1);
}
.chat-side-count{font-size:11px;color:var(--muted,#939bab);background:var(--brand-soft,rgba(79,70,229,.1));padding:2px 8px;border-radius:999px}
.chat-thread-list{flex:1;overflow-y:auto}
.chat-no-thread{padding:40px 18px;text-align:center;color:var(--muted,#939bab);font-size:13px;line-height:1.8}
.chat-thread{
  display:flex;align-items:center;gap:10px;padding:11px 14px;text-decoration:none;
  color:var(--text,inherit);border-left:3px solid transparent;transition:background .15s ease;
}
.chat-thread:hover{background:rgba(127,127,127,.06)}
.chat-thread.active{background:var(--brand-soft,rgba(79,70,229,.1));border-left-color:var(--brand,#4f46e5)}
.chat-thread-av{flex:none}
.chat-thread-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.chat-thread-row{display:flex;align-items:baseline;justify-content:space-between;gap:6px}
.chat-thread-row b{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-thread-row small{font-size:11px;color:var(--muted,#939bab);flex:none}
.chat-thread-preview{font-size:12px;color:var(--muted,#939bab);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-thread-badge{flex:none;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}

.chat-main{
  flex:1;display:flex;flex-direction:column;min-width:0;
  background:var(--card,#f2f3f8);border-radius:16px;overflow:hidden;
}
.chat-placeholder{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:var(--muted,#939bab)}
.chat-ph-ico{opacity:.5;margin-bottom:14px}
.chat-placeholder h2{margin:0 0 8px;font-size:19px;color:var(--text,inherit)}
.chat-placeholder p{margin:0;font-size:13px;line-height:1.7;max-width:340px}
.chat-header{
  display:flex;align-items:center;gap:10px;padding:12px 16px;
  border-bottom:1px solid rgba(127,127,127,.1);background:var(--bg,#fff);
}
.chat-header-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.chat-header-info b{font-size:14px}
.chat-header-info small{font-size:11.5px;color:var(--muted,#939bab)}
.chat-header-profile{color:var(--muted,#939bab);padding:6px;border-radius:8px;display:grid;place-items:center}
.chat-header-profile:hover{background:var(--brand-soft,rgba(79,70,229,.1));color:var(--brand,#4f46e5)}

.chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.chat-load-more{text-align:center;padding:4px 0}
.chat-load-more button{font-size:12px}
.chat-empty{text-align:center;color:var(--muted,#939bab);font-size:13px;padding:30px 10px}
.dm-bubble-row{display:flex;align-items:flex-end;gap:8px;max-width:86%}
.dm-bubble-row.mine{align-self:flex-end;flex-direction:row-reverse}
.dm-bubble{
  max-width:100%;padding:9px 12px;border-radius:14px 14px 14px 4px;
  background:var(--bg,#fff);box-shadow:0 1px 3px rgba(0,0,0,.06);font-size:13.5px;line-height:1.55;
  word-break:break-word;overflow-wrap:anywhere;
}
.dm-bubble-row.mine .dm-bubble{background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border-radius:14px 14px 4px 14px}
.dm-bubble-row.mine .dm-text a{color:#fff;text-decoration:underline}
.dm-time{font-size:10.5px;color:var(--muted,#939bab);margin-top:4px;text-align:right}
.dm-bubble-row.mine .dm-time{color:rgba(255,255,255,.75)}
.dm-gift{
  background:linear-gradient(135deg,#fff7ed,#fef3c7);border:1px dashed #fbbf24;
  border-radius:10px;padding:8px 12px;color:#b45309;font-size:13px;text-align:center;
}
.dm-gift b{font-size:17px}
.dm-gift-note{margin-top:4px;font-size:12px;color:#92400e}

.dm-media-img{display:block;max-width:240px;border-radius:10px;overflow:hidden}
.dm-media-img img{display:block;max-width:100%;max-height:260px;object-fit:cover}
.dm-media-audio,.dm-media-file{display:block;max-width:260px}
.dm-media-audio audio{width:100%;height:34px;margin-top:5px}
.dm-file-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dm-media-video{display:block;max-width:280px;max-height:240px;border-radius:10px;background:#000}
.dm-media-file{
  display:flex;align-items:center;gap:6px;padding:9px 12px;border-radius:10px;
  background:rgba(127,127,127,.1);text-decoration:none;color:inherit;font-size:13px;flex-wrap:wrap;
}
.dm-media-file small{width:100%;font-size:11px;color:var(--muted,#939bab)}
.dm-bubble-row.mine .dm-media-file{background:rgba(255,255,255,.18);color:#fff}

.chat-composer{padding:10px 14px 12px;border-top:1px solid rgba(127,127,127,.1);background:var(--bg,#fff)}
.chat-tools{display:flex;align-items:center;gap:6px;margin-bottom:7px}
.chat-tool{
  display:inline-flex;align-items:center;gap:4px;padding:5px 9px;border:0;border-radius:8px;
  background:transparent;color:var(--muted,#939bab);cursor:pointer;font-size:12px;
}
.chat-tool:hover{background:var(--brand-soft,rgba(79,70,229,.1));color:var(--brand,#4f46e5)}
.chat-tool-gift{background:linear-gradient(135deg,#fff7ed,#fef3c7);color:#b45309;font-weight:700}
.chat-tool-gift:hover{background:#fef3c7;color:#92400e}
.chat-input-row{display:flex;align-items:flex-end;gap:8px}
.chat-input-row textarea{
  flex:1;resize:none;max-height:120px;min-height:38px;padding:9px 12px;
  border:1px solid rgba(127,127,127,.2);border-radius:10px;background:var(--card,#f2f3f8);
  color:var(--text,inherit);font-size:13.5px;line-height:1.5;font-family:inherit;outline:none;
}
.chat-input-row textarea:focus{border-color:var(--brand,#4f46e5)}
.chat-send{
  flex:none;width:38px;height:38px;border:0;border-radius:10px;cursor:pointer;
  background:var(--brand,#4f46e5);color:#fff;display:grid;place-items:center;
}
.chat-send:hover{opacity:.9}
.chat-send:disabled{opacity:.5;cursor:not-allowed}
.chat-hint{font-size:11px;color:var(--muted,#939bab);margin-top:6px}
.chat-hint b{color:#b45309}

/* 送分弹窗 */
.gift-modal{position:fixed;inset:0;z-index:9998;background:rgba(15,23,42,.5);display:grid;place-items:center;padding:18px}
.gift-modal[hidden]{display:none}
.gift-card{position:relative;width:min(380px,100%);padding:22px;border-radius:18px;background:#fff;box-shadow:0 20px 50px -10px rgba(0,0,0,.4)}
.gift-x{position:absolute;top:12px;right:12px;border:0;background:#f1f5f9;color:#64748b;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;cursor:pointer}
.gift-card h3{margin:0 0 8px;font-size:18px;color:#1e293b}
.gift-desc{margin:0 0 14px;font-size:12.5px;color:#64748b;line-height:1.6}
.gift-quick{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-bottom:12px}
.gift-quick-btn{padding:8px 0;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#475569;font-weight:700;cursor:pointer;font-size:13px}
.gift-quick-btn:hover{border-color:#4f46e5;color:#4f46e5;background:#eef2ff}
.gift-card input{
  width:100%;padding:10px 12px;margin-bottom:10px;border:1px solid #e2e8f0;border-radius:9px;
  font-size:13.5px;outline:none;box-sizing:border-box;
}
.gift-card input:focus{border-color:#4f46e5}

/* ===== 积分商店（2026-12-02）===== */
.shop-wrap{padding:18px 20px 60px;max-width:1000px}
.shop-balance{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 22px;border-radius:16px;color:#fff;
  background:linear-gradient(135deg,#f59e0b,#d97706);
  box-shadow:0 8px 24px -8px rgba(217,119,6,.5);
}
.shop-bal-label{font-size:12.5px;opacity:.85}
.shop-bal-num{font-size:38px;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums}
.shop-bal-level{font-size:12.5px;opacity:.9}
.shop-bal-next{margin-left:8px;opacity:.75}
.shop-bal-right{opacity:.35}
.shop-tip{margin:14px 0 24px;font-size:12.5px;color:var(--muted,#939bab);line-height:1.7;padding:10px 14px;background:var(--card,#f2f3f8);border-radius:10px}
.shop-sec-title{font-size:15px;margin:24px 0 12px}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.shop-card{padding:16px;border-radius:14px;background:var(--card,#f2f3f8);display:flex;flex-direction:column;gap:8px}
.shop-card-top{display:flex;align-items:center;justify-content:space-between}
.shop-card-ico{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,#fff7ed,#fef3c7);color:#d97706}
.shop-card-cost{font-size:13px;font-weight:700;color:#b45309;background:#fff7ed;padding:4px 9px;border-radius:999px}
.shop-card-name{font-size:14.5px;font-weight:700}
.shop-card-desc{font-size:12px;color:var(--muted,#939bab);line-height:1.55;flex:1;min-height:36px}
.shop-card .btn{width:100%;margin-top:4px}
.shop-empty{padding:20px;text-align:center;color:var(--muted,#939bab);font-size:13px;background:var(--card,#f2f3f8);border-radius:10px}
.shop-orders{display:flex;flex-direction:column;gap:6px}
.shop-order{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:10px;background:var(--card,#f2f3f8);font-size:13px}
.shop-order span:first-child{flex:1}
.shop-order-cost{font-weight:700;color:#d97706}
.shop-order-time{font-size:11px;color:var(--muted,#939bab)}
.shop-donor-rank{flex:none;font-size:14px;min-width:36px}

/* 手机端：聊天双栏变单栏 */
@media (max-width: 760px){
  .chat-app{margin:10px;height:calc(100vh - 150px);min-height:480px}
  .chat-sidebar{flex:0 0 84px}
  .chat-side-head span:first-child{display:none}
  .chat-thread-body,.chat-thread-badge{display:none}
  .chat-thread{justify-content:center;padding:10px 0}
  .chat-thread-av{display:block}
}
