/* ==========================================================================
   site.css — 前台视觉系统 v2「粉雾玻璃」
   参考风格：NextNapCatWebUI（HeroUI 粉 var(--blue-6) + 渐变光斑背景 + 毛玻璃卡片
   + 8/12/14px 大圆角 + Quicksand 圆体 + 柔和阴影）。
   说明：
   - 变量名与旧版完全兼容（模板内联样式里的 var(--g6) 等照常生效）。
   - JS 状态类（.show/.open/.is-on/.liked/.pop/.active…）保持同名。
   ========================================================================== */
/* --------------------------------------------------------------------------
   1. 字体（Quicksand，本地自托管；中文回退到系统字体）
   -------------------------------------------------------------------------- */
/* 4 个权重共用同一份字重文件：Quicksand 的 400/500/600/700 之前是
   4 个 md5 完全相同的文件（浏览器下 4 次重复内容，共 113KB）。
   现在合并成一份，4 条 @font-face 都指向它 —— 保留 weight 声明，
   让浏览器仍按权重匹配，但只下载一次。 */
@font-face{ font-family:'Quicksand'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/assets/fonts/quicksand-400.woff2') format('woff2'); } /* 绝对路径：CSS 经 assets.php 代理后相对基底不可靠（v1.1.57） */
@font-face{ font-family:'Quicksand'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/quicksand-400.woff2') format('woff2'); } /* 绝对路径：CSS 经 assets.php 代理后相对基底不可靠（v1.1.57） */
@font-face{ font-family:'Quicksand'; font-style:normal; font-weight:600; font-display:swap;
  src:url('/assets/fonts/quicksand-400.woff2') format('woff2'); } /* 绝对路径：CSS 经 assets.php 代理后相对基底不可靠（v1.1.57） */
@font-face{ font-family:'Quicksand'; font-style:normal; font-weight:700; font-display:swap;
  src:url('/assets/fonts/quicksand-400.woff2') format('woff2'); } /* 绝对路径：CSS 经 assets.php 代理后相对基底不可靠（v1.1.57） */
/* --------------------------------------------------------------------------
   2. 设计令牌（亮色）
   -------------------------------------------------------------------------- */
:root{
  /* 品牌粉（HeroUI primary 500/600 实测值） */
  --red:var(--blue-6); --red-rgb:243,18,96;
  --red-600:var(--blue-7); --red-400:var(--red-400); --red-200:var(--blue-3); --red-50:var(--red-50);
  /* 辅助紫（HeroUI secondary） */
  --indigo:#7828c8;
  --violet:#a855f7;
  /* 中性色（蓝灰 240 系） */
  --ink:#18181b; --g7:#52525b; --g6:#71717a; --g9:#a1a1aa; --gcc:#d4d4d8;
  --f7:#f4f4f5; --f0:#eeeef1;
  --bg:var(--white); --page:#fafafc;
  /* 线框 / 玻璃 */
  --line:rgba(24,24,27,.085); --line2:rgba(24,24,27,.06); --border-soft:rgba(24,24,27,.06);
  --glass:rgba(255,255,255,.62); --glass2:rgba(255,255,255,.88);
  --card:rgba(255,255,255,.66); --card-line:rgba(255,255,255,.7);
  --card-sh:rgba(24,24,27,.05); --shadow:rgba(24,24,27,.16); --hl:rgba(255,255,255,.5);
  /* 功能色 */
  --gold:#f5a524; --warning:#f5a524; --success:#17c964; --danger:#e11d48;
  --text-2:#71717a; --primary-soft:rgba(var(--red-rgb),.06); --brand:var(--red);
  /* 页面渐变 + 光斑（参考站背景） */
  --page-grad:linear-gradient(135deg,#eef2ff 0%,var(--white) 46%,#fdf2f8 100%);
  --page-blobs:
    radial-gradient(480px 480px at -6% -8%, rgba(249,160,191,.4), transparent 70%),
    radial-gradient(420px 420px at 104% 16%, rgba(221,214,254,.42), transparent 70%),
    radial-gradient(640px 640px at 20% 106%, rgba(251,207,232,.32), transparent 72%);
  --grad-red:linear-gradient(135deg,var(--blue-6),#ec4899);
  --r-sm:8px; --r-md:12px; --r-lg:14px; --r-xl:20px; --r-pill:999px;
  --sh-1:0 0 1px rgba(24,24,27,.16), 0 1px 2px rgba(24,24,27,.04);
  --sh-2:0 1px 2px rgba(24,24,27,.05);
  --sh-red:0 6px 16px -4px rgba(var(--red-rgb),.45);
  --ease:cubic-bezier(.22,1,.36,1);
  --ease-pop:cubic-bezier(.34,1.42,.5,1);
  --topbar-h:56px;
  --stick-top:calc(var(--topbar-h) + 34px);
}
/* 深色令牌 */
html[data-theme="dark"]{
  --ink:#f4f4f5; --g7:#c9c9d0; --g6:#a1a1aa; --g9:#83838c; --gcc:#52525b;
  --f7:#26262a; --f0:#3f3f46;
  --bg:#18181b; --page:#131316;
  --line:rgba(255,255,255,.1); --line2:rgba(255,255,255,.07); --border-soft:rgba(255,255,255,.07);
  --glass:rgba(24,24,27,.6); --glass2:rgba(24,24,27,.86);
  --card:rgba(255,255,255,.055); --card-line:rgba(255,255,255,.08);
  --card-sh:rgba(0,0,0,.4); --shadow:rgba(0,0,0,.5); --hl:rgba(255,255,255,.08);
  --text-2:#a1a1aa; --primary-soft:rgba(var(--red-rgb),.12);
  --page-grad:linear-gradient(135deg,#17171b 0%,#212127 46%,#1a1a1f 100%);
  --page-blobs:
    radial-gradient(480px 480px at -6% -8%, rgba(var(--red-rgb),.16), transparent 70%),
    radial-gradient(420px 420px at 104% 16%, rgba(120,40,200,.18), transparent 70%),
    radial-gradient(640px 640px at 20% 106%, rgba(236,72,153,.1), transparent 72%);
  --sh-1:0 0 1px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.3);
  --sh-2:0 1px 2px rgba(0,0,0,.35);
}
/* --------------------------------------------------------------------------
   3. 基础与排版
   -------------------------------------------------------------------------- */
*{ margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html{ overflow-x:hidden; background:var(--page-grad) fixed; }
body.site-body{
  /* 用 clip 而不是 hidden：hidden 会让 body 变成滚动容器，导致顶栏 / 侧栏 position:sticky 失效 */
  overflow-x:hidden; overflow-x:clip;
  /* v1.1.64：字体栈收敛——去掉未加载却会劫持渲染的 Nunito/Inter（本机装了才生效，
     导致不同设备观感不一），中文回退补齐 Noto Sans CJK SC / Source Han Sans SC
     （Android / Linux 一致），macOS 补 Helvetica Neue。Quicksand 仍是第一选择。 */
  font-family:'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  font-size:14px; line-height:1.6; color:var(--ink); background:transparent;
  -webkit-font-smoothing:antialiased; transition:color .3s ease;
}
/* 渐变背景上的三团柔光（固定层） */
body.site-body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:var(--page-blobs);
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
svg{ display:block; flex-shrink:0; }
button,input,textarea,select{ font-family:inherit; font-size:inherit; color:inherit; }
button{ cursor:pointer; background:none; border:none; }
input,textarea{ -webkit-appearance:none; appearance:none; }
ul,ol{ list-style:none; }
hr{ border:none; border-top:1px solid var(--line); margin:14px 0; }
::selection{ background:rgba(var(--red-rgb),.18); }
.muted{ color:var(--g9); }
.small{ font-size:12.5px; }
.text-success{ color:var(--success); } .text-danger{ color:var(--danger); }
.text-center{ text-align:center; } .text-right{ text-align:right; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mono{ font-family:'SF Mono', ui-monospace, Consolas, monospace; }
.clamp-1{ display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-3{ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.m-0{margin:0!important;} .mb-8{margin-bottom:8px!important;} .mb-12{margin-bottom:12px!important;}
.mb-14{margin-bottom:14px!important;} .mb-16{margin-bottom:16px!important;}
.mt-6{margin-top:6px!important;} .mt-8{margin-top:8px!important;} .mt-10{margin-top:10px!important;}
.mt-12{margin-top:12px!important;} .mt-14{margin-top:14px!important;}
.hidden-block{display:none!important;}
.page-title{ font-size:20px; font-weight:700; letter-spacing:-.2px; margin:6px 0 14px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.page-title h1{ font-size:20px; font-weight:700; letter-spacing:-.2px; }
.page-title .sub{ font-size:12.5px; font-weight:400; color:var(--g9); }
.page-title-side{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.container{ width:100%; max-width:720px; margin:0 auto; padding:0 14px; }
/* --------------------------------------------------------------------------
   4. 顶栏（悬浮玻璃胶囊，参考站式）
   -------------------------------------------------------------------------- */
.topbar{ position:sticky; top:10px; z-index:60; padding:0 14px; margin-top:10px; }
.topbar-inner{
  max-width:1180px; margin:0 auto; height:var(--topbar-h);
  display:flex; align-items:center; gap:10px; padding:0 10px 0 16px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%);
  border:1px solid rgba(255,255,255,.6);
  border-radius:18px;
  box-shadow:0 1px 2px rgba(24,24,27,.04), 0 10px 30px -14px rgba(24,24,27,.1);
}
html[data-theme="dark"] .topbar-inner{ border-color:rgba(255,255,255,.09); box-shadow:0 10px 30px -14px rgba(0,0,0,.5); }
.menu-toggle,.icon-btn{
  width:38px; height:38px; flex:0 0 38px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  color:var(--g7); background:transparent; border:none; box-shadow:none;
  transition:transform .16s var(--ease-pop), background .2s, color .2s;
}
.menu-toggle:hover,.icon-btn:hover{ background:rgba(24,24,27,.05); color:var(--ink); }
.icon-btn:active,.menu-toggle:active{ transform:scale(.9); }
.menu-toggle{ display:none; }
.brand{ display:flex; align-items:center; gap:9px; min-width:0; }
.brand::before{ content:""; width:4px; height:20px; border-radius:2px; background:var(--red);
  box-shadow:0 2px 8px rgba(var(--red-rgb),.45); flex-shrink:0; }
.brand-text{ font-size:16.5px; font-weight:700; letter-spacing:.2px; white-space:nowrap; color:var(--ink); }
.brand-text-mobile{ display:none; }
.nav{ display:flex; align-items:center; gap:2px; margin-left:8px; }
.nav-link{
  padding:8px 13px; border-radius:11px; font-size:14px; font-weight:500; color:var(--g6);
  transition:color .2s, background .2s; white-space:nowrap;
}
.nav-link:hover{ color:var(--ink); background:rgba(24,24,27,.045); }
.nav-link.active{ color:var(--red); background:rgba(var(--red-rgb),.1); font-weight:600; }
.search{ display:flex; align-items:center; flex:1; max-width:280px; margin-left:auto;
  background:rgba(24,24,27,.045); border:1px solid transparent; border-radius:var(--r-pill);
  padding:0 4px 0 14px; height:38px; transition:background .2s, border-color .2s, box-shadow .2s; }
.search:focus-within{ background:rgba(255,255,255,.85); border-color:rgba(var(--red-rgb),.4);
  box-shadow:0 0 0 3px rgba(var(--red-rgb),.1); }
.search input{ flex:1; min-width:0; background:none; border:none; outline:none; font-size:13.5px; height:100%; }
.search input::placeholder{ color:var(--g9); }
.search button{ width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--gray-1); background:var(--grad-red); box-shadow:0 3px 8px -2px rgba(var(--red-rgb),.5); flex-shrink:0; }
.search button:active{ transform:scale(.92); }
html[data-theme="dark"] .search:focus-within{ background:rgba(255,255,255,.12); }
.topbar-actions{ display:flex; align-items:center; gap:8px; }
.nav + .search + .topbar-actions{ margin-left:0; }
.topbar-search-btn{ display:none; }
.topbar-post{ white-space:nowrap; }
.topbar-actions .theme-toggle{ order:8; margin-left:auto; }
/* 深浅色切换：浅色下显示月亮、深色下显示太阳（只显示一个，避免两个图标叠在一起） */
.theme-toggle .ico-sun{ display:none; }
.theme-toggle .ico-moon{ display:block; }
html[data-theme="dark"] .theme-toggle .ico-sun{ display:block; }
html[data-theme="dark"] .theme-toggle .ico-moon{ display:none; }
.topbar-actions .user-menu{ order:9; margin-left:0; }
/* 用户菜单 */
.user-menu{ position:relative; }
.user-menu-trigger{ display:flex; align-items:center; gap:7px; padding:4px 10px 4px 4px;
  background:rgba(24,24,27,.045); border:1px solid transparent; border-radius:var(--r-pill);
  transition:background .2s; }
.user-menu-trigger:hover{ background:rgba(24,24,27,.07); }
.user-menu-name{ font-size:13px; font-weight:600; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-menu-dropdown{ position:absolute; right:0; top:calc(100% + 12px); min-width:232px; padding:8px;
  background:var(--glass2); -webkit-backdrop-filter:blur(26px) saturate(170%); backdrop-filter:blur(26px) saturate(170%);
  border:1px solid rgba(255,255,255,.55); border-radius:16px;
  box-shadow:0 22px 55px -16px rgba(24,24,27,.3), 0 0 1px rgba(24,24,27,.25);
  display:none; z-index:80; max-height:min(72vh, 620px); overflow:auto; }
html[data-theme="dark"] .user-menu-dropdown{ border-color:rgba(255,255,255,.08); }
.user-menu.open .user-menu-dropdown,.user-menu.is-open .user-menu-dropdown{ display:block; animation:um-in .18s var(--ease); }
@keyframes um-in{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:none; } }
.user-menu-dropdown a{ display:block; padding:9px 12px; border-radius:11px; font-size:13.5px; color:var(--ink); }
.user-menu-dropdown a:hover{ background:rgba(var(--red-rgb),.07); color:var(--red-600); }
.user-menu-dropdown a.um-logout{ color:var(--red); }
.user-menu-dropdown a.um-logout:hover{ background:rgba(var(--red-rgb),.08); }
.user-menu-dropdown a.um-admin{ color:var(--indigo); font-weight:600; }
.user-menu-dropdown a.um-vip{ color:var(--gold); }
.um-head{ display:flex; gap:10px; padding:10px 10px 12px; border-bottom:1px solid var(--line2); margin-bottom:6px; }
.um-name{ font-size:14px; font-weight:700; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.um-sub{ font-size:12px; color:var(--g9); margin-top:3px; }
.um-coins{ font-size:12px; color:var(--gold); margin-top:2px; display:flex; align-items:center; gap:4px; }
.um-dot{ position:static!important; }
/* --------------------------------------------------------------------------
   5. 全局小部件：toast / 提示条 / 公告
   -------------------------------------------------------------------------- */
.toast{ position:fixed; left:50%; bottom:calc(84px + env(safe-area-inset-bottom)); z-index:200;
  max-width:80vw; padding:11px 18px; border-radius:var(--r-pill); font-size:13.5px; font-weight:600; color:var(--gray-1);
  background:rgba(24,24,27,.84); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  box-shadow:0 12px 32px -8px rgba(0,0,0,.4); opacity:0; pointer-events:none;
  transform:translate(-50%,10px); transition:opacity .25s, transform .25s var(--ease); }
.toast.show{ opacity:1; transform:translate(-50%,0); }
.flash-wrap{ max-width:720px; margin:14px auto 0; padding:0 14px; display:flex; flex-direction:column; gap:8px; }
.flash{ padding:12px 15px; border-radius:var(--r-md); font-size:13.5px; font-weight:600; border:1px solid transparent;
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.flash-success{ color:#0d7a3f; background:rgba(23,201,100,.12); border-color:rgba(23,201,100,.25); }
.flash-error{ color:var(--red-600); background:rgba(var(--red-rgb),.1); border-color:rgba(var(--red-rgb),.22); }
.flash-warning{ color:#a16207; background:rgba(245,165,36,.13); border-color:rgba(245,165,36,.26); }
html[data-theme="dark"] .flash-success{ color:#4ade80; }
html[data-theme="dark"] .flash-warning{ color:#fbbf24; }
html[data-theme="dark"] .flash-error{ color:#fb7185; }
.notice{ display:flex; align-items:center; gap:8px; padding:11px 14px; margin-bottom:14px;
  border-radius:var(--r-lg); font-size:13px; color:var(--red-600); background:rgba(var(--red-rgb),.07);
  border:1px solid rgba(var(--red-rgb),.16); }
.notice strong{ font-weight:700; white-space:nowrap; flex-shrink:0; }
.notice-link{ margin-left:auto; font-weight:600; color:var(--red); flex-shrink:0; }
html[data-theme="dark"] .notice{ color:#fb7185; }
/* --------------------------------------------------------------------------
   6. 按钮 / 行内操作
   -------------------------------------------------------------------------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:42px; padding:0 18px; border-radius:var(--r-md); font-size:14px; font-weight:600;
  border:1px solid transparent; white-space:nowrap;
  transition:transform .14s var(--ease-pop), opacity .2s, background .2s, box-shadow .2s; }
.btn:active{ transform:scale(.96); }
.btn:focus-visible{ outline:2px solid rgba(var(--red-rgb),.45); outline-offset:2px; }
.btn-sm{ height:36px; padding:0 14px; font-size:13px; border-radius:11px; }
.btn-lg{ height:50px; font-size:15.5px; border-radius:var(--r-md); }
.btn-block{ width:100%; }
.btn-primary{ color:var(--gray-1); background:var(--red); box-shadow:0 6px 16px -4px rgba(var(--red-rgb),.45); }
.btn-primary:hover{ opacity:.88; }
.btn-primary:disabled{ opacity:.5; cursor:not-allowed; box-shadow:none; }
.btn:disabled, .btn[disabled]{ opacity:.55; cursor:not-allowed; box-shadow:none; }
.btn-ghost{ color:var(--g7); background:rgba(255,255,255,.55); border-color:rgba(24,24,27,.08); }
.btn-ghost:hover{ background:rgba(255,255,255,.9); color:var(--ink); }
html[data-theme="dark"] .btn-ghost{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); }
html[data-theme="dark"] .btn-ghost:hover{ background:rgba(255,255,255,.11); }
.btn-danger-ghost{ color:var(--danger); background:rgba(225,29,72,.08); border-color:rgba(225,29,72,.18); }
.btn-danger-ghost:hover{ background:rgba(225,29,72,.13); }
.trust, .like-num{ color:var(--g9); }
.menu-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:34px; padding:0 12px; border-radius:10px; font-size:13px; font-weight:600; color:var(--g7);
  background:rgba(255,255,255,.55); border:1px solid rgba(24,24,27,.08); transition:background .15s; }
.menu-btn:hover{ background:rgba(255,255,255,.92); color:var(--ink); }
.menu-btn.danger{ color:var(--danger); background:rgba(225,29,72,.08); border-color:rgba(225,29,72,.16); }
html[data-theme="dark"] .menu-btn{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); }
.menu-form{ display:inline; }
.menu-sep{ color:var(--gcc); margin:0 2px; }
.read-all{ font-size:12.5px; font-weight:600; color:var(--red); }
.sign-button{ display:inline-flex; align-items:center; justify-content:center; gap:5px;
  height:44px; padding:0 20px; border-radius:var(--r-md); font-size:14.5px; font-weight:600; color:var(--gray-1);
  background:var(--red); box-shadow:0 6px 16px -4px rgba(var(--red-rgb),.45); transition:transform .14s var(--ease-pop); }
.sign-button:active{ transform:scale(.96); }
.sign-button.is-signed{ color:var(--g6); background:rgba(24,24,27,.06); box-shadow:none; }
.req{ color:var(--danger); font-weight:700; margin-left:2px; }
/* 分享 */
.share-wrap{ position:relative; display:inline-flex; }
.share-toggle{ display:inline-flex; align-items:center; gap:5px; }
.share-menu{ position:absolute; right:0; top:calc(100% + 8px); z-index:70; min-width:168px; padding:6px;
  display:none; background:var(--glass2); -webkit-backdrop-filter:blur(24px); backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,.55); border-radius:14px;
  box-shadow:0 18px 44px -14px rgba(24,24,27,.28), 0 0 1px rgba(24,24,27,.2); }
html[data-theme="dark"] .share-menu{ border-color:rgba(255,255,255,.08); }
.share-wrap.open .share-menu, .share-wrap.is-open .share-menu{ display:block; animation:um-in .16s var(--ease); }
.share-menu a, .share-menu button{ display:flex; align-items:center; gap:8px; width:100%; text-align:left;
  padding:9px 11px; border-radius:10px; font-size:13px; color:var(--ink); }
.share-menu a:hover, .share-menu button:hover{ background:rgba(var(--red-rgb),.07); color:var(--red-600); }
/* 点赞 */
.like-btn{ display:inline-flex; align-items:center; gap:5px; color:var(--g7); font-weight:600;
  padding:0 12px; height:36px; border-radius:11px;
  background:rgba(255,255,255,.55); border:1px solid rgba(24,24,27,.08);
  transition:transform .15s var(--ease-pop); }
.like-btn:active{ transform:scale(.92); }
.like-btn.liked{ color:var(--red); border-color:rgba(var(--red-rgb),.25); background:rgba(var(--red-rgb),.05); }
.like-btn.liked .like-num{ color:var(--red); }
@keyframes like-pop{ 0%{ transform:scale(1);} 45%{ transform:scale(1.22);} 100%{ transform:scale(1);} }
.js-fav.is-on{ color:var(--gold); }
/* --------------------------------------------------------------------------
   7. 表单
   -------------------------------------------------------------------------- */
.form-group{ margin-bottom:15px; }
.form-label{ display:block; font-size:13px; font-weight:600; color:var(--g7); margin-bottom:7px; }
.form-help{ font-size:12px; color:var(--g9); margin-top:6px; line-height:1.6; }
.form-control, textarea.form-control{
  width:100%; min-height:48px; padding:0 15px; border-radius:var(--r-md);
  background:rgba(255,255,255,.62); border:1px solid rgba(24,24,27,.09);
  font-size:14px; color:var(--ink); outline:none;
  transition:border-color .2s, box-shadow .2s, background .2s; }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] textarea.form-control{
  background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); }
textarea.form-control{ padding:13px 15px; line-height:1.7; resize:vertical; }
.form-control::placeholder{ color:var(--g9); }
.form-control:focus{ border-color:rgba(var(--red-rgb),.55); background:rgba(255,255,255,.9);
  box-shadow:0 0 0 3px rgba(var(--red-rgb),.12); }
html[data-theme="dark"] .form-control:focus{ background:rgba(255,255,255,.1); }
.form-row{ display:flex; gap:10px; }
.form-row > *{ flex:1; min-width:0; }
select.form-control{ -webkit-appearance:none; appearance:none; background-image:none; }
.radio-list{ display:flex; flex-direction:column; gap:8px; }
.radio-row{ display:flex; align-items:center; gap:10px; padding:13px 15px; border-radius:var(--r-md);
  background:rgba(255,255,255,.6); border:1px solid rgba(24,24,27,.08); cursor:pointer; transition:border-color .2s, background .2s; }
.radio-row:hover{ border-color:rgba(var(--red-rgb),.35); }
.radio-row input{ width:17px; height:17px; accent-color:var(--red); }
html[data-theme="dark"] .radio-row{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
.glass-input{ width:100%; height:48px; padding:0 14px; border-radius:var(--r-md); font-size:14px; color:var(--ink);
  background:rgba(255,255,255,.62); border:1px solid rgba(24,24,27,.09); outline:none; transition:border-color .2s, box-shadow .2s; }
.glass-input:focus{ border-color:rgba(var(--red-rgb),.55); box-shadow:0 0 0 3px rgba(var(--red-rgb),.12); }
.glass-button{ height:48px; padding:0 20px; border-radius:var(--r-md); font-size:14px; font-weight:600; color:var(--gray-1);
  background:var(--red); box-shadow:0 6px 16px -4px rgba(var(--red-rgb),.45); }
.glass-button:active{ transform:scale(.96); }
.glass-panel .card-body{ padding:16px; }
.description-input{ width:100%; min-height:110px; padding:12px 14px; border-radius:var(--r-md); font-size:14px;
  line-height:1.7; color:var(--ink); background:rgba(255,255,255,.62); border:1px solid rgba(24,24,27,.09); outline:none; resize:vertical; }
.description-input:focus{ border-color:rgba(var(--red-rgb),.5); background:rgba(255,255,255,.9); }
/* 编辑器（发帖 / 编辑） */
.title-input{ width:100%; border:none; outline:none; background:transparent; font-size:19px; font-weight:700;
  color:var(--ink); padding:6px 2px; border-bottom:2px solid transparent; transition:border-color .2s; }
.title-input::placeholder{ color:var(--g9); }
.title-input:focus{ border-bottom-color:rgba(var(--red-rgb),.4); }
.editor-card .card-body{ padding:16px; }
.editor-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.char-count{ font-size:12px; color:var(--g9); margin-top:6px; text-align:right; flex-shrink:0; white-space:nowrap; }
.char-count.over{ color:var(--danger); font-weight:700; }
/* ============================ Markdown 编辑器 ============================ */
.md-editor{ margin-top:2px; }
.md-editor-bar{
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
  padding:6px 8px; border:1.5px solid var(--line); border-bottom:0;
  border-radius:var(--r-md) var(--r-md) 0 0; background:var(--f0); }
.md-btn{
  min-width:28px; height:28px; padding:0 7px; border:0; border-radius:6px;
  background:transparent; color:var(--g5); font-size:12.5px; font-weight:600;
  cursor:pointer; transition:all .14s ease; }
.md-btn:hover{ background:var(--line); color:var(--ink); }
.md-btn:active{ transform:scale(.94); }
.md-btn-i{ font-style:italic; }
.md-btn-preview{ margin-left:auto; color:var(--red-600); }
.md-bar-sep{ width:1px; height:18px; background:var(--line); margin:0 3px; }
.md-editor textarea.form-control{
  border-radius:0 0 var(--r-md) var(--r-md); border-top:0; resize:vertical; }
.md-editor textarea.form-control:focus{ box-shadow:none; border-color:var(--line); }
.md-preview{
  margin-top:0; padding:14px 16px; border:1.5px solid var(--line); border-top:0;
  border-radius:0 0 var(--r-md) var(--r-md); background:var(--f0);
  min-height:120px; }
.md-preview:empty::before{ content:'（暂无内容可预览）'; color:var(--g9); font-size:13px; }
.md-editor.is-previewing textarea.form-control{ display:none; }
/* 上传 */
.upload-box{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  padding:22px 14px; border-radius:var(--r-lg); cursor:pointer; text-align:center;
  background:rgba(255,255,255,.5); border:1.5px dashed rgba(24,24,27,.16); transition:border-color .2s, background .2s; }
.upload-box:hover{ border-color:rgba(var(--red-rgb),.45); background:rgba(var(--red-rgb),.04); }
.upload-icon{ color:var(--red); }
.upload-text{ font-size:13.5px; font-weight:600; color:var(--g7); }
.upload-hint{ font-size:12px; color:var(--g9); }
.upload-preview{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.preview-item{ position:relative; width:86px; height:86px; border-radius:var(--r-md); overflow:hidden;
  background:var(--f0); border:1px solid rgba(24,24,27,.08); }
.preview-item img, .preview-item video{ width:100%; height:100%; object-fit:cover; }
.preview-video-tag{ position:absolute; left:5px; bottom:5px; padding:1px 6px; border-radius:6px;
  font-size:10px; font-weight:700; color:var(--gray-1); background:rgba(0,0,0,.5); }
.preview-del{ position:absolute; right:4px; top:4px; width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:12px; line-height:1;
  color:var(--gray-1); background:rgba(0,0,0,.45); }
.preview-del:active{ transform:scale(.9); }
.upload-avatar{ display:flex; flex-direction:column; align-items:center; gap:10px; }
.upload-avatar .avatar{ box-shadow:0 8px 20px -8px rgba(24,24,27,.35); }
/* 管理行内小工具（前台出现时） */
.admin-inline{ font-size:12px; color:var(--g9); }
.admin-inline-grid{ display:grid; gap:8px; }
.admin-inline-row{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:10px;
  background:rgba(255,255,255,.5); border:1px solid rgba(24,24,27,.07); }
.admin-inline-row:last-child{ border-bottom:1px solid rgba(24,24,27,.07); }
.admin-inline-row a{ color:var(--red); font-weight:600; }
.admin-search{ display:flex; gap:8px; }
.admin-search .form-control{ flex:1; }
/* 付费/隐藏内容 */
.hidden-editor{ display:flex; flex-direction:column; gap:10px; }
.hidden-body{ width:100%; min-height:96px; padding:12px 14px; border-radius:var(--r-md); font-size:14px; line-height:1.7;
  color:var(--ink); background:rgba(255,255,255,.62); border:1px solid rgba(24,24,27,.09); outline:none; resize:vertical; }
.hidden-body:focus{ border-color:rgba(var(--red-rgb),.5); }
.hidden-block-body{ position:relative; min-height:128px; border-radius:var(--r-lg); overflow:hidden;
  background:linear-gradient(180deg, rgba(var(--red-rgb),.1), rgba(var(--red-rgb),.03)); }
.hidden-block-body img{ width:100%; height:100%; object-fit:cover; filter:blur(16px); transform:scale(1.06); }
.hidden-block-head{ position:absolute; left:0; right:0; top:0; display:flex; align-items:center; gap:8px;
  padding:10px 14px; font-size:12.5px; font-weight:700; color:var(--red-600); }
.hidden-body.hidden-block, .hidden-body.hidden-block-body{ display:flex; align-items:center; justify-content:center; }
.hidden-block-body.hidden-block{ min-height:150px; }
/* --------------------------------------------------------------------------
   8. 卡片 / 区块
   -------------------------------------------------------------------------- */
.card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg);
  box-shadow:var(--sh-2); overflow:hidden; margin-bottom:14px; }
.card-body{ padding:16px; }
.card-header{ padding:14px 16px; border-bottom:1px solid var(--line2); font-weight:700; font-size:15px;
  display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; row-gap:6px; }
.card-sub{ font-size:12px; font-weight:400; color:var(--g9); margin-left:6px; }
.content-card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg); box-shadow:var(--sh-2); }
/* 页内右侧栏（页面自带 aside 用） */
.side-card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg);
  box-shadow:var(--sh-2); padding:14px; margin-bottom:14px; }
.side-card h4{ font-size:12.5px; font-weight:700; color:var(--g9); letter-spacing:.4px; margin-bottom:8px; }
.side-links{ display:flex; flex-direction:column; gap:2px; }
.side-links a{ display:flex; align-items:center; gap:8px; height:36px; padding:0 11px; border-radius:10px;
  font-size:13px; font-weight:500; color:var(--g7); transition:background .15s, color .15s; }
.side-links a:hover{ background:rgba(24,24,27,.045); color:var(--ink); }
.side-links a.active{ background:rgba(var(--red-rgb),.1); color:var(--red); font-weight:600; }
.side-stats{ display:flex; gap:8px; }
.side-stats > *{ flex:1; text-align:center; padding:10px 4px; border-radius:12px;
  background:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.6); }
.side-stats .n{ display:block; font-size:15px; font-weight:700; color:var(--red); }
.side-stats .l{ display:block; font-size:11px; color:var(--g9); margin-top:2px; }
.side-user{ display:flex; align-items:center; gap:10px; }
.side-user-name{ font-size:13.5px; font-weight:700; }
/* 小卡片（用户中心 / 等级） */
.mini-card{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:var(--r-md);
  background:rgba(255,255,255,.55); border:1px solid rgba(24,24,27,.06); }
.mini-card.is-profile, .mini-card.is-level{ flex-direction:column; align-items:stretch; gap:8px; }
/* 统计卡 / 宫格 */
.stat-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:14px; }
.stats-card{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
/* u.php 个人主页的统计小方块：数字在上、标签在下，居中 */
.stat-card{ text-align:center; padding:12px 6px; border-radius:var(--r-md);
  background:var(--f7); border:1px solid var(--line2); }
.stat-num{ display:flex; align-items:center; justify-content:center; gap:4px;
  font-size:18px; font-weight:800; color:var(--ink); }
.stat-label{ font-size:11.5px; color:var(--g9); margin-top:3px; }
.stat-item{ padding:14px 12px; border-radius:var(--r-lg); background:var(--card);
  border:1px solid var(--card-line); box-shadow:var(--sh-2); text-align:center; }
.stat-item .stat-num{ display:flex; align-items:center; justify-content:center; gap:4px;
  font-size:18px; font-weight:700; color:var(--red); }
.stat-item .stat-label{ font-size:11.5px; color:var(--g9); margin-top:3px; }
.level-card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg); box-shadow:var(--sh-2); }
.level-card .card-body{ padding:16px; }
/* 等级里程碑轴：等距阶梯，每级一个节点；已过填色、当前放大发光、未达成留白
   等距而非按积分比例，因为等级门槛跨度悬殊（0/30/150/…/12000），
   按比例排会让低等级节点全部重叠 */
.lv-track-wrap{ margin-top:16px; padding-top:14px; border-top:1px solid var(--line2); }
.lv-track-scroll{ overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch;
  scrollbar-width:thin; margin:0 -2px; padding:0 2px; }
.lv-track{ display:flex; align-items:flex-start; min-width:100%; }
.lv-step{ position:relative; flex:1 1 0; min-width:52px; display:flex; flex-direction:column;
  align-items:center; text-align:center; padding-top:14px; }
/* 连接线：从本节点向左延伸到前一个节点，首节点不画 */
.lv-step-line{ position:absolute; top:9px; right:50%; width:100%; height:3px;
  background:rgba(24,24,27,.1); }
.lv-step:first-child .lv-step-line{ display:none; }
.lv-step.is-done .lv-step-line, .lv-step.is-current .lv-step-line{ background:var(--red); }
.lv-step.is-current .lv-step-line{ background:linear-gradient(90deg,var(--red),rgba(var(--red-rgb),.28)); }
html[data-theme="dark"] .lv-step-line{ background:rgba(255,255,255,.14); }
html[data-theme="dark"] .lv-step.is-done .lv-step-line,
html[data-theme="dark"] .lv-step.is-current .lv-step-line,
.lv-step-dot{ position:absolute; top:2px; width:11px; height:11px; border-radius:50%;
  background:var(--card); border:2.5px solid rgba(24,24,27,.16);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease); }
html[data-theme="dark"] .lv-step-dot{ background:#1c1c1f; border-color:rgba(255,255,255,.24); }
.lv-step.is-done .lv-step-dot{ background:var(--red); border-color:var(--red); }
.lv-step.is-current .lv-step-dot{ background:var(--gray-1); border-color:var(--red); border-width:3px;
  transform:scale(1.4); box-shadow:0 0 0 4px rgba(var(--red-rgb),.14), 0 3px 10px -2px rgba(var(--red-rgb),.5); }
.lv-step-lv{ font-size:10.5px; font-weight:700; color:var(--g9); line-height:1.2;
  font-variant-numeric:tabular-nums; }
.lv-step-name{ font-size:10px; color:var(--g10); line-height:1.2; margin-top:1px;
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lv-step-min{ font-size:9.5px; color:var(--g10); line-height:1.2; margin-top:1px;
  font-variant-numeric:tabular-nums; }
.lv-step.is-done .lv-step-lv{ color:var(--red); }
.lv-step.is-done .lv-step-name{ color:var(--g8); }
.lv-step.is-current .lv-step-lv{ color:var(--red); font-size:11.5px; }
.lv-step.is-current .lv-step-name{ color:var(--g7); font-weight:600; }
.lv-track-scale{ display:flex; justify-content:space-between; gap:10px; margin-top:6px;
  font-size:10.5px; color:var(--g10); }
/* --------------------------------------------------------------------------
   9. 表格 / 分页 / 空态 / 进度 / 面包屑
   -------------------------------------------------------------------------- */
.table-wrap{ overflow-x:auto; border-radius:var(--r-lg); border:1px solid var(--card-line); box-shadow:var(--sh-2); background:var(--card); }
.table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.table th{ text-align:left; font-size:12px; font-weight:700; color:var(--g9); padding:12px 14px;
  background:rgba(24,24,27,.03); border-bottom:1px solid var(--line2); white-space:nowrap; }
.table td{ padding:12px 14px; border-bottom:1px solid var(--line2); vertical-align:middle; }
.table tr:last-child td{ border-bottom:none; }
.table tbody tr:hover td{ background:rgba(var(--red-rgb),.03); }
html[data-theme="dark"] .table th{ background:rgba(255,255,255,.04); }
.pager{ display:flex; align-items:center; justify-content:center; gap:6px; margin:18px 0; flex-wrap:wrap; }
.pager-btn{ min-width:38px; height:38px; padding:0 12px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center;
  font-size:13.5px; font-weight:600; color:var(--g7); background:rgba(255,255,255,.6);
  border:1px solid rgba(24,24,27,.07); transition:background .15s, color .15s; }
.pager-btn:hover{ color:var(--red); background:rgba(255,255,255,.92); }
.pager-btn.active{ color:var(--gray-1); background:var(--red); box-shadow:0 6px 14px -4px rgba(var(--red-rgb),.5); border-color:transparent; }
.pager-info{ font-size:12.5px; color:var(--g9); }
.pager-gap{ color:var(--gcc); }
html[data-theme="dark"] .pager-btn{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); }
html[data-theme="dark"] .pager-btn:hover{ background:rgba(255,255,255,.11); }
.empty{ text-align:center; padding:52px 20px; color:var(--g9); }
.empty-icon{ width:72px; height:72px; margin:0 auto 14px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--red); background:rgba(var(--red-rgb),.08); }
.empty-title{ font-size:15px; font-weight:700; color:var(--g7); }
.empty-desc{ font-size:13px; margin-top:6px; line-height:1.7; }
.empty-desc a{ color:var(--red); font-weight:600; }
.progress{ height:8px; border-radius:var(--r-pill); background:rgba(24,24,27,.07); overflow:hidden; }
.progress-bar{ height:100%; border-radius:var(--r-pill); background:var(--grad-red); box-shadow:0 0 8px rgba(var(--red-rgb),.4); }
.breadcrumb{ display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--g9); margin-bottom:12px; flex-wrap:wrap; }
.breadcrumb a{ color:var(--g9); transition:color .15s; }
.breadcrumb a:hover{ color:var(--red); }
.breadcrumb .sep{ color:var(--gcc); }
.breadcrumb > span:last-child{ color:var(--g7); font-weight:600; }
/* --------------------------------------------------------------------------
   10. 头像 / 徽章 / 标签 / 角标
   -------------------------------------------------------------------------- */
.avatar{ border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--f0);
  box-shadow:0 2px 8px -2px rgba(24,24,27,.28); }
.avatar-sm{ width:32px; height:32px; } .avatar-md{ width:46px; height:46px; }
.avatar-lg{ width:64px; height:64px; } .avatar-xl{ width:88px; height:88px; }
.avatar-wrap{ display:inline-flex; flex-shrink:0; position:relative; }
.avatar-ring{ display:inline-flex; padding:3px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,var(--blue-6),#ec4899 55%,#a855f7); }
.avatar-ring .avatar, .avatar-ring img{ border:2.5px solid var(--bg); }
html[data-theme="dark"] body.site-body .avatar-ring .avatar,
html[data-theme="dark"] body.site-body .avatar-ring img{ border-color:#1c1c20; }
.badge, .lv-badge, .role-badge, .verified-badge, .chip{
  display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:700;
  padding:2px 8px; border-radius:var(--r-pill); border:1px solid transparent; line-height:1.6; }
.lv-badge, .level-icon{ color:#b45309; background:rgba(245,165,36,.15); border-color:rgba(245,165,36,.22); }
.vip-badge{ display:inline-flex; align-items:center; gap:3px; flex-shrink:0; vertical-align:-2px; }
.vip-badge img.vip-ico{ height:18px; width:auto; display:block; }
/* 红色 VIP 胶囊（内联 SVG，取代旧位图） */
.vip-badge .vip-mark{ display:block; height:18px; width:auto; }
.vip-mark{ display:inline-block; vertical-align:middle; }
.verified-badge{ color:#0284c7; background:rgba(14,165,233,.12); border-color:rgba(14,165,233,.2); }
.role-badge{ color:var(--indigo); background:rgba(120,40,200,.1); border-color:rgba(120,40,200,.18); }
.chip{ color:var(--g6); background:rgba(24,24,27,.05); font-weight:600; }
.chip-primary{ color:var(--red-600); background:rgba(var(--red-rgb),.12); }
.chip-warning{ color:#b45309; background:rgba(245,165,36,.14); }
.chip-success{ color:#0d7a3f; background:rgba(23,201,100,.12); }
.chip-danger{ color:var(--danger); background:rgba(225,29,72,.1); }
.level-icon{ display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:700;
  padding:2px 8px; border-radius:var(--r-pill); border:1px solid rgba(245,165,36,.22); }
.badge-dot{ position:absolute; top:-4px; right:-4px; min-width:17px; height:17px; padding:0 4px;
  border-radius:9px; background:var(--red); color:var(--gray-1); font-size:10px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; border:1.8px solid var(--bg); }
.dot{ width:8px; height:8px; border-radius:50%; background:var(--red); flex-shrink:0; }
.flag, .tag-line, .topic-flags{ display:inline-flex; gap:6px; flex-wrap:wrap; }
.flag{ font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:var(--r-pill); }
/* flag-pin 显式 rose：原 token --red-600/--red-rgb 在品牌统一后指向蓝色（详见 post-mark 处注释） */
.flag-pin{ color:#e11d48; background:rgba(225,29,72,.10); }
html[data-theme="dark"] .flag-pin{ color:#fb7185; background:rgba(225,29,72,.17); }
.flag-featured{ color:#b45309; background:rgba(245,165,36,.14); }
/* 推荐=品牌蓝、精华=琥珀：与列表 post-mark 的配色语义一致（v1.1.59） */
.flag-recommend{ color:#1677ff; background:rgba(22,119,255,.09); }
html[data-theme="dark"] .flag-recommend{ color:#6ea8ff; background:rgba(22,119,255,.20); }
html[data-theme="dark"] .flag-featured{ color:#fbbf24; background:rgba(245,158,11,.20); }
.flag-closed{ color:var(--g6); background:rgba(24,24,27,.06); }
.flag-pay{ color:#0369a1; background:rgba(14,165,233,.12); }
.flag-pending{ color:var(--g7); background:rgba(24,24,27,.06); }
.flag-cat{ color:var(--indigo); background:rgba(120,40,200,.1); }
.tag-line.is-dot::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.7; margin-right:2px; }
.post-mark-stack{ display:flex; gap:4px; flex-wrap:wrap; margin-bottom:10px; }
.post-mark-stack:empty{ display:none; margin:0; }
/* 内容标记（置顶/精华/推荐）：v1.1.59 按用户反馈精简——原来的实心饱和色块
   （红/蓝/橙+白字）在手机紧凑列表里又小又艳，观感廉价。改为与详情页 .flag
   同款「淡色衬底 + 深色字」轻量风；置顶用 rose 红保持最醒目，推荐走品牌蓝，
   精华走琥珀。全部用显式色值——--red-rgb 在 v1.1.54 品牌统一后已指向品牌蓝
   （实测 22,119,255），别用这些 token 调「红」。 */
.post-mark{ font-size:10px; font-weight:600; line-height:1.3; padding:2.5px 8px; border-radius:var(--r-pill); }
.post-mark.is-all{ color:#e11d48; background:rgba(225,29,72,.10); }
.post-mark.is-section{ color:#1677ff; background:rgba(22,119,255,.09); }
.post-mark.is-essence{ color:#b45309; background:rgba(245,158,11,.15); }
html[data-theme="dark"] .post-mark.is-all{ color:#fb7185; background:rgba(225,29,72,.17); }
html[data-theme="dark"] .post-mark.is-section{ color:#6ea8ff; background:rgba(22,119,255,.20); }
html[data-theme="dark"] .post-mark.is-essence{ color:#fbbf24; background:rgba(245,158,11,.20); }
.post-mark .uid{ font-size:12px; color:var(--g9); font-weight:400; }
/* 等级头像框（8 级） */
.avatar-lv-1{ box-shadow:0 0 0 2px #d4d4d8, 0 3px 10px -2px rgba(24,24,27,.25) !important; }
.avatar-lv-2{ box-shadow:0 0 0 2px #34d399, 0 3px 10px -2px rgba(24,24,27,.25) !important; }
.avatar-lv-3{ box-shadow:0 0 0 2px #60a5fa, 0 3px 10px -2px rgba(24,24,27,.25) !important; }
.avatar-lv-4{ box-shadow:0 0 0 2px #a78bfa, 0 3px 10px -2px rgba(24,24,27,.25) !important; }
.avatar-lv-5{ box-shadow:0 0 0 2px #fbbf24, 0 3px 10px -2px rgba(24,24,27,.25) !important; }
.avatar-lv-6{ box-shadow:0 0 0 2px var(--red), 0 3px 10px -2px rgba(var(--red-rgb),.4) !important; }
.avatar-lv-7{ box-shadow:0 0 0 2px #ffd700, 0 0 0 4px #ff7a45, 0 4px 14px -2px rgba(245,165,36,.55) !important; }
.avatar-lv-8{ box-shadow:0 0 0 2px #ff0080, 0 0 0 4px #ffd700, 0 0 0 6px #00bfff, 0 5px 18px -2px rgba(168,85,247,.45) !important; }
/* VIP 用户名玫红高亮（与红色 VIP 胶囊 #FF2442 同色，三端一致）。
   注意不能用 var(--red)：站点当前品牌色是蓝色，--red 被映射到品牌蓝，
   用它会得到蓝昵称 + 红胶囊的割裂。这里直接写死玫红。 */
.nickname:has(.vip-badge){ color:#FF2442 !important; }
.post-card-id .nickname:has(.vip-badge){ color:#FF2442 !important; }
.um-head .um-name:has(.vip-badge){ color:#FF2442 !important; }
.profile-name:has(.vip-badge){ color:#FF2442 !important; }
.rank-user a:has(.vip-badge){ color:#FF2442 !important; }
.podium-name:has(.vip-badge){ color:#FF2442 !important; }
.my-rank-name:has(.vip-badge){ color:#FF2442 !important; }
/* --------------------------------------------------------------------------
   11. 电脑端三栏外壳（左导航胶囊 / 中内容 / 右栏）
   -------------------------------------------------------------------------- */
.pc-shell{ max-width:1180px; margin:0 auto; display:grid;
  grid-template-columns:240px minmax(0,1fr) 300px; gap:20px; padding:20px 14px 40px; align-items:start; }
/* 两栏页（帖子详情/个人主页/设置）：左栏 200。v1.1.46 架构清理：
   原 240px 基础值被无条件覆盖（死值）、另有一处媒体查询重复值，合并为单一来源。 */
.pc-shell.is-narrow{ grid-template-columns:200px minmax(0,1fr); }
.pc-sidebar, .pc-rail{ position:sticky; top:var(--stick-top); display:flex; flex-direction:column; gap:2px; max-height:calc(100vh - var(--stick-top) - 24px); overflow-y:auto; overflow-x:hidden; scrollbar-width:none; }
.pc-sidebar::-webkit-scrollbar, .pc-rail::-webkit-scrollbar{ display:none; }
.pc-center{ min-width:0; }
.pc-center > .container{ max-width:none; padding:0; }
.rail-card{ background:transparent; border:none; border-radius:0; box-shadow:none; padding:0; }
.rail-card h4{ font-size:12px; font-weight:700; color:var(--g9); letter-spacing:.6px; padding:0 12px; margin:12px 0 4px; }
.rail-link{ display:flex; align-items:center; gap:8px; height:38px; padding:0 12px; border-radius:11px;
  font-size:13.5px; font-weight:500; color:var(--g7); transition:background .15s, color .15s; }
.rail-link:hover{ background:rgba(24,24,27,.045); color:var(--ink); }
.rail-link.is-active{ background:rgba(var(--red-rgb),.1); color:var(--red); font-weight:600; }
.rail-link.is-active::after{ content:""; margin-left:auto; width:12px; height:6px; border-radius:var(--r-pill);
  background:var(--red); box-shadow:0 1px 5px rgba(var(--red-rgb),.5); animation:rail-pulse 2.4s ease-in-out infinite; }
@keyframes rail-pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.4; } }
.rail-count{ margin-left:auto; min-width:20px; height:20px; padding:0 6px; border-radius:10px;
  background:var(--red); color:var(--gray-1); font-size:11px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.rail-link-top{ flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; height:auto; padding:9px 12px; }
.rail-top-title{ font-size:13px; font-weight:600; color:var(--ink); line-height:1.45; width:100%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rail-top-views{ font-size:11.5px; color:var(--g9); }
.rail-link-top:hover .rail-top-title{ color:var(--red); }
.rail-stats{ display:flex; gap:8px; padding:2px 4px; }
.rail-stats > div{ flex:1; text-align:center; padding:10px 4px; border-radius:12px;
  background:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.6); }
.rail-stats strong{ display:block; font-size:15px; font-weight:700; color:var(--red); }
.rail-stats span{ display:block; font-size:11px; color:var(--g9); margin-top:2px; }
html[data-theme="dark"] .rail-link:hover{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .rail-link.is-active{ background:rgba(var(--red-rgb),.16); color:#fb7185; }
html[data-theme="dark"] .rail-stats > div{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .side-links a:hover{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .side-stats > *{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
/* --------------------------------------------------------------------------
   12. 页内两栏布局（.layout）+ 右栏粘滞
   -------------------------------------------------------------------------- */
.layout{ display:flex; flex-direction:column; gap:14px; }
.layout > div, .layout > aside{ min-width:0; }
/* --------------------------------------------------------------------------
   13. 移动端底部导航（悬浮玻璃胶囊）
   -------------------------------------------------------------------------- */
.mobile-tabbar{ display:none; }
/* --------------------------------------------------------------------------
   14. 页脚
   -------------------------------------------------------------------------- */
.site-footer{ padding:28px 14px 130px; }
.footer-inner{ max-width:1180px; margin:0 auto; text-align:center; font-size:12.5px; color:var(--g9); line-height:1.9; }
.footer-inner strong{ color:var(--g7); font-weight:600; }
.footer-desc{ font-size:12px; color:var(--g9); margin-top:4px; }
/* --------------------------------------------------------------------------
   15. 抽屉（仅保留兼容样式，当前前台未使用增强抽屉）
   -------------------------------------------------------------------------- */
.drawer{ position:fixed; inset:0; z-index:90; visibility:hidden; }
.drawer[aria-hidden="false"]{ visibility:visible; }
.drawer-mask{ position:absolute; inset:0; background:rgba(24,24,27,.42); opacity:0; transition:opacity .28s; }
.drawer[aria-hidden="false"] .drawer-mask{ opacity:1; }
.drawer-panel{ position:absolute; left:0; top:0; bottom:0; width:302px; max-width:84vw;
  background:var(--glass2); -webkit-backdrop-filter:blur(26px) saturate(170%); backdrop-filter:blur(26px) saturate(170%);
  border-right:1px solid rgba(255,255,255,.55); box-shadow:20px 0 60px -24px rgba(24,24,27,.4);
  display:flex; flex-direction:column; transform:translateX(-102%); transition:transform .34s var(--ease); overflow:hidden; }
.drawer[aria-hidden="false"] .drawer-panel{ transform:none; }
.drawer-head{ display:flex; align-items:center; gap:11px; padding:16px 16px 14px; border-bottom:1px solid var(--line2); }
.drawer-head strong{ font-size:15.5px; font-weight:700; display:block; }
.drawer-head-text span{ font-size:12px; color:var(--g9); }
.brand-logo{ width:42px; height:42px; flex:0 0 42px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  color:var(--gray-1); font-weight:700; font-size:19px; overflow:hidden; background:var(--grad-red);
  box-shadow:0 10px 24px -10px rgba(var(--red-rgb),.7); }
.brand-logo img{ width:100%; height:100%; object-fit:cover; }
.drawer-close{ margin-left:auto; width:32px; height:32px; border-radius:10px; font-size:20px; color:var(--g6); }
.drawer-close:hover{ background:rgba(24,24,27,.05); }
.drawer-user{ display:flex; gap:11px; align-items:center; padding:14px 16px; border-bottom:1px solid var(--line2); }
.drawer-user-name{ font-size:14.5px; font-weight:700; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.drawer-user-coins{ font-size:12px; color:var(--gold); display:flex; align-items:center; gap:4px; }
.drawer-nav{ flex:1; overflow-y:auto; padding:8px 10px 20px; }
.drawer-group{ font-size:11px; font-weight:700; letter-spacing:1px; color:var(--g9); text-transform:uppercase; padding:14px 8px 6px; }
.drawer-nav a{ display:flex; align-items:center; gap:11px; padding:11px 12px; border-radius:12px; font-size:14px; color:var(--ink); }
.drawer-nav a:hover{ background:rgba(24,24,27,.05); }
.drawer-nav a.active{ background:rgba(var(--red-rgb),.1); color:var(--red); font-weight:600; }
.drawer-nav a svg{ width:18px; height:18px; opacity:.8; }
.drawer-admin{ color:var(--indigo)!important; font-weight:600; }
.drawer-count{ margin-left:auto; min-width:20px; height:20px; padding:0 6px; border-radius:10px;
  background:var(--red); color:var(--gray-1); font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.drawer-foot{ border-top:1px solid var(--line2); padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.drawer-link{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; font-size:13.5px; color:var(--g6); width:100%; }
.drawer-link:hover{ background:rgba(24,24,27,.05); color:var(--ink); }
.drawer-link.danger{ color:var(--red); }
/* --------------------------------------------------------------------------
   16. 首页：焦点轮播
   -------------------------------------------------------------------------- */
.focus-slider{ position:relative; border-radius:var(--r-xl); overflow:hidden; margin-bottom:14px;
  aspect-ratio:16/9; background:var(--f0); box-shadow:0 12px 32px -14px rgba(24,24,27,.22); }
.focus-track{ display:flex; height:100%; transition:transform .45s var(--ease); }
.focus-slide{ position:relative; min-width:100%; height:100%; display:none; }
.focus-slide.active{ display:block; }
.focus-img{ width:100%; height:100%; object-fit:cover; display:block; }
.focus-fallback{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:var(--gray-1);
  font-size:26px; font-weight:700; background:var(--grad-red); }
.focus-shade{ position:absolute; inset:0; background:linear-gradient(180deg,transparent 34%,rgba(0,0,0,.62)); }
.focus-body{ position:absolute; left:0; right:0; bottom:0; padding:16px; color:var(--gray-1);
  display:flex; flex-direction:column; gap:6px; }
.focus-cat{ display:inline-flex; align-self:flex-start; padding:3px 10px; border-radius:var(--r-pill);
  font-size:11px; font-weight:700; background:rgba(255,255,255,.24);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.focus-title{ font-size:17px; font-weight:700; line-height:1.42; text-shadow:0 2px 12px rgba(0,0,0,.35); }
.focus-meta{ display:flex; align-items:center; gap:12px; font-size:12px; opacity:.9; }
.focus-meta > span{ display:inline-flex; align-items:center; gap:4px; }
.focus-nav{ position:absolute; top:50%; transform:translateY(-50%); width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; color:var(--gray-1); font-size:18px;
  background:rgba(24,24,27,.3); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); transition:background .2s; }
.focus-nav:hover{ background:rgba(var(--red-rgb),.8); }
.focus-prev{ left:10px; } .focus-next{ right:10px; }
.focus-dots{ position:absolute; bottom:12px; right:14px; display:flex; gap:5px; }
.focus-dot{ width:6px; height:6px; border-radius:var(--r-pill); background:rgba(255,255,255,.55); transition:transform .25s var(--ease), background-color .25s; }
.focus-dot.active{ transform:scaleX(3.33); background:var(--gray-1); }
/* --------------------------------------------------------------------------
   17. 首页：分段标签（推荐 / 最新评论 / 最新发布 / 精华）
   -------------------------------------------------------------------------- */
.tabs{ display:flex; gap:4px; padding:4px; margin-bottom:14px; border-radius:var(--r-lg);
  background:rgba(255,255,255,.5); border:1px solid rgba(255,255,255,.6);
  overflow-x:auto; scrollbar-width:none; }
.tabs::-webkit-scrollbar{ display:none; }
.tab-item{ flex:1; min-width:max-content; height:38px; padding:0 16px; border-radius:11px;
  display:inline-flex; align-items:center; justify-content:center; position:relative;
  font-size:13.5px; font-weight:600; color:var(--g6); transition:color .2s, background .2s, box-shadow .2s; }
.tab-item:hover{ color:var(--ink); }
.tab-item:active{ transform:scale(.97); }
.tab-item:has(.tab-text-active){ background:var(--gray-1); color:var(--red); box-shadow:0 1px 4px rgba(24,24,27,.08), 0 5px 14px -8px rgba(24,24,27,.14); }
.tab-item .tab-text-active{ color:var(--red); }
.tab-line{ display:none; }
html[data-theme="dark"] .tabs{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .tab-item:has(.tab-text-active){ background:rgba(255,255,255,.12); }
/* --------------------------------------------------------------------------
   18. 帖子列表 / 帖子卡
   -------------------------------------------------------------------------- */
.post-list{ display:flex; flex-direction:column; gap:12px; }
.post-list .post-card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg); box-shadow:var(--sh-2); }
.post-card{ position:relative; padding:16px; border-radius:var(--r-lg); background:var(--card);
  border:1px solid var(--card-line); box-shadow:var(--sh-2);
  transition:transform .18s var(--ease), box-shadow .2s; }
.post-card:hover{ transform:translateY(-1px); box-shadow:0 2px 6px rgba(24,24,27,.05), 0 14px 30px -14px rgba(24,24,27,.16); }
.post-card:active{ transform:scale(.99); }
.post-card.is-clickable{ cursor:pointer; }
.post-card-head{ display:flex; align-items:center; gap:10px; }
.post-card-id{ min-width:0; }
.post-card-id .meta, .meta{ display:flex; align-items:center; gap:10px; margin-top:2px; font-size:12px; color:var(--g9); flex-wrap:wrap; }
.nickname{ font-size:13.5px; font-weight:700; color:var(--ink); display:inline-flex; align-items:center; gap:5px; flex-wrap:wrap; }
a.nickname:hover{ color:var(--red); }
.post-title{ font-size:16.5px; font-weight:700; line-height:1.45; margin-top:12px; display:block; color:var(--ink); transition:color .15s; }
a.post-title:hover{ color:var(--red); }
.post-content{ font-size:13.5px; color:var(--g6); line-height:1.7; margin-top:7px; }
.post-excerpt-img{ width:100%; border-radius:var(--r-md); margin-top:11px; object-fit:cover; max-height:280px; display:block; }
.topic-thumbs{ display:flex; gap:6px; margin-top:11px; }
.topic-thumb{ position:relative; flex:1; height:108px; border-radius:var(--r-md); overflow:hidden; background:var(--f0); }
.topic-thumb img, .topic-thumb video{ width:100%; height:100%; object-fit:cover; }
.thumb-play{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--gray-1); pointer-events:none; }
.thumb-play svg{ padding:8px; border-radius:50%; background:rgba(24,24,27,.42);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.post-foot{ display:flex; align-items:center; gap:8px; margin-top:12px; padding-top:11px; border-top:1px solid var(--line2); }
.foot-left{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.foot-right{ display:flex; align-items:center; gap:14px; margin-left:auto; flex-shrink:0; }
.foot-icon{ display:inline-flex; align-items:center; gap:4px; font-size:12px; color:var(--g9); }
.foot-icon svg{ opacity:.75; }
.section-tag{ display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:var(--r-pill);
  font-size:11.5px; font-weight:600; color:var(--g6); background:rgba(24,24,27,.05); transition:color .15s, background .15s; }
.section-tag:hover{ color:var(--red); background:rgba(var(--red-rgb),.08); }
.section-avatar{ width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:var(--g9); }
.section-name{ font-size:11.5px; }
.logo-box{ width:52px; height:52px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  color:var(--gray-1); background:var(--grad-red); box-shadow:0 8px 20px -8px rgba(var(--red-rgb),.6); flex-shrink:0; }
/* 简易帖子列表（个人主页 / 收藏等） */
.topic-list{ display:flex; flex-direction:column; gap:12px; }
.topic-item{ padding:14px 16px; background:var(--card); border:1px solid var(--card-line);
  border-radius:var(--r-lg); box-shadow:var(--sh-2); }
.topic-title{ font-size:15.5px; font-weight:700; line-height:1.45; display:block; }
a.topic-title:hover{ color:var(--red); }
.topic-excerpt{ font-size:13px; color:var(--g6); line-height:1.65; margin-top:6px; }
.topic-meta, .post-meta{ display:flex; align-items:center; gap:12px; margin-top:10px; font-size:12px; color:var(--g9); flex-wrap:wrap; }
.meta-item{ display:inline-flex; align-items:center; gap:5px; }
/* --------------------------------------------------------------------------
   19. 版块页头 / 板块分组 / 板块网格 / 推荐板块
   -------------------------------------------------------------------------- */
.section-hero{ position:relative; padding:18px; border-radius:var(--r-xl); margin-bottom:14px; overflow:hidden;
  background:linear-gradient(135deg, rgba(var(--red-rgb),.1), rgba(236,72,153,.06) 55%, rgba(168,85,247,.08));
  border:1px solid rgba(255,255,255,.6); }
.hero-veil{ position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(320px 200px at 88% -20%, rgba(249,160,191,.5), transparent 70%); }
.hero-body{ display:flex; align-items:flex-start; gap:16px; position:relative; }
.section-hero .hero-body{ background:transparent; border:0; box-shadow:none; border-radius:0; }
.hero-main{ flex:1; min-width:0; display:flex; gap:14px; align-items:flex-start; }
.hero-info{ min-width:0; }
.hero-title{ font-size:19px; font-weight:700; letter-spacing:-.2px; }
.hero-sub{ font-size:12.5px; color:var(--g7); margin-top:4px; }
.hero-desc{ font-size:12.5px; color:var(--g6); margin-top:4px; line-height:1.6; }
.hero-pills{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.hero-foot{ position:relative; margin-top:14px; display:flex; flex-wrap:wrap; gap:8px; }
.hero-pill{ padding:6px 13px; border-radius:var(--r-pill); font-size:12px; font-weight:600;
  background:rgba(255,255,255,.66); color:var(--red-600); border:1px solid rgba(255,255,255,.7); transition:background .15s; }
.hero-pill:hover{ background:var(--gray-1); }
.hero-mods{ flex-shrink:0; max-width:46%; text-align:right; }
.hero-mods-label{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700; color:var(--g9); }
.hero-mods-list{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.hero-mod{ display:inline-flex; align-items:center; gap:6px; justify-content:flex-end; font-size:12.5px; font-weight:600; color:var(--ink); }
.hero-mod .avatar{ width:26px; height:26px; }
.hero-mod .role-badge{ font-size:10px; padding:1px 6px; }
.hero-mod-empty{ font-size:12.5px; color:var(--g9); }
html[data-theme="dark"] .section-hero{ background:linear-gradient(135deg, rgba(var(--red-rgb),.16), rgba(236,72,153,.08) 55%, rgba(168,85,247,.12)); border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .hero-pill{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.1); color:#fb7185; }
.cat-head-card{ overflow:hidden; }
.chp-main{ display:flex; align-items:center; gap:14px; padding:18px 16px; }
.chp-ico{ width:54px; height:54px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  font-size:25px; color:var(--gray-1); background:var(--grad-red); box-shadow:0 8px 20px -8px rgba(var(--red-rgb),.6); flex-shrink:0; }
.chp-text{ flex:1; min-width:0; }
.chp-title{ font-size:18px; font-weight:700; }
.chp-sub{ font-size:12.5px; color:var(--g9); margin-top:5px; }
.chp-stats{ display:flex; gap:16px; flex-shrink:0; }
.chp-stat{ text-align:center; }
.chp-stat .n{ display:block; font-size:16px; font-weight:700; color:var(--red); }
.chp-stat .l{ display:block; font-size:11px; color:var(--g9); margin-top:2px; }
.chp-divider{ height:1px; background:var(--line2); }
.cat-group{ margin-bottom:16px; }
.group-head{ display:flex; align-items:center; gap:9px; margin-bottom:10px; }
/* 分组标题左侧竖条：原来是红色渐变（--grad-red）。
   板块页现在的卡片是「白底 + 细边框」的中性体系，高饱和红色竖条
   反而比卡片更抢眼，层级关系被倒置。改成半透明中性灰，
   让标题文字本身承担层级，竖条只做视觉锚点。 */
.group-bar{ width:3px; height:15px; border-radius:2px; background:var(--g6); opacity:.55; }
.group-title{ font-size:15px; font-weight:700; }
.group-meta{ font-size:12px; color:var(--g9); margin-left:auto; }
/* 单子板块分组：两列网格会让唯一那张卡只占半行、右边空一半。
   分组越多越明显（比如「技术交流」只挂 1 个子板块时）。
   改单列全宽，卡片宽度与内容密度都正常。 */
.cat-group--single .section-grid{ grid-template-columns:minmax(0,1fr); }
.content-tabs{ display:flex; gap:4px; padding:4px; border-radius:var(--r-lg); background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.6); overflow-x:auto; scrollbar-width:none; }
.content-tabs::-webkit-scrollbar{ display:none; }
.cat-tab, .ctab{ flex:1; min-width:max-content; height:36px; padding:0 14px; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center; font-size:13px; font-weight:600;
  color:var(--g6); transition:color .2s, background .2s, box-shadow .2s; }
.cat-tab:hover, .ctab:hover{ color:var(--ink); }
.cat-tab:active, .ctab:active{ transform:scale(.97); }
.cat-tab.active, .ctab.active{ background:var(--gray-1); color:var(--red); box-shadow:0 1px 4px rgba(24,24,27,.08); }
.ctab.active::after{ display:none; }
html[data-theme="dark"] .content-tabs{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
html[data-theme="dark"] .cat-tab.active, html[data-theme="dark"] .ctab.active{ background:rgba(255,255,255,.12); }
.section-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.section-cell.cat-cell{ padding:15px; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line);
  box-shadow:var(--sh-2); display:flex; flex-direction:column; gap:9px; transition:transform .16s var(--ease), box-shadow .2s; }
.section-cell.cat-cell:hover{ transform:translateY(-2px); box-shadow:0 14px 28px -14px rgba(24,24,27,.18); }
.section-cell.cat-cell:active{ transform:scale(.98); }
.sc-icon{ width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center;
  font-size:21px; color:var(--gray-1); background:var(--grad-red); box-shadow:0 6px 14px -6px rgba(var(--red-rgb),.55); }
.sc-name{ font-size:14.5px; font-weight:700; }
.sc-latest{ font-size:12px; color:var(--g9); line-height:1.5; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-pill{ align-self:flex-start; padding:2px 10px; border-radius:var(--r-pill); font-size:11px; font-weight:700;
  color:var(--red-600); background:rgba(var(--red-rgb),.1); }
.recommend-list{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.recommend-card{ padding:15px; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line);
  box-shadow:var(--sh-2); display:flex; align-items:center; gap:12px; transition:transform .16s var(--ease); }
.recommend-card:hover{ transform:translateY(-2px); }
.rc-icon{ width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center;
  font-size:21px; color:var(--red); background:rgba(var(--red-rgb),.1); flex-shrink:0; }
.rc-name{ font-size:14px; font-weight:700; }
.rc-hot{ margin-left:auto; font-size:11.5px; font-weight:700; color:var(--gold); }
/* --------------------------------------------------------------------------
   19.5 子板块切换条（容器板块页）
   --------------------------------------------------------------------------
   容器板块（有子板块的一级板块）点进去是聚合视图，这条 chips 让用户
   在「全部子板块」与单个子板块之间来回切，不必退回板块页。
   横滑不换行：子板块可能有 4~6 个，换行会把 hero 推得太高。 */
.subcat-chips{
  display:flex; align-items:center; gap:8px;
  margin:0 0 14px; padding:2px 0;
  overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.subcat-chips::-webkit-scrollbar{ display:none; }
.subcat-chip{
  flex:0 0 auto; height:32px; padding:0 14px; border-radius:var(--r-pill);
  display:inline-flex; align-items:center; white-space:nowrap;
  font-size:13px; font-weight:600; color:var(--g6);
  background:var(--card); border:1px solid var(--card-line);
  transition:color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.subcat-chip:hover{ color:var(--ink); }
.subcat-chip:active{ transform:scale(.97); }
/* 当前项用「浅红底 + 红字」，与 .sc-pill 的处理保持一致，
   不用整块高饱和填充 —— 一屏里出现 6 个红块会盖住帖子内容。 */
.subcat-chip.is-current{
  color:var(--red-600); background:rgba(var(--red-rgb),.08);
  border-color:rgba(var(--red-rgb),.25); font-weight:700;
}
/* 容器页 hero 里替代「发帖」按钮的说明文字：不是可点元素，
   所以去掉 hover 与指针变化，用虚边框表示它的非交互身份。 */
.hero-pill--hint{
  cursor:default; font-weight:500; color:var(--g6);
  background:transparent; border-style:dashed; border-color:var(--card-line);
}
.hero-pill--hint:hover{ background:transparent; }
/* 触屏设备不需要 chips 的 hover 态 */
@media (hover:none){
  .subcat-chip:hover{ color:var(--g6); }
  .subcat-chip.is-current:hover{ color:var(--red-600); }
}
/* --------------------------------------------------------------------------
   20. 会员卡 / 用户搜索建议
   -------------------------------------------------------------------------- */
.user-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.user-card{ padding:16px 14px; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line);
  box-shadow:var(--sh-2); display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px;
  transition:transform .16s var(--ease), box-shadow .2s; }
.user-card:hover{ transform:translateY(-2px); box-shadow:0 14px 28px -14px rgba(24,24,27,.18); }
.user-card:active{ transform:scale(.98); }
.user-card-avatar{ position:relative; display:inline-flex; }
.user-card-body{ min-width:0; width:100%; }
.user-card-name{ font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; gap:5px; flex-wrap:wrap; }
.user-card-sub{ font-size:12px; color:var(--g9); margin-top:3px; line-height:1.5; }
.user-card .btn{ width:100%; }
.cert-avatar-badge{ position:absolute; right:-2px; bottom:-2px; width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; color:var(--gray-1); background:#0ea5e9;
  border:2px solid var(--bg); font-size:10px; }
.suggest-row{ display:flex; gap:10px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.suggest-row::-webkit-scrollbar{ display:none; }
.suggest-user{ display:flex; flex-direction:column; align-items:center; gap:5px; min-width:64px; }
.suggest-user-name{ font-size:11.5px; color:var(--g6); max-width:64px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* --------------------------------------------------------------------------
   21. 公告弹窗
   -------------------------------------------------------------------------- */
.notice-popup{ position:fixed; inset:0; z-index:120; display:none; }
.notice-popup.open{ display:block; }
.notice-popup-mask{ position:absolute; inset:0; background:rgba(24,24,27,.4);
  -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.notice-popup-box{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(92vw,420px);
  border-radius:var(--r-xl); background:var(--glass2);
  -webkit-backdrop-filter:blur(26px) saturate(170%); backdrop-filter:blur(26px) saturate(170%);
  border:1px solid rgba(255,255,255,.6); box-shadow:0 30px 70px -20px rgba(24,24,27,.4); overflow:hidden; }
.notice-popup-head{ padding:15px 16px; font-size:15px; font-weight:700; display:flex; align-items:center; gap:7px; border-bottom:1px solid var(--line2); }
.notice-popup-close{ margin-left:auto; color:var(--g9); font-size:20px; line-height:1; }
.notice-popup-close:hover{ color:var(--red); }
.notice-popup-body{ padding:16px; font-size:13.5px; line-height:1.8; color:var(--g7); max-height:50vh; overflow:auto; }
.notice-popup-foot{ padding:12px 16px; border-top:1px solid var(--line2); text-align:right; }
/* --------------------------------------------------------------------------
   22. 帖子详情
   -------------------------------------------------------------------------- */
.topic-detail{ padding:18px; }
/* 详情卡内的「分享 / 管理」下拉要能越过卡片下边缘，且盖住后面的打赏卡 */
.topic-detail.card{ position:relative; z-index:1; overflow:visible; }
.topic-detail:hover{ transform:none; box-shadow:var(--sh-2); }
.topic-detail h1{ font-size:21px; font-weight:700; line-height:1.45; letter-spacing:-.2px; word-break:break-word; }
.post-author-bar{ display:flex; align-items:center; gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line2); }
.pa-name{ font-size:13.5px; font-weight:700; display:inline-flex; align-items:center; gap:5px; flex-wrap:wrap; }
a.pa-name:hover{ color:var(--red); }
.pa-time{ font-size:12px; color:var(--g9); }
.pa-signature{ font-size:12px; color:var(--g9); margin-left:auto; max-width:42%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.post-body{ font-size:15px; line-height:1.9; margin-top:16px; word-break:break-word; }
.post-body a{ color:var(--red); font-weight:600; }
.post-body img{ border-radius:var(--r-md); margin:10px 0; }
.post-body p{ margin:0 0 10px; }
/* ============================ Markdown 富文本排版 ============================ */
/* 作用在帖子正文 / 隐藏区块 / 评论上（由 render_content() / render_comment() 输出） */
.md-body{ font-size:15px; line-height:1.85; word-break:break-word; }
.md-body > *:first-child{ margin-top:0; }
.md-body > *:last-child{ margin-bottom:0; }
.md-body p{ margin:0 0 12px; }
.md-body h1,.md-body h2,.md-body h3,.md-body h4,.md-body h5,.md-body h6{
  margin:20px 0 10px; line-height:1.4; font-weight:700; color:var(--ink); }
.md-body h1{ font-size:1.45em; padding-bottom:8px; border-bottom:1px solid var(--line); }
.md-body h2{ font-size:1.28em; padding-bottom:6px; border-bottom:1px solid var(--line2); }
.md-body h3{ font-size:1.15em; }
.md-body h4,.md-body h5,.md-body h6{ font-size:1em; }
.md-body strong{ font-weight:700; color:var(--ink); }
.md-body em{ font-style:italic; }
.md-body del{ text-decoration:line-through; color:var(--g7); }
.md-body ul,.md-body ol{ margin:0 0 12px; padding-left:22px; }
.md-body li{ margin:4px 0; }
.md-body li > ul,.md-body li > ol{ margin:4px 0; }
.md-body blockquote{
  margin:0 0 12px; padding:8px 14px; border-left:3px solid var(--red);
  background:rgba(var(--red-rgb),.05); border-radius:0 var(--r-sm) var(--r-sm) 0; color:var(--g5); }
.md-body blockquote > *:last-child{ margin-bottom:0; }
.md-body hr{ border:0; border-top:1px solid var(--line); margin:18px 0; }
.md-body code.md-code{
  display:inline-block; padding:2px 6px; border-radius:var(--r-sm);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em;
  background:var(--f0); border:1px solid var(--line); color:var(--ink);
  word-break:break-all; }
.md-body pre.md-code{
  margin:0 0 14px; padding:12px 14px; border-radius:var(--r-md); overflow-x:auto;
  background:#18181b; color:#f4f4f5; font-size:13.5px; line-height:1.65;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.md-body pre.md-code > code{ all:unset; display:block; }
.md-body pre.md-code::before{
  content:attr(data-lang); display:block; margin-bottom:6px; font-size:11px;
  color:#a1a1aa; text-transform:uppercase; letter-spacing:.06em; }
.md-body a{ color:var(--red); font-weight:600; text-decoration:none; }
.md-body a:hover{ text-decoration:underline; }
.post-gallery{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; margin-top:14px; }
.gallery-item{ position:relative; display:block; border-radius:var(--r-md); overflow:hidden; background:var(--f0); aspect-ratio:1; }
.gallery-item img, .gallery-item video{ width:100%; height:100%; object-fit:cover; }
.gallery-single{ grid-template-columns:1fr; }
.gallery-single .gallery-item{ aspect-ratio:auto; max-height:460px; }
.gallery-video::after{ content:""; position:absolute; left:50%; top:50%; width:44px; height:44px; margin:-22px 0 0 -22px;
  border-radius:50%;
  background:rgba(24,24,27,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/18px no-repeat;
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
/* 「实况」短视频 / 动图：左上角徽章；实况自动静音循环，不显示中间的视频角标 */
.gallery-live::after{ display:none; }
.live-badge, .anim-badge{ position:absolute; left:8px; top:8px; z-index:2; padding:2px 8px; border-radius:999px;
  font-size:11px; font-weight:700; color:var(--gray-1); letter-spacing:.5px; pointer-events:none; }
.live-badge{ background:rgba(var(--red-rgb),.85); }
.anim-badge{ background:rgba(24,24,27,.55); }
.review-banner{ margin-top:14px; padding:12px 14px; border-radius:var(--r-md); display:flex; flex-direction:column; gap:8px;
  background:rgba(245,165,36,.12); border:1px solid rgba(245,165,36,.25); }
.review-banner-text{ font-size:13px; color:#b45309; }
.review-banner-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.unlock-box{ margin-top:14px; padding:24px 18px; border-radius:var(--r-lg); text-align:center;
  background:rgba(var(--red-rgb),.05); border:1.5px dashed rgba(var(--red-rgb),.32); }
.unlock-icon{ width:56px; height:56px; margin:0 auto 10px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--red); background:rgba(var(--red-rgb),.1); }
.unlock-title{ font-size:15px; font-weight:700; }
.unlock-desc{ font-size:12.5px; color:var(--g6); margin:7px 0 13px; line-height:1.7; }
.unlock-box .btn{ margin-top:2px; }
.post-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:16px; padding-top:14px; border-top:1px solid var(--line2); }
/* 「更多」「管理」下拉靠右：核心互动（点赞/回复/收藏/分享）留左边一行 */
.post-actions .share-wrap.is-more{ margin-left:auto; }
.post-actions > form{ display:inline-flex; }
.topic-side-action{ display:flex; flex-direction:column; gap:10px; }
.topic-side-action .btn{ width:100%; }
/* 收藏夹分类条 */
.fav-bar{ padding:12px 14px 10px; margin-bottom:14px; }
.fav-bar-scroll{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.fav-chip-wrap{ position:relative; display:inline-flex; align-items:center; }
.fav-chip{ display:inline-flex; align-items:center; gap:5px; padding:5px 10px; border-radius:var(--r-pill);
  font-size:12.5px; font-weight:600; color:var(--g6); background:rgba(24,24,27,.05);
  border:1.5px solid transparent; transition:all .16s ease; white-space:nowrap; }
.fav-chip:hover{ color:var(--g8); background:rgba(24,24,27,.08); text-decoration:none; }
.fav-chip.is-on{ color:var(--red-600); background:rgba(var(--red-rgb),.1); border-color:rgba(var(--red-rgb),.3); }
.fav-chip svg{ width:13px; height:13px; flex-shrink:0; opacity:.8; }
.fav-chip-name{ max-width:88px; overflow:hidden; text-overflow:ellipsis; }
.fav-chip em{ font-style:normal; font-size:11px; font-weight:700; opacity:.7;
  min-width:14px; text-align:center; }
.fav-chip-ops{ display:none; align-items:center; gap:2px; margin-left:-4px; }
.fav-chip-wrap:hover .fav-chip-ops,
.fav-chip-wrap:focus-within .fav-chip-ops{ display:inline-flex; }
.fav-op{ width:22px; height:22px; padding:0; display:inline-flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:var(--g9); border-radius:6px; cursor:pointer; }
.fav-op:hover{ color:var(--red); background:rgba(var(--red-rgb),.1); }
.fav-op svg{ width:13px; height:13px; }
.fav-op-form{ display:inline-flex; margin:0; }
.fav-add{ display:flex; gap:8px; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line2); }
.fav-add .form-control{ max-width:220px; }
.fav-move{ display:flex; }
.fav-move .form-control{ width:100%; }
.flag-fav{ color:var(--indigo); background:rgba(120,40,200,.1); display:inline-flex; align-items:center; gap:4px; }
.flag-fav svg{ width:11px; height:11px; }
.fav-rename-box{ display:flex; gap:6px; align-items:center; margin-top:6px; }
.fav-rename-box .form-control{ flex:1; max-width:200px; }
.rule-row{ display:flex; gap:8px; font-size:12.5px; color:var(--g6); line-height:1.7; padding:8px 0; border-bottom:1px solid var(--line2); }
.rule-row:last-child{ border-bottom:none; padding-bottom:0; }
/* 评论区 */
.comment-list{ display:flex; flex-direction:column; padding:4px 16px 16px; }
.comment-item{ display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--line2); }
.comment-item:first-child{ padding-top:4px; }
.comment-item:last-child{ border-bottom:none; padding-bottom:0; }
.comment-body{ flex:1; min-width:0; }
.comment-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.c-name{ font-size:13.5px; font-weight:700; display:inline-flex; align-items:center; gap:5px; }
a.c-name:hover{ color:var(--red); }
.c-time{ font-size:12px; color:var(--g9); }
.c-floor{ font-size:12px; color:var(--gcc); margin-left:auto; flex-shrink:0; }
.comment-text{ font-size:14px; line-height:1.8; margin-top:7px; word-break:break-word; }
.c-signature{ font-size:12px; color:var(--g9); margin-top:5px; }
.comment-foot{ display:flex; align-items:center; gap:14px; margin-top:9px; }
.comment-foot a, .comment-foot button{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600;
  color:var(--g9); transition:color .15s; }
.comment-foot a:hover, .comment-foot button:hover{ color:var(--red); }
.comment-foot .del:hover{ color:var(--danger); }
.comment-children{ margin:2px 0 0; padding-left:52px; display:flex; flex-direction:column; }
.comment-children .comment-item{ border-bottom:none; }
.reply-form{ display:none; gap:8px; margin-top:10px; }
.reply-form.open{ display:flex; }
.reply-form textarea{ flex:1; min-height:44px; max-height:120px; padding:10px 13px; border-radius:var(--r-md); resize:none;
  font-size:13.5px; line-height:1.6; color:var(--ink); background:rgba(255,255,255,.7);
  border:1px solid rgba(24,24,27,.1); outline:none; }
.reply-form textarea:focus{ border-color:rgba(var(--red-rgb),.5); box-shadow:0 0 0 3px rgba(var(--red-rgb),.1); }
.reply-form button{ flex-shrink:0; }
html[data-theme="dark"] .reply-form textarea{ background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.12); }
/* 打赏 */
.tip-amounts{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.tip-amount{ height:36px; padding:0 15px; border-radius:var(--r-pill); font-size:13px; font-weight:700; color:var(--gold);
  background:rgba(245,165,36,.12); border:1px solid rgba(245,165,36,.28); transition:color .15s, background-color .15s, border-color .15s, box-shadow .15s; }
.tip-amount:hover{ border-color:rgba(245,165,36,.55); }
.tip-amount.active{ color:var(--gray-1); background:var(--gold); border-color:transparent; box-shadow:0 4px 12px -3px rgba(245,165,36,.5); }
.tip-input-row{ display:flex; gap:8px; }
.tip-input-row .form-control{ flex:1; }
.tip-list{ display:flex; flex-direction:column; gap:9px; margin-top:12px; }
.tip-list li{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; }
.tip-user{ font-weight:600; display:inline-flex; align-items:center; gap:5px; }
.tip-coins{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-weight:700; color:var(--gold); }
.tip-msg{ width:100%; color:var(--g9); font-size:12px; }
.tip-toggle{ display:flex; align-items:center; justify-content:center; gap:6px; width:100%; height:42px; border-radius:var(--r-md);
  font-size:13.5px; font-weight:600; color:var(--gold); background:rgba(245,165,36,.1);
  border:1px dashed rgba(245,165,36,.4); transition:background .15s; }
.tip-toggle:hover{ background:rgba(245,165,36,.16); }
/* 移动端固定回复条（默认隐藏，手机端显示） */
.reply-bar-spacer{ display:none; }
.fixed-reply-bar{ display:none; }
/* --------------------------------------------------------------------------
   23. 消息中心 / 私信列表
   -------------------------------------------------------------------------- */
.message-tabs{ display:flex; gap:4px; padding:4px; margin-bottom:14px; border-radius:var(--r-lg);
  background:rgba(255,255,255,.5); border:1px solid rgba(255,255,255,.6); }
.message-tab{ flex:1; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; gap:7px;
  font-size:13.5px; font-weight:600; color:var(--g6); transition:color .2s, background .2s, box-shadow .2s; }
.message-tab:hover{ color:var(--ink); }
.message-tab:has(.tab-label.is-active){ background:var(--gray-1); color:var(--red); box-shadow:0 1px 4px rgba(24,24,27,.08); }
.tab-icon{ display:inline-flex; }
.tab-icon.is-msg{ color:var(--red); }
.tab-icon.is-system{ color:var(--indigo); }
.message-tab .tab-icon{ color:inherit; }
.message-tab:has(.tab-label.is-active) .tab-icon.is-msg{ color:var(--red); }
.message-tab:has(.tab-label.is-active) .tab-icon.is-system{ color:var(--indigo); }
.message-card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg);
  box-shadow:var(--sh-2); overflow:hidden; margin-bottom:14px; }
.msg-toolbar{ display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line2); }
.msg-toolbar-actions{ margin-left:auto; display:flex; gap:8px; }
.private-card{ position:relative; display:flex; align-items:center; gap:12px; padding:14px 16px;
  border-bottom:1px solid var(--line2); transition:background .15s; }
.private-card:last-child{ border-bottom:none; }
.private-card:hover{ background:rgba(var(--red-rgb),.035); }
.private-card.pinned::before{ content:""; position:absolute; left:0; top:12px; bottom:12px; width:3px;
  border-radius:2px; background:var(--gold); }
.private-main{ flex:1; min-width:0; }
.private-name{ display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; min-width:0; }
.private-time{ margin-left:auto; font-size:11.5px; color:var(--g9); font-weight:400; flex-shrink:0; }
.private-preview{ display:flex; align-items:center; gap:4px; font-size:12.5px; color:var(--g9); margin-top:3px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.private-badge{ min-width:18px; height:18px; padding:0 5px; border-radius:9px; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center; background:var(--red); color:var(--gray-1); font-size:11px; font-weight:700; }
.pinned-toggle{ width:30px; height:30px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  flex-shrink:0; opacity:.45; transition:opacity .15s, background .15s; }
.pinned-toggle:hover{ opacity:1; background:rgba(24,24,27,.06); }
.pinned-toggle.active{ opacity:1; background:rgba(245,165,36,.16); }
.msg-item{ padding:14px 16px; border-bottom:1px solid var(--line2); }
.msg-item:last-child{ border-bottom:none; }
.msg-title{ display:flex; align-items:center; gap:7px; font-size:13.5px; font-weight:700; }
.msg-content{ font-size:13px; color:var(--g6); line-height:1.7; margin-top:5px; }
.msg-meta{ font-size:11.5px; color:var(--g9); margin-top:7px; }
html[data-theme="dark"] .message-tabs{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
/* 会话卡撑满一屏（QQ 消息页风格）：高度自适应手机 / 电脑视口 */
.message-card.msg-fill{ display:flex; flex-direction:column;
  min-height:max(300px, calc(100vh - 245px)); min-height:max(300px, calc(100dvh - 245px)); }
.message-card.msg-fill > .empty{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
@media (max-width:820px){
  .message-card.msg-fill{ min-height:max(300px, calc(100vh - 282px - env(safe-area-inset-bottom)));
    min-height:max(300px, calc(100dvh - 282px - env(safe-area-inset-bottom))); }
}
html[data-theme="dark"] .message-tab:has(.tab-label.is-active){ background:rgba(255,255,255,.12); }
/* --------------------------------------------------------------------------
   24. 聊天（私信 / 群聊）
   -------------------------------------------------------------------------- */
.avatar-xs{ width:26px; height:26px; }
.chat-box{ display:flex; flex-direction:column; gap:2px; padding:18px 16px;
  flex:1 1 auto; min-height:0; overflow-y:auto; }
/* ── iMessage 质感（与 App 聊天页统一）：纯白画布 + 浅灰对方气泡 + 玫红我方气泡 ── */
.bubble-row{ display:flex; align-items:flex-end; gap:8px; max-width:100%; margin-top:2px; }
.bubble-row.mine{ flex-direction:row-reverse; }
.bubble-row > .avatar{ flex-shrink:0; }
/* 同组后续消息的头像占位（保持对齐，但不显示头像） */
.chat-avatar-spacer{ width:24px; height:24px; flex-shrink:0; }
.bubble{ max-width:min(72%,520px); padding:9px 13px; border-radius:18px;
  background:var(--f0); border:none;
  font-size:14px; line-height:1.5; word-break:break-word; white-space:pre-wrap; color:var(--ink); }
/* 深色模式：对方气泡深灰实底 */
html[data-theme="dark"] .bubble{ background:rgba(255,255,255,.14); }
/* 我方气泡：玫红实底（与 App 端一致，不用品牌蓝的 var(--red)） */
.bubble-row.mine .bubble{ color:#fff; background:#FF2442;
  border-radius:18px; box-shadow:0 4px 12px -5px rgba(255,36,66,.4); }
/* 同组连发：相邻角收窄到 6，视觉上连成一条 */
.bubble-row.group-cont .bubble{ border-top-left-radius:6px; }
.bubble-row.mine.group-cont .bubble{ border-top-left-radius:18px; border-top-right-radius:6px; }
/* 居中时间分隔（间隔 > 5 分钟才出现） */
.chat-sep{ display:flex; justify-content:center; margin:10px 0 6px; }
.chat-sep span{ font-size:11px; color:var(--g9); background:rgba(24,24,27,.05);
  padding:2px 10px; border-radius:999px; }
html[data-theme="dark"] .chat-sep span{ background:rgba(255,255,255,.08); }
.bubble-time{ display:none; }
/* 气泡内媒体 / 转账 */
.bubble-media{ padding:6px; overflow:hidden; }
/* 同心圆角：外圈 .bubble 为 18px、.bubble-media 内边距 6px → 内圈取 18-6=12px */
.bubble-image{ display:block; border-radius:12px; overflow:hidden; }
.bubble-image img{ max-width:260px; max-height:320px; object-fit:cover; border-radius:12px; }
.bubble-video{ display:block; max-width:280px; max-height:320px; border-radius:12px; }
.bubble-caption{ font-size:13px; padding:7px 8px 3px; }
.bubble-transfer{ background:linear-gradient(135deg, rgba(245,165,36,.16), rgba(251,191,36,.1));
  border:1px solid rgba(245,165,36,.3); color:#92400e; }
html[data-theme="dark"] .bubble-transfer{ color:#fbbf24; background:rgba(245,165,36,.14); border-color:rgba(245,165,36,.35); }
.bubble-transfer-amount{ display:flex; align-items:center; gap:5px; font-size:15px; font-weight:700; color:var(--gold); }
.bubble-transfer-note{ font-size:12.5px; margin-top:4px; opacity:.85; }
/* 输入区 */
.chat-compose{ display:flex; align-items:flex-end; gap:8px; }
.chat-attach{ width:42px; height:42px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  color:var(--red); background:rgba(var(--red-rgb),.1); transition:background .15s; }
.chat-attach:hover{ background:rgba(var(--red-rgb),.16); }
.msg-chat-input{ flex:1; min-height:42px; max-height:120px; padding:10px 14px; border-radius:14px; resize:none;
  font-size:14px; line-height:1.6; color:var(--ink); background:rgba(255,255,255,.7);
  border:1px solid rgba(24,24,27,.09); outline:none; transition:border-color .2s, box-shadow .2s; }
.msg-chat-input:focus{ border-color:rgba(var(--red-rgb),.5); box-shadow:0 0 0 3px rgba(var(--red-rgb),.1); }
.msg-chat-input::placeholder{ color:var(--g9); }
html[data-theme="dark"] .msg-chat-input{ background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.12); }
.msg-chat-send{ height:42px; padding:0 20px; border-radius:12px; flex-shrink:0; font-size:14px; font-weight:600; color:var(--gray-1);
  background:var(--red); box-shadow:0 6px 16px -4px rgba(var(--red-rgb),.45); transition:transform .14s var(--ease-pop), opacity .2s; }
.msg-chat-send:hover{ filter:brightness(1.07); }
.msg-chat-send:active{ transform:scale(.96); }
.chat-attach-preview{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.chat-attach-preview:empty{ display:none; }
/* 「跳至最新」：只在用户滚离底部超过 120px 时出现，浮在消息区底部。
   放在 .card-body 里用 bottom:100% 定位，这样不用多包一层 div，
   也不会被 .chat-box 的 overflow 裁剪（它不是 .chat-box 的后代）。 */
.chat-jump{ position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  margin-bottom:12px; height:32px; padding:0 14px; border:none; border-radius:var(--r-pill);
  display:inline-flex; align-items:center; gap:5px; font-size:12.5px; font-weight:600;
  color:var(--gray-1); background:var(--red); cursor:pointer; z-index:5;
  box-shadow:0 8px 18px -8px rgba(var(--red-rgb),.6);
  transition:opacity .18s, transform .18s var(--ease-pop); }
.chat-jump:hover{ filter:brightness(1.07); }
.chat-jump:active{ transform:translateX(-50%) scale(.94); }
.chat-jump[hidden]{ display:none; }
/* 私信会话页：纯白画布（iMessage 质感，与 App 聊天页统一），
   不能沿用半透明白卡片 —— 浅灰气泡会糊进半透明背景。 */
.card.chat-shell{ display:flex; flex-direction:column; height:calc(100vh - 185px); height:calc(100dvh - 185px);
  min-height:320px; background:#fff; border-color:rgba(24,24,27,.06); }
html[data-theme="dark"] .card.chat-shell{ background:#000; }
.card.chat-shell > .card-body{ flex-shrink:0; position:relative; }
.card.chat-shell .chat-box > .empty{ margin:auto 0; }
/* 输入区「功能菜单」（QQ 风格）：转赠金币面板 */
.chat-tools-btn.active{ color:var(--gold); border-color:rgba(245,165,36,.55); background:rgba(245,165,36,.12); }
.chat-attach.is-tools{ color:var(--gold); background:rgba(245,165,36,.12); }
.chat-attach.is-tools:hover{ background:rgba(245,165,36,.2); }
.chat-attach.is-tools.active{ color:var(--gray-1); background:var(--gold); }
.chat-tools{ margin-bottom:12px; padding:12px; border-radius:14px;
  border:1px solid rgba(245,165,36,.35); background:linear-gradient(135deg, rgba(245,165,36,.1), rgba(251,191,36,.05)); }
.chat-tools[hidden]{ display:none; }
.chat-tools-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px;
  font-size:13px; font-weight:700; color:var(--gold); }
.chat-tools-head .small{ font-weight:400; }
.chat-tools .tip-input-row{ flex-wrap:wrap; }
.chat-tools .tip-input-row .form-control{ flex:1 1 130px; min-width:0; }
.chat-tools .form-help{ margin-top:8px; }
/* --------------------------------------------------------------------------
   26. 个人主页（u.php）
   -------------------------------------------------------------------------- */
.cover{ position:relative; height:140px; border-radius:var(--r-xl); overflow:hidden;
  background:linear-gradient(135deg, rgba(var(--red-rgb),.22), rgba(236,72,153,.16) 50%, rgba(168,85,247,.2));
  border:1px solid rgba(255,255,255,.5); }
html[data-theme="dark"] .cover{ border-color:rgba(255,255,255,.08); }
.orb{ position:absolute; border-radius:50%; filter:blur(30px); opacity:.6; }
.orb-a{ width:220px; height:220px; left:-60px; top:-80px; background:rgba(var(--red-rgb),.5); }
.orb-b{ width:260px; height:260px; right:-70px; top:-60px; background:rgba(168,85,247,.45); }
.orb-c{ width:200px; height:200px; left:40%; bottom:-110px; background:rgba(236,72,153,.4); }
.cover.has-cover .orb{ display:none; }
.profile-wrap{ position:relative; margin-top:-44px; }
/* 卡片与封面有 44px 重叠：用更实的玻璃底 + 背景模糊，避免封面从半透明卡下透出形成"叠块"感 */
.profile-card{ background:var(--glass2); -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%); }
.profile-card .card-body{ padding:18px 16px 16px; }
.profile-head{ display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }
.profile-head .btn{ margin-left:auto; flex-shrink:0; }
.profile-info{ flex:1; min-width:0; }
.profile-name{ font-size:19px; font-weight:700; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.profile-sub{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:12.5px; color:var(--g9); margin-top:5px; }
.profile-signature{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--g6); margin-top:6px; }
.profile-panel{ margin-top:14px; }
.profile-panel .card-body{ padding:16px; }
.avatar-ring.lv-1 .avatar, .avatar-ring.lv-1 img{ border-color:#d4d4d8; }
.avatar-ring.lv-2 .avatar, .avatar-ring.lv-2 img{ border-color:#34d399; }
.avatar-ring.lv-3 .avatar, .avatar-ring.lv-3 img{ border-color:#60a5fa; }
.avatar-ring.lv-4 .avatar, .avatar-ring.lv-4 img{ border-color:#a78bfa; }
.avatar-ring.lv-5 .avatar, .avatar-ring.lv-5 img{ border-color:#fbbf24; }
.avatar-ring.lv-6 .avatar, .avatar-ring.lv-6 img{ border-color:var(--red); }
.uid{ font-size:12px; color:var(--g9); font-weight:400; }
/* --------------------------------------------------------------------------
   27. 用户中心（ucenter.php）
   -------------------------------------------------------------------------- */
.pp-head{ display:flex; align-items:center; gap:14px; padding:18px 18px 14px; }
/* 头像固定尺寸：自定义头像返回的是原图（可能很大），没有尺寸类会把整块撑爆 */
.pp-head .avatar{ width:88px; height:88px; }
.pp-body{ flex:1; min-width:0; }
.pp-meta{ display:flex; gap:12px; flex-wrap:wrap; font-size:12.5px; color:var(--g9); margin-top:6px; }
.pp-side{ display:flex; gap:8px; flex-shrink:0; }
.pp-foot{ display:flex; gap:8px; flex-wrap:wrap; padding:0 18px 16px; }
.stats-card{ display:grid; grid-template-columns:repeat(auto-fit,minmax(86px,1fr)); gap:10px; }
.uc-mini-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.uc-mini-row .mini-card{ flex-direction:row; align-items:center; gap:9px; height:54px; font-size:13.5px;
  font-weight:600; color:var(--g7); transition:border-color .15s, color .15s; }
.uc-mini-row .mini-card:hover{ color:var(--red); border-color:rgba(var(--red-rgb),.25); }
.uc-services{ margin-bottom:14px; }
.uc-services .card-body{ padding:14px; }
.ov-actions{ display:grid; grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); gap:10px; }
.ov-action{ display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 8px;
  border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2);
  transition:transform .16s var(--ease), box-shadow .2s; }
.ov-action:hover{ transform:translateY(-2px); box-shadow:0 12px 26px -14px rgba(24,24,27,.2); }
.ov-action:active{ transform:scale(.97); }
.ov-action-icon{ width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  color:var(--red); background:rgba(var(--red-rgb),.1); }
.ov-action-icon.is-danger{ color:var(--danger); background:rgba(225,29,72,.1); }
.ov-action-icon.is-success{ color:var(--success); background:rgba(23,201,100,.12); }
.ov-action-icon.is-warning{ color:var(--gold); background:rgba(245,165,36,.14); }
.ov-action-icon.is-info{ color:#0ea5e9; background:rgba(14,165,233,.12); }
.ov-action-word{ display:flex; flex-direction:column; align-items:center; gap:1px; text-align:center;
  font-size:12.5px; font-weight:600; color:var(--g7); }
.ov-action-word span{ font-size:10.5px; font-weight:400; color:var(--g9); }
/* --------------------------------------------------------------------------
   28. 排行榜
   -------------------------------------------------------------------------- */
.my-rank{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:var(--r-lg);
  background:linear-gradient(135deg, rgba(var(--red-rgb),.1), rgba(236,72,153,.06) 60%, rgba(168,85,247,.08));
  border:1px solid rgba(var(--red-rgb),.2); margin-bottom:14px; }
.my-rank-info{ flex:1; min-width:0; }
.my-rank-name{ font-size:14px; font-weight:700; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.my-rank-pos{ display:flex; gap:16px; align-items:center; flex-shrink:0; }
.my-rank-pos > div{ text-align:center; }
.my-rank-pos .l{ font-size:11px; color:var(--g9); }
.my-rank-pos .n{ font-size:16px; font-weight:700; color:var(--red); }
.podium{ display:flex; align-items:flex-end; justify-content:center; gap:10px; padding:18px 4px 6px; margin-bottom:14px; }
.podium-item{ flex:1; max-width:150px; display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:16px 8px 14px; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line);
  box-shadow:var(--sh-2); text-align:center; }
.podium-1{ order:2; transform:translateY(-12px);
  background:linear-gradient(180deg, rgba(245,165,36,.18), var(--card) 70%); border-color:rgba(245,165,36,.4); }
.podium-2{ order:1; }
.podium-3{ order:3; }
.podium-medal{ font-size:26px; line-height:1; }
.podium-name{ font-size:13.5px; font-weight:700; display:inline-flex; align-items:center; gap:4px;
  flex-wrap:wrap; justify-content:center; }
.podium-name:hover{ color:var(--red); }
.podium-level{ font-size:11px; color:var(--g9); }
.podium-value{ font-size:15px; font-weight:700; color:var(--red); }
.podium-rank{ font-size:11px; color:var(--g9); }
.rank-table td{ font-size:13.5px; }
.rank-no{ display:inline-flex; width:26px; height:26px; border-radius:9px; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:var(--g6); background:rgba(24,24,27,.05); }
.rank-no1{ color:var(--gray-1); background:linear-gradient(135deg,#f5a524,#fbbf24); box-shadow:0 3px 8px -2px rgba(245,165,36,.5); }
.rank-no2{ color:var(--gray-1); background:linear-gradient(135deg,#94a3b8,#cbd5e1); }
.rank-no3{ color:var(--gray-1); background:linear-gradient(135deg,#d97706,#f59e0b); opacity:.9; }
.rank-user{ display:flex; align-items:center; gap:9px; }
/* 列表行里的名字与徽章不压缩、不换行：手机端由表格横向滚动兜底，避免徽章被挤成竖排 */
.rank-user > *{ flex-shrink:0; }
.rank-user a{ display:inline-flex; align-items:center; gap:5px; font-weight:600; white-space:nowrap; }
.rank-user > span{ white-space:nowrap; }
.rank-user a:hover{ color:var(--red); }
.rank-score{ font-weight:700; color:var(--red); }
.rank-table .rank-me td{ background:rgba(var(--red-rgb),.05); }
/* --------------------------------------------------------------------------
   29. 签到 / 积分（checkin / level / coins）
   -------------------------------------------------------------------------- */
.checkin-hero{ position:relative; overflow:hidden; display:flex; justify-content:space-between; align-items:center; gap:14px;
  padding:20px; border-radius:var(--r-xl); color:var(--gray-1);
  background:linear-gradient(135deg,var(--blue-6),#ec4899 70%,#f472b6);
  box-shadow:0 14px 34px -14px rgba(var(--red-rgb),.65); }
.checkin-hero-left{ position:relative; }
.checkin-streak{ display:flex; align-items:baseline; gap:5px; }
.checkin-streak-num{ font-size:36px; font-weight:700; letter-spacing:-1px; line-height:1; }
.checkin-streak-unit{ font-size:14px; opacity:.9; }
.checkin-streak-label{ font-size:12px; opacity:.85; margin-top:6px; }
.checkin-hero-right{ position:relative; text-align:right; }
.checkin-reward-label{ font-size:12px; opacity:.9; }
.checkin-reward-num{ display:flex; align-items:center; justify-content:flex-end; gap:5px; font-size:22px; font-weight:700; margin-top:3px; }
.checkin-reward-hint{ font-size:11.5px; opacity:.8; margin-top:4px; }
.checkin-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:14px 0; }
.checkin-stat{ padding:12px 8px; text-align:center; border-radius:var(--r-lg); background:var(--card);
  border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.checkin-stat .n{ font-size:18px; font-weight:700; color:var(--red); }
.checkin-stat .l{ font-size:11.5px; color:var(--g9); margin-top:2px; }
.checkin-cal{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-head{ text-align:center; font-size:11px; font-weight:600; color:var(--g9); padding:4px 0; }
.cal-cell, .checkin-cal > div:not(.cal-head){ aspect-ratio:1; border-radius:12px; display:flex; align-items:center;
  justify-content:center; position:relative; font-size:12.5px; font-weight:600; color:var(--g7);
  background:rgba(24,24,27,.04); }
html[data-theme="dark"] .cal-cell, html[data-theme="dark"] .checkin-cal > div:not(.cal-head),
.checkin-cal .cal-empty{ background:transparent; }
.checkin-cal .cal-done{ color:var(--gray-1); background:var(--grad-red); box-shadow:0 4px 10px -4px rgba(var(--red-rgb),.5); }
.checkin-cal .cal-today{ color:var(--red); background:rgba(var(--red-rgb),.08); border:1.5px solid rgba(var(--red-rgb),.55); }
.checkin-cal .cal-today.cal-done{ color:var(--gray-1); border:1.5px solid rgba(255,255,255,.85); }
.checkin-cal .cal-future{ color:var(--g10); background:transparent; }
.cal-dot{ position:absolute; bottom:5px; width:4px; height:4px; border-radius:50%; background:currentColor; opacity:.85; }
/* 日历：月份翻页头 */
.checkin-cal-head{ align-items:center; }
.cal-nav{ display:flex; align-items:center; gap:2px; }
.cal-nav-btn{ display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px;
  border-radius:var(--r-pill); color:var(--g7); background:rgba(24,24,27,.05);
  transition:background .16s var(--ease), color .16s var(--ease); }
.cal-nav-btn:hover{ background:rgba(var(--red-rgb),.1); color:var(--red); }
.cal-nav-btn.is-disabled{ opacity:.3; pointer-events:none; }
.cal-nav-label{ min-width:86px; text-align:center; font-size:12.5px; font-weight:600; color:var(--g6);
  font-variant-numeric:tabular-nums; }
html[data-theme="dark"] .cal-nav-btn{ background:rgba(255,255,255,.08); color:var(--g8); }
/* 日历：本月概览（环形进度 + 四项统计） */
.cal-summary{ display:flex; align-items:center; gap:16px; padding:2px 0 14px; margin-bottom:12px;
  border-bottom:1px solid var(--line2); }
.cal-ring{ position:relative; flex-shrink:0; width:62px; height:62px; }
.cal-ring svg{ width:100%; height:100%; transform:rotate(-90deg); }
.cal-ring-bg{ fill:none; stroke:rgba(24,24,27,.08); stroke-width:4; }
.cal-ring-fg{ fill:none; stroke:var(--red); stroke-width:4; stroke-linecap:round;
  transition:stroke-dasharray .5s var(--ease); }
.cal-ring-num{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700; color:var(--red); font-variant-numeric:tabular-nums; }
html[data-theme="dark"] .cal-ring-bg{ stroke:rgba(255,255,255,.12); }
.cal-summary-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; flex:1; min-width:0; }
.cal-sum-item{ display:flex; flex-direction:column; align-items:center; gap:2px; min-width:0; }
.cal-sum-n{ font-size:15px; font-weight:700; color:var(--g6); font-variant-numeric:tabular-nums; }
.cal-sum-miss{ color:var(--g9); }
.cal-sum-l{ font-size:10.5px; color:var(--g9); white-space:nowrap; }
/* 日历：格子内金币角标 + 连续段连接条 */
.cal-cell{ flex-direction:column; gap:1px; transition:transform .16s var(--ease), background .16s var(--ease); }
.cal-day{ line-height:1; }
.cal-coins{ font-size:9px; font-weight:600; line-height:1; opacity:.92; font-variant-numeric:tabular-nums; }
.checkin-cal .cal-done:hover{ transform:scale(1.06); }
/* 连续签到段：相邻两天之间画一条横向连接条，视觉上连成一条链 */
.checkin-cal .cal-done.link-prev::before,
.checkin-cal .cal-done.link-next::after{ content:""; position:absolute; top:50%; width:6px; height:2px;
  background:var(--red); opacity:.45; transform:translateY(-50%); pointer-events:none; }
.checkin-cal .cal-done.link-prev::before{ left:-6px; }
.checkin-cal .cal-done.link-next::after{ right:-6px; }
.checkin-cal .cal-done.cal-today{ animation:cal-pulse 2.4s var(--ease) infinite; }
@keyframes cal-pulse{
  0%,100%{ box-shadow:0 4px 10px -4px rgba(var(--red-rgb),.5); }
  50%{ box-shadow:0 4px 16px -2px rgba(var(--red-rgb),.75); }
}
/* 日历：图例 */
.cal-legend{ display:flex; align-items:center; gap:14px; margin-top:12px; padding-top:10px;
  border-top:1px solid var(--line2); font-size:11px; color:var(--g9); }
.cal-legend-item{ display:inline-flex; align-items:center; gap:5px; }
.cal-legend-dot{ width:9px; height:9px; border-radius:3px; display:inline-block; }
.cal-legend-dot.is-done{ background:var(--grad-red); }
.cal-legend-dot.is-today{ background:rgba(var(--red-rgb),.1); border:1.5px solid rgba(var(--red-rgb),.55); }
.cal-legend-dot.is-miss{ background:rgba(24,24,27,.1); }
.checkin-btn{ width:100%; }
.check-line{ display:flex; align-items:center; gap:9px; padding:10px 0; border-bottom:1px solid var(--line2);
  font-size:13px; color:var(--g6); line-height:1.6; }
.check-line input[type="checkbox"]{ appearance:none; -webkit-appearance:none; flex-shrink:0; margin:0;
  width:38px; height:22px; border-radius:11px; position:relative; cursor:pointer;
  background:rgba(24,24,27,.14); transition:background .2s; }
.check-line input[type="checkbox"]::after{ content:""; position:absolute; top:2px; left:2px; width:18px; height:18px;
  border-radius:50%; background:var(--gray-1); box-shadow:0 1px 3px rgba(0,0,0,.22); transition:transform .2s var(--ease); }
.check-line input[type="checkbox"]:checked{ background:var(--red); }
.check-line input[type="checkbox"]:checked::after{ transform:translateX(16px); }
html[data-theme="dark"] .check-line input[type="checkbox"]{ background:rgba(255,255,255,.18); }
.radio-list{ display:flex; flex-direction:column; gap:8px; }
.radio-row{ display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:var(--r-md);
  background:rgba(255,255,255,.6); border:1.5px solid rgba(24,24,27,.09); cursor:pointer;
  font-size:13.5px; color:var(--g7); transition:border-color .2s, background .2s, color .2s; }
.radio-row:hover{ border-color:rgba(var(--red-rgb),.35); }
.radio-row:has(input:checked){ border-color:var(--red); background:rgba(var(--red-rgb),.05);
  color:var(--red-600); font-weight:600; }
.radio-row input[type="radio"]{ appearance:none; -webkit-appearance:none; width:18px; height:18px; border-radius:50%;
  border:2px solid rgba(24,24,27,.25); margin:0; flex-shrink:0; position:relative; transition:border-color .2s; }
.radio-row input[type="radio"]:checked{ border-color:var(--red); }
.radio-row input[type="radio"]:checked::after{ content:""; position:absolute; inset:3px; border-radius:50%; background:var(--red); }
html[data-theme="dark"] .radio-row{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .radio-row:has(input:checked){ background:rgba(var(--red-rgb),.1); border-color:var(--red); }
/* 属性多选 / 性别单选胶囊（注册页、设置页、后台编辑用户共用） */
.pick-wrap{ display:flex; flex-wrap:wrap; gap:8px; }
.pick-wrap label{ display:inline-flex; align-items:center; gap:7px; padding:8px 13px; border-radius:999px;
  background:rgba(255,255,255,.6); border:1.5px solid rgba(24,24,27,.09); cursor:pointer;
  font-size:13px; color:var(--g7); transition:border-color .2s, background .2s, color .2s; }
.pick-wrap label:hover{ border-color:rgba(var(--red-rgb),.35); }
.pick-wrap label:has(input:checked){ border-color:var(--red); background:rgba(var(--red-rgb),.05); color:var(--red-600); font-weight:600; }
.pick-wrap input{ appearance:none; -webkit-appearance:none; width:16px; height:16px; border:2px solid rgba(24,24,27,.25);
  margin:0; flex-shrink:0; position:relative; transition:border-color .2s, background .2s; }
.pick-wrap input[type="radio"]{ border-radius:50%; }
.pick-wrap input[type="radio"]:checked{ border-color:var(--red); }
.pick-wrap input[type="radio"]:checked::after{ content:""; position:absolute; inset:3px; border-radius:50%; background:var(--red); }
.pick-wrap input[type="checkbox"]{ border-radius:5px; }
.pick-wrap input[type="checkbox"]:checked{ border-color:var(--red); background:var(--red); }
.pick-wrap input[type="checkbox"]:checked::after{ content:""; position:absolute; left:4px; top:1px; width:4px; height:8px;
  border:solid var(--gray-1); border-width:0 2px 2px 0; transform:rotate(45deg); }
html[data-theme="dark"] .pick-wrap label{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.12); }
html[data-theme="dark"] .pick-wrap label:has(input:checked){ background:rgba(var(--red-rgb),.1); }
.check-line:last-child{ border-bottom:none; padding-bottom:0; }
.check-line .ico{ width:30px; height:30px; border-radius:10px; flex-shrink:0; display:flex; align-items:center;
  justify-content:center; color:var(--red); background:rgba(var(--red-rgb),.1); }
.check-line strong{ color:var(--ink); }
.coin-hero{ display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding:20px; border-radius:var(--r-xl); color:#78350f;
  background:linear-gradient(135deg,#fbbf24,#fcd34d 60%,#fde68a);
  box-shadow:0 14px 34px -14px rgba(245,165,36,.6); }
.coin-balance-ico{ width:52px; height:52px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; color:var(--gray-1); background:rgba(255,255,255,.35); flex-shrink:0; }
.coin-balance-label{ font-size:12.5px; opacity:.85; }
.coin-balance-num{ font-size:26px; font-weight:700; letter-spacing:-.5px; line-height:1.2; }
.vip-hero-badge{ height:132px; width:auto; flex-shrink:0; margin-left:auto; align-self:center;
  filter:drop-shadow(0 8px 18px rgba(180,120,10,.35)); }
/* 会员中心大号红色 VIP 胶囊（vip_mark_svg 输出 .vip-mark） */
.coin-hero .vip-mark{ height:132px; width:auto; flex-shrink:0; margin-left:auto; align-self:center;
  filter:drop-shadow(0 8px 20px rgba(255,36,66,.28)); }
.vip-hero-expiry{ flex-basis:100%; }
/* --------------------------------------------------------------------------
   30. 兑换 / 支付 / 卡密
   -------------------------------------------------------------------------- */
.ex-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.ex-card{ padding:15px; display:flex; flex-direction:column; gap:9px; border-radius:var(--r-lg);
  background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.ex-card-top{ display:flex; align-items:flex-start; gap:10px; }
.ex-card-ico{ width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center;
  font-size:21px; color:var(--gray-1); background:var(--grad-red); box-shadow:0 6px 14px -6px rgba(var(--red-rgb),.55); flex-shrink:0; }
.ex-card-cost{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-size:14px; font-weight:700; color:var(--gold); }
.ex-card-name{ font-size:14.5px; font-weight:700; }
.ex-card-desc{ font-size:12.5px; color:var(--g6); line-height:1.6; }
.ex-card-meta{ font-size:11.5px; color:var(--g9); }
.ex-card-action{ margin-top:auto; }
.ex-card-action .btn{ width:100%; }
.ex-card.ex-soldout{ opacity:.55; }
.code-chip{ display:inline-flex; align-items:center; gap:6px; font-family:'SF Mono', ui-monospace, Consolas, monospace;
  font-size:13px; letter-spacing:1px; padding:8px 13px; border-radius:12px;
  background:rgba(24,24,27,.04); border:1px dashed rgba(24,24,27,.18); }
.card-key-input{ display:flex; gap:9px; margin-bottom:14px; }
.card-key-input .form-control{ flex:1; }
.pay-icon{ width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  color:var(--red); background:rgba(var(--red-rgb),.1); flex-shrink:0; }
.pay-setting{ display:flex; align-items:center; gap:10px; }
.pay-setting .form-control{ flex:1; }
.pay-unit{ font-size:13px; color:var(--g9); flex-shrink:0; }
/* --------------------------------------------------------------------------
   31. 登录 / 注册（auth）
   -------------------------------------------------------------------------- */
.auth-wrap{ max-width:420px; margin:34px auto 60px; padding:0 14px; }
.auth-wrap > .card{ background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-xl);
  box-shadow:0 18px 44px -18px rgba(24,24,27,.18), var(--sh-2); }
.auth-wrap > .card .card-body{ padding:26px 22px; }
.auth-logo{ width:64px; height:64px; margin:0 auto 14px; border-radius:20px; display:flex; align-items:center;
  justify-content:center; color:var(--gray-1); font-size:28px; font-weight:700; background:var(--grad-red);
  box-shadow:0 14px 30px -12px rgba(var(--red-rgb),.6); }
.auth-logo img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.auth-title{ text-align:center; font-size:20px; font-weight:700; letter-spacing:-.2px; }
.auth-sub{ text-align:center; font-size:13px; color:var(--g9); margin-top:6px; }
.auth-wrap .form-group{ margin-top:16px; }
.auth-foot{ text-align:center; font-size:13px; color:var(--g9); margin-top:16px; }
.auth-foot a{ color:var(--red); font-weight:600; }
.auth-pill{ display:inline-flex; align-items:center; gap:6px; margin:0 auto 14px; padding:5px 13px;
  border-radius:var(--r-pill); font-size:12px; font-weight:600; color:var(--red-600);
  background:rgba(var(--red-rgb),.1); }
.auth-cap{ text-align:center; font-size:12px; color:var(--g9); margin-top:18px; line-height:1.7; }
.seg-tabs{ display:flex; gap:4px; padding:4px; border-radius:var(--r-lg); background:rgba(24,24,27,.045); margin-bottom:16px; }
.seg-tabs > a, .seg-tabs > button{ flex:1; height:38px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; font-size:13.5px; font-weight:600; color:var(--g6); transition:color .2s, background .2s, box-shadow .2s; }
.seg-tabs > a:hover:not(.active), .seg-tabs > button:hover:not(.active){ color:var(--ink); }
.seg-tabs > .active{ background:var(--gray-1); color:var(--red); box-shadow:0 1px 4px rgba(24,24,27,.08); }
html[data-theme="dark"] .seg-tabs > .active{ background:rgba(255,255,255,.12); }
/* --------------------------------------------------------------------------
   32. 认证 / 验证清单（verify）
   -------------------------------------------------------------------------- */
.verify-list{ display:flex; flex-direction:column; gap:10px; }
.verify-row{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:var(--r-lg);
  background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.verify-row:last-child{ margin-bottom:0; }
.verify-row-label{ font-size:13.5px; font-weight:600; min-width:0; display:flex; align-items:center; gap:6px; }
.verify-row-need{ font-size:12px; color:var(--g9); }
.verify-row-now{ font-size:12px; color:var(--g7); }
.verify-row-state{ margin-left:auto; flex-shrink:0; font-size:12.5px; font-weight:700; color:var(--g9); }
.verify-row.verify-ok .verify-row-state, .verify-ok{ color:var(--success); }
.verify-row.verify-ok .verify-row-label{ color:var(--ink); }
.verify-row.verify-no .verify-row-state{ color:var(--danger); }
/* --------------------------------------------------------------------------
   33. 举报
   -------------------------------------------------------------------------- */
.report-card .card-body{ padding:16px; }
.report-target{ padding:12px 14px; border-radius:12px; background:rgba(24,24,27,.04);
  border-left:3px solid var(--red); font-size:13px; color:var(--g7); margin-bottom:12px; line-height:1.7; }
/* --------------------------------------------------------------------------
   34. 安装向导（install.php）
   -------------------------------------------------------------------------- */
.install-wrap{ max-width:1080px; margin:0 auto; padding:26px 14px 60px; display:grid;
  grid-template-columns:minmax(0,1fr) 300px; gap:20px; align-items:start; }
.install-main{ min-width:0; }
.install-title{ font-size:22px; font-weight:700; letter-spacing:-.3px; }
.install-sub{ font-size:13.5px; color:var(--g9); margin-top:8px; line-height:1.7; }
.install-section{ margin-top:20px; }
.install-hero{ border-radius:var(--r-xl); padding:22px; margin-bottom:18px; color:var(--gray-1); position:relative; overflow:hidden;
  background:linear-gradient(135deg,var(--blue-6),#ec4899 60%,#a855f7); box-shadow:0 18px 44px -18px rgba(var(--red-rgb),.55); }
.install-hero-logo{ width:56px; height:56px; border-radius:18px; background:rgba(255,255,255,.22);
  display:flex; align-items:center; justify-content:center; font-size:26px; overflow:hidden; }
.install-hero-logo img{ width:100%; height:100%; object-fit:cover; }
.install-hero-brand{ display:flex; align-items:center; gap:14px; }
.install-hero-name{ font-size:22px; font-weight:700; }
.install-hero-ver{ font-size:12.5px; opacity:.85; margin-top:3px; }
.install-hero-lead{ font-size:13.5px; line-height:1.8; opacity:.92; margin-top:14px; }
.install-hero-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.install-hero-tags span{ padding:5px 12px; border-radius:var(--r-pill); font-size:12px; font-weight:600;
  background:rgba(255,255,255,.2); }
.install-side{ position:sticky; top:24px; }
.install-side-title{ font-size:12.5px; font-weight:700; color:var(--g9); letter-spacing:.4px;
  padding:0 12px; margin:4px 0 6px; }
.step{ display:flex; align-items:center; gap:10px; height:40px; padding:0 12px; border-radius:11px;
  font-size:13.5px; font-weight:500; color:var(--g7); }
.step.done, .step.is-done{ color:var(--success); font-weight:600; }
.step.active{ background:rgba(var(--red-rgb),.1); color:var(--red); font-weight:600; }
.install-features{ display:grid; gap:8px; }
.install-features li{ display:flex; align-items:center; gap:10px; padding:11px 13px; border-radius:12px;
  background:rgba(24,24,27,.03); border:1px solid var(--line2); font-size:13px; color:var(--g7); }
.install-features b{ font-weight:700; color:var(--ink); }
.install-features small{ color:var(--g9); margin-left:auto; }
.fi-ico{ width:34px; height:34px; border-radius:11px; flex-shrink:0; display:flex; align-items:center;
  justify-content:center; color:var(--red); background:rgba(var(--red-rgb),.1); }
.db-choice{ display:grid; gap:10px; }
.db-choice-item{ display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:var(--r-md);
  background:rgba(255,255,255,.6); border:1.5px solid rgba(24,24,27,.09); cursor:pointer;
  transition:border-color .2s, background .2s; }
.db-choice-item:hover{ border-color:rgba(var(--red-rgb),.35); }
.db-choice-item.active, .db-choice-item:has(input:checked){ border-color:var(--red); background:rgba(var(--red-rgb),.05); }
.install-done{ text-align:center; }
.install-done .card-body{ padding:34px 24px; }
.install-done-ico{ width:76px; height:76px; margin:0 auto 16px; border-radius:50%; display:flex;
  align-items:center; justify-content:center; color:var(--success); background:rgba(23,201,100,.12); }
.install-done-title{ font-size:20px; font-weight:700; }
.install-done-actions{ display:flex; gap:10px; justify-content:center; margin-top:20px; flex-wrap:wrap; }
/* --------------------------------------------------------------------------
   35. PWA 安装条
   -------------------------------------------------------------------------- */
.install-bar{ position:fixed; left:10px; right:10px; bottom:calc(84px + env(safe-area-inset-bottom));
  z-index:150; display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:16px;
  background:var(--glass2); -webkit-backdrop-filter:blur(20px) saturate(170%); backdrop-filter:blur(20px) saturate(170%);
  border:1px solid rgba(255,255,255,.6); box-shadow:0 14px 36px -12px rgba(24,24,27,.28); }
.install-bar[hidden]{ display:none; }
.install-bar-logo{ width:36px; height:36px; border-radius:10px; flex-shrink:0; }
.install-bar-text{ flex:1; min-width:0; font-size:12.5px; color:var(--g7); line-height:1.5; }
.install-bar-close{ width:28px; height:28px; border-radius:9px; flex-shrink:0; color:var(--g9); font-size:16px;
  display:flex; align-items:center; justify-content:center; }
.install-bar-close:hover{ background:rgba(24,24,27,.06); color:var(--ink); }
/* --------------------------------------------------------------------------
   36. 零散补充（与旧版选择器完全对齐）
   -------------------------------------------------------------------------- */
.card-bg{ background:var(--card); }
.card-header .card-sub{ display:block; margin:2px 0 0; }
.card-header > span:first-child{ min-width:0; }
.card-header > span:first-child:not(:last-child){ flex:1; }
.post-head{ min-width:0; }
.topic-detail .post-head{ min-width:0; }
.topic-detail .topic-flags{ margin-bottom:10px; }
.topic-detail .post-actions{ margin-top:18px; }
.post-excerpt{ font-size:13.5px; color:var(--g6); line-height:1.7; margin-top:7px; }
.post-thumb{ width:108px; height:76px; border-radius:12px; object-fit:cover; flex-shrink:0; background:var(--f0); }
.post-card .level-icon{ font-size:10px; padding:1px 6px; }
.like-btn .like-num{ font-size:12px; }
.um-admin{ color:var(--indigo)!important; font-weight:600; }
.um-vip{ color:var(--gold)!important; }
.um-logout{ color:var(--red)!important; }
.signature{ font-size:12px; color:var(--g9); }
.rank-list{ display:flex; flex-direction:column; gap:2px; }
.rank-item{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; }
.rank-item:hover{ background:rgba(24,24,27,.04); }
.rank-no-1{ color:var(--gray-1); background:linear-gradient(135deg,#f5a524,#fbbf24); }
.rank-no-2{ color:var(--gray-1); background:linear-gradient(135deg,#94a3b8,#cbd5e1); }
.rank-no-3{ color:var(--gray-1); background:linear-gradient(135deg,#d97706,#f59e0b); }
.coin-balance{ min-width:0; }
.checkin-card .card-body{ padding:18px; }
.checkin-btn:active{ transform:scale(.97); }
.tip-amount:active{ transform:scale(.95); }
.message-tab:active{ transform:scale(.98); }
.private-card:active{ background:rgba(var(--red-rgb),.06); }
.private-card + .private-card{ margin-top:0; }
.chat-attach-preview .preview-item{ width:72px; height:72px; }
.tab-item .tab-text{ display:inline-flex; align-items:center; gap:5px; }
.page-title > div{ min-width:0; }
.check-line svg{ flex-shrink:0; }
.checkin-reward{ position:relative; }
.uc-services .ov-action{ background:rgba(255,255,255,.55); }
html[data-theme="dark"] .uc-services .ov-action{ background:rgba(255,255,255,.05); }
.uc-services .ov-action-icon{ width:42px; height:42px; }
.uc-services .ov-action-word strong{ font-size:12.5px; font-weight:600; }
.bubble-row.system-msg{ justify-content:center; }
.bubble-row.system-msg .bubble{ max-width:88%; padding:6px 14px; border-radius:var(--r-pill);
  font-size:12px; color:var(--g6); background:rgba(24,24,27,.06); border:none; box-shadow:none; }
html[data-theme="dark"] .bubble-row.system-msg .bubble{ background:rgba(255,255,255,.08); color:var(--g9); }
.pp-foot .btn{ flex:1; min-width:120px; }
.topic-side-action .btn + .btn{ margin-top:0; }
body.drawer-open{ overflow:hidden; }
body.lightbox-open{ overflow:hidden; }
/* --------------------------------------------------------------------------
   图片灯箱增强（P3）
   - 加载中旋转指示 + 图片淡入（只动 opacity / transform）
   - 可缩放图片显示「放大镜」光标，提示用户可双击放大
   - 左右切换按钮在触屏上更大，方便拇指点按
   -------------------------------------------------------------------------- */
.lightbox-spinner{
  position:absolute; top:50%; left:50%;
  width:38px; height:38px; margin:-19px 0 0 -19px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.18);
  border-top-color:var(--gray-1);
  animation:lb-spin .7s linear infinite;
  z-index:1; pointer-events:none;
}
@keyframes lb-spin{ to{ transform:rotate(360deg); } }
/* 图片加载完成后隐藏旋转指示（相邻兄弟选择器，只影响外观不影响布局） */
.lightbox-img.is-loaded + .lightbox-spinner{ display:none; }
.lightbox-img{
  opacity:0; transition:opacity .2s var(--ease), transform .2s var(--ease);
  cursor:zoom-in;
}
.lightbox-img.is-loaded{ opacity:1; cursor:zoom-in; }
.lightbox-img.is-error{
  opacity:1; min-width:200px; min-height:120px;
  background:rgba(255,255,255,.06); border-radius:var(--r-md);
}
.lightbox-nav{
  width:44px; height:44px; border-radius:50%;
  -webkit-tap-highlight-color:transparent;
}
@media (max-width:640px){
  .lightbox-nav{ width:40px; height:40px; }
  .lightbox-prev{ left:8px; }
  .lightbox-next{ right:8px; }
  .lightbox-img{ max-width:100vw; max-height:100vh; }
}
/* 可缩放图片的提示：列表页缩略图 / 预览图加放大镜光标 */
.topic-thumb, .post-excerpt-img{ cursor:zoom-in; }
@media (hover:hover) and (pointer:fine){
  .topic-thumb:hover, .post-excerpt-img:hover{ opacity:.92; }
}
body.media-dragging{ cursor:copy; }
.over{ color:var(--danger); }
.pop{ animation:like-pop .32s var(--ease); }
.is-on{ color:var(--red); }
.dragging{ outline:2px dashed rgba(var(--red-rgb),.5); outline-offset:3px; border-radius:var(--r-md); }
/* --------------------------------------------------------------------------
   37. 窄桌面（≤1080）：合并搜索为按钮弹出
   -------------------------------------------------------------------------- */
@media (max-width:1080px){
  .search{ display:none; }
  .topbar-search-btn{ display:flex; }
  /* 搜索框隐藏后，由操作区整体撑到最右（否则头像/按钮会挂在中间留一截空位） */
  .nav + .search + .topbar-actions{ margin-left:auto; }
  .search.open{ display:flex; position:absolute; left:14px; right:14px; top:calc(100% + 8px);
    max-width:none; margin:0; height:48px; z-index:70; padding:0 5px 0 16px;
    background:var(--glass2); -webkit-backdrop-filter:blur(20px) saturate(170%); backdrop-filter:blur(20px) saturate(170%);
    border:1px solid rgba(255,255,255,.65); border-radius:14px;
    box-shadow:0 16px 40px -14px rgba(24,24,27,.28); }
  html[data-theme="dark"] .search.open{ border-color:rgba(255,255,255,.09); }
}
@media (max-width:920px){
  .brand-text{ font-size:15px; }
  .nav-link{ padding:8px 10px; font-size:13.5px; }
}
/* --------------------------------------------------------------------------
   38. 桌面（≥821）：页内两栏网格 + 右栏粘滞
   -------------------------------------------------------------------------- */
@media (min-width:821px){
  .layout{ display:grid; grid-template-columns:minmax(0,1fr); gap:20px; align-items:start; }
  .layout:has(> aside){ grid-template-columns:minmax(0,1fr) 300px; }
  .stat-grid{ grid-template-columns:repeat(4,1fr); }
  .layout > aside{ position:sticky; top:var(--stick-top); }
  .site-footer{ padding-bottom:40px; }
  .fixed-reply-bar, .reply-bar-spacer{ display:none; }
}
/* --------------------------------------------------------------------------
   39. 移动端（≤820）
   -------------------------------------------------------------------------- */
@media (max-width:820px){
  :root{ --topbar-h:52px; }
  .topbar{ top:8px; padding:0 16px; margin-top:8px; }
  .topbar-inner{ height:52px; border-radius:16px; padding:0 8px 0 13px; gap:8px; }
  .brand-text{ display:none; }
  .brand-text-mobile{ display:block; font-size:15.5px; }
  .nav{ display:none; }
  .topbar-post{ display:none; }
  .topbar-actions{ gap:4px; }
  .search.open{ left:16px; right:16px; }
  .user-menu-name{ display:none; }
  /* 移动端头像即为顶栏最右侧元素：隐藏头像旁的等级胶囊，避免顶到右边的是 Lv 而不是头像 */
  .user-menu-trigger .lv-badge{ display:none; }
  .user-menu-trigger{ padding:4px; background:transparent; }
  .user-menu-trigger:hover{ background:rgba(24,24,27,.05); }
  .user-menu-dropdown{ position:fixed; left:16px; right:16px; top:calc(8px + 52px + 8px);
    max-height:min(70vh, 560px); }
  .pc-shell, .pc-shell.is-narrow{ display:block; padding:16px 16px 132px; }
  .pc-sidebar, .pc-rail{ display:none; }
  .pc-center > .container{ padding:0; }
  .container{ padding:0 16px; }
  .page-title{ font-size:18px; margin:2px 0 12px; }
  .page-title h1{ font-size:18px; }
  .card-body{ padding:14px; }
  .card-header{ padding:13px 14px; }
  .post-card{ padding:14px; }
  .post-title{ font-size:15.5px; }
  .topic-detail{ padding:15px; }
  .topic-detail h1{ font-size:18.5px; }
  .pa-signature{ display:none; }
  .focus-slider{ border-radius:16px; }
  .focus-title{ font-size:15.5px; }
  .focus-nav{ display:none; }
  .topic-thumb{ height:86px; }
  .comment-children{ padding-left:26px; }
  /* 帖子操作按钮：手机端压缩，让「点赞/回复/收藏/分享」一行放下不折行 */
  .post-actions{ gap:5px; }
  .post-actions .btn-sm{ height:32px; padding:0 9px; font-size:12px; border-radius:10px; }
  .post-actions .like-btn{ height:32px; padding:0 9px; font-size:12px; }
  .post-actions .share-toggle{ height:32px; padding:0 9px; font-size:12px; }
  .post-actions .btn-sm svg{ width:14px; height:14px; }
  .post-actions .like-btn svg{ width:14px; height:14px; }
  .chat-box{ padding:14px 12px; }
  .card.chat-shell{ height:calc(100vh - 270px - env(safe-area-inset-bottom));
    height:calc(100dvh - 270px - env(safe-area-inset-bottom)); min-height:300px; }
  .chat-tools .tip-input-row .btn{ flex:1 1 100%; }
  .chat-compose .char-count{ display:none; }
  .chat-jump{ height:28px; padding:0 11px; font-size:12px; margin-bottom:8px; }
  .bubble{ max-width:78%; }
  .bubble-image img{ max-width:216px; max-height:260px; }
  .bubble-video{ max-width:228px; max-height:260px; }
  .unlock-box{ padding:20px 14px; }
  .checkin-streak-num{ font-size:30px; }
  .podium{ gap:8px; }
  .podium-item{ padding:12px 6px; }
  .podium-medal{ font-size:22px; }
  .podium-name{ font-size:12.5px; }
  .avatar-xl{ width:72px; height:72px; }
  /* 个人主页(u.php)：窄屏下操作按钮换行，避免 .profile-info 被挤成竖排 */
  .profile-info{ flex:1 1 calc(100% - 92px); }
  .profile-head > .btn, .profile-head > form{ margin-left:0; }
  .auth-wrap{ margin-top:22px; }
  .install-wrap{ grid-template-columns:1fr; padding:18px 12px 130px; }
  .install-side{ position:static; }
  .chp-stats{ gap:12px; }
  .cal-cell, .checkin-cal > div:not(.cal-head){ border-radius:10px; font-size:12px; }
  /* 日历窄屏：概览改为上下两行，金币角标缩小，连接条收窄 */
  .cal-summary{ flex-direction:column; align-items:stretch; gap:10px; }
  .cal-ring{ align-self:center; width:56px; height:56px; }
  .cal-summary-stats{ gap:6px; }
  .cal-sum-n{ font-size:14px; }
  .cal-sum-l{ font-size:10px; }
  .cal-coins{ font-size:8.5px; }
  .checkin-cal .cal-done.link-prev::before,
  .checkin-cal .cal-done.link-next::after{ width:4px; }
  .checkin-cal .cal-done.link-prev::before{ left:-4px; }
  .checkin-cal .cal-done.link-next::after{ right:-4px; }
  .cal-legend{ gap:10px; font-size:10.5px; }
  .cal-nav-label{ min-width:74px; font-size:12px; }
  .site-footer{ padding:24px 12px 150px; }
  /* 底部导航 */
  .mobile-tabbar{ display:flex; position:fixed; left:16px; right:16px; bottom:calc(10px + env(safe-area-inset-bottom));
    z-index:70; height:60px; padding:6px 8px; align-items:stretch; justify-content:space-around; gap:2px;
    background:var(--glass); -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%);
    border:1px solid rgba(255,255,255,.6); border-radius:20px;
    box-shadow:0 10px 30px -10px rgba(24,24,27,.16), 0 1px 2px rgba(24,24,27,.05); }
  html[data-theme="dark"] .mobile-tabbar{ border-color:rgba(255,255,255,.08); }
  .mtab{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    border-radius:14px; color:var(--g9); font-size:10.5px; font-weight:600; position:relative;
    transition:color .2s; }
  .mtab-ico{ display:flex; align-items:center; justify-content:center; height:24px; }
  .mtab-ico svg{ width:22px; height:22px; }
  .mtab.active{ color:var(--red); }
  .mtab.active .mtab-ico svg{ filter:drop-shadow(0 2px 5px rgba(var(--red-rgb),.45)); }
  .mtab-dot{ position:absolute; top:1px; left:calc(50% + 3px); min-width:15px; height:15px; padding:0 4px;
    border-radius:8px; display:inline-flex; align-items:center; justify-content:center;
    background:var(--red); color:var(--gray-1); font-size:9.5px; font-weight:700; border:1.5px solid var(--bg); }
  .mtab-post{ justify-content:flex-start; }
  .mtab-post-btn{ display:flex; align-items:center; justify-content:center; width:38px; height:38px;
    margin-top:-16px; border-radius:50%; color:var(--gray-1); background:var(--red);
    box-shadow:0 8px 18px -4px rgba(var(--red-rgb),.55); }
  .mtab-post-btn svg{ width:18px; height:18px; }
  .mtab-post .mtab-txt{ margin-top:2px; font-size:10px; }
  /* 固定回复条 */
  .reply-bar-spacer{ display:block; height:60px; }
  .fixed-reply-bar{ display:flex; position:fixed; left:16px; right:16px;
    bottom:calc(84px + env(safe-area-inset-bottom)); z-index:65; align-items:center; gap:8px;
    padding:6px 6px 6px 14px; border-radius:16px;
    background:var(--glass2); -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%);
    border:1px solid rgba(255,255,255,.6); box-shadow:0 10px 30px -12px rgba(24,24,27,.24); }
  .frb-input{ flex:1; min-width:0; height:40px; border:none; background:transparent; outline:none; font-size:14px; }
  .frb-input::placeholder{ color:var(--g9); }
  .frb-btn{ height:40px; padding:0 16px; border-radius:12px; display:inline-flex; align-items:center; gap:5px;
    font-size:13.5px; font-weight:600; color:var(--gray-1); background:var(--red);
    box-shadow:0 5px 12px -4px rgba(var(--red-rgb),.5); flex-shrink:0; }
  .frb-btn:active{ transform:scale(.95); }
  html[data-theme="dark"] .fixed-reply-bar{ border-color:rgba(255,255,255,.08); }
  /* 用户中心头像资料卡：签到按钮换行到右下，避免昵称/徽章区被挤成窄条 */
  .pp-head{ flex-wrap:wrap; row-gap:10px; }
  .pp-head .avatar{ width:72px; height:72px; }
  .pp-side{ flex-basis:100%; justify-content:flex-end; }
  .pp-side:not(:has(*)){ display:none; }
}
/* --------------------------------------------------------------------------
   40. 超窄屏（≤420）
   -------------------------------------------------------------------------- */
@media (max-width:420px){
  .container{ padding:0 14px; }
  .pc-shell, .pc-shell.is-narrow{ padding:14px 14px 128px; }
  .topbar{ padding:0 14px; }
  .search.open{ left:14px; right:14px; }
  .user-menu-dropdown{ left:14px; right:14px; }
  .mobile-tabbar{ left:14px; right:14px; }
  .fixed-reply-bar{ left:14px; right:14px; }
  .ex-grid{ grid-template-columns:1fr; }
  .section-grid, .recommend-list{ gap:10px; }
  .section-cell.cat-cell, .recommend-card{ padding:12px; gap:8px; }
  .sc-icon, .rc-icon{ width:38px; height:38px; border-radius:11px; font-size:18px; }
  .sc-name{ font-size:13.5px; }
  .rc-name{ font-size:13px; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
  .user-grid{ grid-template-columns:repeat(2,1fr); gap:10px; }
  .checkin-stats{ gap:8px; }
  .foot-right{ gap:11px; }
  .topic-thumbs .topic-thumb:nth-child(n+3){ display:none; }
  .focus-body{ padding:13px; }
  /* 小屏：标签筛选栏与标签组收紧，避免换行挤压 */
  .tag-filter-bar{ padding:8px 12px; gap:7px; }
  .tag-filter-clear{ margin-left:0; }
  .post-tags{ gap:5px; }
  .post-tags .topic-tag{ padding:2px 8px; font-size:11px; }
  .topic-tag-more{ font-size:11px; }
}
/* --------------------------------------------------------------------------
   41. 深色补充
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .focus-shade{ background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.75)); }
html[data-theme="dark"] .hidden-block-body{ background:linear-gradient(180deg, rgba(var(--red-rgb),.16), rgba(var(--red-rgb),.05)); }
html[data-theme="dark"] .unlock-box{ background:rgba(var(--red-rgb),.08); border-color:rgba(var(--red-rgb),.4); }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .glass-input,
html[data-theme="dark"] .description-input,
html[data-theme="dark"] .hidden-body{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.1); }
html[data-theme="dark"] .dcard{ background:rgba(255,255,255,.05); }
html[data-theme="dark"] .upload-box{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.14); }
html[data-theme="dark"] .pager-btn.active{ color:var(--gray-1); background:var(--red); }
html[data-theme="dark"] .toast{ background:rgba(52,52,58,.92); }
/* ==========================================================================
   42. 商业级视觉精修 v3（2026-10-27）
   --------------------------------------------------------------------------
   目标：把「个人开发者风格」提升到商业级质感。
   约束：只做视觉覆盖——不改 DOM、不改类名、不改 JS 状态类、不改布局尺寸；
        所有动效只动 transform / opacity / box-shadow，绝不动 width / height。
   做法：整段追加在最后，靠层叠顺序生效；如需还原，删除本段即可。
   ========================================================================== */
/* --------------------------------------------------------------------------
   42.1 设计令牌：色彩降噪 + 圆角 / 阴影统一
   - 粉色从「大面积底色」退回「唯一强调色」：主按钮、激活态、角标、链接
   - 页面底色改中性浅灰 #F7F8FA，卡片纯白 var(--white)
   - 次要信息统一到 #8C92A4
   -------------------------------------------------------------------------- */
:root{
  /* 品牌粉（唯一强调色） */
  --red:#ff2b5e; --red-rgb:255,43,94;
  --red-600:#e01d4a; --red-400:var(--blue-5); --red-200:#ffc2d0; --red-50:#fff0f4;
  --primary-soft:rgba(var(--red-rgb),.06);
  --grad-red:linear-gradient(135deg,#ff2b5e 0%,#ff5c8a 100%);
  --sh-red:0 6px 18px -6px rgba(var(--red-rgb),.36);
  /* 中性色：标题近墨黑，次要信息浅灰 */
  --ink:#16181d; --g7:#4b5563; --g6:#6b7280; --g9:#8c92a4; --gcc:#dcdfe6;
  --f7:#f5f6f8; --f0:#eef0f3;
  --bg:var(--white); --page:#f7f8fa;
  /* 卡片：纯白 + 极细描边 + 弥散阴影（全部去掉生硬纯黑投影） */
  --card:var(--white); --card-line:rgba(17,24,39,.035);
  --line:rgba(17,24,39,.07); --line2:rgba(17,24,39,.05);
  --glass:rgba(255,255,255,.78); --glass2:rgba(255,255,255,.92);
  --card-sh:rgba(17,24,39,.04);
  --sh-1:0 4px 16px rgba(17,24,39,.04);
  --sh-2:0 4px 16px rgba(17,24,39,.04);
  /* 圆角规范：卡片 16px / 按钮 12px / 小控件 8px */
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:20px;
  /* 背景去粉：整页暖白渐变，移除原来的粉色／紫色光斑 */
  --page-grad:linear-gradient(180deg,#fbfbfc 0%,#f7f8fa 100%);
  --page-blobs:none;
  /* 统一缓动：0.25,0.8,0.25,1 —— 有弹性但不拖沓 */
  --ease:cubic-bezier(.25,.8,.25,1);
}
/* 固定层光斑直接关闭：这是「粉色泛滥」的最大来源 */
body.site-body::before{ display:none; }
html{ background:var(--page-grad) fixed; }
/* 深色令牌同步：卡片改为实色，避免半透明叠在深底上发灰 */
html[data-theme="dark"]{
  --bg:#1a1b1f; --page:#121317;
  --card:#1f2024; --card-line:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.06);
  --g9:#8b8f9a; --g6:#a6abb6; --g7:#c9ccd4;
  --sh-1:0 4px 16px rgba(0,0,0,.24);
  --sh-2:0 4px 16px rgba(0,0,0,.24);
  --page-blobs:none;
  --page-grad:linear-gradient(180deg,#141519 0%,#121317 100%);
}
/* --------------------------------------------------------------------------
   42.2 卡片统一：纯白 + 16px 圆角 + 1px 极细边 + 呼吸感阴影
   -------------------------------------------------------------------------- */
.card,
.post-card,
.topic-item,
.section-cell.cat-cell,
.recommend-card,
.user-card,
.message-card{
  background:var(--card);
  border:1px solid var(--card-line);
  border-radius:var(--r-lg);
  box-shadow:var(--sh-1);
  /* 过渡只包含 transform / box-shadow / background-color，滚动时无重排 */
  transition:transform .1s ease, box-shadow .2s var(--ease), background-color .2s var(--ease);
}
/* 列表卡片间距与内边距：更松弛，视觉更“贵” */
.topic-list{ gap:12px; }
.topic-item, .post-card{ padding:16px; }
/* 标题层级：加大、加粗到 600，字距微收 */
.topic-title, .post-title{ font-size:16px; font-weight:600; letter-spacing:-.01em; color:var(--ink); }
/* 次要信息（时间 / 阅读量 / 作者）统一浅灰，并保证图标与文字垂直居中 */
.topic-meta, .post-meta, .meta{ color:var(--g9); font-size:12px; gap:10px; align-items:center; }
.meta-item, .foot-icon{ align-items:center; line-height:1; }
.foot-icon svg{ transform:scale(.92); opacity:.72; }  /* 图标视觉缩小，不改变布局宽高 */
.foot-right{ gap:12px; }
.topic-thumbs{ margin-top:12px; }
.topic-thumb{ border-radius:12px; }
/* --------------------------------------------------------------------------
   42.3 顶部公告栏：粉底红字 → 毛玻璃浅底 + 深灰文字 + 一点品牌粉点缀
   -------------------------------------------------------------------------- */
.notice{
  color:var(--ink);
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(12px) saturate(150%);
  backdrop-filter:blur(12px) saturate(150%);
  border:1px solid var(--line2);
  border-radius:14px;
  box-shadow:0 4px 16px rgba(17,24,39,.03);
}
.notice strong{ color:var(--red); font-weight:600; }
.notice-link{ color:var(--red); }
/* --------------------------------------------------------------------------
   42.4 首页 Tab：胶囊滑块 + 弹性缓动（取代死板方块指示器）
   -------------------------------------------------------------------------- */
.tabs{
  background:rgba(17,24,39,.035);
  border:1px solid transparent;
  border-radius:14px;
  padding:4px;
}
.tab-item{
  border-radius:11px;
  transition:color .3s var(--ease), background-color .3s var(--ease),
             box-shadow .3s var(--ease), transform .1s ease;
}
.tab-item:hover{ color:var(--ink); }
/* 选中态：白色胶囊 + 轻投影，形成“浮起”的滑块感 */
.tab-item:has(.tab-text-active){
  background:var(--gray-1);
  color:var(--red);
  box-shadow:0 1px 2px rgba(17,24,39,.06), 0 4px 10px -4px rgba(17,24,39,.12);
}
.tab-item .tab-text-active{ color:var(--red); }
.tab-line{ display:none !important; }          /* 彻底移除方块指示器 */
.tab-item:active{ transform:scale(.97); }
/* --------------------------------------------------------------------------
   42.5 板块页：图标底色从重粉块 → 5% 淡粉，图标本身保留品牌色
   -------------------------------------------------------------------------- */
.sc-icon, .chp-ico, .rc-icon{
  background:rgba(var(--red-rgb),.06);
  color:var(--red);
  box-shadow:none;
}
/* 卡片“浮在页面上”的质感：极细边 + 浅阴影 + 悬停加深 */
.section-cell.cat-cell:hover,
.recommend-card:hover,
.user-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px -12px rgba(17,24,39,.16);
}
.section-cell.cat-cell:active,
.recommend-card:active,
.user-card:active{ transform:scale(.97); }
/* 板块数量胶囊：降饱和，避免一片粉 */
.sc-pill{ color:var(--red-600); background:rgba(var(--red-rgb),.06); font-weight:600; }
/* --------------------------------------------------------------------------
   42.6 私信页：iOS 分段控制器（灰底 + 白色滑块）+ 头像细描边
   -------------------------------------------------------------------------- */
.message-tabs{
  background:#f1f2f5;
  border:1px solid transparent;
  border-radius:12px;
  padding:3px;
  gap:2px;
}
.message-tab{
  border-radius:9px;
  color:var(--g6);
  transition:color .3s var(--ease), background-color .3s var(--ease),
             box-shadow .3s var(--ease), transform .1s ease;
}
.message-tab:has(.tab-label.is-active){
  background:var(--gray-1);
  color:var(--ink);
  box-shadow:0 1px 2px rgba(17,24,39,.08), 0 2px 8px -2px rgba(17,24,39,.10);
}
/* 未选中时图标也降为灰，选中后才回到文字色（iOS 观感） */
.message-tab .tab-icon{ color:var(--g9); }
.message-tab:has(.tab-label.is-active) .tab-icon,
.message-tab:has(.tab-label.is-active) .tab-icon.is-msg,
.message-tab:has(.tab-label.is-active) .tab-icon.is-system{ color:inherit; }
.message-tab:active{ transform:scale(.98); }
/* 头像极细描边，防止浅色头像融进白底 */
.msg-item .avatar{ box-shadow:0 0 0 1px rgba(17,24,39,.06); }
/* --------------------------------------------------------------------------
   42.7 用户中心：数据面板改为“一排数字 + 分割线”，服务宫格统一浅灰底
   -------------------------------------------------------------------------- */
/* 用户中心数据面板：原本是「2 行散卡片」，这里改为「5 项横向并排 + 细分隔线」
   只动这一个 grid 的列数（该容器仅 ucenter.php 使用），不涉及其他页面布局 */
.stats-card{ display:grid; grid-template-columns:repeat(5,1fr); gap:0; }
.stats-card .stat-item{
  background:transparent;
  border:0;
  border-right:1px solid var(--line2);
  border-radius:0;
  box-shadow:none;
  padding:6px 4px;
}
.stats-card .stat-item:last-child{ border-right:0; }
.stats-card .stat-num{ font-size:22px; font-weight:700; letter-spacing:-.02em; color:var(--ink); }
.stats-card .stat-label{ font-size:11px; color:var(--g9); margin-top:4px; }
/* 功能宫格：去掉彩色方块底，统一极浅灰，图标统一高级灰 */
.uc-services .ov-action{
  background:#f5f6f8;
  border:0;
  box-shadow:none;
  border-radius:14px;
}
.uc-services .ov-action:hover{
  background:#f0f2f5;
  transform:translateY(-1px);
  box-shadow:0 6px 16px -8px rgba(17,24,39,.16);
}
.uc-services .ov-action:active{ transform:scale(.97); }
.uc-services .ov-action-icon,
.uc-services .ov-action-icon.is-info,
.uc-services .ov-action-icon.is-warning,
.uc-services .ov-action-icon.is-success{
  background:transparent;
  color:var(--g7);
}
.uc-services .ov-action-icon.is-danger{ background:transparent; color:var(--danger); }
/* --------------------------------------------------------------------------
   42.8 签到按钮：粉底微渐变 + 右侧微光，强化点击欲望
   -------------------------------------------------------------------------- */
.checkin-btn{
  background:linear-gradient(135deg,#ff2b5e 0%,#ff5b86 100%);
  border:0;
  box-shadow:0 8px 22px -10px rgba(var(--red-rgb),.55), inset 0 1px 0 rgba(255,255,255,.18);
  position:relative;
  overflow:hidden;
}
/* 右侧高光：纯装饰层，不参与布局 */
.checkin-btn::after{
  content:"";
  position:absolute; right:-18px; top:-40%;
  width:96px; height:180%;
  background:radial-gradient(closest-side, rgba(255,255,255,.42), transparent 70%);
  pointer-events:none;
}
/* --------------------------------------------------------------------------
   42.9 底部导航：毛玻璃 + 选中微放大 + 顶部细指示线
   -------------------------------------------------------------------------- */
.mobile-tabbar{
  background:rgba(255,255,255,.78);
  -webkit-backdrop-filter:blur(10px) saturate(160%);
  backdrop-filter:blur(10px) saturate(160%);
  border-color:rgba(17,24,39,.05);
  box-shadow:0 8px 24px -12px rgba(17,24,39,.18), inset 0 1px 0 rgba(255,255,255,.6);
}
/* 只缩放图标：不改变导航栏与按钮的宽高，避免布局抖动 */
.mtab-ico{ transition:transform .18s var(--ease); }
.mtab.active .mtab-ico{ transform:scale(1.08); }
.mtab.active .mtab-ico svg{ filter:none; }
/* 选中项顶部 2px 指示线 */
.mtab.active::before{
  content:"";
  position:absolute; top:2px; left:50%;
  width:18px; height:2px; margin-left:-9px;
  border-radius:2px;
  background:var(--red);
}
/* --------------------------------------------------------------------------
   42.10 触控反馈 / 悬浮态 / 防抖动
   - 可点元素按下时缩放 0.97（只动 transform，不动宽高）
   - 桌面端 hover 用浅灰底或加深阴影，过渡 200ms
   - 关闭系统「减少动态效果」时全部降级为无动画
   -------------------------------------------------------------------------- */
.btn:active,
.post-card:active,
.topic-item:active,
.tab-item:active,
.cat-tab:active, .ctab:active,
.ov-action:active,
.section-cell.cat-cell:active,
.recommend-card:active,
.user-card:active,
.msg-item:active,
.mtab:active{ transform:scale(.97); transition:transform .1s ease; }
/* 触控设备不需要 hover 态，避免 tap 后“粘住” */
@media (hover:hover) and (pointer:fine){
  .post-card:hover,
  .topic-item:hover{
    background:var(--card);
    box-shadow:0 8px 24px -12px rgba(17,24,39,.18);
  }
  .msg-item:hover{ background:#f9fafb; }
  .msg-item{ transition:background-color .2s var(--ease); }
}
@media (prefers-reduced-motion:reduce){
  .btn, .tab-item, .cat-tab, .ctab, .mtab, .mtab-ico,
  .ov-action, .post-card, .topic-item, .section-cell.cat-cell,
  .recommend-card, .user-card, .msg-item, .message-tab{
    transition:none !important;
    transform:none !important;
  }
}
/* --------------------------------------------------------------------------
   42.11 深色模式补充（新增组件）
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .notice{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.08);
  color:var(--ink);
}
html[data-theme="dark"] .tabs{ background:rgba(255,255,255,.05); }
html[data-theme="dark"] .tab-item:has(.tab-text-active){
  background:rgba(255,255,255,.12);
  box-shadow:none;
}
html[data-theme="dark"] .message-tabs{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .message-tab:has(.tab-label.is-active),
html[data-theme="dark"] .uc-services .ov-action{
  background:rgba(255,255,255,.06);
}
html[data-theme="dark"] .mobile-tabbar{
  background:rgba(20,21,25,.72);
  box-shadow:0 8px 24px -12px rgba(0,0,0,.6);
}
html[data-theme="dark"] .sc-icon, html[data-theme="dark"] .chp-ico,
html[data-theme="dark"] .rc-icon,
@media (hover:hover) and (pointer:fine){
  html[data-theme="dark"] .msg-item:hover{ background:rgba(255,255,255,.04); }
}
/* --------------------------------------------------------------------------
   骨架屏（Skeleton）—— 帖子列表 / 详情加载占位
   纯 CSS 脉冲动画，只动 opacity（符合动画规范：不动 width/height）
   -------------------------------------------------------------------------- */
@keyframes skel-pulse{
  0%{ opacity:.55; }
  50%{ opacity:1; }
  100%{ opacity:.55; }
}
.skel{ background:linear-gradient(90deg, rgba(24,24,27,.06) 25%, rgba(24,24,27,.11) 37%, rgba(24,24,27,.06) 63%);
  background-size:400% 100%; animation:skel-pulse 1.4s ease-in-out infinite; border-radius:var(--r-md);
  display:block; }
html[data-theme="dark"] .skel{
  background:linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.10) 37%, rgba(255,255,255,.05) 63%);
  background-size:400% 100%;
}
/* 帖子卡片骨架 */
.skel-post{ display:flex; gap:12px; padding:14px; border-radius:var(--r-lg); background:var(--card);
  border:1px solid var(--card-line); box-shadow:var(--sh-2); margin-bottom:10px; }
.skel-post .skel-avatar{ width:44px; height:44px; border-radius:var(--r-pill); flex-shrink:0; }
.skel-post .skel-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:9px; }
.skel-line{ height:12px; border-radius:var(--r-sm); }
.skel-line.lg{ height:15px; width:70%; }
.skel-line.md{ width:55%; }
.skel-line.sm{ width:40%; height:10px; }
/* 帖子详情骨架 */
.skel-detail{ padding:20px; border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.skel-detail .skel-line{ height:18px; }
.skel-detail .skel-content-line{ height:14px; margin-top:8px; }
.skel-detail .skel-content-line.w90{ width:90%; }
.skel-detail .skel-content-line.w70{ width:70%; }
.skel-detail .skel-content-line.w80{ width:80%; }
/* 懒加载图片骨架占位：图片未加载完成前显示脉冲骨架，加载后由图片像素覆盖 */
.post-excerpt-img,
.topic-thumb img,
.topic-thumb video{
  background-color:rgba(24,24,27,.06);
  background-image:linear-gradient(90deg, rgba(24,24,27,.06) 25%, rgba(24,24,27,.11) 37%, rgba(24,24,27,.06) 63%);
  background-size:400% 100%;
  animation:skel-pulse 1.4s ease-in-out infinite;
}
html[data-theme="dark"] .post-excerpt-img, html[data-theme="dark"] .topic-thumb img, html[data-theme="dark"] .topic-thumb video,
/* 图片加载完成后移除骨架脉冲（由 app.js 在 load 时加 .is-loaded） */
.post-excerpt-img.is-loaded,
.topic-thumb img.is-loaded,
.topic-thumb video.is-loaded{
  background-image:none;
  animation:none;
}
/* --------------------------------------------------------------------------
   帖子标签系统（P3）
   -------------------------------------------------------------------------- */
/* 帖子详情页标签行 */
.topic-tags{ display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:10px; }
/* 单个标签 */
.topic-tag{ display:inline-flex; align-items:center; gap:4px; padding:3px 11px; border-radius:var(--r-pill);
  font-size:12px; font-weight:600; color:var(--red-600); background:rgba(var(--red-rgb),.07);
  border:1px solid rgba(var(--red-rgb),.14); transition:color .15s, background-color .15s, border-color .15s; }
.topic-tag:hover{ color:var(--gray-1); background:var(--grad-red); border-color:transparent; }
.topic-tag::before{ content:'#'; opacity:.55; font-weight:500; }
/* 筛选栏里「当前生效」的标签 */
.topic-tag.is-current{ color:var(--gray-1); background:var(--grad-red); border-color:transparent; }
.topic-tag.is-current::before{ opacity:.75; }
/* 列表页帖子卡片上的标签组 */
.post-tags{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:9px; }
.post-tags .topic-tag{ padding:2px 9px; font-size:11.5px; }
.topic-tag-more{ font-size:11.5px; font-weight:600; color:var(--g9); }
/* 标签筛选提示条 */
.tag-filter-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:9px; padding:9px 14px; margin-bottom:12px;
  border-radius:var(--r-lg); background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.tag-filter-label{ display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:var(--g9); }
.tag-filter-count{ font-size:12px; color:var(--g9); }
.tag-filter-clear{ margin-left:auto; font-size:12px; font-weight:600; color:var(--g6);
  padding:2px 10px; border-radius:var(--r-pill); background:rgba(24,24,27,.05); transition:color .15s, background-color .15s; }
.tag-filter-clear:hover{ color:var(--red); background:rgba(var(--red-rgb),.08); }
html[data-theme="dark"] .topic-tag{ color:var(--red-400); background:rgba(var(--red-rgb),.14); border-color:rgba(var(--red-rgb),.26); }
html[data-theme="dark"] .topic-tag:hover{ color:var(--gray-1); }
html[data-theme="dark"] .tag-filter-clear{ background:rgba(255,255,255,.07); }
/* --------------------------------------------------------------------------
   热门标签云（P3）
   --------------------------------------------------------------------------
   仅首页默认视图（无分类 / 无搜索 / 无标签 / 第一页）展示。
   字号按使用次数线性映射，只用于视觉层级；点击直接跳到 ?tag=xxx 筛选。
   -------------------------------------------------------------------------- */
.tag-cloud{
  display:flex; flex-wrap:wrap; align-items:center; gap:12px 14px;
  padding:14px 16px; margin-bottom:12px;
  background:var(--card); border:1px solid var(--card-line);
  border-radius:var(--r-lg); box-shadow:var(--sh-1);
}
.tag-cloud-head{
  display:flex; align-items:center; gap:8px; flex-shrink:0;
}
.tag-cloud-bar{ width:4px; height:16px; border-radius:2px; background:var(--grad-red); }
.tag-cloud-title{ font-size:15px; font-weight:700; color:var(--ink); }
.tag-cloud-meta{ font-size:12px; color:var(--g9); }
.tag-cloud-list{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  flex:1 1 240px; min-width:0;
}
.tag-cloud-item{ gap:5px; }
/* 前 3 名：加一点品牌粉强度，形成热度层级 */
.tag-cloud-item.is-hot{
  color:var(--red-600); background:rgba(var(--red-rgb),.09); border-color:rgba(var(--red-rgb),.2);
}
.tag-cloud-count{
  font-size:10.5px; font-weight:600; color:var(--g9);
  padding:0 5px; border-radius:var(--r-pill); background:rgba(17,24,39,.04);
  line-height:16px;
}
.tag-cloud-item:hover .tag-cloud-count{ color:var(--gray-1); background:rgba(255,255,255,.22); }
@media (max-width:560px){
  .tag-cloud{ padding:12px; gap:10px; }
  .tag-cloud-title{ font-size:14px; }
  .tag-cloud-list{ flex-basis:100%; }
}
html[data-theme="dark"] .tag-cloud-item.is-hot,
html[data-theme="dark"] .tag-cloud-count,
html[data-theme="dark"] .tag-cloud-item:hover .tag-cloud-count,
/* --------------------------------------------------------------------------
   草稿箱（P3）
   -------------------------------------------------------------------------- */
.draft-list{ list-style:none; margin:0; padding:0; }
.draft-item{
  display:flex; gap:14px; align-items:flex-start;
  padding:14px 16px; border-bottom:1px solid var(--line2);
  transition:background-color .18s var(--ease);
}
.draft-item:last-child{ border-bottom:0; }
.draft-item:hover{ background:rgba(17,24,39,.02); }
.draft-main{ flex:1 1 auto; min-width:0; }
.draft-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.draft-title{
  font-size:15px; font-weight:600; letter-spacing:-.01em; color:var(--ink);
  text-decoration:none; line-height:1.4;
}
.draft-title:hover{ color:var(--red); }
.flag-edit{ color:var(--info); background:rgba(21,101,192,.08); border:1px solid rgba(21,101,192,.18); }
.flag-auto{ color:var(--g6); background:rgba(17,24,39,.04); border:1px solid var(--line2); }
.flag-hidden{ color:var(--warning); background:rgba(184,106,0,.08); border:1px solid rgba(184,106,0,.2); }
.flag-media{ color:var(--g6); background:rgba(17,24,39,.04); border:1px solid var(--line2); }
.draft-meta{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:6px; }
.draft-excerpt{
  margin:7px 0 0; font-size:13px; line-height:1.6; color:var(--g6);
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.draft-tags-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:9px; }
.draft-tags-row .topic-tag{ padding:2px 9px; font-size:11.5px; }
.draft-foot{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:8px; }
.draft-actions{ display:flex; flex-direction:column; gap:6px; flex-shrink:0; }
.btn-danger-ghost{ color:var(--danger); border-color:rgba(217,45,32,.2); }
.btn-danger-ghost:hover{ color:var(--gray-1); background:var(--danger); border-color:transparent; }
.inline-form{ display:inline; margin:0; }
.draft-hint{ margin-top:10px; font-size:12.5px; }
@media (max-width:760px){
  .draft-item{ flex-direction:column; }
  .draft-actions{ flex-direction:row; flex-wrap:wrap; width:100%; }
  .draft-actions .btn{ flex:1 1 auto; justify-content:center; }
}
html[data-theme="dark"] .flag-edit{ color:var(--info); background:rgba(21,101,192,.22); border-color:rgba(21,101,192,.34); }
html[data-theme="dark"] .flag-hidden{ color:var(--warning); background:rgba(184,106,0,.18); border-color:rgba(184,106,0,.3); }
html[data-theme="dark"] .draft-item:hover{ background:rgba(255,255,255,.03); }
/* --------------------------------------------------------------------------
   35. 帖子投票（poll）：发帖编辑器 + 帖子详情展示
   -------------------------------------------------------------------------- */
/* ---------- 发帖页：投票编辑器 ---------- */
.poll-editor{ padding:14px; border-radius:var(--r-lg); background:rgba(24,24,27,.02);
  border:1px solid var(--line2); }
html[data-theme="dark"] .poll-editor{ background:rgba(255,255,255,.03); }
.poll-editor-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.poll-editor-head .form-label{ display:inline-flex; align-items:center; gap:6px; }
.poll-editor-head .form-label svg{ color:var(--red); }
/* 开关：只动 transform 与 background，不动宽高 */
.poll-switch{ display:inline-flex; align-items:center; gap:7px; cursor:pointer; user-select:none; }
.poll-switch input{ position:absolute; opacity:0; width:0; height:0; }
.poll-switch-track{ position:relative; width:38px; height:22px; border-radius:11px;
  background:rgba(24,24,27,.14); transition:background .2s var(--ease); flex-shrink:0; }
.poll-switch-dot{ position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%;
  background:var(--gray-1); box-shadow:0 1px 3px rgba(0,0,0,.22); transition:transform .2s var(--ease); }
.poll-switch input:checked + .poll-switch-track{ background:var(--red); }
.poll-switch input:checked + .poll-switch-track .poll-switch-dot{ transform:translateX(16px); }
.poll-switch input:focus-visible + .poll-switch-track{ box-shadow:0 0 0 3px rgba(var(--red-rgb),.18); }
.poll-switch-text{ font-size:12.5px; color:var(--g7); font-weight:600; }
html[data-theme="dark"] .poll-switch-track{ background:rgba(255,255,255,.18); }
.poll-editor-body{ margin-top:12px; display:flex; flex-direction:column; gap:10px; }
.poll-options{ display:flex; flex-direction:column; gap:8px; }
.poll-option-row{ display:flex; align-items:center; gap:8px; }
.poll-option-no{ width:20px; flex-shrink:0; text-align:center; font-size:12px; font-weight:700;
  color:var(--g9); font-variant-numeric:tabular-nums; }
.poll-option-row .form-control{ flex:1; min-width:0; }
.poll-option-del{ flex-shrink:0; width:28px; height:28px; border-radius:8px; display:inline-flex;
  align-items:center; justify-content:center; color:var(--g9); background:transparent;
  border:1px solid var(--line2); transition:color .16s, background .16s, border-color .16s; }
.poll-option-del:hover{ color:var(--danger); background:rgba(217,45,32,.08); border-color:rgba(217,45,32,.24); }
.poll-add-option{ align-self:flex-start; }
.poll-editor-row{ display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding-top:8px; border-top:1px dashed var(--line2); }
.poll-check{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--g7);
  cursor:pointer; user-select:none; }
.poll-check input{ width:15px; height:15px; accent-color:var(--red); cursor:pointer; }
.poll-inline-field{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--g7); }
.poll-inline-field .form-control{ padding:5px 8px; font-size:12.5px; text-align:center; }
/* ---------- 帖子详情：投票展示 ---------- */
.poll-card{ margin:16px 0; padding:16px; border-radius:var(--r-lg); background:var(--card);
  border:1px solid var(--card-line); box-shadow:var(--sh-2); }
.poll-head{ display:flex; align-items:flex-start; gap:9px; }
.poll-head-icon{ flex-shrink:0; width:28px; height:28px; border-radius:9px; display:flex;
  align-items:center; justify-content:center; color:var(--gray-1); background:var(--grad-red); }
.poll-question{ flex:1; min-width:0; font-size:15px; font-weight:700; color:var(--g6); line-height:1.5; }
.poll-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:7px;
  font-size:11.5px; color:var(--g9); }
.poll-meta-tag{ padding:2px 8px; border-radius:var(--r-pill); background:rgba(24,24,27,.05);
  font-weight:600; }
.poll-meta-closed{ color:var(--danger); background:rgba(217,45,32,.09); }
html[data-theme="dark"] .poll-meta-tag{ background:rgba(255,255,255,.08); }
/* 选项：一条一条排，投票后用填充条表示比例 */
.poll-list{ display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.poll-item{ position:relative; display:block; width:100%; text-align:left; padding:11px 14px;
  border-radius:12px; border:1px solid var(--line2); background:rgba(24,24,27,.02);
  cursor:pointer; overflow:hidden; transition:border-color .16s var(--ease), background .16s var(--ease); }
.poll-item:hover{ border-color:rgba(var(--red-rgb),.32); background:rgba(var(--red-rgb),.03); }
html[data-theme="dark"] .poll-item{ background:rgba(255,255,255,.04); }
.poll-item.is-mine{ border-color:rgba(var(--red-rgb),.55); background:rgba(var(--red-rgb),.05); }
.poll-item.is-closed{ cursor:default; }
.poll-item.is-closed:hover{ border-color:var(--line2); background:rgba(24,24,27,.02); }
html[data-theme="dark"] .poll-item.is-closed:hover{ background:rgba(255,255,255,.04); }
/* 比例填充：宽度用 CSS 变量，不改元素宽高，避免重排抖动 */
.poll-fill{ position:absolute; inset:0 auto 0 0; width:var(--poll-pct,0%);
  background:linear-gradient(90deg,rgba(var(--red-rgb),.16),rgba(var(--red-rgb),.07));
  transition:width .5s var(--ease); pointer-events:none; }
.poll-item.is-mine .poll-fill{ background:linear-gradient(90deg,rgba(var(--red-rgb),.26),rgba(var(--red-rgb),.1)); }
.poll-item-row{ position:relative; display:flex; align-items:center; gap:10px; }
.poll-radio{ flex-shrink:0; width:17px; height:17px; border-radius:50%; border:2px solid rgba(24,24,27,.2);
  display:flex; align-items:center; justify-content:center; transition:border-color .16s, background .16s; }
.poll-radio.is-box{ border-radius:5px; }
.poll-item.is-mine .poll-radio{ border-color:var(--red); background:var(--red); }
.poll-item.is-mine .poll-radio::after{ content:""; width:6px; height:6px; border-radius:50%; background:var(--gray-1); }
.poll-item.is-mine .poll-radio.is-box::after{ width:9px; height:5px; border-radius:0;
  border-left:2px solid var(--gray-1); border-bottom:2px solid var(--gray-1); background:none;
  transform:rotate(-45deg) translate(1px,-1px); }
html[data-theme="dark"] .poll-radio{ border-color:rgba(255,255,255,.28); }
.poll-label{ flex:1; min-width:0; font-size:13.5px; color:var(--g6); line-height:1.5;
  word-break:break-word; }
.poll-item.is-mine .poll-label{ font-weight:600; }
.poll-pct{ flex-shrink:0; font-size:12.5px; font-weight:700; color:var(--g7);
  font-variant-numeric:tabular-nums; }
.poll-item.is-mine .poll-pct{ color:var(--red); }
.poll-votes{ flex-shrink:0; min-width:38px; text-align:right; font-size:11.5px; color:var(--g9);
  font-variant-numeric:tabular-nums; }
.poll-foot{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px;
  padding-top:12px; border-top:1px solid var(--line2); }
.poll-foot-info{ font-size:12px; color:var(--g9); }
.poll-foot-info strong{ color:var(--g7); font-variant-numeric:tabular-nums; }
.poll-actions{ margin-left:auto; display:flex; align-items:center; gap:8px; }
.poll-hint{ font-size:12px; color:var(--g9); }
.poll-hint.is-error{ color:var(--danger); }
.poll-voted-badge{ display:inline-flex; align-items:center; gap:4px; padding:2px 9px;
  border-radius:var(--r-pill); font-size:11.5px; font-weight:600;
  color:var(--red); background:rgba(var(--red-rgb),.1); }
@media (max-width:560px){
  .poll-card{ padding:13px; }
  .poll-question{ font-size:14px; }
  .poll-item{ padding:10px 12px; }
  .poll-label{ font-size:13px; }
  .poll-votes{ display:none; }
  .poll-editor{ padding:12px; }
  .poll-editor-row{ gap:12px; }
}
/* ---------- 发帖页：本地草稿恢复提示 ---------- */
.draft-restore{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:14px; padding:11px 14px;
  border:1.5px solid var(--line); border-left:3px solid var(--red-600);
  border-radius:var(--r-md); background:var(--f0);
  font-size:13px; color:var(--g5);
}
.draft-restore-text{ flex:1; min-width:140px; }
.draft-restore-btn{
  flex:0 0 auto; padding:5px 12px; border:1.5px solid var(--line);
  border-radius:999px; background:var(--card); color:var(--g5);
  font-size:12.5px; font-weight:600; cursor:pointer;
  transition:all .14s ease;
}
.draft-restore-btn:hover{ border-color:var(--g4); color:var(--g6); }
.draft-restore-btn.primary{
  border-color:transparent; background:var(--red-600); color:var(--gray-1);
}
.draft-restore-btn.primary:hover{ filter:brightness(1.06); }
html[data-theme="dark"] .draft-restore,
/* ---------- 独立搜索页 ---------- */
.search-page{ max-width:860px; margin:0 auto; }
.search-box-card{ padding:16px 18px; margin-bottom:14px; }
.search-form{ margin:0; }
.search-input-wrap{
  display:flex; align-items:center; gap:8px;
  border:1.5px solid var(--line); border-radius:999px;
  background:var(--f0); padding:4px 4px 4px 14px;
  transition:border-color .16s ease;
}
.search-input-wrap:focus-within{ border-color:var(--red-600); }
.search-input-icon{ display:flex; color:var(--g4); flex:0 0 auto; }
.search-input{
  flex:1; min-width:0; border:0; background:transparent; outline:none;
  font-size:14.5px; color:var(--g6); padding:8px 0;
}
.search-input::-webkit-search-cancel-button{ display:none; }
.search-clear{
  flex:0 0 auto; width:24px; height:24px; line-height:22px; text-align:center;
  border-radius:50%; color:var(--g4); font-size:17px; text-decoration:none;
}
.search-clear:hover{ background:var(--line); color:var(--g6); }
.search-submit{ flex:0 0 auto; border-radius:999px; padding:8px 20px; }
.search-tabs{
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  margin-top:14px; padding-top:13px; border-top:1px solid var(--line);
}
.search-tab{
  display:inline-flex; align-items:center; gap:5px;
  padding:6px 13px; border-radius:999px;
  font-size:13px; font-weight:600; color:var(--g4); text-decoration:none;
  transition:all .14s ease;
}
.search-tab:hover{ background:var(--f0); color:var(--g5); }
.search-tab.active{ background:var(--red-600); color:var(--gray-1); }
.search-tab-num{
  font-size:11.5px; font-weight:500; opacity:.75;
  padding:0 5px; border-radius:999px; background:rgba(0,0,0,.08);
}
.search-tab.active .search-tab-num{ background:rgba(255,255,255,.22); }
.search-sorts{ margin-left:auto; display:flex; gap:4px; }
.search-sort{
  padding:5px 11px; border-radius:999px; font-size:12.5px;
  color:var(--g4); text-decoration:none; transition:all .14s ease;
}
.search-sort:hover{ color:var(--g5); background:var(--f0); }
.search-sort.active{ color:var(--red-600); font-weight:600; background:var(--red-50, #fff1f4); }
.search-hit{ background:rgba(255,196,0,.32); color:inherit; padding:0 1px; border-radius:2px; }
.search-result-list{ display:flex; flex-direction:column; }
.search-result{
  display:flex; gap:14px; padding:16px 18px;
  border-bottom:1px solid var(--line);
}
.search-result:last-child{ border-bottom:0; }
.search-result-thumb{
  flex:0 0 84px; width:84px; height:84px; border-radius:var(--r-md);
  overflow:hidden; background:var(--f0); display:block;
}
.search-result-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.search-result-main{ flex:1; min-width:0; }
.search-result-title{
  display:block; font-size:15px; font-weight:600; line-height:1.5;
  color:var(--g6); text-decoration:none; margin-bottom:5px;
}
.search-result-title:hover{ color:var(--red-600); }
.search-result-snippet{
  margin:0 0 8px; font-size:13px; line-height:1.65; color:var(--g4);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.search-result-meta{
  display:flex; align-items:center; gap:11px; flex-wrap:wrap;
  font-size:12px; color:var(--g3);
}
.search-meta-item{ display:inline-flex; align-items:center; gap:3px; }
.search-user-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:2px; padding:6px;
}
.search-user{
  display:flex; align-items:center; gap:11px; padding:11px 12px;
  border-radius:var(--r-md); text-decoration:none; color:inherit;
  transition:background .14s ease;
}
.search-user:hover{ background:var(--f0); }
.search-user-info{ min-width:0; }
.search-user-name{
  display:flex; align-items:center; gap:5px;
  font-size:14px; font-weight:600; color:var(--g6);
}
.search-user-sub{ font-size:12px; color:var(--g3); margin-top:2px; }
.search-tag-cloud{ display:flex; flex-wrap:wrap; gap:9px; padding:18px; }
.search-tag{
  display:inline-flex; align-items:center; gap:7px;
  padding:7px 14px; border:1.5px solid var(--line); border-radius:999px;
  font-size:13.5px; font-weight:600; color:var(--g5); text-decoration:none;
  transition:all .14s ease;
}
.search-tag:hover{ border-color:var(--red-600); color:var(--red-600); }
.search-tag-n{
  font-size:11.5px; font-weight:500; color:var(--g3);
  padding:0 6px; border-radius:999px; background:var(--f0);
}
.search-cat-list{ display:flex; flex-direction:column; }
.search-cat{
  display:flex; align-items:center; gap:12px; padding:14px 18px;
  border-bottom:1px solid var(--line); text-decoration:none; color:inherit;
  transition:background .14s ease;
}
.search-cat:last-child{ border-bottom:0; }
.search-cat:hover{ background:var(--f0); }
.search-cat-icon{ display:flex; color:var(--red-600); flex:0 0 auto; }
.search-cat-main{ flex:1; min-width:0; }
.search-cat-name{ display:block; font-size:14.5px; font-weight:600; color:var(--g6); }
.search-cat-desc{ display:block; font-size:12.5px; color:var(--g3); margin-top:3px; }
.search-cat-n{ flex:0 0 auto; font-size:12px; color:var(--g3); }
@media (max-width: 640px){
  .search-result{ padding:14px; gap:11px; }
  .search-result-thumb{ flex:0 0 64px; width:64px; height:64px; }
  .search-sorts{ margin-left:0; width:100%; margin-top:6px; }
  .search-user-grid{ grid-template-columns:1fr; }
}
/* ---------------------------- 相关推荐 ---------------------------- */
.related-list{ list-style:none; margin:0; padding:0; }
.related-item{ border-bottom:1px solid var(--line); }
.related-item:last-child{ border-bottom:0; }
.related-link{
  display:flex; gap:14px; align-items:flex-start;
  padding:14px 18px; text-decoration:none; color:inherit;
  transition:background .14s ease;
}
.related-link:hover{ background:var(--f0); }
.related-thumb{
  flex:0 0 80px; width:80px; height:80px; border-radius:var(--r-md);
  overflow:hidden; background:var(--f0);
}
.related-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.related-body{ flex:1; min-width:0; }
.related-title{
  font-size:14.5px; font-weight:600; color:var(--g6);
  line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.related-excerpt{
  font-size:12.5px; color:var(--g3); margin-top:5px;
  line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.related-meta{
  display:flex; gap:12px; align-items:center;
  margin-top:8px; font-size:12px; color:var(--g3);
}
.related-meta span{ display:inline-flex; align-items:center; gap:3px; }
.related-meta .icon{ color:var(--g3); }
@media (max-width: 640px){
  .related-link{ padding:12px 14px; gap:12px; }
  .related-thumb{ flex:0 0 64px; width:64px; height:64px; }
  .related-title{ font-size:14px; }
  .related-excerpt{ font-size:12px; -webkit-line-clamp:1; }
  .related-meta{ gap:10px; margin-top:6px; }
}
/* ==========================================================================
   43. PC 端排版精修（2026-10-29）
   --------------------------------------------------------------------------
   目标：三栏更宽更透气、顶栏从「浮起的玻璃胶囊」改为「通栏白底」、
        帖子卡的标题/摘要/留白拉开层级、Tabs 去掉灰底块改下划线。
   约束：只做样式覆盖，不改任何 DOM、类名、数据与业务逻辑。
        所有选择器都限定在已有的结构类上，不新增标记。
   回滚：删除本段即可回到 42 节的样子。
   ========================================================================== */
/* --------------------------------------------------------------------------
   43.1 概览尺度
   - 容器 1180 → 1320，左右留白加大
   - 三栏 240/1fr/300 → 200/1fr/300（左栏收窄，中间更宽）
   - 吸顶位置 90 → 80（顶栏变高 64，正好留 16 的呼吸）
   - 圆角 16/12 → 12/8，符合「卡片 8~12px」
   -------------------------------------------------------------------------- */
:root{
  /* 不要复用 --topbar-h：那个变量归后台所有，variables.css 在 site.css 之后
     加载且同为 :root，会把这里的值冲掉（实测一直是 56）。前台另起一个名字。 */
  --site-topbar-h: 64px;
  --stick-top: 80px;
  --pc-max: 1320px;
  --pc-gap: 20px;
  --r-lg: 12px;
  --r-md: 8px;
}
.pc-shell{
  max-width: var(--pc-max);
  grid-template-columns: 200px minmax(0,1fr) 300px;
  gap: var(--pc-gap);
  padding: 28px 20px 56px;
  align-items: start;
}
/* 1025~1200：左栏再收一点，避免中间被挤 */
@media (max-width: 1200px) and (min-width: 1025px){
  .pc-shell{ grid-template-columns: 180px minmax(0,1fr) 280px; gap: 16px; padding: 20px 16px 48px; }
}
/* --------------------------------------------------------------------------
   43.2 顶栏：取消玻璃胶囊，改纯白通栏 + 底部 1px 分割线
   - 不再悬浮（去掉 top:10 / margin-top:10 与阴影），直接贴在页面顶端
   - 高度 64，内容宽度与 .pc-shell 一致（1320），保证左右与内容区对齐
   -------------------------------------------------------------------------- */
.topbar{
  top: 0;
  margin-top: 0;
  padding: 0;
  background: var(--gray-1);
  border-bottom: 1px solid #eef0f3;
}
.topbar-inner{
  max-width: var(--pc-max);
  height: var(--site-topbar-h);
  padding: 0 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-theme="dark"] .topbar-inner,
html[data-theme="dark"] .topbar,
/* 搜索框 / 发帖 / 头像的间距收一点，视觉上更成一组 */
.topbar-actions{ gap: 8px; }
.topbar-actions > .btn,
.topbar-actions > .icon-btn{ flex-shrink: 0; }
/* --------------------------------------------------------------------------
   43.3 Tabs：去掉灰底块，改成「下划线切换」
   —— 结构里本来就有 .tab-line（此前被 display:none 关掉），这里改用 ::after
      画下划线，不再依赖那个多余节点。
   -------------------------------------------------------------------------- */
.tabs{
  gap: 2px;
  padding: 0;
  margin-bottom: 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  overflow-x: auto;
}
.tab-item{
  flex: none;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--g6);
}
.tab-item:hover{ color: var(--ink); background: transparent; }
.tab-item:active{ transform: none; }
.tab-item:has(.tab-text-active){
  background: transparent;
  box-shadow: none;
  color: var(--red);
  font-weight: 600;
}
.tab-item:has(.tab-text-active)::after{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--red);
}
.tab-item .tab-text-active{ color: var(--red); }
/* --------------------------------------------------------------------------
   43.4 帖子卡：标题加重、摘要变大变松、底部操作弱化
   - 卡内边距 16 → 24，卡间距 12 → 16
   - 标题 16/600 → 18/700；摘要 13.5/1.7 → 14/1.6
   - 标题→摘要→标签→图片→底部 统一 12~16 的留白
   - 标签与底部统计压到 12px 浅灰，和正文拉开层级
   -------------------------------------------------------------------------- */
.post-list{ gap: 16px; }
.post-list .post-card,
.post-card{
  padding: 24px;
  border-radius: var(--r-lg);
}
.post-card-head{ gap: 10px; }
.post-title{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 14px;
}
.post-content{
  font-size: 14px;
  line-height: 1.6;
  color: var(--g6);
  margin-top: 10px;
}
.post-tags{ margin-top: 12px; gap: 6px; }
.topic-tag{ font-size: 12px; padding: 2px 9px; }
.topic-thumb-more{ font-size: 12px; }
/* 多图：间距 6 → 8，圆角 12 → 8 */
.topic-thumbs{ gap: 8px; margin-top: 14px; }
.topic-thumb{ border-radius: var(--r-md); }
.post-excerpt-img{ border-radius: var(--r-md); margin-top: 14px; }
/* 底部：分割线之上留白加大，统计整体降到 12px 浅灰 */
.post-foot{
  margin-top: 16px;
  padding-top: 12px;
  font-size: 12px;
  color: var(--g9);
}
.post-foot .foot-icon{ font-size: 12px; color: var(--g9); }
.post-foot .foot-icon svg{ width: 13px; height: 13px; }
.post-foot .section-tag{ font-size: 12px; padding: 2px 9px; }
.post-foot .flag{ font-size: 11.5px; }
/* --------------------------------------------------------------------------
   43.5 左侧栏：分组标题留白 + 导航项缩进 8px、圆角 8px、选中浅蓝
   —— 「不要顶满侧边栏」= 左右各留 8px，用 margin 实现，不改容器 padding
   -------------------------------------------------------------------------- */
.pc-sidebar{ gap: 0; }
.rail-card{ background: transparent; border: 0; box-shadow: none; }
.rail-card h4{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--g9);
  padding: 0 18px;
  margin: 18px 0 6px;
}
/* 三栏顶部对齐：各自第一个分组标题都不带上边距 */
.pc-sidebar .rail-card:first-child h4,
.pc-rail .rail-card:first-child h4{ margin-top: 0; }
/* 用 :not 排除「本周热门」那种两行条目，否则 height:36 会把两行压扁 */
.rail-link:not(.rail-link-top){
  height: 36px;
  margin: 0 8px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--g7);
}
.rail-link-top{
  height: auto;
  margin: 0 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  gap: 1px;
}
.rail-top-title{ font-size: 13px; line-height: 1.45; }
.rail-top-views{ font-size: 11px; color: var(--g6); }
.rail-link:hover{ background: var(--f7); color: var(--ink); }
.rail-link.is-active{
  background: rgba(var(--red-rgb), .08);
  color: var(--red);
  font-weight: 600;
}
/* 取消选中项右侧那个小胶囊点，浅蓝底已经足够表达 */
.rail-link.is-active::after{ display: none; }
/* --------------------------------------------------------------------------
   43.6 右侧栏 · 站点数据：去掉独立卡片感，只留数字与标签
   —— 无背景、无描边、无圆角；数字加大加粗，标签缩小
   -------------------------------------------------------------------------- */
.pc-rail .rail-stats{ gap: 0; padding: 0; }
.pc-rail .rail-stats > div{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 6px 0;
}
.pc-rail .rail-stats strong{
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1.2;
}
.pc-rail .rail-stats span{
  font-size: 11px;
  margin-top: 3px;
  color: var(--g9);
}
html[data-theme="dark"] .pc-rail .rail-stats > div,
/* --------------------------------------------------------------------------
   43.7 右侧栏 · 快捷入口：竖排列表改 2 列网格 + 浅底块
   —— 这个 rail-card 里是「h4 + 若干个 a.rail-link」的平铺结构，
      没有额外容器，所以直接把卡片本身变成 grid，让 h4 横跨整行。
   -------------------------------------------------------------------------- */
.pc-rail .rail-card:last-child{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 8px;
}
.pc-rail .rail-card:last-child h4{
  grid-column: 1 / -1;
  padding: 0 10px;
  margin-bottom: 0;
}
.pc-rail .rail-card:last-child .rail-link{
  height: 34px;
  margin: 0;
  padding: 0 8px;
  justify-content: center;
  background: var(--f7);
  border: 1px solid var(--line2);
  border-radius: var(--r-sm);
  font-size: 13px;
  text-align: center;
}
.pc-rail .rail-card:last-child .rail-link:hover{
  background: var(--gray-1);
  border-color: var(--gcc);
  color: var(--ink);
}
html[data-theme="dark"] .pc-rail .rail-card:last-child .rail-link,
/* 43.8 窄屏回退：顶栏恢复 52（PC 的 64 在小屏太占地方），三栏已由原规则转单列 */
@media (max-width: 820px){
  .topbar-inner{ height: 52px; padding: 0 14px; }
}
/* ==========================================================================
   44. PC 端左右两侧再优化（2026-10-29 第二轮）
   --------------------------------------------------------------------------
   43 节已经把尺度、顶栏、Tabs、帖子卡拉开了，这一节只解决 43 遗留的
   三个「结构性」问题，仍然遵循 43 的约束：只覆盖样式，不动 DOM。
   【问题 1】中间栏被钉死在 740px
     1320 外壳 − 200 左 − 300 右 − 40 间距 = 740，是常量。
     实测 1920 屏两侧各空 300px、2560 屏各空 620px，
     而 1440 屏恰好贴合 —— 等于只对一种分辨率友好。
     解法：外壳随视口伸展（上限 1600），中栏自然吃满剩余宽度。
   【问题 2】左右两栏底部参差
     左栏 616px / 右栏 570px，差 46px，视觉上右栏像「没写完」。
     解法：两栏统一 min-height，并让末张卡片吃掉剩余高度。
   【问题 3】左右栏内容互相重复
     左栏「浏览」有 排行榜 / 会员，右栏「快捷入口」也有 排行榜 / 找会员；
     左栏「板块」和右栏「逛板块」同样重复。
     解法：不改 PHP（遵守 43 的约束），用 CSS 把右栏重复项隐藏，
     只保留「逛板块 / 每日签到」这类不重复的入口，并改成等宽双列。
   ========================================================================== */
/* --------------------------------------------------------------------------
   44.1 外壳宽度随视口伸展，中栏不再钉死
   -------------------------------------------------------------------------- */
:root{
  /* 与 43.1 的 --pc-max 解耦：那里是「最舒服的窄版」，这里是「大屏可用的宽版」 */
  --pc-max-wide: 1600px;
}
@media (min-width: 1361px){
  .pc-shell{
    max-width: var(--pc-max-wide);
    /* 左 200 固定，中栏弹性，右 300 固定 —— 只有中间变宽 */
    grid-template-columns: 200px minmax(0, 1fr) 300px;
  }
  /* 顶栏跟着外壳一起变宽，否则顶部胶囊比内容区窄，左右对不齐 */
  .topbar-inner{ max-width: var(--pc-max-wide); }
}
/* 1600 以上不再变宽，避免超宽屏中栏一行字太长反而难读 */
@media (min-width: 1900px){
  .pc-shell{ max-width: 1600px; }
}
/* --------------------------------------------------------------------------
   44.2 左右两栏等高：末张卡片吸收剩余高度
   -------------------------------------------------------------------------- */
@media (min-width: 821px){
  .pc-sidebar, .pc-rail{
    /* 两栏都撑到视口可视高度，底部自然齐平 */
    min-height: calc(100vh - var(--stick-top) - 48px);
  }
  /* 末张卡片不再 flex 撑高：
     实测左栏「账号」只有 2 个链接，被撑到 304px（正常 100 出头），
     中间留一大片空白，比底部不齐更难看。
     改成「按内容自然高度 + 容器 min-height 兜底」，
     两栏都到 772 时底部自然齐平；内容超长时各自内部滚动。 */
  /* 登录态修正（2026-10-29 补）：
     未登录左栏 3 张卡共 682px，登录后多出「我的」10 个链接，
     总高 846px > 可视 796px，出现内部滚动条（虽然隐藏但仍占位）。
     这里给左栏放宽 max-height 到 100vh - stick-top，
     并把链接高度从 38px 收到 34px（44.5 已做），
     让 10 项「我的」也能一屏放下。 */
  .pc-sidebar{
    max-height: calc(100vh - var(--stick-top) - 8px);
  }
}
/* --------------------------------------------------------------------------
   44.3 右栏第三块：由「快捷入口」换成「最新回复」
   —— 原「快捷入口」的 排行榜 / 找会员 / 逛板块 与左栏「浏览」「板块」完全重复，
      一个侧栏里出现两次同样的入口是排版冗余。
      现在第三块改成「最新回复」（左栏没有的信息），样式沿用 rail-link-top。
      模板改动见 includes/footer.php，此处的规则只负责它的视觉。
   -------------------------------------------------------------------------- */
.pc-rail .rail-card:last-child .rail-top-title{
  font-weight: 500;
  color: var(--g7);
}
.pc-rail .rail-card:last-child .rail-link-top:hover .rail-top-title{ color: var(--red); }
.pc-rail .rail-card:last-child .rail-top-views{
  font-size: 11px;
  color: var(--g9);
}
/* 最新回复的序号方块没有意义（不是榜单），去掉计数器 */
.pc-rail .rail-card:last-child .rail-link-top::before{ content: none; }
/* 43.7 把「右栏最后一张卡」设成了 2 列网格（原本是给快捷入口的短按钮用）。
   现在最后一张卡换成「最新回复」，两行标题在 138px 的格子里会溢出重叠，
   必须把网格还原成竖排列表。 */
.pc-rail .rail-card:last-child{
  display: block;
  padding: 0;
}
.pc-rail .rail-card:last-child h4{
  padding: 0 18px;
  margin: 14px 0 4px;
}
.pc-rail .rail-card:last-child .rail-link-top{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  height: auto;
  margin: 0 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 0;
  text-align: left;
}
.pc-rail .rail-card:last-child .rail-link-top:hover{
  background: var(--f7);
}
.pc-rail .rail-empty{
  padding: 12px 10px;
  font-size: 12.5px;
  color: var(--g9);
}
/* --------------------------------------------------------------------------
   44.4 右栏「本周热门」：序号化 + 标题两行截断
   —— 43 节是一行省略，长标题被截成「新人必看…」看不出内容
      改两行截断后，13px 字号下能多容纳约 12 个字
   -------------------------------------------------------------------------- */
.pc-rail .rail-link-top{
  align-items: flex-start;
  gap: 8px;
  /* 收紧上下内边距：6 条 × 79px 会把右栏顶出可视区，
     压到 68px 后 6 条共 408px，配合下方两张卡正好收在 772 内 */
  padding-top: 6px;
  padding-bottom: 6px;
}
/* 标题两行截断。
   坑：.rail-link-top 是 flex-direction:column，-webkit-box 作为 flex 子项时
   高度会被压成 0（实测只剩 6px）。必须显式给 flex 基准与 min-height，
   否则文字看起来「消失」。 */
.pc-rail .rail-link-top .rail-top-title{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  line-height: 1.42;
  width: 100%;
  /* 2 行 × 1.42 × 13px ≈ 37px，兜底防止 flex 压缩 */
  min-height: calc(13px * 1.42 * 2);
  flex: 0 0 auto;
  align-self: stretch;
}
/* 用计数器给热门条目加序号，不改 DOM */
.pc-rail .rail-card:first-child{ counter-reset: hotno; }
.pc-rail .rail-card:first-child .rail-link-top{ counter-increment: hotno; position: relative; padding-left: 30px; }
.pc-rail .rail-card:first-child .rail-link-top::before{
  content: counter(hotno);
  position: absolute; left: 8px; top: 8px;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; line-height: 1;
  color: var(--g9);
  background: var(--f7);
  border-radius: 4px;
}
/* 前三名用品牌色强调，形成「榜单」的视觉层级 */
.pc-rail .rail-card:first-child .rail-link-top:nth-of-type(1)::before{ background: var(--red); color: #fff; }
.pc-rail .rail-card:first-child .rail-link-top:nth-of-type(2)::before{ background: rgba(var(--red-rgb), .55); color: #fff; }
.pc-rail .rail-card:first-child .rail-link-top:nth-of-type(3)::before{ background: rgba(var(--red-rgb), .28); color: #fff; }
html[data-theme="dark"] .pc-rail .rail-card:first-child .rail-link-top::before,
/* --------------------------------------------------------------------------
   44.5 左栏：分组间距收紧 + 选中项左侧指示条
   —— 43 节 h4 上下 18px 留白，8 个板块 + 5 个浏览 + 2 个账号叠起来
      左栏比右栏高出 46px，收紧后两栏高度接近，视觉更稳
   -------------------------------------------------------------------------- */
.pc-sidebar .rail-card h4{ margin: 12px 0 3px; }
.pc-sidebar .rail-card:first-child h4{ margin-top: 0; }
.pc-sidebar .rail-link:not(.rail-link-top){
  height: 32px;
  position: relative;
}
/* 选中项左侧 2px 竖条，比整块浅底更轻，且不与右栏网格块冲突 */
.pc-sidebar .rail-link.is-active::before{
  content: "";
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 15px;
  border-radius: 2px;
  background: var(--red);
}
/* 选中项浅底只在左栏做，右栏网格块保持 43 的样子 */
.pc-sidebar .rail-link.is-active{ background: rgba(var(--red-rgb), .07); }
/* --------------------------------------------------------------------------
   44.6 中等宽度：左栏收窄而不是直接隐藏
   —— 43 的窄屏回退是 820 一刀切到单列，821~1200 之间左栏 180 + 右 280
      仍然挤压中栏；这里让 1081~1360 先只收右栏，中栏能多拿 320px
   -------------------------------------------------------------------------- */
@media (max-width: 1360px) and (min-width: 1081px){
  .pc-shell{ grid-template-columns: 200px minmax(0, 1fr); }
  .pc-rail{ display: none; }
  /* 右栏隐藏后，页面自带的 .layout > aside 仍保留（帖子页/个人页需要） */
}
@media (max-width: 1080px) and (min-width: 821px){
  /* 左栏也收，正文独占；但页内两栏页仍保留自己的右栏 */
  .pc-shell, .pc-shell.is-narrow{ grid-template-columns: minmax(0, 1fr); }
  .pc-sidebar{ display: none; }
  .layout:has(> aside){ grid-template-columns: minmax(0, 1fr) 280px; }
}
/* ==========================================================================
   45. AI 私聊：打字机与等待态（2026-10-29 阶段5 流式改造）
   --------------------------------------------------------------------------
   线上前置网关（kangle）会把不足 64KB 的响应整体缓冲到脚本结束才下发，
   实测 SSE 到不了浏览器，所以打字机效果放在前端做增量渲染。
   这里只补渲染所需的样式，不改动任何已有气泡规则。
   ========================================================================== */
/* 45.1 等待 AI 回复时的三个点 */
.bubble.is-typing{ display:inline-flex; align-items:center; gap:4px; min-width:52px; min-height:22px; }
.typing-dots{ display:inline-flex; align-items:center; gap:4px; }
.typing-dots i{
  width:6px; height:6px; border-radius:50%;
  background:var(--g9); opacity:.35;
  animation:typingBounce 1.2s infinite ease-in-out;
}
.typing-dots i:nth-child(2){ animation-delay:.18s; }
.typing-dots i:nth-child(3){ animation-delay:.36s; }
@keyframes typingBounce{
  0%, 60%, 100%{ transform:translateY(0); opacity:.35; }
  30%{ transform:translateY(-4px); opacity:.85; }
}
/* 45.2 打字过程中的光标：跟在最后一个字后面闪 */
.bubble.is-typing-out::after{
  content:"";
  display:inline-block;
  width:2px; height:1em;
  margin-left:2px;
  vertical-align:-2px;
  background:currentColor;
  opacity:.75;
  animation:caretBlink .9s steps(1) infinite;
}
@keyframes caretBlink{ 0%,49%{ opacity:.75; } 50%,100%{ opacity:0; } }
/* 45.3 失败提示：弱化处理，不抢视觉 */
.bubble.is-error{ color:var(--g9); font-size:13px; }
/* 45.4 减少动效偏好：直接出全文，不做动画 */
@media (prefers-reduced-motion: reduce){
  .typing-dots i{ animation:none; opacity:.6; }
  .bubble.is-typing-out::after{ animation:none; }
}
/* ==========================================================================
   46. 个人主页信息区重构（.profile-page 作用域）
   --------------------------------------------------------------------------
   设计要点：
     - 全部规则以 .profile-page 为根，不外泄、不覆盖任何已有的 .profile-* 规则；
     - 三端差异只靠媒体查询，HTML 结构完全一致（PC / 移动 / APP WebView 共用一套）；
     - 头像用独立负边距压过封面边界，与 .profile-wrap 的整体 -44px 上移叠加，
       形成「卡片上移 + 头像再突出」的层次感。
   ========================================================================== */
/* 46.1 PC 端容器宽度：跟随 38 节骨架（is-narrow 两栏），不再单独收窄到 800px。
   原先的 :has() 收窄与 38 节骨架叠加，宽屏下产生「侧栏-空洞-内容-大空白」的三层错位
   （2026-11-05 修复：浏览器实测对照确认，观感与首页骨架一致）。 */
/* 46.2 顶部安全区：仅移动端加，避免 PC 端多出空白 */
@media (max-width: 820px) {
  .profile-page { padding-top: calc(4px + env(safe-area-inset-top)); }
}
/* 46.3 头部容器：头像列 + 信息列 + 操作列 */
.profile-page .pf-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}
/* 46.4 头像：负边距压过封面 */
/* 46.4a 头像突出依赖负边距越过卡片顶边，而 .card 基类自带 overflow:hidden（圆角裁剪），
   会把突出部分裁掉 —— 表现为「头像被卡片遮挡」。此处放行溢出（作用域限本页），
   卡片圆角由 border-radius + backdrop-filter 自身保证（2026-11-05）。 */
.profile-page .profile-card{ overflow:visible; }
.profile-page .pf-avatar-col {
  flex-shrink: 0;
  margin-top: -30px;
  position: relative;
  z-index: 2;
}
.profile-page .pf-avatar-col .avatar-ring { padding: 3px; }
.profile-page .pf-avatar-col .avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
/* 46.5 信息列 */
.profile-page .pf-info { flex: 1; min-width: 0; }
/* 46.6 行 1：昵称 + 徽章 + 编辑按钮 */
.profile-page .pf-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-page .pf-name {
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
  min-width: 0;
}
.profile-page .pf-name-text { word-break: break-word; }
.profile-page .pf-name-row .pf-btn { margin-left: auto; flex-shrink: 0; }
/* 46.7 行 2：等级标签 + 等级名 */
.profile-page .pf-level-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}
.profile-page .pf-level-name {
  font-size: 12.5px;
  color: var(--g9);
  font-weight: 500;
}
/* 46.8 行 3：元信息（12px，允许折行，分隔符不单独落行首） */
.profile-page .pf-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--g9);
}
.profile-page .pf-meta-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.profile-page .pf-meta-dot { color: var(--g9); opacity: .55; }
.profile-page .pf-meta-strong {
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--brand, #4d91ff);
}
/* 46.9 性别 / 简介 */
.profile-page .pf-gender {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--g9);
}
.profile-page .pf-bio {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  word-break: break-word;
}
/* 46.10 签名：保持在进度条上方 */
.profile-page .pf-signature {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--g6);
  word-break: break-word;
}
/* 46.11 进度条 */
.profile-page .pf-progress { margin-top: 12px; }
.profile-page .pf-progress-hint { margin-top: 5px; }
/* 46.12 操作按钮组 */
.profile-page .pf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  flex-shrink: 0;
}
.profile-page .pf-inline-form { display: inline; margin: 0; }
/* 46.13 统一按钮样式（pf-btn）：与站点 btn 视觉一致，但尺寸更紧凑 */
.profile-page .pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-md, 10px);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.profile-page .pf-btn-md { height: 38px; padding: 0 16px; font-size: 13.5px; }
.profile-page .pf-btn-icononly { width: 32px; padding: 0; }
.profile-page .pf-btn svg { flex-shrink: 0; }
.profile-page .pf-btn-primary {
  background: var(--brand, #4d91ff);
  color: #fff;
  border-color: var(--brand, #4d91ff);
}
.profile-page .pf-btn-ghost {
  background: rgba(24, 24, 27, .05);
  color: var(--g6);
  border-color: transparent;
}
.profile-page .pf-btn-danger {
  background: rgba(var(--red-rgb, 239, 68, 68), .1);
  color: var(--red, #ef4444);
}
.profile-page .pf-btn.is-static { cursor: default; opacity: .7; }
@media (hover: hover) and (pointer: fine) {
  .profile-page .pf-btn-primary:hover { filter: brightness(1.06); }
  .profile-page .pf-btn-ghost:hover { background: rgba(24, 24, 27, .09); color: var(--g7); }
  .profile-page .pf-btn-danger:hover { background: rgba(var(--red-rgb, 239, 68, 68), .16); }
}
html[data-theme="dark"] .profile-page .pf-btn-ghost,
html[data-theme="dark"] .profile-page .pf-btn-ghost:hover,
/* 46.14 移动端：头像略小、按钮组换行到下方并占满 */
@media (max-width: 820px) {
  .profile-page .pf-head { gap: 12px; }
  .profile-page .pf-avatar-col { margin-top: -26px; }
  .profile-page .pf-avatar-col .avatar { width: 76px; height: 76px; }
  .profile-page .pf-name { font-size: 17.5px; }
  .profile-page .pf-name-row .pf-btn { margin-left: auto; }
  .profile-page .pf-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 2px;
    gap: 7px;
  }
  .profile-page .pf-actions .pf-btn { flex: 1 1 0; min-width: 0; }
  .profile-page .pf-actions .pf-inline-form { flex: 1 1 0; display: flex; }
  .profile-page .pf-actions .pf-inline-form .pf-btn { width: 100%; }
}
/* 46.15 超窄屏（≤360）：元信息字号再收一档，避免三段挤成三行 */
@media (max-width: 360px) {
  .profile-page .pf-meta { font-size: 11.5px; gap: 5px; }
  .profile-page .pf-avatar-col .avatar { width: 68px; height: 68px; }
}
/* --------------------------------------------------------------------------
   47. 首页帖子列表排版切换：卡片版 / 紧凑版（后台「首页展示」三端分别设置）
   容器：<div class="post-list is-card"> 或 <div class="post-list is-compact">
   实现要点：紧凑卡的主行（头像/昵称/标题/缩略图）走 flex-wrap 自适应；
   摘要与统计放在主行之后各自整行，靠 max-width 限制宽度 + margin:auto 对齐，
   这样摘要永远不会被压成一条省略号，窄屏时也只会换行不会重叠。
     宽屏（≥821）：头像 昵称 标题 摘要 缩略图 —— 同一行；统计整行
     中屏（≤820）：头像 标题 缩略图 —— 第一行；摘要 统计 —— 第二行
     窄屏（≤360）：头像 标题 缩略图 —— 第一行；摘要 —— 第二行；统计 —— 第三行
   -------------------------------------------------------------------------- */
/* ===== 47.1 紧凑模式基础结构 ===== */
.post-list.is-compact{ gap:8px; }
.post-list.is-compact .post-card{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px 10px;
  padding:11px 14px;
  border-radius:var(--r-lg);
}
/* 头像：左置，尺寸收小；等级光晕在紧凑行里去掉避免外溢 */
.post-list.is-compact .post-card-head{
  flex:0 0 auto;
  gap:7px;
  min-width:0;
}
.post-list.is-compact .post-card-head .avatar{ width:32px; height:32px; border-radius:9px; flex:none; }
.post-list.is-compact .post-card-head .avatar-lv-1,
.post-list.is-compact .post-card-head .avatar-lv-2,
.post-list.is-compact .post-card-head .avatar-lv-3,
.post-list.is-compact .post-card-head .avatar-lv-4,
.post-list.is-compact .post-card-head .avatar-lv-5,
.post-list.is-compact .post-card-head .avatar-lv-6,
.post-list.is-compact .post-card-head .avatar-lv-7,
.post-list.is-compact .post-card-head .avatar-lv-8{ box-shadow:none !important; }
/* 昵称：跟在头像后，紧凑行里自然显示（不裁切），身份徽章紧随其后。
   之前 max-width:96px + overflow:hidden 会把昵称右边的 VIP/等级徽章裁掉，
   再用 display:none 把徽章彻底藏掉 —— 「紧凑就丢身份」的根源。
   紧凑行是 flex-wrap 布局，昵称 + 徽章占一行自然宽度即可，无需硬裁。 */
.post-list.is-compact .post-card-id .nickname{
  font-size:12.5px;
  max-width:none;
  flex-wrap:nowrap;
  white-space:nowrap;
}
/* 身份徽章（VIP/等级）在紧凑行里保留 */
.post-list.is-compact .post-card-id .vip-badge{ display:inline-flex; }
.post-list.is-compact .post-card-id .level-icon{ display:inline-flex; }
.post-list.is-compact .post-card-id .meta{ display:none; }
/* 标题：单行省略，吃满剩余宽度；空间不够时自动换到下一行 */
.post-list.is-compact .post-title{
  flex:1 1 150px;
  min-width:0;
  margin:0;
  font-size:14.5px;
  font-weight:600;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
/* 单图 / 多图缩略图：贴最右侧，只保留第一张 */
.post-list.is-compact .post-excerpt-img{
  flex:0 0 54px;
  order:9;
  width:54px;
  height:54px;
  margin:0;
  max-height:none;
  border-radius:10px;
  object-fit:cover;
}
.post-list.is-compact .topic-thumbs{ flex:0 0 auto; order:9; margin:0; gap:4px; }
.post-list.is-compact .topic-thumb{ width:54px; height:54px; flex:none; border-radius:10px; }
.post-list.is-compact .topic-thumbs .topic-thumb:nth-child(n+2){ display:none; }
/* 摘要：整行，单行省略，靠左对齐。
   必须重置 display —— 基础规则 .clamp-3 是 -webkit-box，
   不重置的话 white-space:nowrap 不生效，文本会换行而不是省略 */
.post-list.is-compact .post-content{
  display:block;
  flex:0 1 auto;
  order:8;
  width:auto;
  max-width:100%;
  min-width:0;
  margin:3px 0 0;
  text-align:left;
  font-size:12.5px;
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--g9);
}
/* 底部：整行收尾，只保留统计，去掉分类标签与分割线 */
.post-list.is-compact .post-foot{
  flex:0 0 100%;
  order:11;
  align-items:center;
  gap:6px;
  margin:2px 0 0;
  padding:0;
  border-top:none;
}
.post-list.is-compact .post-foot .foot-left{ display:none; }
.post-list.is-compact .post-foot .foot-right{ margin-left:0; gap:12px; font-size:11.5px; }
.post-list.is-compact .post-foot .foot-icon{ font-size:11.5px; gap:3px; }
.post-list.is-compact .post-foot .foot-icon svg{ width:12px; height:12px; }
/* 置顶/推荐/精华标记：作为第一行的首个元素参与排布（order:-1），
   不再用 position:absolute 悬浮。
   原来写的是 left:14px + top:-7px，标记会被顶出卡片上边缘 5~6px，
   并且压到头像上（标记底边 314px / 头像顶边 313px 实测重叠），
   三端（PC / 手机 / 超窄）都能复现。改成正常流后随 flex-wrap 自然换行。 */
.post-list.is-compact .post-mark-stack{
  position:static;
  order:-1;
  flex:0 0 auto;
  gap:3px;
  margin:0;
}
.post-list.is-compact .post-mark{ font-size:9.5px; padding:1px 6px; }
.post-list.is-compact .post-tags{ display:none; }
/* ===== 47.2 移动端紧凑模式（≤820）：头像 标题 缩略图 同行，摘要与统计同行 ===== */
@media (max-width:820px){
  .post-list.is-compact{ gap:8px; }
  .post-list.is-compact .post-card{
    gap:4px 9px;
    padding:10px 12px;
    border-radius:14px;
  }
  /* 身份徽章不丢：移动端紧凑行保留「头像 + 昵称 + VIP/等级徽章」，
     只隐藏时间 meta。昵称不硬裁（自然宽度），徽章紧随其后不被裁掉。 */
  .post-list.is-compact .post-card-id{ display:flex; }
  .post-list.is-compact .post-card-id .nickname{
    font-size:12px;
    max-width:none;
    white-space:nowrap;
  }
  .post-list.is-compact .post-card-id .meta{ display:none; }
  .post-list.is-compact .post-card-head{ flex:0 0 auto; }
  .post-list.is-compact .post-card-head .avatar{ width:30px; height:30px; border-radius:8px; }
  /* 标题与缩略图在同一行：标题可收缩，缩略图固定 */
  .post-list.is-compact .post-title{ flex:1 1 110px; font-size:14px; }
  .post-list.is-compact .post-excerpt-img{ width:46px; height:46px; flex:0 0 46px; }
  .post-list.is-compact .topic-thumb{ width:46px; height:46px; }
  /* 摘要与统计同一行：摘要靠左占剩余，统计靠右 */
  .post-list.is-compact .post-content{ flex:1 1 auto; margin:6px 0 0; font-size:12px; }
  .post-list.is-compact .post-foot{ flex:0 0 auto; margin:6px 0 0; }
  .post-list.is-compact .post-foot .foot-right{ gap:10px; font-size:11px; }
  /* 移动端标记同属第一行，字号再收一档（原来在这里改 left/top 覆盖绝对定位，已改回正常流） */
  .post-list.is-compact .post-mark{ font-size:9px; padding:1px 5px; }
}
/* ===== 47.3 超窄屏（≤360）：字号再收一档，布局同上 ===== */
@media (max-width:360px){
  .post-list.is-compact .post-card{ padding:9px 10px; }
  .post-list.is-compact .post-title{ font-size:13.5px; }
  .post-list.is-compact .post-content{ font-size:11.5px; }
  .post-list.is-compact .post-excerpt-img{ width:42px; height:42px; flex:0 0 42px; }
  .post-list.is-compact .topic-thumb{ width:42px; height:42px; }
  .post-list.is-compact .post-foot .foot-right{ gap:8px; font-size:10.5px; }
  /* 超窄屏：标记独占一行。
     320px 下「置顶 推荐 精华」三个标记得占 ~90px，挤在第一行会把标题压到
     只剩 42% 宽度（实测「关于系统后续开发方向投票」被截断），
     不如让标记整行前置，标题拿回完整宽度。 */
  .post-list.is-compact .post-mark-stack{ flex:0 0 100%; margin-bottom:2px; }
}
/* ===== 47.4 紧凑模式下不出现 hover 位移（每行很矮，位移会晃） ===== */
@media (hover:hover) and (pointer:fine){
  .post-list.is-compact .post-card:hover{ transform:none; box-shadow:var(--sh-2); }
  .post-list.is-compact .post-card:active{ transform:scale(.99); }
}
/* --------------------------------------------------------------------------
   41. 软键盘适配
   键盘高度由 app.js 写入 --kb（见 visualViewport 监听）。
   iOS Safari / 微信内置浏览器弹出键盘时不压缩布局视口，而是直接盖在页面上，
   所以 fixed 定位的回复条和 100dvh 定高的聊天壳要自己抬高/收缩。
   Android Chrome 会压缩视口，此时 --kb 为 0，不会重复补偿。
   -------------------------------------------------------------------------- */
html[data-kb] .fixed-reply-bar{ bottom:calc(var(--kb, 0px) + 6px); }
/* 聊天壳按「真实可视高度」收缩：直接用 dvh 减键盘高度会被 min-height 卡住，
   键盘很高时仍有一部分被盖住，所以改用 JS 提供的可视高度 --vvh */
html[data-kb] .card.chat-shell{ height:calc(var(--vvh, 100dvh) - 185px); min-height:200px; }
html[data-kb] .toast{ bottom:calc(var(--kb, 0px) + 12px); }
/* --------------------------------------------------------------------------
   42.11 图片上传进度条（发帖 / 换头像 / 私信附件共用）
   -------------------------------------------------------------------------- */
.forum-upload-progress{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  z-index:9999;
  width:min(340px,88vw);
  height:26px;
  background:rgba(15,20,32,.82);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  backdrop-filter:blur(8px);
  color:#fff;
  font-size:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}
.forum-upload-progress-bar{
  width:0%;
  height:10px;
  background:linear-gradient(90deg,var(--brand,#1677ff),#ec4899);
  border-radius:999px;
  transition:width .25s ease;
}
.forum-upload-progress-text{
  font-variant-numeric:tabular-nums;
  color:#cfd8e6;
}
/* --------------------------------------------------------------------------
   43. 首次进入渐入（同一会话只播一次）
   --------------------------------------------------------------------------
   html.first-enter 由 includes/header.php 的内联脚本在 <head> 阶段打上：
   sessionStorage 里没有 forum-entered 时添加并写标记，之后的站内跳转不再播放。
   注意两点：
   1) body 只做透明度，不做 transform —— transform 会改变 fixed 元素
      （toast / 抽屉 / 弹窗）的包含块，动画那零点几秒里它们会错位；
   2) 顶栏的「下落入场」作用在 .topbar 自身（sticky 元素自带 transform
      不影响吸顶），和 body 的渐入叠加出层次感。
   -------------------------------------------------------------------------- */
@keyframes pageEnter{
  from{ opacity:0; }
  to{ opacity:1; }
}
@keyframes topbarEnter{
  from{ opacity:0; transform:translateY(-10px); }
  to{ opacity:1; transform:none; }
}
html.first-enter body{
  animation:pageEnter .8s ease both;
}
html.first-enter .topbar{
  animation:topbarEnter .95s cubic-bezier(.22,.61,.36,1) both;
}
@media (prefers-reduced-motion: reduce){
  html.first-enter body,
  html.first-enter .topbar{ animation:none; }
}
/* --------------------------------------------------------------------------
   48. Markdown 表格（GFM）：v1.1.33 起解析器支持表格语法
   外层容器负责窄屏横向滚动，表格本体不出圈；暗色同步。
   -------------------------------------------------------------------------- */
.md-table-wrap{ overflow-x:auto; margin:14px 0; border:1px solid var(--line); border-radius:var(--r-md); -webkit-overflow-scrolling:touch; }
.md-table-wrap table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.md-table-wrap th, .md-table-wrap td{ padding:9px 12px; border-bottom:1px solid var(--line); text-align:left; }
.md-table-wrap thead th{ background:var(--f7); font-weight:600; white-space:nowrap; }
.md-table-wrap tbody tr:last-child td{ border-bottom:0; }
html[data-theme="dark"] .md-table-wrap thead th{ background:rgba(255,255,255,.05); }
/* --------------------------------------------------------------------------
   49. 电脑端左导航重排（v1.1.35）：发帖 CTA 置顶 + 图标 + 徽章 + 签到状态
       + 「我的」低频项收纳 + 管理后台沉底 + active 左缘指示条
   全部规则以 .pc-sidebar 为根，不外泄；移动端不受影响（pc-sidebar 仅桌面渲染）。
   -------------------------------------------------------------------------- */
.pc-sidebar .rail-link{ position:relative; gap:9px; }
.pc-sidebar .rail-link .ico{ flex-shrink:0; opacity:.72; }
.pc-sidebar .rail-link:hover .ico{ opacity:1; }
/* 发帖主按钮：全站第一转化动作 */
.pc-cta{ display:flex; align-items:center; justify-content:center; gap:8px;
  height:40px; margin:2px 8px 4px; border-radius:12px;
  background:var(--red); color:#fff; font-weight:700; font-size:14px;
  box-shadow:0 4px 14px -6px rgba(var(--red-rgb),.55);
  transition:transform .15s var(--ease), box-shadow .15s ease; }
.pc-cta:hover{ transform:translateY(-1px); box-shadow:0 8px 20px -8px rgba(var(--red-rgb),.6); color:#fff; }
.pc-cta:active{ transform:scale(.98); }
/* active 态：左缘指示条 + 品牌底 */
.pc-sidebar .rail-link.is-active{ background:rgba(var(--red-rgb),.09); color:var(--red); font-weight:600; }
.pc-sidebar .rail-link.is-active .ico{ opacity:1; }
.pc-sidebar .rail-link.is-active::before{
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:3px; height:16px; border-radius:0 3px 3px 0; background:var(--red);
}
/* 签到状态文案（未签到橙色提醒 / 已签灰绿） */
.pc-sidebar .rail-side{ margin-left:auto; font-size:11px; color:var(--g6); flex-shrink:0; }
.pc-sidebar .rail-side.is-todo{ color:#f59e0b; font-weight:700; }
/* 「更多」收纳开关 */
.pc-sidebar .rail-more{ display:flex; align-items:center; gap:6px; width:calc(100% - 16px);
  margin:2px 8px; padding:0 10px; height:34px; border:0; border-radius:var(--r-sm);
  background:transparent; color:var(--g7); font-size:12.5px; cursor:pointer;
  transition:background .15s ease; }
.pc-sidebar .rail-more:hover{ background:var(--f7); }
.pc-sidebar .rail-more-arrow{ width:7px; height:7px; margin-left:auto;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px); transition:transform .2s var(--ease); }
.pc-sidebar .rail-more.is-open .rail-more-arrow{ transform:rotate(225deg) translateY(-1px); }
.pc-sidebar .rail-extra[hidden]{ display:none; }
/* 管理后台沉底：弱化的次级入口 */
.pc-sidebar .rail-admin{ margin-top:12px; padding-top:0;
  border-top:1px dashed var(--line2); border-radius:0 0 var(--r-sm) var(--r-sm);
  padding-top:10px; opacity:.72; }
.pc-sidebar .rail-admin:hover{ opacity:1; }
/* 组间呼吸感 */
.pc-sidebar .rail-card + .rail-card{ margin-top:10px; }
/* --------------------------------------------------------------------------
   50. 右侧栏重构 v2（v1.1.36）：卡片皮肤回归 + 奖牌热门 + 头像回复
       + 官方公告卡 + 最新成员卡；与左导航（49 节）视觉对称。
   全部规则以 .pc-rail 为根，不外泄；43.x 的旧覆盖按需在此收口。
   -------------------------------------------------------------------------- */
/* 注意：不要在这里重设 display —— 44.6 节在 1081~1360px 用 display:none 隐藏右栏，
   而本节位置更靠后、同优先级（0,1,0），一旦写 display:flex 就会把隐藏规则顶掉，
   右栏会换行挤到左栏下方（1280 常见笔记本宽度实测错位）。display 统一由 618 行提供。 */
.pc-rail{ flex-direction:column; gap:14px; }
.pc-rail .rail-card{
  background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg);
  box-shadow:var(--sh-2); padding:12px 10px;
}
.pc-rail .rail-card h4{ display:flex; align-items:center; gap:6px;
  font-size:12px; font-weight:700; color:var(--g9); letter-spacing:.6px;
  margin:2px 6px 8px; }
.pc-rail .rail-card h4 .ico{ color:var(--red); }
/* 热门条目：奖牌 + 标题两行 + meta 行（浏览/评论），紧凑无孤儿数字 */
.pc-rail .rail-link{ display:flex; flex-direction:column; align-items:stretch; gap:4px;
  height:auto; margin:0 4px; padding:8px 8px; border-radius:var(--r-sm); }
.pc-rail .rail-link:hover{ background:var(--f7); }
.pc-rail .rail-top-row{ display:flex; align-items:flex-start; gap:7px; }
.pc-rail .rail-medal{ flex-shrink:0; min-width:18px; height:18px; padding:0 4px;
  border-radius:6px; background:var(--f0); color:var(--g7);
  font-size:11px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; }
.pc-rail .rail-medal.is-top1{ background:linear-gradient(135deg,#ffd76e,#f5a524); color:#7c4a03; }
.pc-rail .rail-medal.is-top2{ background:linear-gradient(135deg,#e8edf5,#c3cddc); color:#4b5563; }
.pc-rail .rail-medal.is-top3{ background:linear-gradient(135deg,#f3c49f,#d99a6c); color:#6b3f1d; }
.pc-rail .rail-top-title{ font-size:13px; font-weight:600; color:var(--ink);
  line-height:1.45; width:100%;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pc-rail .rail-top-meta{ display:flex; gap:12px; padding-left:25px;
  font-size:11px; color:var(--g6); }
.pc-rail .rail-top-meta .ico{ vertical-align:-2px; opacity:.7; }
/* 最新回复：头像行 */
.pc-rail .rail-reply{ flex-direction:row; align-items:flex-start; gap:8px; }
.pc-rail .rail-avatar{ flex-shrink:0; width:32px; height:32px; border-radius:50%; object-fit:cover; }
.pc-rail .rail-reply .rail-top-row{ min-width:0; }
/* 官方公告卡：品牌渐变细边突出「官方」属性 */
.pc-rail .rail-announce{
  border:1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, rgba(var(--red-rgb),.55), rgba(236,72,153,.45) 55%, rgba(168,85,247,.45)) border-box;
}
.pc-rail .rail-announce h4{ color:var(--red); }
.pc-rail .rail-announce-text{ font-size:12.5px; line-height:1.6; color:var(--ink);
  padding:2px 6px 4px;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
/* 今日新帖 */
.pc-rail .rail-today{ margin:8px 6px 0; padding-top:8px; border-top:1px dashed var(--line2);
  font-size:11.5px; color:var(--g7); text-align:center; }
.pc-rail .rail-today strong{ color:var(--red); }
/* 最新成员行 */
.pc-rail .rail-members{ display:flex; flex-direction:column; }
.pc-rail .rail-member{ display:flex; align-items:center; gap:9px;
  padding:6px 8px; border-radius:var(--r-sm); transition:background .15s ease; }
.pc-rail .rail-member:hover{ background:var(--f7); }
.pc-rail .rail-member .rail-avatar{ width:28px; height:28px; }
.pc-rail .rail-member-info{ display:flex; flex-direction:column; min-width:0; }
.pc-rail .rail-member-name{ font-size:12.5px; font-weight:600; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pc-rail .rail-member-time{ font-size:10.5px; color:var(--g6); }
/* --------------------------------------------------------------------------
   51. 个人主页封面分级 + scrim + 移动端遮挡减半（v1.1.36）
   -------------------------------------------------------------------------- */
.cover{ height:200px; }
@media (max-width:820px){
  .cover{ height:150px; }
  .profile-page .profile-wrap, .profile-wrap{ margin-top:-16px; }
  .profile-page .pf-avatar-col{ margin-top:-22px; }
}
/* 自定义封面图底部 scrim：资料卡压上来处白化过渡，图与卡片边界不再生硬 */
.cover.has-cover::after{
  content:''; position:absolute; inset:auto 0 0 0; height:56px; pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(255,255,255,.85));
}
html[data-theme="dark"] .cover.has-cover::after{
  background:linear-gradient(180deg, transparent, rgba(24,24,27,.82));
}
/* 51.x 个人主页统计卡：数字同步品牌色（跟随 --brand，暗色自动适配），
   悬停微反馈与全站卡片语言一致（2026-11-05）。 */
.profile-page .stat-card .stat-num{ color:var(--red); }
.profile-page .stat-card{ transition:transform .15s var(--ease), border-color .15s ease, box-shadow .15s ease; }
.profile-page .stat-card:hover{ transform:translateY(-1px); border-color:rgba(var(--red-rgb),.28);
  box-shadow:0 6px 16px -10px rgba(var(--red-rgb),.35); }
/* 51.x 续：统计卡底色改白色（var(--card)，与全站卡片一致；暗色自动适配） */
.profile-page .stat-card{ background:var(--card); }
/* 51.x 续：消息页标题区仅桌面显示（移动端取消「我的私信/未读」标题区，
   页面直接以分类 tab 开始——2026-11-05 用户反馈） */
@media (max-width:820px){
  .page-title-flush{ display:none; }
}
/* --------------------------------------------------------------------------
   52. 用户中心面板族（v1.1.40）：原样式被误置于后台 ref.css（前台不加载），
       ucenter 页面长期裸奔无样式 —— 现移植至前台并升级为品牌化版本。
   -------------------------------------------------------------------------- */
.profile-panel{
  padding:16px; border:1px solid var(--card-line); border-radius:var(--r-lg);
  background:var(--card);
  box-shadow:var(--sh-2);
}
.profile-panel .avatar-wrap{
  width:88px; height:88px; padding:3px; border-radius:50%;
  background:linear-gradient(135deg, #1677ff, #9d5cff 55%, #ff5c8a);
  display:inline-block; position:relative; flex-shrink:0;
}
.profile-panel .avatar-wrap .avatar{
  width:100%; height:100%; border:3px solid #fff; border-radius:50%;
  display:block; object-fit:cover; box-sizing:border-box;
}
html[data-theme="dark"] .profile-panel .avatar-wrap .avatar{ border-color:var(--card); }
.profile-panel .cert-avatar-badge{ width:19px; height:19px; font-size:10px; line-height:17px; }
.profile-panel .nickname{ font-size:16px; font-weight:900; color:var(--ink); }
.profile-panel .uid{
  display:inline-block; padding:0 6px; border-radius:999px;
  background:var(--f0); font-size:11px; font-weight:800; color:var(--g7);
}
.profile-panel .tag-line{
  display:inline-block; padding:2px 8px; border-radius:999px;
  background:var(--f0); font-size:10.5px; color:var(--g7);
}
.profile-panel .tag-line.is-dot{
  background:rgba(var(--red-rgb),.1); color:var(--red); font-weight:700;
}
.profile-panel .signature{ font-size:12px; color:var(--g6); }
.profile-panel .stats-card .stat-num{ color:var(--red); }
/* 50.x 续：右侧栏仅电脑版显示——手机版与 App（同一套 CSS）整栏隐藏，
   不论任何页面与未来的新增卡片（2026-11-05 用户要求） */
@media (max-width:820px){
  .pc-rail{ display:none !important; }
}
/* 50.x 续：回到顶部悬浮钮（v1.1.45，app.js 注入 .back-top） */
.back-top{
  position:fixed; right:18px; bottom:calc(96px + env(safe-area-inset-bottom));
  width:42px; height:42px; border-radius:50%; padding:0;
  background:var(--card); border:1px solid var(--card-line); box-shadow:var(--sh-2);
  color:var(--g7); display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:80;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s, color .15s ease, border-color .15s ease;
}
.back-top.show{ opacity:1; visibility:visible; transform:none; }
.back-top:hover{ color:var(--red); border-color:rgba(var(--red-rgb),.3); }
@media (min-width:821px){
  .back-top{ bottom:28px; }
}
html[data-fx~="click"] .back-top:active{ transform:scale(.92); }
/* ==========================================================================
   52. PWA 安装引导条（v1.1.47）
   职责：移动端底部浮动条，引导把站点安装到桌面；显隐由 app.js 控制。
   覆盖关系：无覆盖（新增组件，不重定义任何既有选择器）。
   注：assets/style.css 里还有一份旧版 .install-bar（类名与本节不同，且该文件
   只被 install.php / 后台 / 未授权页加载），互不影响。
   ========================================================================== */
.pwa-install-bar{
  position:fixed; left:50%; bottom:calc(64px + env(safe-area-inset-bottom));
  transform:translate(-50%,12px);
  width:calc(100% - 32px); max-width:420px;
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  background:var(--card); border:1px solid var(--card-line); border-radius:var(--r-lg);
  box-shadow:var(--sh-1);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  z-index:90;
  opacity:0; visibility:hidden;
  transition:opacity var(--fx-dur,.2s) ease, transform var(--fx-dur,.2s) ease, visibility var(--fx-dur,.2s);
}
.pwa-install-bar[hidden]{ display:none; }
.pwa-install-bar.show{ opacity:1; visibility:visible; transform:translate(-50%,0); }
.pwa-install-text{ flex:1; min-width:0; font-size:12.5px; line-height:1.45; color:var(--g7); }
.pwa-install-go{
  flex:none; padding:7px 16px; border:none; border-radius:var(--r-pill);
  background:var(--brand); color:#fff; font-size:13px; font-weight:600; cursor:pointer;
}
.pwa-install-go[hidden]{ display:none; }
.pwa-install-close{
  flex:none; width:26px; height:26px; border:none; border-radius:50%;
  background:transparent; color:var(--g9); font-size:18px; line-height:1; cursor:pointer;
}
.pwa-install-close:hover{ color:var(--g7); background:var(--f7); }
@media (min-width:821px){ .pwa-install-bar{ display:none; } }
html[data-fx~="click"] .pwa-install-go:active{ transform:scale(.94); }
/* ==========================================================================
   53. 实色材质覆盖（v1.1.54：品牌蓝 + 实色卡片）
   职责：把本文件各处仍在写死的半透白表面（rgba(255,255,255,.5~.7)）改成实色，
        并把随玻璃一起失效的"白色描边"换成真正的描边色。
   覆盖关系：本节覆盖第 3/5/17/19/23/26/34/35/49/50/52 节的相关声明。
        原因：玻璃拟态在浅底上边缘整条消失、暗色下发灰；经用户确认改实色。
        全部改用令牌（--card / --line），暗色模式自动跟随，不新增断点。
        注：--glass/--glass2 的实色化在 assets/variables.css 第 10 节统一处理。
   ========================================================================== */
.topbar-inner{ background:var(--card); border-color:var(--line); }
.user-menu-dropdown{ background:var(--card); border-color:var(--line); }
.share-menu{ background:var(--card); border-color:var(--line); }
.drawer-panel{ background:var(--card); border-right-color:var(--line); }
.side-stats > *{ background:var(--card); border-color:var(--line); }
.rail-stats > div{ background:var(--card); border-color:var(--line); }
.tabs{ background:var(--card); border-color:var(--line); }
.section-hero{ border-color:var(--line); }
.hero-pill{ background:var(--card); border-color:var(--line); }
.content-tabs{ background:var(--card); border-color:var(--line); }
.message-tabs{ background:var(--card); border-color:var(--line); }
.cover{ border-color:var(--line); }
.profile-card{ background:var(--card); }
.install-bar{ background:var(--card); border-color:var(--line); }
.search.open{ background:var(--card); border-color:var(--line); }
.mobile-tabbar{ background:var(--card); border-color:var(--line); }
.fixed-reply-bar{ background:var(--card); border-color:var(--line); }
/* 暗色同构：本文件多处暗色规则特异性更高（html[data-theme="dark"] .x = 0,2,0），
   必须一并用同特异性覆盖，否则暗色下又变回半透。 */
html[data-theme="dark"] .topbar-inner{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .user-menu-dropdown{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .share-menu{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .drawer-panel{ background:var(--card); border-right-color:var(--card-line); }
html[data-theme="dark"] .side-stats > *{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .rail-stats > div,
html[data-theme="dark"] .pc-rail .rail-stats > div{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .tabs{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .section-hero{ border-color:var(--card-line); }
html[data-theme="dark"] .hero-pill{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .content-tabs{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .message-tabs{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .cover{ border-color:var(--card-line); }
html[data-theme="dark"] .profile-card{ background:var(--card); }
html[data-theme="dark"] .install-bar{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .search.open{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .mobile-tabbar{ background:var(--card); border-color:var(--card-line); }
html[data-theme="dark"] .fixed-reply-bar{ background:var(--card); border-color:var(--card-line); }

/* ==========================================================================
   54. 空状态打磨（v1.1.64）
   职责：空状态（.empty）视觉升级——图标底改圆角方块（与全站卡片语言一致）、
   整体加淡入上移动画；错误提示沿用既有 .flash-* toast，不新增组件。
   覆盖关系：仅覆盖 .empty-icon 的圆角与内部图标尺寸，其余为增强。
   ========================================================================== */
.empty{ animation:empty-in .32s var(--ease) both; }
@keyframes empty-in{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
.empty-icon{ border-radius:20px; }
.empty-icon svg{ width:34px; height:34px; }
@media (prefers-reduced-motion: reduce){ .empty{ animation:none; } }

/* ==========================================================================
   55. 列表骨架屏（v1.1.64）
   职责：首页 tab 秒切时的加载占位（app.js 注入 .skel-list  .skel-card），
   微光扫过动画；reduced-motion 时静止。
   覆盖关系：无覆盖（新增组件）。
   ========================================================================== */
.skel-list{ background:var(--card); border:1px solid var(--card-line); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:12px; }
.skel-card{ height:118px; border-radius:12px; background:linear-gradient(100deg, rgba(24,24,27,.055) 40%, rgba(24,24,27,.11) 50%, rgba(24,24,27,.055) 60%); background-size:200% 100%; animation:skel-sweep 1.15s ease-in-out infinite; }
html[data-theme="dark"] .skel-card{ background:linear-gradient(100deg, rgba(255,255,255,.05) 40%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.05) 60%); background-size:200% 100%; }
@keyframes skel-sweep{ from{ background-position:200% 0; } to{ background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce){ .skel-card{ animation:none; } }

/* ==========================================================================
   56. 图片淡入 blur-up（v1.1.64）
   职责：图片加载完成前透明，load 后 0.28s 淡入（app.js 加 .blur-up / .blur-up-done）。
   覆盖关系：无覆盖（新增类）。
   ========================================================================== */
.blur-up{ opacity:0; transition:opacity .28s ease; }
.blur-up-done{ opacity:1; }
@media (prefers-reduced-motion: reduce){ .blur-up{ transition:none; } }

/* ==========================================================================
   57. 编辑历史（v1.1.65）
   职责：帖子页「编辑历史」卡片（.rev-item details 折叠，旧内容摘要展示）。
   覆盖关系：无覆盖（新增组件）。
   ========================================================================== */
.rev-item{ border:1px solid var(--card-line); border-radius:12px; padding:10px 12px; margin-bottom:8px; }
.rev-item summary{ cursor:pointer; font-size:13px; color:var(--g7); font-weight:600; list-style:none; }
.rev-item summary::-webkit-details-marker{ display:none; }
.rev-item summary::before{ content:"▸"; margin-right:6px; color:var(--g9); display:inline-block; transition:transform .15s; }
.rev-item[open] summary::before{ transform:rotate(90deg); }
.rev-body{ margin-top:8px; padding-top:8px; border-top:1px dashed var(--card-line); }
.rev-title{ font-size:13px; font-weight:700; color:var(--g7); margin-bottom:4px; }
.rev-content{ font-size:13px; color:var(--g6); white-space:pre-wrap; word-break:break-word; line-height:1.7; }
.rev-private{ font-size:12.5px; color:var(--g9); }
.tag-cloud-all{ margin-left:auto; font-size:12px; color:var(--g9); font-weight:600; flex-shrink:0; }
.tag-cloud-all:hover{ color:var(--red); }

/* ==========================================================================
   58. 成就徽章墙（v1.1.65）
   职责：用户中心「我的成就」卡片（.ach-grid 网格 + 已解锁高亮 + 进度条）。
   覆盖关系：无覆盖（新增组件）。
   ========================================================================== */
.ach-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.ach-item{ border:1px solid var(--card-line); border-radius:12px; padding:12px; text-align:center; background:rgba(24,24,27,.025); }
.ach-item.is-owned{ border-color:rgba(var(--red-rgb),.35); background:rgba(var(--red-rgb),.06); }
.ach-icon{ width:38px; height:38px; margin:0 auto 8px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:var(--g9); background:rgba(24,24,27,.05); }
.ach-item.is-owned .ach-icon{ color:#fff; background:var(--grad-red); }
.ach-name{ font-size:13.5px; font-weight:700; color:var(--g7); }
.ach-item.is-owned .ach-name{ color:var(--red-600); }
.ach-desc{ font-size:11.5px; color:var(--g9); margin-top:2px; line-height:1.5; }
.ach-prog{ height:4px; border-radius:999px; background:rgba(24,24,27,.07); margin:10px 0 6px; overflow:hidden; }
.ach-item.is-owned .ach-prog{ display:none; }
.ach-prog-bar{ height:100%; border-radius:999px; background:var(--grad-red); }
.ach-state{ font-size:11px; color:var(--g9); font-weight:600; }
.ach-item.is-owned .ach-state{ color:var(--red-600); }
html[data-theme="dark"] .ach-item{ background:rgba(255,255,255,.04); }
html[data-theme="dark"] .ach-icon{ background:rgba(255,255,255,.07); }
html[data-theme="dark"] .ach-item.is-owned{ background:rgba(var(--red-rgb),.10); }

/* ==========================================================================
   59. 问答模式（v1.1.65）
   职责：问答帖标记、已解决/未解决状态、被采纳回答高亮、采纳按钮、回答点赞按钮。
   颜色一律用显式色值——--red-* 在 v1.1.54 品牌统一后已指向品牌蓝，不能当「红/绿」用。
   覆盖关系：仅新增组件类，不重定义既有选择器。
   ========================================================================== */

/* 问答标记（沿用 .flag 基类） */
.flag-qa{ color:#7c3aed; background:rgba(124,58,237,.10); }
html[data-theme="dark"] .flag-qa{ color:#a78bfa; background:rgba(124,58,237,.18); }
.flag-qa-solved{ color:#16a34a; background:rgba(22,163,74,.12); }
html[data-theme="dark"] .flag-qa-solved{ color:#4ade80; background:rgba(22,163,74,.18); }
.flag-qa-open{ color:#ea580c; background:rgba(234,88,12,.12); }
html[data-theme="dark"] .flag-qa-open{ color:#fb923c; background:rgba(234,88,12,.18); }
.flag-qa-bounty{ color:#ca8a04; background:rgba(234,179,8,.16); }
html[data-theme="dark"] .flag-qa-bounty{ color:#facc15; background:rgba(234,179,8,.20); }

/* 被采纳的回答：绿色左侧强调 + 浅绿底 */
.comment-item.is-accepted{
  background:rgba(22,163,74,.05);
  border-left:3px solid #16a34a;
  border-radius:10px;
  padding-left:14px;
}
html[data-theme="dark"] .comment-item.is-accepted{ background:rgba(22,163,74,.08); }

/* 评论头部「已采纳」徽章 */
.c-accepted{ display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:700;
  color:#16a34a; background:rgba(22,163,74,.12); padding:1px 7px; border-radius:999px; }
html[data-theme="dark"] .c-accepted{ color:#4ade80; background:rgba(22,163,74,.18); }

/* 采纳按钮（回答底部，绿描边小按钮） */
.accept-btn{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:700;
  color:#16a34a; background:transparent; border:1px solid rgba(22,163,74,.4); border-radius:8px;
  padding:3px 10px; cursor:pointer; transition:all .15s; }
.accept-btn:hover{ background:rgba(22,163,74,.10); border-color:#16a34a; }
.accept-btn.is-accepted{ color:var(--g9); border-color:var(--card-line); }
html[data-theme="dark"] .accept-btn{ color:#4ade80; border-color:rgba(74,222,128,.4); }

/* 回答点赞按钮：缩到评论操作行的大小，去掉外层框 */
.comment-foot .like-btn{ height:auto; padding:2px 8px; border-radius:8px; background:transparent; border:none; }
.comment-foot .like-btn.liked{ background:transparent; border:none; }

/* ==========================================================================
   60. 任务悬赏大厅（v1.1.66）
   职责：大厅任务列表 + 任务详情/提交区。
   覆盖关系：仅新增组件类；标记复用 .flag（第 59 节）与 .comment-item（既有）。
   ========================================================================== */

.bounty-list{ display:flex; flex-direction:column; }
.bounty-item{ display:flex; gap:14px; align-items:flex-start; padding:14px; border-bottom:1px solid var(--line2); text-decoration:none; color:inherit; }
.bounty-item:last-child{ border-bottom:none; }
.bounty-item:hover{ background:rgba(24,24,27,.025); }
.bounty-item-main{ flex:1; min-width:0; }
.bounty-item-title{ font-size:15px; font-weight:700; color:var(--ink); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bounty-item-desc{ font-size:13px; color:var(--g6); margin-top:5px; line-height:1.5; }
.bounty-item-meta{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:9px; }
.bounty-author{ display:inline-flex; align-items:center; gap:6px; min-width:0; }
.bounty-author .avatar{ flex:none; }
.bounty-item-time{ flex-shrink:0; padding-top:3px; }

.bounty-detail-head{ padding-bottom:14px; border-bottom:1px solid var(--line2); }
.bounty-detail-body{ padding:16px 0; }
.bounty-content{ font-size:15px; line-height:1.8; color:var(--ink); word-break:break-word; }
.bounty-claimer{ margin-top:4px; padding:10px 14px; border-radius:10px; background:rgba(22,119,255,.06); color:var(--g7); font-size:13.5px; }
.bounty-claimer a{ color:var(--indigo); font-weight:600; }
.bounty-actions{ display:flex; gap:10px; padding:14px 0 2px; }

/* ==========================================================================
   61. 用户中心「我的服务」紧凑宫格（v1.1.70）
   职责：替代第 27 节 .ov-actions/.ov-action 在用户中心的使用——
         旧宫格每条带功能描述、格子偏大，手机上一屏放不下几个入口；
         本版去掉描述（保留为 title 悬浮提示）、缩小格子。
         「我的成就」改为宫格中的一个入口（撤掉原独立大卡）。
   覆盖关系：本节只新增 .svc-* 组件类，不重定义 .ov-*
         （.ov-actions/.ov-action 仍被后台首页 admin/index.php 使用，不能动）。
   ========================================================================== */

.uc-services .card-body{ padding:12px; }
.svc-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.svc-cell{ display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:12px 4px 10px; border-radius:14px; text-decoration:none; color:inherit;
  transition:background .15s var(--ease), transform .12s var(--ease); }
.svc-cell:hover{ background:rgba(24,24,27,.045); }
.svc-cell:active{ transform:scale(.96); }
.svc-icon{ width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  color:var(--ink); background:rgba(24,24,27,.055); }
.svc-icon.is-danger{ color:#e11d48; background:rgba(225,29,72,.09); }
.svc-icon.is-success{ color:#17c964; background:rgba(23,201,100,.11); }
.svc-icon.is-warning{ color:#f5a524; background:rgba(245,165,36,.13); }
.svc-icon.is-info{ color:#0ea5e9; background:rgba(14,165,233,.11); }
.svc-label{ font-size:12px; font-weight:600; color:var(--g7); text-align:center; line-height:1.3; }
@media (min-width:821px){
  /* 桌面主栏更宽，一排放 6 个，避免格子被拉得过大 */
  .svc-grid{ grid-template-columns:repeat(6,minmax(0,1fr)); }
}

html[data-theme="dark"] .svc-cell:hover{ background:rgba(255,255,255,.06); }
html[data-theme="dark"] .svc-icon{ color:#e8eaf0; background:rgba(255,255,255,.08); }

/* ==========================================================================
   两侧留白优化（v1.1.71 追加）：全站内容区两侧间距缩小 20%
   做法：各主容器 max-width 由固定值改为 calc(20vw + 0.8×原值)，
         任意屏宽下两侧留白恰好为原来的 80%；左右 padding 同步 ×0.8。
   —— 本段追加于文件末尾覆盖前文；回档删除本段即可。
   ========================================================================== */
.container{ max-width:calc(20vw + 576px); padding-left:11.2px; padding-right:11.2px; }
.topbar{ padding-left:11.2px; padding-right:11.2px; }
.topbar-inner{ max-width:calc(20vw + 944px); }
.pc-shell{ max-width:calc(20vw + 944px); padding-left:11.2px; padding-right:11.2px; }
.site-footer{ padding-left:11.2px; padding-right:11.2px; }
.footer-inner{ max-width:calc(20vw + 944px); }
.search-page{ max-width:calc(20vw + 688px); }
.install-wrap{ max-width:calc(20vw + 864px); padding-left:11.2px; padding-right:11.2px; }

/* ==========================================================================
   区块间距压缩（v1.1.71 追加）：收紧上半部分区块间距，整体不松散
   覆盖前文所有 .notice / .tabs / .empty / .pc-shell 定义；回档删除本段即可。
   ========================================================================== */
.notice{ margin-bottom:8px; padding:9px 14px; }
.tabs{ margin-bottom:10px; }
.empty{ padding:28px 20px; }
.empty-icon{ margin-bottom:10px; }
/* 手机端：顶栏到首屏内容、各区块上边距收紧 */
@media (max-width:720px){
  .pc-shell{ padding-top:10px; }
  .flash-wrap{ margin-top:8px; }
  .page-title{ margin:2px 0 10px; }
}

/* ==========================================================================
   流畅度与UI细节优化（v1.1.71 追加）
   A) 移动端/APP WebView 降低动效开销：全屏淡入 + 退出动画在低端机明显掉帧，
      这里只在窄屏关闭它们，桌面端动效保持不变。
   B) UI 细节：标签/按钮/卡片过渡更顺滑，层次更清晰。
   回档：删除本段即可。
   ========================================================================== */
@media (max-width:820px){
  /* 关闭整页淡入淡出（WebView 里最卡的两处） */
  html[data-fx~="page_fade"] body,
  html.fx-nav-leaving body{ animation:none !important; }
  /* 帖子卡片不做交错显现，直接可见 */
  html[data-fx~="page_fade"][data-fx-js] .post-list .post-card{ opacity:1 !important; transform:none !important; }
  /* 统一缩短过渡时长，减少持续重绘 */
  .post-card,.btn,.tab-item,.icon-btn,.rail-link,.side-link{ transition-duration:.14s !important; }
}

/* UI 细节增强 */
.tab-item .tab-text{ transition:color .18s ease; }
.tabs .tab-item{ -webkit-tap-highlight-color:transparent; }
.card{ box-shadow:0 1px 2px rgba(16,24,40,.03), 0 8px 24px -12px rgba(16,24,40,.10); }
.btn:active,.icon-btn:active{ -webkit-tap-highlight-color:transparent; }
/* 减少无谓的回弹动画（果冻效果在触屏上观感差且耗性能） */
html[data-fx~="jelly"] .post-card:hover{ transform:none !important; }
@media (prefers-reduced-motion:reduce){
  html[data-fx] body,html[data-fx] *{ animation:none !important; transition-duration:.01ms !important; }
}

/* 细节修复：移动端固定背景(--page-grad fixed)会导致 WebView 滚动每帧重绘，
   是已知的卡顿源。窄屏改为不固定，视觉几乎一致但滚动明显流畅。 */
@media (max-width:820px){
  html{ background-attachment:scroll !important; }
}
