/* ============================================================
   地平线 SNS - 全站样式（浅色 · 灰白深灰 · 极简）
   ============================================================ */
:root {
  --bg: #f0f0f2;
  --card: #ffffff;
  --card-2: #f5f5f7;
  --border: #e0e0e4;
  --border-2: #d0d0d5;
  --text: #1a1a1e;
  --muted: #6e6e78;
  --dim: #9e9ea5;
  --white: #1a1a1e;
  --success: #2e7d32;
  --danger: #d32f2f;
  --warn: #e65100;
  --radius: 10px;
  --radius-sm: 8px;
  --accent: #1a6dd4;
  --accent-2: #1a6dd4;
  --navbar-bg: rgba(240,240,242,.92);
  --primary: #3b5bdb;
  --primary-soft: #eef2ff;
}

/* ============ 深色模式 ============ */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e11;
  --card: #1a1a1f;
  --card-2: #232329;
  --border: #2a2a31;
  --border-2: #383840;
  --text: #e9e9ee;
  --muted: #a6a6b0;
  --dim: #6e6e78;
  --white: #ffffff;
  --success: #4caf50;
  --danger: #ff6b6b;
  --warn: #ffb74d;
  --accent: #4a9eff;
  --accent-2: #4a9eff;
  --navbar-bg: rgba(18,18,22,.92);
  --primary: #8ab4ff;
  --primary-soft: #1b2236;
}
[data-theme="dark"] .alert-error { background: rgba(255,90,90,.12); border-color: rgba(255,90,90,.35); color: #ff8a8a; }
[data-theme="dark"] .input,
[data-theme="dark"] .textarea,
[data-theme="dark"] select.input { background: #141418; }
[data-theme="dark"] .ql-editor { color: #e9e9ee; }
[data-theme="dark"] .ql-toolbar.ql-snow,
[data-theme="dark"] .ql-container.ql-snow { border-color: var(--border-2); }
[data-theme="dark"] .nav-links a.on { color: #0e0e11; }
[data-theme="dark"] .btn-primary { color: #0e0e11; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navbar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  height: 56px; display: flex; align-items: center; gap: 16px;
}
.brand { font-size: 17px; letter-spacing: 2px; white-space: nowrap; display: flex; align-items: center; }
.brand b { color: var(--white); }
.brand-logo { height: 32px; width: auto; max-width: 180px; max-height: 32px; border-radius: 6px; vertical-align: middle; display: inline-block; object-fit: contain; }
.admin-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 16px; font-weight: 700; color: var(--white); }
.admin-brand-logo { height: 26px; width: auto; max-width: 120px; max-height: 26px; border-radius: 6px; object-fit: contain; }
.admin-brand-name { font-weight: 700; }
.admin-brand span:not(.admin-brand-name) { font-size: 11px; font-weight: 400; opacity: .7; }
.logo-preview { max-height: 64px; max-width: 220px; border-radius: 6px; border: 1px solid var(--border); padding: 4px; background: var(--card-2); }
.nav-links { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.nav-links a {
  padding: 6px 12px; border-radius: 99px; color: var(--muted); font-size: 14px;
  white-space: nowrap; flex-shrink: 0; font-weight: 600;
}
.nav-links a:hover { color: var(--text); background: var(--card-2); }
.nav-links a.on { color: var(--bg); background: var(--white); }
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-ic { font-size: 13px; color: var(--muted); position: relative; padding: 4px 2px; }
.nav-ic:hover { color: var(--text); }
.badge-dot {
  background: var(--white); color: var(--bg); font-size: 10px; font-weight: 700;
  border-radius: 99px; padding: 0 5px; margin-left: 2px; vertical-align: top;
}
.theme-toggle { background: none; border: 0; font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 8px; flex-shrink: 0; }
.theme-toggle:hover { background: var(--card-2); }
.admin-theme-toggle {
  display: block; width: 100%; margin-top: 12px; padding: 8px 12px; text-align: center;
  background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 99px; font-size: 14px; cursor: pointer;
}
.admin-theme-toggle:hover { border-color: var(--muted); background: var(--card-2); }

/* 下拉菜单 */
.dropdown { position: relative; }
.dropdown::after {
  content: ''; position: absolute; top: 100%; right: 0; width: 200px; height: 10px;
  /* 透明桥接区域：覆盖头像与菜单间的间隙，避免 hover 断链 */
}
.dropdown-menu {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 140px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.08);
  z-index: 100;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--muted); }
.dropdown-menu a:hover { background: var(--card-2); color: var(--text); }
.logout-btn {
  display: block; width: 100%; padding: 8px 12px; border: none; border-radius: 6px;
  font-size: 14px; color: var(--muted); background: transparent; cursor: pointer;
  font-family: inherit; text-align: left;
}
.logout-btn:hover { background: var(--card-2); color: var(--text); }

/* ---------- 布局 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 20px 16px 60px; }
.grid3 { display: grid; grid-template-columns: 220px minmax(0,1fr) 260px; gap: 20px; align-items: start; }
.narrow { max-width: 680px; margin: 0 auto; }
.wide { max-width: 1120px; margin: 0 auto; }
.side-l, .side-r { position: sticky; top: 76px; }
/* 右侧栏首个元素（如 neon_side_top 广告）去掉上边距，使其顶部与中间列对齐 */
.side-r > :first-child { margin-top: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.empty { text-align: center; color: var(--muted); padding: 48px 18px; }
.empty-sm { text-align: center; padding: 16px 0; }
.muted { color: var(--muted); font-size: 13px; }
.ad-size-badge { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 99px; background: var(--primary-soft, #eef2ff); color: var(--primary, #3b5bdb); font-size: 12px; font-weight: 500; vertical-align: middle; }
.ad-pos-size { color: var(--muted); font-size: 12px; }
.tar { text-align: right; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 8px 18px; font-size: 14px; font-weight: 600; text-align: center;
  transition: all .15s; white-space: nowrap;
}
.btn-primary { background: var(--white); color: var(--bg); }
.btn-primary:hover { background: #3a3a3e; color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; font-size: 13px; padding: 0; }
.link-btn:hover { color: var(--danger); }
.inline-form { display: inline; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input, .textarea, select.input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-2);
  color: var(--text); padding: 9px 12px; border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; outline: none;
}
.input:focus, .textarea:focus { border-color: var(--muted); }
.textarea { resize: vertical; }
.qty-input { width: 76px; }
input[type="file"].input { padding: 7px; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; border-bottom: 1px solid var(--border); }
.radio-row:last-of-type { border-bottom: 0; }
.alert { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fff0f0; border: 1px solid #ffcdcd; color: #d32f2f; }

/* ---------- Flash 提示 ---------- */
.flash {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 999;
  background: var(--card); border: 1px solid var(--border-2); color: var(--text);
  padding: 10px 22px; border-radius: 99px; font-size: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.08); animation: flashIn .25s ease;
}
.flash-success { border-color: #c8e6c9; color: var(--success); }
.flash-error { border-color: #ffcdcd; color: var(--danger); }
@keyframes flashIn { from { opacity: 0; transform: translate(-50%,-8px); } to { opacity: 1; transform: translate(-50%,0); } }

/* ---------- 头像 ---------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  background: var(--card-2); flex: none;
}
.avatar-text {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 600; background: #e0e0e4; font-size: 16px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 60px; height: 60px; font-size: 22px; }
.avatar.xl { width: 84px; height: 84px; font-size: 30px; }

/* 真实 file 输入框覆盖在按钮上：用户点击直接命中输入框，避免 display:none 输入框无法被 JS 触发点击的问题 */
.avatar-pick { position: relative; }
.avatar-pick > input[type=file] {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2; font-size: 0;
}

/* ---------- 头像裁剪弹窗 ---------- */
.avatar-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.avatar-modal[hidden] { display: none; }
.avatar-modal .am-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.avatar-modal .am-box {
  position: relative; z-index: 1; width: 340px; max-width: 92vw;
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.avatar-modal .am-head { font-weight: 600; margin-bottom: 12px; text-align: center; }
.avatar-modal .am-stage { display: flex; justify-content: center; }
.avatar-modal .am-window {
  position: relative; width: 280px; height: 280px; overflow: hidden;
  border-radius: 50%; background: #eee; cursor: grab; touch-action: none;
  border: 2px solid var(--primary, #4f7cff);
}
.avatar-modal .am-window:active { cursor: grabbing; }
.avatar-modal .am-window img {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; display: block;
  width: auto; height: auto; max-width: none; z-index: 1;
  user-select: none; -webkit-user-drag: none; will-change: transform;
}
.avatar-modal .am-zoom { display: flex; align-items: center; gap: 10px; margin: 16px 4px 4px; }
.avatar-modal .am-zoom-lbl { color: var(--muted); font-size: 13px; }
.avatar-modal .am-zoom input[type=range] { flex: 1; accent-color: var(--primary, #4f7cff); }
.avatar-modal .am-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ---------- 侧栏 ---------- */
.mini-profile { text-align: center; }
.mini-profile .avatar { margin: 0 auto 8px; }
.mp-name { font-weight: 600; }
.mp-stats { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.mp-stats b { display: block; color: var(--text); font-size: 15px; text-align: center; }
.side-nav { padding: 8px; }
.side-nav a { display: block; padding: 9px 14px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; }
.side-nav a:hover { background: var(--card-2); color: var(--text); }
.side-nav a.on { background: var(--card-2); color: var(--white); font-weight: 600; }
.side-block h3 { font-size: 14px; margin-bottom: 10px; color: var(--text); }
.stat-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--muted); }
.stat-row b { color: var(--text); }
.hot-group { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.hot-group:last-child { border-bottom: 0; }
.hg-name { color: var(--text); }
.side-product { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: center; }
.side-product:last-child { border-bottom: 0; }
.side-product img, .side-product .ph { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--card-2); flex: none; }
.sp-info { display: flex; flex-direction: column; font-size: 13px; }
.sp-price { color: var(--accent); font-weight: 600; }

/* 小说排行 */
.novel-rank { list-style: none; padding: 0; margin: 0; }
.novel-rank li { counter-increment: none; }
.nr-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: center; font-size: 13px; }
.nr-item:last-child { border-bottom: 0; }
.nr-index { width: 20px; height: 20px; border-radius: 4px; background: var(--card-2); color: var(--muted); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.novel-rank li:first-child .nr-index { background: #ff8f00; color: #fff; }
.novel-rank li:nth-child(2) .nr-index { background: #78909c; color: #fff; }
.novel-rank li:nth-child(3) .nr-index { background: #8d6e63; color: #fff; }
.nr-title { flex: 1; min-width: 0; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-author { flex: none; font-size: 12px; }

/* 最近更新 */
.update-list { list-style: none; padding: 0; margin: 0; }
.ul-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ul-item:last-child { border-bottom: 0; }
.ul-novel { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.ul-chapter { color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ul-time { white-space: nowrap; font-size: 11px; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 16px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--white); font-weight: 600; border-bottom-color: var(--white); }

/* ---------- 发布框 ---------- */
.pub-row { display: flex; gap: 12px; }
.pub-row .textarea { border: 0; background: transparent; padding: 8px 0; font-size: 15px; }
.pub-toolbar { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.pub-tool { font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 99px; }
.pub-tool:hover { color: var(--text); border-color: var(--muted); }
.pub-hint { flex: 1; }
.pub-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pub-preview img, .pub-preview video { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-2); }
.pub-thumb { position: relative; width: 84px; height: 84px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-2); background: var(--card-2); }
.pub-thumb img, .pub-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-thumb-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px; text-align: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; user-select: none; }
.pub-thumb-x:hover { background: #e11d48; }
.dropzone { border: 2px dashed transparent; border-radius: 12px; transition: border-color .15s, background .15s; }
.dropzone.is-over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.login-tip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 动态卡片 ---------- */
.post-head { display: flex; gap: 12px; align-items: flex-start; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 600; font-size: 15px; }
.post-sub { font-size: 12px; color: var(--dim); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.post-del { flex: none; }
.post-content { margin: 12px 0 4px; white-space: pre-wrap; word-break: break-word; }
.post-ellipsis { color: var(--muted); }
.post-more { color: var(--primary); font-weight: 500; margin-left: 2px; }
.post-more:hover { text-decoration: underline; }
.tag {
  display: inline-block; font-size: 12px; color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 99px; padding: 1px 10px;
}
.tag-admin { color: var(--white); border-color: var(--muted); }
.tag-ban { color: var(--danger); border-color: #ffcdcd; }

/* 媒体网格 */
.media-grid { display: grid; gap: 6px; margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; }
.media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; background: var(--card-2); }
.media-grid.n1 { grid-template-columns: minmax(0, 420px); }
.media-grid.n1 img { aspect-ratio: auto; max-height: 480px; }
.media-grid.n2, .media-grid.n4 { grid-template-columns: repeat(2, 1fr); max-width: 420px; }
.media-grid.n3, .media-grid.n5, .media-grid.n6, .media-grid.n7, .media-grid.n8, .media-grid.n9 { grid-template-columns: repeat(3, 1fr); }
.media-video { margin-top: 12px; }
.media-video video { width: 100%; max-height: 480px; border-radius: var(--radius-sm); background: #000; }

.post-actions { display: flex; gap: 8px; margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.act-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--muted); font-size: 13px;
  padding: 4px 12px; border-radius: 99px;
}
.act-btn:hover { background: var(--card-2); color: var(--text); }
.btn-like.liked { color: var(--white); }
.btn-like.liked .ic { color: var(--danger); }

/* ---------- 分享弹层 ---------- */
/* 分享弹层：flex 居中，卡片风格与整体 UI 统一 */
.share-panel {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.share-panel.show { display: flex; }
.share-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.share-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.22);
  animation: sharePop .18s ease;
}
@keyframes sharePop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.share-title { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 16px; }
.share-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer; color: var(--text); font-size: 12px; padding: 4px;
}
.share-opt .si {
  width: 52px; height: 52px; border-radius: 50%; background: var(--card-2);
  display: flex; align-items: center; justify-content: center; font-size: 24px; transition: transform .15s;
}
.share-opt:hover .si { transform: scale(1.06); }
.share-opt:active .si { transform: scale(.92); }
.share-close {
  width: 100%; margin-top: 18px; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-2); color: var(--text); font-size: 15px; cursor: pointer;
}
.share-close:hover { background: var(--border); }
.share-close:active { opacity: .8; }

/* 微信内置浏览器分享引导浮层 */
.wx-guide {
  position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.82);
  color: #fff; display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 18px 16px; cursor: pointer;
}
.wx-guide-inner { text-align: right; max-width: 260px; line-height: 1.7; font-size: 15px; }
.wx-guide-inner p { margin: 4px 0; }
.wx-arrow { font-size: 46px; line-height: 1; margin-bottom: 10px; }

/* ---------- 评论 ---------- */
.block-title { font-size: 15px; margin-bottom: 14px; }
.block-title.lst { margin: 20px 0 12px; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.comment-author { font-weight: 600; }
.comment-content { margin-top: 2px; font-size: 14px; word-break: break-word; }
.comment-form { margin-bottom: 16px; }
.comment-form .textarea { margin-bottom: 8px; }
.back-link { display: inline-block; margin-bottom: 12px; font-size: 14px; }

/* ---------- 登录注册 ---------- */
.auth-box { max-width: 400px; margin: 40px auto; }
.auth-box.wide-form { max-width: 520px; }
.auth-title { text-align: center; margin-bottom: 20px; font-size: 20px; }
.auth-foot { text-align: center; margin-top: 14px; }
.auth-foot a { color: var(--accent); }

/* ---------- 个人主页 ---------- */
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ph-info { flex: 1; min-width: 200px; }
.ph-info h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ph-stats { display: flex; gap: 18px; margin-top: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.ph-stats b { color: var(--text); }
.page-title { font-size: 20px; margin-bottom: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .page-title { margin-bottom: 0; }
.page-head-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-form .input { width: 200px; }

/* ---------- 通知 ---------- */
.notice-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.notice-tab { padding: 5px 14px; border-radius: 99px; font-size: 13px; color: var(--muted); background: var(--card-2); }
.notice-tab:hover { color: var(--text); }
.notice-tab.on { background: var(--white); color: var(--bg); font-weight: 600; }
.notice-list { padding: 6px 14px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: var(--radius-sm); border-bottom: 1px solid var(--border); position: relative; color: var(--text); }
.notice:hover { background: var(--card-2); }
.notice:last-child { border-bottom: 0; }
.notice.unread { background: rgba(26,109,212,.07); }
.notice.unread .notice-content { font-weight: 600; }
.notice-body { flex: 1; min-width: 0; }
.notice-content { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.notice-type { font-size: 14px; flex-shrink: 0; }
.notice-link { color: var(--muted); font-size: 13px; margin-left: 6px; }
.notice-link:hover { color: var(--accent); }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-left: 4px; }

/* ---------- 小组 ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { border: 1px solid var(--border-2); border-radius: 99px; padding: 5px 14px; font-size: 13px; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--muted); }
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.group-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.gc-cover { display: block; height: 110px; background: var(--card-2); position: relative; }
.gc-cover img { width: 100%; height: 100%; object-fit: cover; }
.gc-ph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 34px; font-weight: 700; color: var(--dim);
}
.gc-ph.big { font-size: 30px; }
.gc-body { padding: 14px; }
.gc-name { font-weight: 600; font-size: 15px; }
.gc-intro { margin: 4px 0 10px; min-height: 20px; }
.gc-foot { display: flex; justify-content: space-between; align-items: center; }
.group-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.gh-cover { width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--card-2); flex: none; }
.gh-cover img { width: 100%; height: 100%; object-fit: cover; }
.gh-info { flex: 1; min-width: 200px; }
.gh-info h2 { font-size: 19px; }
.gh-meta { margin-top: 8px; font-size: 13px; }
.member-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 18px; }

/* 小组权限相关（v1.9.33） */
.gh-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-pending { color: #b8760a; border-color: #ffe0a3; background: #fff7e6; }
.tag-lock { color: var(--accent); border-color: var(--accent); }
.btn-edit-group { margin-left: 8px; }
.perm-row { display: flex; align-items: center; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.switch input { width: 18px; height: 18px; }
.cur-cover { margin-bottom: 8px; }
.cur-cover img { border-radius: var(--radius-sm); max-height: 90px; }
.pending-card { padding: 16px 18px; }
.pending-list { list-style: none; margin: 10px 0 0; padding: 0; }
.pending-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pending-list li:last-child { border-bottom: 0; }
.pm-user { display: flex; align-items: center; gap: 8px; }
.pm-act { display: flex; gap: 8px; }
.empty.locked { font-size: 15px; }

/* 编辑动态：已有图片管理（v1.9.34） */
.edit-media { display: flex; flex-wrap: wrap; gap: 10px; }
.em-item {
  position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; background: var(--card-2);
  transition: outline-color .12s;
}
.em-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.em-del { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.em-tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 0; text-align: center;
  background: rgba(220,38,38,.88); color: #fff; font-size: 12px; pointer-events: none;
}
.em-item:has(.em-del:checked) { outline: 3px solid #dc2626; outline-offset: 0; }
.em-item:has(.em-del:checked) .em-tag { background: rgba(37,99,235,.92); }
.em-item:has(.em-del:checked) .em-tag::after { content: ' ✓'; }

/* ---------- 商城 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card { padding: 0; overflow: hidden; margin-bottom: 0; transition: border-color .15s; }
.product-card:hover { border-color: var(--muted); }
.pc-img { position: relative; aspect-ratio: 1; background: var(--card-2); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--dim); font-size: 13px; }
.pc-soldout {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(240,240,242,.7); color: var(--muted); font-weight: 600;
}
.pc-body { padding: 12px 14px; }
.pc-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 42px; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.pc-price { color: var(--white); font-weight: 700; font-size: 16px; }

.product-detail { display: flex; gap: 22px; flex-wrap: wrap; }
.pd-img { width: 320px; max-width: 100%; aspect-ratio: 1; background: var(--card-2); border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.pd-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.pd-info { flex: 1; min-width: 240px; }
.pd-info h2 { font-size: 19px; margin: 8px 0; }
.pd-price { font-size: 26px; font-weight: 700; color: var(--white); }
.pd-meta { margin: 6px 0 18px; }
.pd-qty { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pd-qty label { font-size: 13px; color: var(--muted); }
.pd-btns { display: flex; gap: 10px; }
.pd-intro { white-space: pre-wrap; color: #5a5a62; font-size: 14px; }

/* 购物车 / 订单 */
.cart-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ci-img { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--card-2); flex: none; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ci-title { font-size: 14px; }
.ci-price { color: var(--muted); font-size: 13px; }
.ci-sub { font-weight: 600; min-width: 72px; text-align: right; }
.cart-foot { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding-top: 16px; }
.co-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; align-items: center; }
.co-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.co-total { text-align: right; padding-top: 12px; }
.oc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.oc-thumb { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; display: inline-block; }
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; }
.st-1 { color: var(--warn); border-color: #ffecb3; }
.st-2 { color: #7dd3fc; border-color: #b3e5fc; }
.st-3 { color: var(--success); border-color: #c8e6c9; }
.st-4 { color: var(--dim); }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.pagination a, .pagination .cur {
  padding: 6px 13px; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--muted);
}
.pagination a:hover { color: var(--text); border-color: var(--muted); }
.pagination .cur { background: var(--white); color: var(--bg); border-color: var(--white); font-weight: 600; }

/* ---------- 页脚 / 底部导航 ---------- */
.footer { text-align: center; color: var(--dim); font-size: 12px; padding: 30px 16px 40px; }
.footer .beian { margin-top: 6px; }
.footer .beian a { color: var(--dim); text-decoration: none; transition: color .15s; }
.footer .beian a:hover { color: var(--text, #1a1a1e); }
.footer .beian a.tech-support { color: var(--accent); text-decoration: none; }
.footer .beian a.tech-support:hover { color: var(--accent); opacity: .82; text-decoration: underline; }
.footer .beian .beian-badge { display: inline-block; transform: translateY(1px); }
.footer .friend-links { margin-bottom: 10px; line-height: 1.9; }
.footer .friend-links .fl-row { display: block; }
.footer .friend-links .fl-label { color: var(--dim); }
.footer .friend-links .fl-item { display: inline-block; margin: 0 4px; color: var(--accent, #3b82f6); text-decoration: none; transition: opacity .15s; }
.footer .friend-links .fl-item:hover { opacity: .7; text-decoration: underline; }
.tabbar { display: none; }

/* ---------- 灯箱 ---------- */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center; cursor: default;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 92vh; object-fit: contain;
  transform-origin: center center; transition: transform .12s ease;
  cursor: grab; will-change: transform;
}
.lightbox img:active { cursor: grabbing; }
.lightbox .lb-bar {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 6px 10px; z-index: 1001; user-select: none;
}
.lightbox .lb-bar button {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; font-size: 17px; line-height: 1;
  cursor: pointer; transition: background .15s;
}
.lightbox .lb-bar button:hover { background: rgba(255,255,255,.32); }
.lightbox .lb-bar .lb-zoom {
  color: #fff; font-size: 13px; min-width: 46px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.lightbox .lb-bar .lb-count {
  color: #fff; font-size: 13px; min-width: 44px; text-align: center;
  font-variant-numeric: tabular-nums; padding-right: 2px;
}
/* 翻页箭头 */
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.16); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; z-index: 1001; user-select: none; transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-nav:hover { background: rgba(255,255,255,.34); }
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }
/* 单张时不显示翻页箭头与计数 */
.lightbox.single .lb-nav, .lightbox.single .lb-count { display: none; }

/* ---------- 后台 ---------- */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
  width: 210px; flex: none; background: var(--card); border-right: 1px solid var(--border);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { font-size: 16px; font-weight: 700; letter-spacing: 1px; padding: 4px 12px 16px; color: var(--white); }
.admin-brand span { color: var(--muted); font-size: 11px; font-weight: 400; display: block; }
.admin-nav a { display: block; padding: 9px 14px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; margin-bottom: 2px; }
.admin-nav a:hover { background: var(--card-2); color: var(--text); }
.admin-nav a.on { background: var(--white); color: var(--bg); font-weight: 600; }
.admin-nav .sep { border-top: 1px solid var(--border); margin: 10px 4px; }
.admin-main { flex: 1; min-width: 0; padding: 24px; }
.admin-title { font-size: 19px; margin-bottom: 18px; }

/* 统计卡片 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat-card .num { font-size: 24px; font-weight: 700; color: var(--white); }
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat-card .sub { font-size: 12px; color: var(--dim); margin-top: 4px; }

/* 柱状图 */
.bar-chart { display: flex; gap: 10px; align-items: flex-end; height: 160px; padding: 10px 4px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 120px; }
.bar { width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar.b-posts { background: #9e9ea5; }
.bar.b-users { background: var(--white); }
.bar-day { font-size: 11px; color: var(--dim); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.table td .avatar { display: inline-flex; vertical-align: middle; }
.table .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.table .ops .btn { padding: 3px 10px; font-size: 12px; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #ffcdcd; }
.btn-danger:hover { background: #fff0f0; }
.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--card-2); }
.cell-clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filter-bar .input { width: 220px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .grid3 { grid-template-columns: minmax(0,1fr) 240px; }
  .side-l { display: none; }
}
@media (max-width: 820px) {
  .grid3 { grid-template-columns: 1fr; }
  .side-r { display: none; }
  .nav-links { display: none; }
  .container { padding-bottom: 90px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(240,240,242,.92); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .tabbar a { flex: 1; text-align: center; padding: 13px 0; font-size: 13px; color: var(--muted); }
  .tabbar a:active { color: var(--white); }
  .field-row { grid-template-columns: 1fr; }
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 10px; }
  .admin-brand { padding: 4px 10px; width: 100%; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav a { padding: 6px 12px; font-size: 13px; margin-bottom: 0; }
  .admin-nav .sep { display: none; }
  .admin-main { padding: 16px; }
  .search-form .input { width: 100%; }
}

/* ============================================================
   视频频道
   ============================================================ */
.chip.on { background: var(--white); color: var(--bg); border-color: var(--white); font-weight: 600; }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.live-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.live-cover { display: block; position: relative; height: 130px; background: var(--card-2); overflow: hidden; }
.live-cover img { width: 100%; height: 100%; object-fit: cover; }
.live-badge {
  position: absolute; top: 8px; left: 8px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .5px;
}
.live-viewers {
  position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
}
.live-on { color: var(--success); }

/* 观看页布局 */
.live-page { max-width: 1120px; }
.live-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
.live-player {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.live-video { width: 100%; height: 100%; background: #000; }
.live-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lp-inner { text-align: center; padding: 20px; }
.lp-inner img { width: 90px; height: 90px; border-radius: 12px; object-fit: cover; margin: 0 auto 12px; }
.lp-inner .gc-ph.big { display: flex; align-items: center; justify-content: center; width: 90px; height: 90px; border-radius: 12px; margin: 0 auto 12px; font-size: 34px; }
.lp-inner p { font-size: 15px; margin-bottom: 4px; }
.lp-inner .muted { font-size: 13px; }

/* 主播信息 */
.live-meta { margin-top: 14px; }
.lm-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lm-info { flex: 1; min-width: 0; }
.lm-title { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lm-sub { font-size: 13px; margin-top: 4px; }
.lm-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.live-intro { margin-top: 12px; white-space: pre-wrap; }

/* 聊天室 */
.live-side { position: sticky; top: 76px; }
.live-chat { display: flex; flex-direction: column; height: calc(100vh - 130px); padding: 0; overflow: hidden; }
.live-chat-head { padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.live-msg-list { flex: 1; overflow-y: auto; padding: 12px 14px; min-height: 200px; }
.live-msg { font-size: 14px; padding: 4px 0; line-height: 1.5; word-break: break-word; }
.live-msg-user { font-weight: 600; color: var(--muted); margin-right: 6px; font-size: 13px; }
.live-msg-user:hover { color: var(--text); }
.live-msg.is-admin .live-msg-user { color: var(--white); }
.live-msg.is-admin .live-msg-text { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; }
.live-chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
.live-chat-form .input { flex: 1; }

/* 飘心动画 */
.heart-float {
  position: absolute; bottom: 12px; font-size: 26px; pointer-events: none;
  animation: heartUp 1.6s ease-out forwards; color: #ef4444;
}
@keyframes heartUp {
  0% { opacity: 1; transform: translateY(0) scale(.8); }
  100% { opacity: 0; transform: translateY(-140px) scale(1.3); }
}

@media (max-width: 820px) {
  .live-layout { grid-template-columns: 1fr; }
  .live-side { position: static; }
  .live-chat { height: 64vh; }
}

/* 首页「正在视频」小部件 */
.live-badge-sm { display: inline-block; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }
.side-more { display: block; text-align: center; font-size: 13px; color: var(--muted); padding-top: 10px; }
.side-more:hover { color: var(--text); }

/* 首页左栏：最新视频 */
.video-mini { list-style: none; padding: 0; margin: 0; }
.video-mini li { border-bottom: 1px solid var(--border); }
.video-mini li:last-child { border-bottom: none; }
.vm-item { display: flex; gap: 10px; align-items: center; padding: 9px 0; }
.vm-cover { position: relative; flex: none; width: 64px; height: 40px; border-radius: 6px; overflow: hidden; background: #0d1b2e; display: flex; align-items: center; justify-content: center; }
.vm-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-ph { color: rgba(255,255,255,.7); font-size: 14px; }
.vm-play { position: absolute; right: 4px; bottom: 3px; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; padding: 1px 4px; line-height: 1; }
.vm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vm-title { font-size: 13px; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vm-meta { font-size: 11px; }

/* ================= 视频回放 / 主播等级 / 广告 ================= */

/* 回放角标 */
.live-badge.replay { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(4px); }

/* 主播等级徽章 */
.lv-badge {
  display: inline-block; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 4px; vertical-align: middle; margin-left: 4px;
  background: #e8e8ec; color: #ffffff; letter-spacing: .5px;
}
.lv-badge.lv-t2 { background: #c8e6c9; color: #ffffff; }
.lv-badge.lv-t3 { background: #bbdefb; color: #ffffff; }
.lv-badge.lv-t4 { background: #e1bee7; color: #ffffff; }
.lv-badge.lv-t5 { background: #fff3e0; color: #ffffff; }
.lv-title { font-size: 12px; }

/* 动态流中的视频卡片 */
.live-post-card {
  display: flex; gap: 12px; align-items: center; margin-top: 10px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; transition: border-color .15s;
}
.live-post-card:hover { border-color: var(--border-2); }
.lpc-cover { width: 88px; height: 56px; border-radius: 6px; overflow: hidden; background: #f0f0f2; flex: none; display: flex; align-items: center; justify-content: center; }
.lpc-cover img { width: 100%; height: 100%; object-fit: cover; }
.lpc-ph { font-size: 24px; }
.lpc-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lpc-tag { font-size: 11px; color: #ef4444; font-weight: 700; }
.lpc-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpc-go { font-size: 12px; color: var(--muted); }

/* 广告位 */
.ad-wrap { margin-top: 14px; }
.ad-slot { margin: 12px 0; }
.ad-item {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px;
}
.ad-item:last-child { margin-bottom: 0; }

/* 全站顶部 / 底部广告：紧贴导航 / 页脚，避免上下过大留白 */
.ad-wrap-global { margin-top: 0; margin-bottom: 8px; }
.ad-wrap-global-top,
.ad-wrap-global-footer {
  padding: 0 16px; /* 去掉 .container 默认的 20px/60px 垂直内边距，避免广告下方大段空白 */
  text-align: center;
}
.ad-wrap-global-top .ad-slot { display: inline-block; max-width: 100%; }
/* 全站顶部/底部横幅：所有模板统一无框无空白（用 !important 覆盖各主题对 .ad-slot 的描边，如国风金边） */
.ad-wrap-global-top .ad-slot,
.ad-wrap-global-footer .ad-slot {
  border: none !important; border-radius: 0 !important; padding: 0 !important; background: none !important;
}
/* 全站顶部横幅：去掉卡片底/边框，仅展示图片本身，避免小图被包在大卡片框里 */
.ad-wrap-global-top .ad-item,
.ad-wrap-global-footer .ad-item {
  display: block; max-width: 100%; margin: 0; padding: 0;
  background: none; border: none; border-radius: 0; overflow: hidden;
}
.ad-wrap-global-top .ad-item img,
.ad-wrap-global-footer .ad-item img { width: 100%; max-width: 100%; height: auto; }
.ad-wrap-global-footer { margin-top: 8px; margin-bottom: 14px; }
.ad-wrap-global .ad-slot { margin: 4px 0; }
.ad-wrap-global .ad-item { margin-bottom: 0; }
body.has-ad-global-top .ad-wrap-global-top { margin-bottom: 0; }
body.has-ad-global-top main.container { padding-top: 0; }

/* 横幅类广告（全宽大图 / 幻灯 / 信息流顶部）：所有皮肤统一无框、无底色、无内边距。
   覆盖各皮肤对 .ad-slot / .neon-slider 的特色描边（国风金边、neon 紫/粉框、科技冷线等），
   仅作用于横幅位，侧栏小广告框保留各自皮肤设计。 */
.neon-slider { border: none !important; }
.ad-slot.ad-pos-global_top,
.ad-slot.ad-pos-global_footer,
.ad-slot.ad-pos-home_top {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: none !important;
}
.ad-item.ad-pos-global_top,
.ad-item.ad-pos-global_footer,
.ad-item.ad-pos-home_top {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: none !important;
}
.ad-item a { display: block; }
.ad-item img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.ad-pos-home_side .ad-item img { max-height: 160px; }
.ad-item .ad-text { display: block; padding: 12px 14px; font-size: 14px; color: var(--text); }
.ad-item a:hover .ad-text { color: var(--white); }
.ad-mark {
  position: absolute; right: 6px; bottom: 6px; font-style: normal; font-size: 10px;
  color: rgba(0,0,0,.55); background: rgba(0,0,0,.15); padding: 1px 5px; border-radius: 3px; pointer-events: none;
}
.ad-type-code .ad-mark { position: static; display: inline-block; margin: 4px 6px; }

/* ---------- 幻灯大图广告位（基础样式，全皮肤通用） ---------- */
.neon-slider {
  position: relative; width: 100%; height: 360px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); margin-bottom: 16px;
}
.neon-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; display: flex; align-items: center; justify-content: center; }
.neon-slide.on { opacity: 1; z-index: 2; }
/* 非激活 slide 完全关闭鼠标事件，避免隐藏/淡入淡出中的 slide 喇叭按钮抢点（导致可见视频声音不变、点击"无效"） */
.neon-slide:not(.on) { pointer-events: none; }
.neon-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 视频广告：无边框铺满整屏 */
.neon-slider.is-video { border: 0 !important; border-radius: 0; }
.neon-slide.is-video { padding: 0; }
.neon-slide .slide-media-link { display: block; width: 100%; height: 100%; }
.neon-slide .slide-video { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; background: #000; }
.neon-slide .slide-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  padding: 16px 20px 14px; z-index: 1;
}
.neon-slide .slide-overlay a { color: var(--accent); font-size: 16px; font-weight: 600; text-decoration: none; }
/* 视频幻灯：左下角喇叭按钮占位，标题左移避免遮挡 */
.neon-slide.is-video .slide-overlay { padding-left: 58px; }
.neon-slide .slide-overlay .slide-title { color: #fff; font-size: 16px; font-weight: 600; }
.neon-slider-dots { position: absolute; bottom: 12px; right: 18px; z-index: 3; display: flex; gap: 7px; }
.neon-slider-dots span { width: 9px; height: 9px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.6); cursor: pointer; transition: all .3s; border-radius: 50%; }
.neon-slider-dots span.on { background: var(--accent); border-color: var(--accent); }
.neon-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 50px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.75); border: 1px solid var(--border); color: var(--text);
  font-size: 20px; cursor: pointer; transition: all .2s; user-select: none;
}
[data-theme="dark"] .neon-slider-arrow { background: rgba(0,0,0,.5); color: var(--text); }
.neon-slider-arrow:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.neon-slider-arrow.prev { left: 10px; }
.neon-slider-arrow.next { right: 10px; }
@media (max-width: 640px) {
  .neon-slider { height: 200px !important; }
  .neon-slider-arrow { width: 30px; height: 40px; }
}

/* 首页导航下全屏幻灯：横跨三栏网格整行 */
.grid3 > .neon-slider { grid-column: 1 / -1; }

/* ---------- 视频广告声音开关（小喇叭按钮） ---------- */
.video-sound-btn {
  position: absolute; z-index: 10; left: 12px; bottom: 12px; pointer-events: auto;
  width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: background .18s, transform .12s;
}
.video-sound-btn:hover { background: rgba(15, 23, 42, .78); }
.video-sound-btn:active { transform: scale(.92); }
.video-sound-btn .ico-off { display: none; }
.video-sound-btn.is-muted .ico-on { display: none; }
.video-sound-btn.is-muted .ico-off { display: block; }
.video-sound-btn.is-muted { background: rgba(220, 38, 38, .62); }
/* 仅给非幻灯的视频广告容器（.ad-item）设相对定位；.neon-slide 本身已是 absolute（满屏定位），不可改 relative 否则高度塌缩、按钮被裁切 */
.ad-item { position: relative; }
@media (max-width: 640px) {
  .video-sound-btn { width: 34px; height: 34px; left: 10px; bottom: 10px; }
}
/* 后台表单两列 */
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row2 { grid-template-columns: 1fr; } }

/* ================= 创作中心 / 小说 ================= */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }

.novel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .novel-grid { grid-template-columns: repeat(3, 1fr); } }
.novel-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.novel-card:hover { border-color: #d0d0d5; }
.nc-cover { display: block; height: 120px; background: #f0f0f2; overflow: hidden; }
.nc-cover img { width: 100%; height: 100%; object-fit: cover; }
.nc-cover-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 42px; color: #d0d0d5; background: linear-gradient(135deg, #e8e8ec, #f0f0f2); }
.nc-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nc-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0; }
.nc-title a { color: inherit; text-decoration: none; }
.nc-intro { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.nc-status { color: var(--muted); }
.nc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.nc-edit { color: var(--muted); text-decoration: none; }
.nc-edit:hover { color: var(--text); }
.nc-del { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--muted); cursor: pointer; }
.nc-del:hover { color: #e5484d; }
.nc-del-form { display: inline; margin: 0; }
.vis-badge { font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.vis-public { color: #4ade80; border-color: rgba(74,222,128,.35); }
.vis-friend { color: #60a5fa; border-color: rgba(96,165,250,.35); }
.vis-private { color: #fbbf24; border-color: rgba(251,191,36,.35); }

/* 创作页头部 */
.novel-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.neh-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.neh-title { font-size: 16px; font-weight: 600; color: var(--text); }
.back-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--text); }

/* 创作：左卷章树 + 右编辑器 */
.novel-editor { display: flex; gap: 16px; align-items: flex-start; }
.ne-side { width: 240px; flex: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; max-height: 78vh; overflow: auto; }
.ne-side-act { margin-bottom: 10px; }
.ne-tree { display: flex; flex-direction: column; gap: 12px; }
.vol-block { border-top: 1px solid var(--border); padding-top: 8px; }
.vol-block:first-child { border-top: 0; padding-top: 0; }
.vol-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.vol-name { font-size: 13px; font-weight: 600; color: var(--text); }
.vol-act button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.vol-act button:hover { color: var(--text); }
.ch-list { display: flex; flex-direction: column; gap: 2px; }
.ch-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--muted); }
.ch-item:hover { background: #f0f0f2; color: var(--text); }
.ch-item.on { background: #f0f0f2; color: var(--white); }
.ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-del { background: none; border: 0; color: #f87171; cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; }
.ch-item:hover .ch-del { opacity: 1; }
.ch-empty { font-size: 12px; padding: 4px 8px; }

.ne-main { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.em-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ch-title-input { flex: 1; min-width: 160px; }
.em-actions { display: flex; align-items: center; gap: 8px; }
.save-state { font-size: 12px; color: var(--muted); }
#editor { background: #ffffff; border-radius: 8px; overflow: hidden; }
.ql-toolbar.ql-snow { border-color: #e5e7eb; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.ql-container.ql-snow { border-color: #e5e7eb; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.ql-editor { min-height: 360px; font-size: 15px; color: #1a1a1a; }
.em-foot { margin-top: 8px; font-size: 12px; }

/* AI 辅助面板 */
.ai-panel { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.ai-modes { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ai-mode { background: #f0f0f2; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.ai-mode.on { color: var(--white); border-color: #d0d0d5; background: #e8e8ec; }
.ai-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.ai-result { margin-top: 10px; background: #f0f0f2; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; min-height: 40px; }
.ai-err { color: #d32f2f; }
.meta-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }

/* 阅读页 */
.novel-read { display: flex; gap: 20px; align-items: flex-start; }
.nr-side { width: 260px; flex: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; position: sticky; top: 14px; max-height: 86vh; overflow: auto; }
.nr-book { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.nr-cover { width: 60px; height: 84px; border-radius: 6px; overflow: hidden; background: #f0f0f2; flex: none; display: flex; align-items: center; justify-content: center; }
.nr-cover img { width: 100%; height: 100%; object-fit: cover; }
.nr-title { font-size: 16px; margin: 0 0 4px; color: var(--text); }
.nr-intro { font-size: 13px; line-height: 1.6; margin: 10px 0; }
.nr-toc { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.toc-block { border-top: 1px solid var(--border); padding-top: 8px; }
.toc-vol { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.toc-item { display: block; padding: 5px 8px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13px; }
.toc-item:hover { background: #f0f0f2; color: var(--text); }
.toc-item.on { background: #f0f0f2; color: var(--white); }
.nr-main { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 22px 26px; }
.nr-ch-title { font-size: 20px; margin: 0 0 14px; color: var(--text); }
.nr-content { font-size: 15px; line-height: 1.9; color: var(--text); }
.nr-content p { margin: 0 0 14px; }
.nr-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
@media (max-width: 760px) {
  .novel-editor, .novel-read { flex-direction: column; }
  .ne-side, .nr-side { width: 100%; max-height: none; position: static; }
}

/* ============ 个人中心（v1.4.0） ============ */
.center-hero { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 16px; }
.ch-avatar { flex: none; }
.ch-info { flex: 1; min-width: 0; }
.ch-name { font-size: 20px; margin: 0 0 4px; }
.ch-bio { font-size: 13px; margin: 0 0 10px; word-break: break-word; }
.ch-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.ch-stats b { color: var(--text); font-size: 16px; margin-right: 3px; }

.center-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cq { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); transition: .15s; }
.cq span { font-size: 22px; }
.cq:hover { color: var(--text); border-color: var(--border-2); background: var(--card-2); transform: translateY(-2px); }

.center-cols { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.center-cols .card { padding: 16px; }
.center-cols .block-head { margin-bottom: 12px; }

/* 我的收藏 tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs a { padding: 7px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.tabs a.on { color: var(--bg); background: var(--white); border-color: var(--white); font-weight: 600; }

/* 用户列表（关注 / 粉丝） */
.user-list { padding: 6px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); }
.user-row:hover { background: var(--card-2); }
.ur-avatar { flex: none; }
.ur-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ur-name { color: var(--text); font-size: 14px; }
.ur-name:hover { color: var(--white); }
.ur-bio { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 收藏按钮 / 已收藏态 */
.btn-fav.faved { color: var(--white); }
.btn-fav.faved .ic { filter: drop-shadow(0 0 2px rgba(255,255,255,.4)); }
.nc-fav { background: none; border: none; color: var(--muted); padding: 2px 4px; font-size: 14px; }
.nc-fav.faved { color: var(--white); }
.nc-foot-actions { display: inline-flex; align-items: center; gap: 8px; }
.post-owner-actions { display: flex; align-items: center; gap: 12px; }

/* 表单 */
.form-control { width: 100%; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 12px; font: inherit; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

.empty, .empty-sm { color: var(--muted); font-size: 13px; padding: 16px; text-align: center; }
.empty-sm { padding: 12px; }
.empty a, .card.empty a { color: var(--white); text-decoration: underline; }

.novel-grid.sm { grid-template-columns: 1fr; }

@media (max-width: 860px) {
  .center-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .center-quick { grid-template-columns: repeat(2, 1fr); }
}

/* ===== v1.5.0 私信（消息中心） ===== */
.back-link { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.back-link:hover { color: var(--accent); }

/* 会话列表 */
.msg-row { text-decoration: none; color: inherit; }
.msg-prev { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.msg-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-time { font-size: 11px; }
.msg-unread { align-self: center; }

/* 会话头部 */
.msg-thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; }
.msg-thread-head .ur-name { font-size: 15px; font-weight: 600; color: var(--text); }
.msg-thread-head .msg-goto { margin-left: auto; }

/* 消息气泡 */
.msg-box { padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; margin-bottom: 12px; }
.msg-line { display: flex; align-items: flex-end; gap: 8px; }
.msg-line.mine { justify-content: flex-end; }
.msg-line.theirs { justify-content: flex-start; }
.msg-av { flex: none; }
.msg-bubble { max-width: 72%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: break-word; background: var(--card-2); color: var(--text); }
.msg-line.mine .msg-bubble { background: var(--primary, #2563eb); color: #fff; border-bottom-right-radius: 4px; }
.msg-line.theirs .msg-bubble { border-bottom-left-radius: 4px; }

/* 发送框 */
.msg-form { display: flex; align-items: flex-end; gap: 10px; padding: 12px; }
.msg-form textarea { flex: 1; background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 9px 12px; font: inherit; resize: none; outline: none; }
.msg-form textarea:focus { border-color: var(--primary, #2563eb); }
.msg-locked { padding: 14px 16px; margin-bottom: 12px; color: var(--dim); font-size: 14px; text-align: center; background: var(--card-2); border: 1px dashed var(--border); }

@media (max-width: 560px) {
  .msg-bubble { max-width: 82%; }
  .msg-form .btn { flex: none; }
}

/* ===== v1.6.0 积分 / 钱包明细 + 最近访客 ===== */

/* 余额 / 积分 概览卡 */
.wallet-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.wb-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.wb-label { font-size: 13px; color: var(--muted); }
.wb-val { font-size: 22px; font-weight: 700; color: var(--white); }

/* 筛选 tab */
.wallet-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.wallet-filter a { padding: 7px 18px; border-radius: 99px; background: var(--card); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.wallet-filter a.on { color: var(--bg); background: var(--white); border-color: var(--white); font-weight: 600; }

/* 流水列表 */
.wallet-list { padding: 4px 0; }
.wl-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.wl-row:last-child { border-bottom: 0; }
.wl-icon { font-size: 18px; width: 24px; text-align: center; flex: none; }
.wl-main { flex: 1; min-width: 0; }
.wl-label { font-size: 14px; color: var(--text); }
.wl-time { margin-top: 2px; }
.wl-delta { font-size: 15px; font-weight: 700; flex: none; min-width: 84px; text-align: right; }
.wl-in { color: var(--success); }
.wl-out { color: var(--danger); }
.wl-neutral { color: var(--text); }
.wl-bal { font-size: 12px; color: var(--muted); flex: none; min-width: 76px; text-align: right; }

/* 访客列表（完整页） */
.visitor-list { padding: 6px; }
.vl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: inherit; }
.vl-row:hover { background: var(--card-2); }
.vl-main { flex: 1; min-width: 0; }
.vl-name { font-size: 14px; color: var(--text); }
.vl-time { margin-top: 2px; }
.vl-go { color: var(--muted); font-size: 18px; }

/* 访客头像条（个人中心摘要） */
.visitor-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 2px; }
.vs { display: inline-flex; transition: transform .15s; }
.vs:hover { transform: translateY(-2px); }
.vs-more { font-size: 13px; color: var(--muted); padding: 0 6px; }
.vs-more:hover { color: var(--text); }

@media (max-width: 560px) {
  .wl-bal { display: none; }
  .wl-delta { min-width: 70px; }
}

/* ===== v1.7.0 新增样式 ===== */

/* 顶部搜索框 */
.nav-search { display: flex; align-items: center; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 12px; margin: 0 10px; }
.nav-search-input { background: transparent; border: 0; outline: none; color: var(--text); width: 180px; max-width: 38vw; font-size: 13px; }
.nav-search-btn { background: transparent; border: 0; cursor: pointer; font-size: 14px; padding: 4px 8px; }

/* 转发卡片 */
.repost-card { margin: 8px 0 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--card-2); }
.rp-head { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; }
.rp-flag { color: var(--muted); }
.rp-author { color: var(--accent); font-weight: 600; }
.rp-time { color: var(--muted); }
.rp-content { font-size: 14px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.rp-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 6px; margin-top: 8px; }
.rp-media img, .rp-media video { width: 100%; border-radius: var(--radius-sm); max-height: 180px; object-fit: cover; }
.rp-link { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.rp-link:hover { color: var(--accent); }

/* @提及 / #话题 高亮链接 */
.mention { color: var(--accent); font-weight: 600; }
.mention:hover { text-decoration: underline; }
.topic { color: var(--accent-2, #1a6dd4); font-weight: 600; }
.topic:hover { text-decoration: underline; }

/* 签到页 */
.checkin-card { padding: 18px; text-align: center; }
.ci-stats { display: flex; justify-content: space-around; margin-bottom: 16px; }
.ci-stat { display: flex; flex-direction: column; align-items: center; }
.ci-stat b { font-size: 26px; color: var(--accent); }
.ci-stat span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ci-done { color: var(--success, #2e7d32); font-weight: 600; }
.ci-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.ci-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--card-2); font-size: 13px; color: var(--muted); }
.ci-day.on { background: var(--accent); color: #fff; }
.ci-tip { font-size: 12px; margin-top: 6px; }

/* 搜索页 */
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.search-input { flex: 1; }
.search-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.search-tabs a { padding: 5px 12px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 13px; }
.search-tabs a.on { background: var(--accent); color: #fff; }
.search-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 8px; }
.su { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-sm); background: var(--card-2); }
.su-name { font-weight: 600; color: var(--text); }
.su-bio { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.search-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 8px; }
.sg { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius-sm); background: var(--card-2); }
.sg img { width: 100%; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.sg-ph { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--card-3, #f0f0f2); border-radius: var(--radius-sm); }
.sg-name { font-weight: 600; color: var(--text); }
.sg-meta { font-size: 12px; }
/* 搜索关键词高亮 */
mark.hl { background: rgba(255, 200, 60, .28); color: #ffd76a; padding: 0 2px; border-radius: 3px; }
/* 搜索动态片段 */
.search-posts { display: flex; flex-direction: column; gap: 8px; }
.sp { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--card-2); align-items: flex-start; }
.sp:hover { background: var(--card-3, #f0f0f2); }
.sp-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-head { font-size: 13px; color: var(--text); }
.sp-head .muted { font-weight: 400; margin-left: 6px; font-size: 12px; }
.sp-excerpt { font-size: 13px; color: var(--muted); line-height: 1.6; word-break: break-all; }

/* 举报表单 */
.report-reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.report-reason { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.report-reason input { accent-color: var(--accent); }
.report-captcha { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 14px; }
.report-captcha b { color: var(--accent); letter-spacing: 1px; }
.report-captcha input { width: 130px; }

/* 后台举报管理 */
.admin-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.admin-filters a { padding: 5px 12px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 13px; }
.admin-filters a.on { background: var(--accent); color: #fff; }
.report-ops { display: flex; flex-wrap: wrap; gap: 4px; }

/* ==================== v1.8.0：勋章 / VIP / 排行榜 / 收藏 ==================== */

/* 个人主页：顶部通栏封面 Hero（沉稳深蓝窄带 + 白卡资料区） */
.profile-hero { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.ph-cover { height: 96px; background: linear-gradient(120deg, #22304a 0%, #1a6dd4 58%, #3b5bdb 100%); }
.ph-inner { display: flex; align-items: flex-end; gap: 18px; padding: 0 24px 20px; }
.ph-avatar { flex: none; margin-top: -40px; }
.ph-avatar .avatar { width: 96px; height: 96px; border: 4px solid var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.14); border-radius: 50%; object-fit: cover; background: var(--card-2); }
.ph-avatar .avatar-text { display: inline-flex; align-items: center; justify-content: center; font-size: 36px; color: var(--muted); }
.ph-info { flex: 1; min-width: 0; padding-top: 14px; }
.ph-name { font-size: 20px; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; line-height: 1.3; }
.ph-bio { margin: 4px 0 10px; line-height: 1.6; }
.ph-stats { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.ph-stats b { color: var(--text); font-size: 15px; margin-right: 3px; }
.ph-act { flex: none; display: flex; gap: 8px; align-items: center; padding-top: 14px; }
.profile-cols { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; align-items: start; }
.profile-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.profile-aside { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.block-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block-head-row .block-title { margin: 0; }
@media (max-width: 820px) {
  .profile-cols { grid-template-columns: 1fr; }
  .profile-aside { position: static; }
}
@media (max-width: 640px) {
  .ph-inner { flex-direction: column; align-items: center; text-align: center; padding: 0 16px 18px; }
  .ph-avatar { margin-top: -34px; }
  .ph-stats { justify-content: center; }
  .ph-act { width: 100%; justify-content: center; flex-wrap: wrap; padding-top: 0; }
  .ph-act .btn { flex: 1; justify-content: center; }
}

/* 勋章墙 */
.badge-wall { margin-top: 14px; }
.bw-head { display: flex; align-items: center; justify-content: space-between; }
.bw-head .block-head { margin: 0 0 10px; }
.bw-list { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border); font-size: 13px; color: var(--text); cursor: default; }
.badge-item i { font-style: normal; font-size: 15px; }
.badge-item:hover { border-color: var(--accent); }

/* VIP 标识与昵称高亮 */
.vip-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #1a1206; background: linear-gradient(135deg, #f7d774, #e6b422); vertical-align: 2px; }
.vip-name { color: #e8c15a !important; }
a.vip-name:hover { color: #f7d774 !important; }

/* VIP 会员页 */
.vip-status { display: flex; align-items: center; gap: 16px; padding: 22px; }
.vip-status.is-vip { border: 1px solid rgba(230, 180, 34, .45); background: linear-gradient(160deg, rgba(230, 180, 34, .10), transparent 55%); }
.vs-icon { font-size: 40px; }
.vs-info h3 { margin: 0 0 6px; }
.vip-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vip-plan { position: relative; text-align: center; padding: 20px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vip-plan.hot { border: 1px solid rgba(230, 180, 34, .55); }
.vp-flag { position: absolute; top: -1px; right: -1px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #1a1206; background: linear-gradient(135deg, #f7d774, #e6b422); border-radius: 0 var(--radius-sm) 0 10px; }
.vp-name { font-weight: 700; font-size: 15px; }
.vp-days { font-size: 13px; color: var(--muted); }
.vp-price { font-size: 15px; }
.vp-price b { font-size: 24px; color: #e8c15a; }
.vp-avg { font-size: 12px; }
.vip-perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.perk { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.perk span { font-size: 20px; }
.perk i { font-style: normal; font-size: 12px; }
.vip-tip { margin-top: 12px; font-size: 12px; }
@media (max-width: 640px) { .vip-plans { grid-template-columns: 1fr; } .vip-perks { grid-template-columns: 1fr; } }

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); }
.rank-row:hover { background: var(--card-2); }
.rank-no { width: 30px; text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; flex: none; }
.rank-no.top { font-size: 20px; }
.rank-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rank-name { font-size: 14px; }
.rank-sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { flex: none; font-size: 13px; color: var(--muted); }
.rank-tip { margin-top: 10px; font-size: 12px; }

/* 收藏：视频间行 / 小说阅读页收藏按钮 */
.fav-live-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.fav-live-row:last-child { border-bottom: 0; }
.flr-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); }
.flr-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flr-sub { font-size: 12px; flex: none; }
.nr-fav { margin-left: 8px; font-size: 13px; }
.btn-fav.faved { color: #e8c15a; }

/* ================= v1.9.0 话题 / 积分商城 / 等级 / 审核 ================= */

/* 动态正文下方话题标签 */
.post-topics { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

/* 话题广场 - 热门榜 */
.topic-hot { display: flex; flex-direction: column; gap: 2px; }
.th-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); }
.th-item:hover { background: var(--card-2); }
.th-rank { width: 26px; text-align: center; font-size: 16px; flex: none; }
.th-name { font-weight: 600; flex: 1; }
.th-count { font-size: 12px; color: var(--muted); flex: none; }

/* 话题广场 - 全部网格 */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tg-item { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); }
.tg-item:hover { border-color: var(--accent); }
.tg-cover { width: 100%; height: 80px; object-fit: cover; border-radius: var(--radius-sm); }
.tg-name { font-weight: 600; }
.tg-meta { font-size: 12px; color: var(--muted); }
.tg-desc { font-size: 12px; color: var(--muted); }
.tg-rec { position: absolute; top: 8px; right: 8px; font-size: 11px; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 99px; }

/* 话题详情头部 */
.topic-head { display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 16px; }
.thd-cover { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.thd-info h2 { margin-bottom: 6px; }
.thd-info .small { margin-top: 4px; }

/* 积分商城 */
.mall-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.mall-points { font-size: 14px; color: var(--muted); }
.mall-points b { color: var(--warn); font-size: 16px; }
.mall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mall-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; display: flex; flex-direction: column; }
.mall-card:hover { border-color: var(--border-2); }
.mc-cover { width: 100%; height: 120px; object-fit: cover; }
.mc-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mc-name { font-weight: 600; }
.mc-desc { font-size: 12px; color: var(--muted); }
.mc-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; align-items: center; }
.mc-price { color: var(--warn); font-weight: 700; }
.mc-stock { color: var(--muted); }
.mc-type { border: 1px solid var(--border-2); border-radius: 99px; padding: 1px 8px; color: var(--muted); }

/* 我的等级 */
.level-card { display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 16px; }
.lc-badge { width: 64px; height: 64px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; flex: none; }
.lc-info { flex: 1; }
.lc-info h2 { margin-bottom: 2px; }
.lc-progress { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin: 8px 0 4px; }
.lc-bar { height: 100%; background: linear-gradient(90deg, #1a6dd4, #4ade80); }
.level-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.ll-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.ll-item.reached { border-color: var(--accent); }
.ll-badge { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex: none; }
.ll-title { font-weight: 600; }
.ll-min { margin-left: auto; font-size: 12px; color: var(--muted); }
.level-perks { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.level-perks li { font-size: 14px; color: var(--muted); }
.level-perks li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* 后台审核队列 */
.review-item { padding: 14px 16px; margin-bottom: 10px; }
.ri-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ri-body { font-size: 14px; color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
.ri-ops { display: flex; gap: 8px; margin-top: 10px; }

/* ===== 视频间 Studio（浏览器推流控制台） ===== */
.studio-page { max-width: 1100px; margin: 0 auto; padding: 18px 16px; }
.studio-layout { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.studio-main { flex: 1; min-width: 0; }
.studio-side { width: 260px; flex: none; }
.studio-preview-wrap { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; min-height: 360px; display: flex; align-items: center; justify-content: center; }
.studio-preview { width: 100%; max-height: 60vh; object-fit: contain; display: none; }
.studio-placeholder { display: flex; align-items: center; justify-content: center; }
.studio-ph-inner { text-align: center; padding: 40px 20px; }
.studio-devices { position: absolute; bottom: 10px; left: 10px; z-index: 5; }
.studio-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding: 12px 0; }
.studio-controls .btn-lg { padding: 10px 28px; font-size: 15px; }
.studio-controls .active { background: rgba(255,255,255,.08); border-color: var(--primary); color: var(--primary); }
.studio-info { font-size: 13px; margin-left: auto; }
.btn-off { opacity: .55; }

/* 浏览器推流的视频在观众端 */
.live-video { width: 100%; display: block; background: #000; }

@media (max-width: 768px) {
  .studio-layout { flex-direction: column; }
  .studio-side { width: 100%; }
  .studio-preview-wrap { min-height: 240px; }
}

/* ===== 视频弹幕 ===== */
.danmaku-layer { position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: hidden; pointer-events: none; z-index: 4; }
.danmaku-layer.hide { display: none; }
.danmaku-item { position: absolute; left: 100%; top: 0; white-space: nowrap; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.85); will-change: transform; animation: danmaku-move linear forwards; }
@keyframes danmaku-move { from { transform: translateX(0); } to { transform: translateX(var(--dm-dist, -100%)); } }
.danmaku-item.dm-fixed { left: 0; right: 0; top: 0; text-align: center; padding: 0 12px; font-weight: 700; animation: dm-fixed ease forwards; }
@keyframes dm-fixed { 0% { opacity: 0; } 12% { opacity: var(--dm-op, 1); } 86% { opacity: var(--dm-op, 1); } 100% { opacity: 0; } }
.dm-types { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; flex: none; }
.dm-types button { border: none; background: var(--card-2); padding: 0 10px; line-height: 26px; font-size: 13px; color: var(--muted); cursor: pointer; }
.dm-types button + button { border-left: 1px solid var(--border); }
.dm-types button.on { background: var(--accent); color: #fff; }
.danmaku-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.danmaku-bar .input { flex: 1; min-width: 140px; }
.danmaku-bar .dm-color { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.danmaku-bar .dm-color input[type=color] { width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); background: none; border-radius: 4px; cursor: pointer; }
.danmaku-bar .dm-toggle { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.danmaku-bar { position: relative; }
.danmaku-bar .dm-gear, .danmaku-bar .dm-history { padding: 0 9px; line-height: 26px; }
.danmaku-bar .dm-history { color: var(--muted); }
.danmaku-settings {
  position: absolute; right: 10px; top: 100%; margin-top: 6px; z-index: 30;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; width: 224px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column; gap: 10px;
}
.danmaku-settings[hidden] { display: none; }
.danmaku-settings .ds-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text); }
.danmaku-settings .ds-row select { font-size: 13px; padding: 2px 4px; }
.danmaku-settings .ds-row input[type=range] { flex: 1; max-width: 120px; }
.dm-mirror { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; user-select: none; }
.dm-mirror input { width: 14px; height: 14px; }

/* ===== 好评（星级评分） ===== */
.rating-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.rating-label { font-weight: 600; }
.star-rating { display: inline-flex; gap: 2px; }
.star-rating .star { font-size: 22px; line-height: 1; color: var(--border); cursor: pointer; transition: color .15s, transform .1s; }
.star-rating .star.on { color: #ffb400; }
.star-rating .star:hover { transform: scale(1.15); }
.rating-text { font-size: 13px; }

/* ============================================================
   应用中心（后台）
   ============================================================ */
.app-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 20px;
}
.app-hero h2 { font-size: 18px; margin-bottom: 6px; }
.app-hero p { color: var(--muted); font-size: 13px; max-width: 640px; }
.app-hero-stat { text-align: right; white-space: nowrap; }
.app-hero-stat b { display: block; font-size: 28px; color: var(--accent); line-height: 1.2; }
.app-hero-stat span { font-size: 12px; color: var(--muted); }

.app-group { margin-bottom: 22px; }
.app-group-title {
  font-size: 14px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.app-group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.app-group-title span {
  background: var(--card-2); border: 1px solid var(--border); color: var(--dim);
  font-size: 11px; padding: 0 7px; border-radius: 10px; font-weight: 500;
}
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.app-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  position: relative; opacity: .62;
}
.app-card:hover { border-color: var(--border-2); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.app-card.on { opacity: 1; }
.app-card.on::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.app-card.core { opacity: 1; cursor: default; background: var(--card-2); }

.app-card-head { display: flex; align-items: center; gap: 10px; }
.app-icon { font-size: 22px; line-height: 1; }
.app-title { flex: 1; min-width: 0; }
.app-title b { display: block; font-size: 15px; }
.app-title code { font-size: 11px; color: var(--dim); font-family: Consolas, Monaco, monospace; }
.app-lock { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px; white-space: nowrap; }

.app-switch { position: relative; width: 42px; height: 24px; flex: none; }
.app-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.app-switch i {
  position: absolute; inset: 0; background: var(--border-2); border-radius: 24px;
  transition: background .18s;
}
.app-switch i::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.app-switch input:checked + i { background: var(--accent); }
.app-switch input:checked + i::after { transform: translateX(18px); }

.app-desc { font-size: 13px; color: var(--muted); margin: 9px 0 0; line-height: 1.6; }
.app-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.app-tag {
  font-size: 11px; color: var(--dim); background: var(--card-2);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px;
  font-family: Consolas, Monaco, monospace;
}
.app-tag.admin { color: var(--muted); }

.app-actions {
  position: sticky; bottom: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; box-shadow: 0 -2px 12px rgba(0,0,0,.04);
}
.app-actions .muted { font-size: 12px; }

.stat-card.app-stat .num small { font-size: 15px; color: var(--muted); font-weight: 400; }
.stat-card.app-stat .sub a { color: var(--accent); text-decoration: none; }
.stat-card.app-stat .sub a:hover { text-decoration: underline; }

/* 前台：应用已关闭提示页 */
.app-off { text-align: center; padding: 54px 24px; }
.app-off-icon { font-size: 52px; line-height: 1; margin-bottom: 14px; }
.app-off h2 { font-size: 20px; margin-bottom: 8px; }
.app-off p { font-size: 14px; }
.app-off-tip { color: var(--muted); margin-top: 10px; font-size: 13px; }
.app-off-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-hero-stat { text-align: left; }
}

/* ============================================================
   移动端打磨（发帖 / 视频上传 / 触屏体验）— v1.9.27
   ============================================================ */
@media (max-width: 640px) {
  /* 输入框 16px：避免 iOS 聚焦时自动放大页面 */
  .input, .textarea, select.input, .nav-search-input, .pub-row .textarea, .live-chat-form .input { font-size: 16px; }

  /* 发帖框：工具按钮换行、发布按钮占满整行、预览图略大便于点按 */
  .pub-toolbar { flex-wrap: wrap; gap: 10px; }
  .pub-tool { padding: 8px 14px; font-size: 14px; }
  .pub-toolbar .btn-primary { flex: 1 1 100%; }
  .pub-preview img, .pub-preview video { width: 72px; height: 72px; }

  /* 视频上传：文件选择框更高的点按区域，卡片内边距更舒适 */
  input[type="file"].input { padding: 12px; }
  .auth-box.wide-form { padding: 0 12px; }
  .auth-box .card { padding: 16px; }
  .auth-box .btn-block { padding: 14px; }

  /* 极窄屏：搜索提交按钮让位，输入框占满，保留搜索可达 */
  .nav-search-btn { display: none; }
  .nav-search-input { width: 100%; max-width: 100%; }

  /* 富文本编辑器工具栏换行，避免移动端溢出 */
  .ql-toolbar.ql-snow { flex-wrap: wrap; }
}

/* 触屏设备：去除点击高亮等待，按钮/标签响应更跟手 */
@media (hover: none) {
  .btn, .pub-tool, .chip, .nav-links a, .tabbar a, .theme-toggle { -webkit-tap-highlight-color: transparent; }
  .pub-tool:active, .chip:active, .tabbar a:active { transform: scale(.96); transition: transform .1s; }
}


/* ================= 后台：模板 / 皮肤管理 ================= */
.theme-manage .muted { margin-bottom: 16px; }
.theme-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}
.theme-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.08); }
.theme-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.theme-preview {
  position: relative; height: 116px; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.tp-bar { position: absolute; top: 0; left: 0; right: 0; height: 8px; }
.tp-body {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; align-items: center; gap: 10px;
}
.tp-logo { font-size: 22px; line-height: 1; }
.tp-btn {
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.tp-chip {
  padding: 3px 12px; border-radius: 99px; font-size: 12px;
  border: 1px solid var(--border-2); background: rgba(255,255,255,.6);
}
.theme-meta { padding: 14px 16px 16px; }
.theme-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text);
}
.theme-cur {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); border-radius: 99px; padding: 2px 10px;
}
.theme-desc { margin: 6px 0 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.theme-swatches { display: flex; gap: 6px; margin-bottom: 14px; }
.theme-swatches i {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-2);
}
.theme-actions { display: flex; align-items: center; gap: 8px; }
.theme-on { font-size: 13px; color: var(--success); font-weight: 600; }
.theme-del-btn {
  color: var(--danger, #c0392b);
  border: 1px solid var(--danger, #c0392b);
  background: transparent;
}
.theme-del-btn:hover { background: var(--danger, #c0392b); color: #fff; }

/* 前台皮肤预览浮动条 */
.theme-preview-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 200; display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 99px; padding: 8px 10px 8px 18px;
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
  backdrop-filter: blur(10px); max-width: 92vw;
}
.theme-preview-bar .tp-text { font-size: 14px; color: var(--text); white-space: nowrap; }
.theme-preview-bar .tp-text b { color: var(--primary); }

/* 小说人气榜封面 */
.rank-cover {
  width: 44px; height: 58px; flex: 0 0 auto;
  border-radius: 6px; overflow: hidden; background: var(--card-2);
  display: flex; align-items: center; justify-content: center;
}
.rank-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-cover-ph { font-size: 20px; font-weight: 700; color: var(--muted); line-height: 1; }

/* ===================== 组长后台 / 矩阵数据仪表盘 ===================== */
.gadmin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.gadmin-head-l h2 { margin: 0 0 2px; font-size: 18px; }
.gadmin-head-r { display: flex; gap: 6px; flex-wrap: wrap; }

.dash-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.dash-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 4px;
}
.dc-label { font-size: 13px; color: var(--muted); }
.dc-value { font-size: 26px; font-weight: 700; color: var(--text); }
.dc-sub { font-size: 12px; color: var(--muted); }

.dash-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.dash-chart {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; min-height: 280px; display: flex; flex-direction: column;
}
.dash-chart-head h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.dash-chart canvas { max-height: 230px; }

@media (max-width: 760px) {
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-grid2 { grid-template-columns: 1fr; }
}

.gadmin-form .form-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gadmin-form .form-row3 .field { margin-bottom: 10px; }
@media (max-width: 760px) { .gadmin-form .form-row3 { grid-template-columns: 1fr; } }

.perm-row-group { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.gadmin-filter { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.gadmin-filter .input { max-width: 200px; }

.pf-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; color: #fff; font-weight: 500; }
.ok-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; color: #fff; background: #10b981; font-weight: 500; }
.no-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; color: #fff; background: #ef4444; font-weight: 500; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--border); color: var(--muted); font-weight: 600; white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:hover td { background: var(--card-2); }
.op-cell { white-space: nowrap; display: flex; gap: 4px; }
.inline-form { display: inline; }

/* ============ 仪表盘水印 ============ */
.gadmin-watermark {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background-repeat: repeat;
}

/* ============ 副组长权限复选 ============ */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.switch-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ===================== 小组 OA 协作中心（v2.1.6） ===================== */
/* ============ 协作中心：左侧栏布局 ============ */
.oa-shell { display: flex; align-items: flex-start; gap: 22px; }
.oa-side {
  position: sticky; top: 76px;
  width: 224px; flex: none; align-self: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 12px;
  max-height: calc(100vh - 96px); overflow-y: auto;
}
.oa-side-head { margin-bottom: 12px; }
.oa-back { display: inline-block; color: var(--muted); font-size: 13px; text-decoration: none; margin-bottom: 10px; }
.oa-back:hover { color: var(--primary); }
.oa-side-group { font-size: 16px; font-weight: 700; line-height: 1.35; }
.oa-side-group .oa-side-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.oa-side-set { margin-top: 10px; width: 100%; text-align: center; }
.oa-side-nav { display: flex; flex-direction: column; gap: 2px; }
.oa-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 14px; color: var(--text); text-decoration: none;
}
.oa-side-link:hover { background: var(--card-2); }
.oa-side-link.on { background: var(--primary); color: #fff; }
.oa-side-ic { font-size: 17px; width: 22px; text-align: center; flex: none; }
.oa-side-tx { flex: 1; min-width: 0; }
.oa-side-link .oa-dot { margin-left: auto; }
.oa-main { flex: 1; min-width: 0; }
.oa-ro { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.oa-body { padding-top: 4px; }
.oa-welcome { padding: 16px 18px; }
.oa-welcome h3 { margin: 0 0 6px; }
.oa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.oa-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.os-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.os-label { font-size: 13px; color: var(--text); }
.os-sub { font-size: 12px; color: var(--muted); }
.oa-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.oa-qbtn { display: inline-block; padding: 9px 16px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); text-decoration: none; font-size: 14px; font-weight: 600; }
.oa-qbtn:hover { filter: brightness(0.97); }
.oa-block { padding: 14px 16px; }
.oa-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.oa-block-head h3 { font-size: 15px; margin: 0; }
.oa-more { font-size: 13px; color: var(--primary); text-decoration: none; }
.oa-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.oa-row:first-of-type { border-top: none; }
.oa-row-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.oa-row-main:hover { color: var(--primary); }
.oa-pri { font-size: 12px; padding: 2px 8px; border-radius: 99px; color: #fff; flex-shrink: 0; }
.pri-0 { background: #8a8a93; } .pri-1 { background: #3b5bdb; } .pri-2 { background: #e8590c; } .pri-3 { background: #e03131; }
.oa-st { font-size: 12px; padding: 2px 8px; border-radius: 99px; flex-shrink: 0; }
.st-0 { background: #fff3bf; color: #8a6d00; } .st-1 { background: #d0ebff; color: #165a8a; }
.st-2 { background: #d3f9d8; color: #1f7a36; } .st-3 { background: #ffe3e3; color: #b02525; }
.tag-pin { background: #fff0f6; color: #c2255c; border: 1px solid #fcc2d2; font-size: 12px; padding: 1px 7px; border-radius: 99px; }
.oa-ext { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; color: #fff; flex-shrink: 0; background: #868e96; min-width: 34px; text-align: center; }
.ext-pdf { background: #e03131; } .ext-doc, .ext-docx { background: #2b6cb0; } .ext-xls, .ext-xlsx { background: #1f8a4c; }
.ext-ppt, .ext-pptx { background: #d9480f; } .ext-zip, .ext-rar, .ext-7z, .ext-tar, .ext-gz { background: #7048b6; }
.ext-jpg, .ext-jpeg, .ext-png, .ext-gif, .ext-webp, .ext-bmp { background: #0c8599; } .ext-mp4, .ext-webm, .ext-mov, .ext-avi, .ext-mkv { background: #c2255c; }
.ext-mp3, .ext-wav, .ext-ogg, .ext-flac { background: #5f3dc4; }
.oa-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.oa-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.oa-filters a { padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); text-decoration: none; border: 1px solid var(--border); }
.oa-filters a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.oa-task { display: block; padding: 14px 16px; margin-bottom: 12px; }
.oa-task-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.oa-task-title { font-weight: 600; font-size: 15px; color: var(--text); }
.oa-task-content { font-size: 14px; color: var(--muted); margin-bottom: 8px; white-space: pre-wrap; }
.oa-task-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.oa-assign { font-size: 13px; color: var(--muted); margin: 6px 0; }
.oa-assignee { display: inline-block; background: var(--card-2); border: 1px solid var(--border); border-radius: 99px; padding: 1px 9px; margin: 2px 4px 2px 0; }
.oa-progress { position: relative; height: 16px; background: var(--card-2); border-radius: 99px; margin: 10px 0; overflow: hidden; }
.oa-progress-bar { height: 100%; background: var(--primary); border-radius: 99px; }
.oa-progress-txt { position: absolute; right: 8px; top: 0; line-height: 16px; font-size: 11px; color: var(--text); }
.oa-task-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oa-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.oa-note { width: 140px; padding: 5px 8px; font-size: 13px; }
.oa-form { display: flex; flex-direction: column; gap: 10px; }
.oa-form label { font-size: 13px; color: var(--muted); font-weight: 600; }
.oa-form input[type=text], .oa-form input[type=date], .oa-form input[type=number], .oa-form select, .oa-form textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font: inherit; font-size: 14px; width: 100%; box-sizing: border-box;
}
.oa-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.oa-form-row > div { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 6px; }
.oa-assign-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 200px; overflow: auto; padding: 6px 0; }
.oa-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text); font-weight: 400; cursor: pointer; }
.oa-form-act { display: flex; gap: 10px; margin-top: 4px; }
.oa-type { font-size: 12px; padding: 2px 8px; border-radius: 99px; color: #fff; flex-shrink: 0; }
.type-leave { background: #2b6cb0; } .type-expense { background: #1f8a4c; } .type-purchase { background: #d9480f; } .type-other { background: #868e96; }
.oa-appr { padding: 14px 16px; margin-bottom: 12px; }
.oa-ann { padding: 14px 16px; margin-bottom: 12px; }
.oa-search { display: flex; gap: 6px; }
.oa-search input[type=text] { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.oa-filelist { padding: 6px 16px; }
.oa-file-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.oa-file-row:first-child { border-top: none; }
.oa-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.oa-file-name:hover { color: var(--primary); }
.oa-switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.oa-switch:first-of-type { border-top: none; }
.oa-switch input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); }
.oa-switch strong { font-size: 15px; }
.oa-tip { padding: 14px 16px; }
.oa-tip ul { margin: 6px 0 0; padding-left: 18px; }
.oa-tip li { margin: 4px 0; font-size: 13px; }

/* ============ v2.2.0 协作系统增强 ============ */
.oa-h3 { font-size: 15px; margin: 0 0 10px; }
.oa-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.oa-list { display: block; }
.oa-desc { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.oa-toolbar-r, .oa-actions-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.oa-chip { display: inline-block; padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); text-decoration: none; border: 1px solid var(--border); }
.oa-chip:hover { color: var(--text); background: var(--card-2); }
.oa-chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.oa-tag { display: inline-block; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); border-radius: 99px; padding: 1px 9px; font-size: 12px; margin: 2px 4px 2px 0; }
.oa-panel { padding: 14px 16px; margin-bottom: 12px; }
.oa-inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }

/* ---- v2.2.12 OA 文件拖拽 / 文件夹上传 ---- */
.oa-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 26px 16px; text-align: center; transition: background .15s, border-color .15s; cursor: default; }
.oa-drop.is-drag { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--card)); }
.oa-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.oa-drop-ico { font-size: 30px; line-height: 1; }
.oa-drop-title { font-size: 15px; font-weight: 600; margin: 2px 0 0; }
.oa-drop-btns { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.oa-queue { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.oa-queue-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-queue-bar { flex: 1; min-width: 80px; height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.oa-queue-bar > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s; }
.oa-queue-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 280px; overflow: auto; }
.oa-q-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.oa-q-item:first-child { border-top: none; }
.oa-q-ico { flex-shrink: 0; }
.oa-q-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-q-size { flex-shrink: 0; }
.oa-q-status { flex-shrink: 0; width: 66px; text-align: right; }
.oa-q-item.done .oa-q-status { color: #1f8a4c; }
.oa-q-item.err .oa-q-status { color: #d9480f; }
.oa-q-track { flex-shrink: 0; width: 80px; height: 5px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.oa-q-track > i { display: block; height: 100%; width: 0; background: var(--primary); }
.oa-q-item.done .oa-q-track > i { background: #1f8a4c; }
.oa-q-item.err .oa-q-track > i { background: #d9480f; }
.oa-inline-form input[type=text], .oa-inline-form select { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.oa-inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-row > label { font-size: 13px; color: var(--muted); font-weight: 600; }
.form-row input[type=text], .form-row input[type=number], .form-row input[type=date], .form-row select, .form-row textarea {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font: inherit; font-size: 14px; width: 100%; box-sizing: border-box;
}
.btn.danger, .btn-warn { color: #c92a2a; }
.btn.danger:hover { background: #fff0f0; }
.oa-fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.oa-fld-label { font-size: 13px; color: var(--muted); font-weight: 600; }

/* 导航待办角标 */
.oa-dot { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: #e03131; color: #fff; font-size: 11px; font-style: normal; line-height: 16px; text-align: center; }
.oa-side-link.on .oa-dot { background: #fff; color: var(--primary); }

/* 我的待办 */
.oa-todo-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; text-decoration: none; color: var(--text); }
.oa-todo-card:hover { border-color: var(--primary); }
.oa-todo-card.has .oa-todo-num { background: #e03131; }
.oa-todo-num { min-width: 52px; height: 52px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.oa-todo-txt { flex: 1; min-width: 0; }
.oa-todo-go { font-size: 13px; color: var(--primary); }
.oa-todo-sum { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; }
.oa-todo-sec { padding: 14px 16px; margin-bottom: 12px; }
.oa-todo-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; text-decoration: none; color: var(--text); }
.oa-todo-row:first-of-type { border-top: none; }
.oa-todo-row:hover .oa-todo-title { color: var(--primary); }
.oa-todo-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-late, .oa-overdue { color: #e03131; font-style: normal; margin-left: 4px; font-weight: 600; }

/* 数据看板 */
.oa-charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.oa-chart { padding: 14px 16px; }
.oa-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.oa-bar-label { width: 66px; flex-shrink: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-bar-track { flex: 1; height: 10px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.oa-bar { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.oa-bar.c0 { background: #adb5bd; } .oa-bar.c1 { background: #3b5bdb; }
.oa-bar.c2 { background: #2f9e44; } .oa-bar.c3 { background: #e8590c; }
.oa-bar-val { width: 34px; text-align: right; flex-shrink: 0; color: var(--muted); }
.oa-cols { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 130px; padding-top: 6px; }
.oa-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.oa-col-num { font-size: 11px; color: var(--muted); }
.oa-col-bar { display: block; width: 100%; max-width: 30px; background: var(--primary-soft); border-radius: 5px 5px 0 0; position: relative; overflow: hidden; }
.oa-col-bar i { position: absolute; left: 0; right: 0; bottom: 0; display: block; background: var(--primary); }
.oa-col-bar.alt { background: #3b5bdb; }
.oa-col-label { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* 任务看板 / 卡片 */
.oa-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.oa-board-col { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 120px; }
.oa-board-h { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.oa-t-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.oa-t-title { font-weight: 600; font-size: 15px; color: var(--text); flex: 1; min-width: 0; }
.oa-t-tags { margin: 4px 0; }
.oa-t-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.oa-t-assign, .oa-t-assign-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.oa-ava, .oa-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--card-2); }
.oa-assign-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); background: var(--card-2); border-radius: 99px; padding: 2px 8px; }
.oa-sub-h { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }
.oa-sub-list { margin: 0 0 8px; }
.oa-sub-toggle { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.oa-sub-add { display: flex; gap: 6px; }
.oa-comments { margin-top: 12px; }
.oa-row2 { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }

/* 审批 */
.oa-appr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oa-appr-title { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; color: var(--text); }
.oa-appr-meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.oa-appr-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.oa-appr-flow { list-style: none; margin: 8px 0; padding: 0; }
.oa-appr-flow li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.oa-appr-flow li:first-child { border-top: none; }
.oa-step-dot { width: 10px; height: 10px; border-radius: 50%; background: #ced4da; flex-shrink: 0; }
.oa-appr-flow .pass .oa-step-dot { background: #2f9e44; }
.oa-appr-flow .reject .oa-step-dot { background: #e03131; }
.oa-appr-flow .pending .oa-step-dot { background: #f59f00; }
.oa-cc { font-size: 13px; color: var(--muted); margin: 6px 0; }
.oa-mtbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.oa-mtbl th, .oa-mtbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.oa-mtbl th { color: var(--muted); font-weight: 600; background: var(--card-2); }

/* 公告 */
.oa-ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oa-ann-title { font-weight: 600; font-size: 15px; color: var(--text); flex: 1; min-width: 0; }
.oa-ann-meta { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.oa-ann-content, .oa-rich-content, .oa-rich { font-size: 14px; line-height: 1.75; color: var(--text); word-break: break-word; }
.oa-ann-content img, .oa-rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* 合同字段占位符（正文编辑器内与详情页共用） */
.ctf {
  display: inline-block;
  padding: 0 6px;
  margin: 0 2px;
  border-radius: 4px;
  background: #eef4ff;
  color: #1d4ed8;
  border: 1px solid #c7d7ff;
  font-weight: 600;
  white-space: nowrap;
  user-select: all;
}
.oa-rich-content .ctf, .oa-quill .ctf { background: #eef4ff; color: #1d4ed8; border: 1px solid #c7d7ff; }
.ctf-amount { background: #fff4e6; color: #b25e09; border-color: #ffd8a8; }
.ctf-idcard { background: #f3f0ff; color: #5f3dc4; border-color: #d0bfff; }
.ctf-date { background: #e6fcf5; color: #0c8599; border-color: #96f2d7; }

/* Quill 编辑器容器高度 */
.oa-quill.ql-container, .oa-quill { min-height: 280px; }
.oa-quill.ql-container { font-size: 14px; }
.ql-toolbar.ql-snow { border-radius: var(--radius) var(--radius) 0 0; }
.ql-container.ql-snow { border-radius: 0 0 var(--radius) var(--radius); }
.ql-editor { min-height: 280px; }

/* 模块插入面板 */
.oa-mod-panel {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 10px);
  padding: 12px;
  margin: 10px 0 14px;
  background: var(--card-2, #f8fafc);
}
.oa-mod-title { font-weight: 600; font-size: 13px; color: var(--muted, #6b7280); margin-bottom: 8px; }
.oa-mod-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.oa-mod-input { flex: 1; min-width: 0; }
.oa-mod-img { flex-wrap: wrap; }
.oa-dropzone {
  flex: 1;
  min-width: 200px;
  border: 1.5px dashed var(--border, #cbd5e1);
  border-radius: var(--radius-sm, 8px);
  padding: 14px;
  text-align: center;
  color: var(--muted, #6b7280);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.oa-dropzone.drag { background: #eef4ff; border-color: #1d4ed8; }
.oa-dropzone-tip { font-size: 13px; }
.oa-mod-imgbar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }


.oa-ann-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.oa-unread { background: #ffe3e3; color: #b02525; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.oa-read { background: var(--card-2); color: var(--muted); font-size: 11px; padding: 1px 7px; border-radius: 99px; }

/* 文件共享 */
.oa-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
.oa-crumb a { color: var(--primary); text-decoration: none; }
.oa-crumb .sep { color: var(--muted); }
.oa-crumb-stat { margin-left: auto; }
.oa-folder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.oa-folder { padding: 12px 14px; display: flex; align-items: center; gap: 8px; }
.oa-folder-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.oa-folder-ico { font-size: 20px; }
.oa-folder-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-folder-main .small { margin-left: auto; }
.oa-file-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--card-2); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.oa-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oa-file-info { flex: 1; min-width: 0; }
.oa-file-list, .oa-file-ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oa-vbadge { display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.ext-image { background: #0c8599; } .ext-video { background: #c2255c; } .ext-audio { background: #5f3dc4; }
.ext-archive { background: #7048b6; } .ext-other { background: #868e96; }
.oa-menu { position: relative; display: inline-block; }
.oa-menu > summary { list-style: none; cursor: pointer; padding: 4px 10px; border-radius: var(--radius-sm); color: var(--muted); user-select: none; }
.oa-menu > summary::-webkit-details-marker { display: none; }
.oa-menu > summary:hover { background: var(--card-2); color: var(--text); }
.oa-menu-box { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 250px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px; }
.oa-verlist { margin-top: 6px; }
.oa-ver-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.oa-ver-row:first-child { border-top: none; }
.oa-ver-row.cur { background: var(--card-2); border-radius: var(--radius-sm); padding-left: 8px; padding-right: 8px; }
.oa-ver-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.oa-ver-info { flex: 1; min-width: 0; }
.oa-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.oa-preview-head h3 { margin: 0 0 4px; }
.oa-preview-body { padding: 14px 16px; text-align: center; }
.oa-preview-img { max-width: 100%; border-radius: var(--radius-sm); cursor: zoom-in; }
.oa-preview-video { max-width: 100%; max-height: 70vh; border-radius: var(--radius-sm); background: #000; }
.oa-preview-audio { width: 100%; }
.oa-preview-frame { width: 100%; height: 78vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.oa-preview-text { text-align: left; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; background: var(--card-2); border-radius: var(--radius-sm); padding: 14px; max-height: 70vh; overflow: auto; }
.zoomable { cursor: zoom-in; }

/* ---- v2.2.13 OA 知识库 / 投票问卷 / 项目看板 样式 ---- */
.oa-doc, .oa-poll, .oa-proj { padding: 14px 16px; margin-bottom: 12px; }
.oa-doc-head, .oa-poll-head, .oa-proj-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oa-doc-title, .oa-poll-title, .oa-proj-title { font-weight: 600; font-size: 15px; color: var(--text); flex: 1; min-width: 0; text-decoration: none; }
.oa-doc-sum { font-size: 13px; color: var(--muted); margin: 6px 0; }
.oa-doc-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.oa-doc-detail, .oa-poll-detail { padding: 16px 18px; margin-bottom: 12px; }
.oa-doc-content { margin-top: 12px; }
.oa-back-link { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 13px; text-decoration: none; }
.oa-back-link:hover { color: var(--primary); }
.oa-sub { font-size: 14px; font-weight: 700; margin: 14px 0 6px; }

.oa-status { font-size: 12px; padding: 2px 9px; border-radius: 99px; flex-shrink: 0; }
.oa-status-on { background: #e6f4ea; color: #1f8a4c; }
.oa-status-off { background: var(--card-2); color: var(--muted); }
.oa-status-arch { background: #fff3bf; color: #a3680a; }

.oa-result { margin: 10px 0; }
.oa-result-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.oa-result-name { color: var(--text); }
.oa-result-num { color: var(--muted); }
.oa-result-bar { height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.oa-result-bar.sm { height: 5px; margin-top: 6px; }
.oa-result-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

.oa-vote-opt { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.oa-vote-opt:hover { border-color: var(--primary); }
.oa-opt-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.oa-opt-row input[type=text] { flex: 1; }

.oa-cat-list { list-style: none; margin: 10px 0 0; padding: 0; }
.oa-cat-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.oa-cat-list li > form:first-child { flex: 1; display: flex; gap: 6px; }

.oa-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); font-weight: 400; cursor: pointer; margin: 0; }
.oa-row-end { justify-content: space-between; }

.oa-link { background: none; border: none; padding: 0; color: var(--primary); font-size: 13px; cursor: pointer; text-decoration: none; }
.oa-link:hover { text-decoration: underline; }
.oa-proj-head-card { padding: 16px 18px; margin-bottom: 12px; }
.oa-pri.p-low { background: #868e96; }
.oa-pri.p-mid { background: #3b5bdb; }
.oa-pri.p-high { background: #e8590c; }
.oa-pri.p-urg { background: #e03131; }

.oa-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
.oa-kan-col { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 80px; }
.oa-kan-head { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.oa-kan-head em { font-style: normal; color: var(--primary); }
.oa-kan-body { display: flex; flex-direction: column; gap: 8px; }
.oa-kan-empty { font-size: 13px; text-align: center; padding: 16px 0; }
.oa-kan-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.oa-kan-title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.oa-kan-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.oa-kan-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.oa-kan-move select { padding: 3px 6px; font-size: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); }

@media (max-width: 720px) {
  .oa-kanban { grid-template-columns: 1fr; }
}
/* 合同 */
.oa-contract { display: block; padding: 14px 16px; margin-bottom: 12px; text-decoration: none; color: var(--text); }
.oa-contract:hover { border-color: var(--primary); }
.oa-c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oa-c-title { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; }
.oa-c-meta, .oa-c-sub { font-size: 12px; color: var(--muted); }
.oa-c-text { font-size: 14px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; padding: 6px 0; }
.oa-c-party { font-size: 13px; color: var(--muted); background: var(--card-2); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; white-space: pre-wrap; }
.oa-c-user { display: inline-flex; align-items: center; gap: 6px; }
.oa-signers, .oa-sign-list { margin: 8px 0; }
.oa-signers { display: flex; flex-wrap: wrap; gap: 10px; }
.oa-signer { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--bg); transition: border-color .15s, background .15s; }
.oa-signer:hover { border-color: var(--primary); }
.oa-signer:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg)); }
.oa-s-name { min-width: 0; }
.oa-tpl { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.oa-tpl:first-of-type { border-top: none; }
.oa-tpl-name { flex: 1; min-width: 0; font-weight: 600; }
.oa-tpl-act { display: flex; gap: 6px; }

/* 部门 */
.oa-dept { padding: 12px 16px; font-size: 14px; }
.oa-dept-row { display: flex; align-items: center; gap: 10px; }
.oa-dept-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oa-dept-name { font-weight: 600; }
.oa-dept-act { display: flex; gap: 6px; flex-wrap: wrap; }
.oa-dept-desc { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); white-space: pre-wrap; font-size: 13px; line-height: 1.6; }
.oa-dept-desc-input { width: 100%; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font: inherit; font-size: 14px; resize: vertical; box-sizing: border-box; }

@media (max-width: 900px) {
  .oa-charts { grid-template-columns: 1fr; }
  .oa-board { grid-template-columns: repeat(2, 1fr); }
  .oa-folder-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .oa-stats { grid-template-columns: repeat(2, 1fr); }
  .oa-shell { flex-direction: column; gap: 12px; }
  .oa-side { position: static; width: 100%; max-height: none; }
  .oa-side-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .oa-side-group { flex: 1; min-width: 0; }
  .oa-side-set { width: auto; margin: 0 0 0 auto; }
  .oa-side-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .oa-side-nav::-webkit-scrollbar { display: none; }
  .oa-side-link { flex: none; white-space: nowrap; padding: 8px 12px; }
  .oa-side-ic { width: auto; }
  .oa-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .oa-filters::-webkit-scrollbar { display: none; }
  .oa-chip { flex-shrink: 0; }
  .oa-board, .oa-folder-grid { grid-template-columns: 1fr; }
  .oa-toolbar { flex-direction: column; align-items: stretch; }
  .oa-actions-right { justify-content: flex-end; }
  .oa-search { flex-wrap: wrap; }
  .oa-search input[type=text] { flex: 1; min-width: 140px; }
  .oa-crumb-stat { margin-left: 0; width: 100%; }
  .oa-file-row { flex-wrap: wrap; }
  .oa-file-ops { width: 100%; justify-content: flex-end; }
  .oa-menu-box { right: auto; left: 0; min-width: 210px; }
  .oa-preview-frame { height: 60vh; }
  .oa-todo-num { min-width: 44px; height: 44px; font-size: 18px; }
  .oa-cols { height: 110px; }
  .oa-mtbl { font-size: 12px; }
  .oa-mtbl th, .oa-mtbl td { padding: 6px 7px; }
}

/* ================= v2.2.1 小说多人协作 ================= */
.collab-banner { border: 1px solid #cfe3ff; background: #f4f9ff; }
.collab-banner-h { font-size: 14px; color: #1f6feb; }
.collab-on { font-weight: 600; }
.collab-role { color: #b8860b; font-weight: 600; }
.collab-members { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }

.collab-switch { margin: 6px 0; }
.switch-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.switch-label input { width: auto; }
.collab-switch .small { font-size: 12px; font-weight: 400; margin: 2px 0 0; }

.collab-mgmt { margin-top: 14px; border-top: 1px dashed #e2e2e2; padding-top: 12px; }
.collab-mgmt-h { font-size: 14px; margin: 10px 0 6px; color: #333; }
.collab-invite { display: flex; gap: 8px; margin-bottom: 8px; }
.collab-invite .input-sm { flex: 1; }
.collab-list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.collab-item { display: flex; align-items: center; gap: 8px; }
.collab-op { display: inline; }
.collab-chip { display: inline-flex; align-items: center; gap: 5px; background: #eef2f7; border: 1px solid #dfe6ee; border-radius: 14px; padding: 2px 10px; font-size: 13px; color: #334; max-width: 160px; }
.collab-chip.owner { background: #fff4e0; border-color: #ffd9a0; color: #a35a00; }
.collab-av { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: #ccc; }

.ch-author { font-style: normal; font-size: 11px; color: #b8860b; margin-left: 4px; }

.nr-collab { margin-top: 12px; border: 1px solid #cfe3ff; background: #f4f9ff; border-radius: 10px; padding: 10px 12px; }
.nr-collab-h { font-size: 14px; color: #1f6feb; margin-bottom: 8px; }
.nr-collab-members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nr-apply { margin: 0; }
.nr-collab-status { font-size: 13px; color: #888; }

.toc-author { font-style: normal; font-size: 11px; color: #b8860b; margin-left: 3px; }
.nr-ch-author { font-style: normal; font-size: 14px; color: #b8860b; font-weight: 400; margin-left: 6px; }

.nc-collab-badge { background: #e8f1ff; color: #1f6feb; border: 1px solid #cfe0ff; border-radius: 10px; padding: 1px 8px; font-size: 12px; }

.btn-xs { padding: 3px 9px; font-size: 12px; border-radius: 6px; line-height: 1.4; }
.small { font-size: 12px; }

@media (max-width: 600px) {
  .collab-invite { flex-direction: column; }
  .collab-invite .btn { width: 100%; }
}

/* ===== 实名认证（v2.2.4） ===== */
.oa-warn { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius, 10px); background: color-mix(in srgb, #f59e0b 14%, var(--card)); border: 1px solid #f59e0b; color: #b45309; font-size: 13px; }
.oa-warn a { color: #b45309; font-weight: 600; text-decoration: underline; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* 后台身份证列：默认脱敏，点击切换明文 */
.idcard-cell { cursor: pointer; user-select: none; }
.idcard-cell:hover { color: var(--primary); }
.idcard-cell::after { content: '👁'; font-size: 11px; opacity: .35; margin-left: 4px; }
.idcard-cell.revealed::after { opacity: .9; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge-ok { background: color-mix(in srgb, #22c55e 16%, var(--card)); color: #15803d; }
.badge-warn { background: color-mix(in srgb, #f59e0b 18%, var(--card)); color: #b45309; }
.badge-err { background: color-mix(in srgb, #ef4444 14%, var(--card)); color: #b91c1c; }
.badge-v { background: color-mix(in srgb, #3b82f6 18%, var(--card)); color: #1d4ed8; }
.auth-cell { white-space: nowrap; }
.auth-cell .badge { margin: 1px 2px 1px 0; }
.ip-cell { line-height: 1.5; }
.ip-line { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #2b3a55; }
.ip-loc { font-size: 12px; }
.badge-xs { font-size: 11px; padding: 1px 7px; }

.verify-done, .verify-pending, .verify-rejected { text-align: center; padding: 28px 20px; }
.vd-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: color-mix(in srgb, #22c55e 18%, var(--card)); color: #15803d; font-size: 30px; line-height: 56px; }
.verify-form { max-width: 420px; margin-top: 16px; }
.verify-tip { font-size: 12px; margin: 6px 0 14px; }

/* ---------- VIP 认证标识（蓝V / 黄V / 红V） ---------- */
.vauth-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  vertical-align: middle; margin-left: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.5);
}
.vauth-ic { color: #fff !important; }
.vauth-types { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.vauth-type {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--card);
}
.vauth-type input { grid-row: 1 / 3; width: 16px; height: 16px; accent-color: var(--primary, #4f7cff); }
.vauth-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700;
}
.vauth-tname { font-weight: 600; }
.vauth-tdesc { grid-column: 2; font-size: 12px; }

/* V 认证：图片附件拖拽上传区 */
.vauth-dropzone { border-color: var(--border-2); padding: 20px; cursor: pointer; text-align: center; }
.vauth-dropzone.is-over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.vauth-dropzone .dz-inner { pointer-events: none; }
.vauth-dropzone .dz-tip { margin: 0; font-size: 14px; }
.vauth-dropzone .dz-link { color: var(--primary); font-weight: 600; text-decoration: underline; }
.vauth-dropzone .dz-sub { margin: 4px 0 0; font-size: 12px; }
.vauth-dropzone .dz-hint { margin: 8px 0 0; font-size: 12px; color: #e11d48; min-height: 16px; }
.vauth-dropzone .pub-preview { justify-content: center; }

/* 后台审核：认证说明与图片附件 */
.vauth-proof .vp-detail { font-size: 12px; color: var(--dim); margin-bottom: 6px; max-width: 240px; white-space: pre-wrap; word-break: break-word; }
.vauth-proof .vp-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.vauth-proof .vp-img { width: 54px; height: 54px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-2); display: block; }
.vauth-proof .vp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* V 认证门禁：未实名提示 */
.verify-gate { text-align: center; padding: 30px 22px; }
.vg-icon { font-size: 40px; margin-bottom: 8px; }
.verify-gate h3 { margin: 0 0 8px; }
.verify-gate .btn { margin-top: 14px; }

/* 日程与会议 / 考勤（v2.2.5） */
.oa-form-row > .oa-fld { flex: 1 1 160px; }
.oa-today { margin-bottom: 14px; }
.oa-mt-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.oa-mt-row:first-of-type { border-top: none; }
.oa-mt-time { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--primary); font-size: 13px; white-space: nowrap; }
.oa-mt-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.oa-mt-room { color: var(--muted); font-size: 12px; white-space: nowrap; }
.oa-cal { padding: 12px; }
.oa-cal-head, .oa-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.oa-cal-head { margin-bottom: 6px; }
.oa-cal-head span { text-align: center; font-size: 12px; color: var(--muted); }
.oa-cal-grid { gap: 4px; }
.oa-cal-cell { min-height: 78px; border: 1px solid var(--border); border-radius: 8px; padding: 5px 6px; display: flex; flex-direction: column; gap: 3px; background: var(--card); font-size: 12px; overflow: hidden; }
.oa-cal-empty { background: transparent; border-color: transparent; }
.oa-cal-cell.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.oa-cal-d { font-weight: 600; color: var(--text); }
.oa-cal-dot { display: block; background: color-mix(in srgb, var(--primary) 12%, var(--card)); color: var(--primary); border-radius: 5px; padding: 2px 5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-cal-dot:hover { background: color-mix(in srgb, var(--primary) 20%, var(--card)); }
.oa-cal-more { color: var(--muted); font-size: 11px; }
.oa-mt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.oa-mt-head h3 { margin: 0; }
.oa-mt-meta { margin: 6px 0; }
.oa-mt-content { color: var(--text); line-height: 1.7; white-space: pre-wrap; margin-top: 8px; }
.oa-rsvp { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.oa-rsvp.ok { color: #1f7a36; background: color-mix(in srgb, #22c55e 12%, var(--card)); }
.oa-rsvp.no { color: #b02525; background: color-mix(in srgb, #ef4444 10%, var(--card)); }
.oa-att-list { display: flex; flex-direction: column; gap: 6px; }
.oa-att { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; }
.oa-att-name { font-size: 14px; }
.oa-checkin { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.oa-ci-date { font-size: 16px; font-weight: 600; }
.oa-ci-stats { display: flex; gap: 14px; color: var(--muted); font-size: 13px; flex: 1; }

/* ---- v2.2.14 OA 销项表 样式 ---- */
.oa-flash { background: color-mix(in srgb, #22c55e 12%, var(--card)); border: 1px solid color-mix(in srgb, #22c55e 40%, var(--border)); color: #1f7a36; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.oa-empty { padding: 24px; text-align: center; }

.oa-punch-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.oa-stat { flex: 1; min-width: 84px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.oa-stat b { display: block; font-size: 22px; line-height: 1.1; }
.oa-stat span { font-size: 12px; color: var(--muted); }
.oa-stat.s0 b { color: #d97706; }
.oa-stat.s1 b { color: #2563eb; }
.oa-stat.s2 b { color: #7c3aed; }
.oa-stat.s3 b { color: #16a34a; }
.oa-stat.rate b { color: var(--accent, #4a90d9); }

.oa-punch-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.oa-punch-filter select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); }
.oa-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }

.oa-punch-list { display: flex; flex-direction: column; gap: 10px; }
.oa-punch-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.oa-punch-card:hover { border-color: var(--accent, #4a90d9); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.oa-punch-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.oa-pstat { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.oa-pstat.s0 { color: #d97706; background: color-mix(in srgb, #f59e0b 14%, var(--card)); }
.oa-pstat.s1 { color: #2563eb; background: color-mix(in srgb, #3b82f6 14%, var(--card)); }
.oa-pstat.s2 { color: #7c3aed; background: color-mix(in srgb, #8b5cf6 14%, var(--card)); }
.oa-pstat.s3 { color: #16a34a; background: color-mix(in srgb, #22c55e 16%, var(--card)); }
.oa-pcat { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--tagbg, #eef2f7); color: var(--muted); }
.oa-pcode { font-size: 12px; color: var(--muted); margin-left: auto; font-family: ui-monospace, Menlo, Consolas, monospace; }
.oa-punch-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.oa-punch-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; }
.oa-punch-head .oa-punch-title { font-size: 18px; margin: 6px 0; }
.oa-punch-fixnote { font-size: 13px; color: var(--text); background: var(--tagbg, #eef2f7); border-radius: 8px; padding: 8px 10px; margin-top: 8px; line-height: 1.6; }

.oa-timeline { display: flex; flex-direction: column; gap: 0; }
.oa-tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.oa-tl-step:last-child { padding-bottom: 0; }
.oa-tl-step::before { content: ''; position: absolute; left: 7px; top: 16px; bottom: -2px; width: 2px; background: var(--border); }
.oa-tl-step:last-child::before { display: none; }
.oa-tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--border); margin-top: 2px; flex: 0 0 auto; z-index: 1; }
.oa-tl-step.done .oa-tl-dot { background: var(--accent, #4a90d9); }
.oa-tl-name { font-weight: 600; font-size: 14px; }
.oa-tl-meta { font-size: 12px; }

.oa-photos-block { display: flex; gap: 16px; flex-wrap: wrap; }
.oa-photos-col { flex: 1; min-width: 220px; }
.oa-photos-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.oa-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.oa-photo { position: relative; width: 96px; height: 96px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--tagbg, #eef2f7); }
.oa-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-photo-del { position: absolute; top: 2px; right: 2px; }
.oa-photo-del button { background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; line-height: 18px; cursor: pointer; font-size: 12px; padding: 0; }
.oa-photo-up { width: 96px; height: 96px; }
.oa-photo-add { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 26px; cursor: pointer; }
.oa-photo-add input { display: none; }

.oa-act-row { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.oa-act-row:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.oa-punch-op { display: flex; gap: 8px; margin-top: 14px; }

.oa-role-list { display: flex; flex-direction: column; gap: 10px; }
.oa-role-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.oa-role-name { font-weight: 600; font-size: 15px; }
.oa-role-desc { font-size: 13px; margin-top: 4px; }
.oa-role-meta { font-size: 12px; margin-top: 4px; }
.oa-role-act { display: flex; gap: 14px; margin-top: 8px; }
.oa-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.oa-member-chk { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; cursor: pointer; }
.oa-member-chk input { width: 16px; height: 16px; }

@media (max-width: 720px) {
  .oa-punch-stats { gap: 6px; }
  .oa-stat { min-width: 64px; padding: 8px 6px; }
  .oa-stat b { font-size: 18px; }
  .oa-photos-block { flex-direction: column; }
}

/* ============ v2.2.15 Emoji 表情选择器 ============ */
.emoji-btn { font-size: 13px; color: var(--muted); cursor: pointer; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 99px; background: none; line-height: 1.4; }
.emoji-btn:hover { color: var(--text); border-color: var(--muted); }
.comment-tools { margin-bottom: 8px; }
.emoji-panel { position: fixed; z-index: 9999; width: 304px; max-width: calc(100vw - 16px); background: var(--white); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.16); overflow: hidden; display: none; }
.emoji-panel.open { display: block; }
.emoji-cats { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.emoji-cat { padding: 4px 9px; font-size: 13px; border-radius: 6px; cursor: pointer; border: none; background: var(--bg); color: var(--muted); }
.emoji-cat.active { background: var(--accent); color: #fff; }
.emoji-grid { max-height: 216px; overflow-y: auto; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; }
.emoji-grid button { border: none; background: none; font-size: 20px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; color: inherit; }
.emoji-grid button:hover { background: var(--bg); }
[data-theme="dark"] .emoji-panel { background: #2a2d33; border-color: #3a3d44; }
[data-theme="dark"] .emoji-cats { border-color: #3a3d44; }
[data-theme="dark"] .emoji-cat { background: #33363c; color: #bbb; }
[data-theme="dark"] .emoji-grid button:hover { background: #33363c; }

/* ============ v2.2.19 自定义表情 + 内联表情 ============ */
/* 帖子正文中渲染出的自定义表情 */
.inline-emoji { height: 1.5em; width: auto; vertical-align: -0.28em; margin: 0 1px; border-radius: 4px; }
/* 选择器里的自定义表情格 */
.emoji-grid .ce { position: relative; display: flex; align-items: center; justify-content: center; }
.emoji-grid .ce img { width: 30px; height: 30px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.emoji-grid .ce .ce-x { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; line-height: 14px; text-align: center; font-size: 13px; border-radius: 50%; background: #e5484d; color: #fff; cursor: pointer; display: none; }
.emoji-grid .ce:hover .ce-x { display: block; }
.emoji-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-align: center; padding: 18px 6px; line-height: 1.6; }
/* 右键收藏菜单 */
.emoji-ctx { position: fixed; z-index: 10000; display: none; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 4px; min-width: 140px; }
.emoji-ctx.open { display: block; }
.emoji-ctx button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; font-size: 13px; color: var(--text); border-radius: 6px; cursor: pointer; }
.emoji-ctx button:hover { background: var(--bg); }
/* 收藏反馈 toast */
.emoji-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px); z-index: 10001; background: rgba(30,32,38,.94); color: #fff; padding: 9px 18px; border-radius: 99px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.emoji-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
[data-theme="dark"] .emoji-grid .ce .ce-x { background: #f2555a; }
[data-theme="dark"] .emoji-ctx { background: #2a2d33; border-color: #3a3d44; }
[data-theme="dark"] .emoji-ctx button { color: #eee; }
[data-theme="dark"] .emoji-ctx button:hover { background: #33363c; }
[data-theme="dark"] .emoji-toast { background: rgba(20,22,26,.95); }
