/* ═══════════════════════════════════════════════════
   M-Model V3 — Components
   按钮 / Badge / 卡片 / 输入框 / 行列表 / 骨架屏 / 弹窗
   ═══════════════════════════════════════════════════ */

/* ─── Icon system ─── */
.v3-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.v3-icon svg {
  width: 20px; height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v3-icon-sm svg {
  width: 16px; height: 16px;
  stroke-width: 1.8;
}

/* ─── Buttons ─── */
/* 2026-08-14 需求5: 全局按钮/可点控件禁文字选择——电脑/PWA 环境连点按钮不再误触发选区高亮。
   仅禁按钮类(button标签+点击组件类), 不碰正文文本(聊天/帖子文字仍可复制)。 */
button,
.v3-btn,
.v3-icon-btn,
.v3-tab-item,
.v3-chip,
.v3-tag,
.v3-item-action,
.v3-list-item,
[role="button"] {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  cursor: pointer;
  transition: opacity .12s, transform .12s, border-color .12s, color .12s, background .12s;
}

.v3-btn:active { transform: scale(.97); }
.v3-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.v3-btn-primary {
  background: var(--c-accent);
  color: var(--c-accent-text);
}
.v3-btn-primary:hover { opacity: .9; }

.v3-btn-secondary {
  background: transparent;
  border: 1px solid var(--c-border-2);
  color: var(--c-text-2);
}
.v3-btn-secondary:hover {
  border-color: var(--c-accent-border);
  color: var(--c-accent);
}

.v3-btn-ghost {
  background: transparent;
  border: none;
  color: var(--c-accent);
  padding: 9px 14px;
  min-height: 40px;        /* 小米8触控区≥40,治历史/新对话溢出 */
}
.v3-btn-ghost:hover { opacity: .8; }
/* 导出长图按钮(chat工具栏):小米8"导出长图"4字+图标溢出14px治本 */
.v3-qa-export-btn { padding: 9px 14px; min-height: 40px; }

/* Quick action button (used in dashboard header) */
.v3-quick-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;          /* 防flex父容器压缩致长文本溢出(小米8快捷问题栏) */
  gap: var(--sp-xs);
  padding: 12px 14px;  /* 8→12px(审计P2): 触摸目标扩44, 多行文本时min-height保底 */
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border-2);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;     /* 长问题文本自然换行不溢出截断 */
  color: var(--c-text-2);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, color .12s;
}
.v3-quick-btn:hover {
  border-color: var(--c-accent-border);
  color: var(--c-accent);
}

/* ─── Badges ─── */
.v3-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
}
.v3-badge-up   { background: var(--c-up-bg);   color: var(--c-up); }
.v3-badge-accent { background: var(--c-accent-bg); color: var(--c-accent); }
.v3-badge-down { background: var(--c-down-bg); color: var(--c-down); }
.v3-badge-neutral { background: var(--c-surface-2); color: var(--c-text-2); }
.v3-badge-warning { background: rgba(245,158,11,0.12); color: #f59e0b; }
.v3-btn-danger { background: #ef4444; color: #fff; }
.v3-btn-danger:hover { background: #dc2626; }

/* ─── Cards ─── */
.v3-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  transition: border-color .12s;
}
.v3-card:hover {
  border-color: var(--c-accent-border);
}

/* ─── Stat Card ─── */
.v3-stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
}
.v3-stat-num {
  font-size: var(--t-stat-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-text);
}
.v3-stat-label {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 2px;
}
.v3-stat-blue .v3-stat-num { color: var(--c-accent, #818cf8); }
.v3-stat-green .v3-stat-num { color: #34d399; }
.v3-stat-amber .v3-stat-num { color: #f59e0b; }
.v3-stat-red .v3-stat-num { color: #ef4444; }

/* ─── Rise / Fall colors (大陆习惯：红涨绿跌) ─── */
/* 需求3 A+D(2026-07-07): 涨跌色升级圆角pill(主题变量+淡背景胶囊), 强调感
   box-decoration-break:clone(🟠-2收口) 长文本跨行时每段独立圆角, 不破损 */
.v3-rise { color: var(--c-up); font-weight: 600; background: var(--c-up-bg); padding: 0 6px; border-radius: 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.v3-fall { color: var(--c-down); font-weight: 600; background: var(--c-down-bg); padding: 0 6px; border-radius: 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.v3-flat { color: var(--c-text-2); }
.v3-stat-sub {
  font-size: 11px;
  margin-top: 2px;
}

/* ─── Input ─── */
.v3-input {
  width: 100%;
  padding: 8px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  color: var(--c-text);
  font-family: inherit;
  font-size: var(--t-body);
  outline: none;
  transition: border-color .12s;
}
.v3-input::placeholder { color: var(--c-text-3); }
.v3-input:focus { border-color: var(--c-accent); }

/* Search input wrapper */
.v3-search {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 8px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  color: var(--c-text-3);
  font-size: var(--t-body);
  cursor: text;
  transition: border-color .12s;
}
.v3-search:focus-within { border-color: var(--c-accent); }
.v3-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-text);
  font-family: inherit;
  font-size: inherit;
}
.v3-search input::placeholder { color: var(--c-text-3); }

/* ─── Pills / Filters ─── */
.v3-pill {
  display: inline-flex;
  flex-shrink: 0;          /* 防flex父容器压缩致文字溢出(小米8热度词栏#v3HotSearchRow),放不下自然换行 */
  padding: 7px 15px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--c-surface-2);
  color: var(--c-text-2);
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
/* 触摸目标扩44px(审计P2): 视觉不变, ::before隐形热区上下各扩9px(30→48高) */
.v3-pill { position: relative; }
.v3-pill::before { content: ''; position: absolute; inset: -9px 0; }
.v3-pill:hover { color: var(--c-text); }
/* 小米8治本:#v3HotSearchRow 热度词栏实测被覆盖成nowrap,1标签+10热词横向溢出堆叠=主人看到的"互相覆盖" */
#v3HotSearchRow { flex-wrap: wrap !important; }
.v3-pill.active {
  background: var(--c-accent-bg);
  color: var(--c-accent);
}

/* ─── Target Row ─── */
.v3-trow {
  display: flex;
  align-items: center;
  padding: 10px var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background .12s;
}
.v3-trow:last-child { border-bottom: none; }
.v3-trow:hover { background: var(--c-surface-2); }
.v3-trow-expanded {
  background: var(--c-surface-2);
  border-left: 3px solid var(--c-accent);
}

.v3-trow-name {
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--c-text);
  min-width: 100px;
}
.v3-trow-sectors {
  font-size: 11px;
  color: var(--c-text-2);
  margin-left: var(--sp-md);
}
.v3-trow-count {
  font-size: var(--t-meta);
  color: var(--c-text-3);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.v3-trow-star {
  margin-left: var(--sp-md);
  color: var(--c-text-3);
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 2px;
  line-height: 0;
}
.v3-trow-star.active { color: var(--c-accent); }
.v3-trow-star svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: currentColor;
  stroke-width: 1.6;
}

/* ─── Video Card ─── */
.v3-video-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.v3-video-card:hover {
  border-color: var(--c-accent-border);
  box-shadow: var(--c-shadow);
  transform: translateY(-2px);
}
.v3-video-cover {
  aspect-ratio: 3 / 4;
  background: var(--c-surface-2);
  position: relative;
  overflow: hidden;
}
.v3-video-conf {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
  font-size: var(--t-meta);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.v3-video-pin {
  position: absolute;
  top: var(--sp-sm);
  left: var(--sp-sm);
  font-size: var(--t-meta);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: var(--c-accent);
  color: var(--c-accent-text);
}
/* ── 已删除视频卡片：封面保留仅发灰(与正常卡视觉一致, 不再换文本块避免误以为平台删的) ── */
.v3-video-pin-del {
  background: #5a5a6a;
  color: #fff;
}
.v3-video-deleted .v3-video-cover {
  filter: brightness(.88);
}

/* ── 视频内容禁止复制（防盗用；存图请用详情页"存图"按钮）── */
.v3-video-card, .v3-video-card *,
.v3-modal, .v3-modal * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.v3-video-dur {
  position: absolute;
  bottom: var(--sp-sm);
  right: var(--sp-sm);
  font-size: var(--t-meta);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.v3-video-tag {
  display: inline-block;
  font-size: var(--t-meta);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  margin-left: 6px;
  vertical-align: middle;
}
.v3-video-pinned {
  border-color: var(--c-accent-border);
}
.v3-video-body { padding: 4px 5px 5px; }
.v3-video-title {
  font-size: var(--t-body);
  font-weight: 500;
  line-height: 1.4;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
}
.v3-video-meta {
  font-size: var(--t-meta);
  color: var(--c-text-3);
  margin-top: 6px;
}

/* Mobile: horizontal video card */
@media (max-width: 768px) {
  .v3-video-card-h {
    display: flex;
    flex-direction: row;
  }
  .v3-video-card-h .v3-video-cover {
    width: 100px;
    height: 72px;
    flex-shrink: 0;
  }
  .v3-video-card-h .v3-video-body {
    padding: var(--sp-sm) 10px;
  }
}

/* ─── Chat ─── */
.v3-chat-bubble {
  display: inline-block;   /* 对齐.cr-bubble: 气泡宽收内容自适应(原block被col flex stretch拉满致user气泡撑420px离头像远=问题2真凶) */
  padding: 10px 14px;
  border-radius: 12px;
  font-size: var(--t-body);
  line-height: 1.6;
}
.v3-chat-bubble-user {
  max-width: 420px;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  border-radius: 12px 12px 4px 12px;
  margin-left: auto;
}
.v3-chat-bubble-bot {
  max-width: 680px;
  background: var(--c-surface-2);
  color: var(--c-text);
  border-radius: 12px 12px 12px 4px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}
@media (max-width: 768px) {
  .v3-chat-bubble {
    max-width: 80%;
  }
  .v3-chat-bubble-user {
    max-width: 100%;   /* 反馈2治本(2026-08-01): 原80%把user气泡卡死在80%×col, 375视口col仅163→气泡content 130px装不下9字(需135)强行换行(实测"今天大盘到底怎么走"H=68=2行); 放宽到100%(对齐bot)让9字单行, 超长消息走word-break; 桌面端420px上限不动 */
  }
  .v3-chat-bubble-bot {
    max-width: 92%;
  }
}

/* ─── Skeleton ─── */
.v3-skeleton {
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  animation: skeleton-pulse 1.5s ease infinite;
}
.v3-skeleton-line {
  height: 12px;
  margin-bottom: var(--sp-sm);
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ─── Empty State ─── */
.v3-empty {
  text-align: center;
  padding: 48px var(--sp-xl);
  color: var(--c-text-3);
}
.v3-empty-icon {
  font-size: 32px;
  margin-bottom: var(--sp-md);
}
.v3-empty h2 {
  font-size: var(--t-h2);
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: var(--sp-sm);
}
.v3-empty p {
  font-size: var(--t-body);
  max-width: 320px;
  margin: 0 auto;
}

/* Chrome83/MIUI WebView 兼容(小米8范式 task#112):
   -webkit-tap-highlight-color 治底部菜单/button 点击金色边框(MIUI 给 focus/active 默认渲染系统金色);
   button:focus/a:focus outline:none 保险(其他设备不渲染,MIUI 渲染)。 */
* { -webkit-tap-highlight-color: transparent; }
button:focus, a:focus { outline: none; }
button:focus-visible, a:focus-visible { outline: auto; }

/* ─── Modal ─── */
.v3-modal-overlay {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.v3-modal-overlay.active { display: flex; }
.v3-modal {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  height: 75vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.v3-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) 20px;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.v3-modal-close {
  background: transparent;
  border: none;
  color: var(--c-text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.v3-modal-close:hover { color: var(--c-text); }
.v3-modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

/* ─── 视频弹窗→抽屉化(2026-08-06): header 返回钮 + 快捷钮, 演变 chip/时间轴 ─── */
.v3-modal-hleft { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.v3-modal-hright { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.v3-modal-back {
  background: transparent; border: none; color: var(--c-text-3);
  padding: 4px 6px; cursor: pointer; display: flex; align-items: center;
  border-radius: 6px; flex-shrink: 0;
}
.v3-modal-back:hover { color: var(--c-text); background: var(--c-bg-2); }
.v3-modal-shot {
  background: transparent; border: none; font-size: 18px;
  padding: 4px 6px; cursor: pointer; border-radius: 6px; line-height: 1;
}
.v3-modal-shot:hover { background: var(--c-bg-2); }
.v3-modal-shot:active { transform: scale(.96); }
.v3-modal-shot.loading { opacity: .6; pointer-events: none; }

/* 演变 tab: 概念 chip + range 切换器 + 时间轴(红涨绿跌) */
.v3-ev-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; }
.v3-ev-chip {
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text-2); cursor: pointer; white-space: nowrap;
}
.v3-ev-chip.active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.v3-ev-ranges { display: flex; gap: 4px; padding: 8px 12px; }
.v3-ev-range {
  padding: 3px 10px; border-radius: 6px; font-size: 12px;
  border: 1px solid var(--c-border); background: transparent;
  color: var(--c-text-3); cursor: pointer;
}
.v3-ev-range.active { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-accent-border, var(--c-accent)); }
.v3-ev-list { padding: 4px 12px 16px; }
.v3-ev-item {
  display: flex; gap: 10px; padding: 12px 4px;
  border-bottom: 1px solid var(--c-border); cursor: pointer; align-items: flex-start;
}
.v3-ev-item:active { background: var(--c-bg-2); }
.v3-ev-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.v3-ev-item.ev-up .v3-ev-dot { background: #CF4040; }
.v3-ev-item.ev-down .v3-ev-dot { background: #00AC4E; }
.v3-ev-item.ev-flat .v3-ev-dot { background: var(--c-text-3); }
.v3-ev-main { flex: 1; min-width: 0; }
.v3-ev-line1 { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.v3-ev-date { font-size: 12px; color: var(--c-text-3); font-family: monospace; }
.v3-ev-badge { font-size: 11px; padding: 1px 7px; border-radius: 4px; font-weight: 600; }
.v3-ev-item.ev-up .v3-ev-badge { background: rgba(207,64,64,.12); color: #CF4040; }
.v3-ev-item.ev-down .v3-ev-badge { background: rgba(0,172,78,.12); color: #00AC4E; }
.v3-ev-item.ev-flat .v3-ev-badge { background: var(--c-bg-2); color: var(--c-text-3); }
.v3-ev-reason { font-size: 13px; color: var(--c-text-2); line-height: 1.5; }
.v3-ev-title { font-size: 12px; color: var(--c-text-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-ev-empty { text-align: center; color: var(--c-text-3); font-size: 13px; padding: 30px 0; }

/* 演变 tab 红点提示(有 asset_views 才显) */
.v3-tab-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-accent); margin-left: 3px; vertical-align: middle;
}

/* ─── Theme Switch (v238 方案A·裸图标对:去pill容器精致化) ─── */
.v3-theme-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}
.v3-theme-btn {
  width: 26px; height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-3);
  transition: background .12s, color .12s;
}
.v3-theme-btn:hover { background: var(--c-surface); color: var(--c-text-2); }
.v3-theme-btn.active {
  background: var(--c-accent-bg);
  color: var(--c-accent);
}
.v3-theme-btn svg {
  width: 15px; height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
/* v241: i-moon 是 fill 型新月 path, 被 .v3-theme-btn svg{fill:none} 压成空壳看不见;
   只给 dark 钮(i-moon) 开 fill, light 钮(i-sun stroke 型)不动(🟠6)。 */
.v3-theme-btn[data-theme="dark"] svg { fill: currentColor; stroke: none; }


/* ═══════════════════════════════════════════════════
   Grids — responsive helpers
   ═══════════════════════════════════════════════════ */
.v3-grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 强制4列一行(2026-07-25 主人定:4卡同一行节约空间,治auto-fit窗口稍窄降2x2) */
  gap: var(--sp-md);
}
.v3-grid-videos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

@media (max-width: 768px) {
  .v3-grid-stats {
    grid-template-columns: repeat(4, 1fr);  /* 手机也4列一行(2026-07-25 主人定方案A:极致节约空间) */
    gap: 6px;
  }
  .v3-grid-videos {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  /* 移动端触摸目标提至44px(WCAG/iOS HIG,A6); theme-btn/pill高频筛选 */
  .v3-theme-btn { width: auto; min-width: 44px; min-height: 44px; }
  .v3-forum-pills .v3-pill { min-height: 44px; padding: 8px 14px; }

}

/* ─── Chat Shell (full height layout, no parent scroll) ─── */
.v3-chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}
#page-chat.active {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  padding: 0 var(--sp-lg);
  overflow: hidden;
}
.v3-chat-header {
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.v3-chat-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.v3-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 8px;   /* 反馈1(2026-08-01主人定): 左右16→8减半, 头像距边17→9(主人报"双方头像离各自边框太远要缩小一半间距"), 本轮覆盖原"禁贴边"诉求; 8px仍留呼吸不真贴边, 聊天室.cr-stream同步 */
  display: flex;
  flex-direction: column;
  gap: 8px;   /* 对齐.cr-stream gap8, 原14行间距过大(问题1) */
}

/* ─── A方案(2026-08-01 主人定): AI对话气泡包 row+头像+昵称+时间, 复用社区聊天室.cr-msg范式 ───
   AI=M-Model AI(金色M方块头像) / 用户=用户名(首字母hash色头像), 时间北京时间每条显示 */
.v3-chat-row { display: flex; gap: 8px; max-width: 95%; }   /* 对齐.cr-msg 95%, 原88%致内容离边缘过远(问题1) */
.v3-chat-row.user { align-self: flex-end; flex-direction: row-reverse; }
.v3-chat-col { min-width: 0; max-width: 100%; }   /* block容器对齐.cr-msg-body(去flex column, stretch不再拽气泡) */
.v3-chat-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 12px; color: var(--c-text-3); flex-wrap: wrap;
}
.v3-chat-row.user .v3-chat-meta { justify-content: flex-end; }   /* 对齐.cr-msg.self meta靠右(保留昵称→时间顺序, 原row-reverse反序了) */
.v3-chat-row.user .v3-chat-col { text-align: right; }   /* 反馈1治本(2026-08-01): inline-block气泡在block col里默认左对齐, 被meta撑宽的col右侧留大空隙(gap实测25px离头像远); text-align:right让短气泡右靠到col右边缘=gap降到8与长气泡统一紧贴头像(对齐聊天室.cr-msg.self .cr-msg-body同改) */
.v3-chat-name { font-weight: 600; font-size: 12px; color: var(--c-text); }
.v3-chat-name.ai { color: var(--c-accent); }
.v3-chat-time { color: var(--c-text-3); font-size: 11px; }
.v3-chat-avatar {
  width: 32px; height: 32px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.v3-chat-avatar.ai { background: linear-gradient(135deg, #FFE08A, #9C6E08); color: #3a2a00; }
/* 思考态气泡在 row 内宽度自然撑开 col, 不用额外处理 */
.v3-chat-row .v3-chat-bubble { margin-left: 0; }   /* 覆盖 user 气泡原 margin-left:auto(改由 row 对齐) */
/* 反馈2治本(2026-08-01): 移动端AI回答气泡太窄频繁换行可读性差(375视口实测仅261px=row95%+col+气泡92%嵌套砍两刀+padding32+avatar32+gap8挤没).
   ①row gap 减半 8→4(主人定: AI头像和用户头像间距统一减半, 气泡顺带往两边扩) ②bot气泡 max-width 92%→100%(占满col不再二次砍, 聊天室同步). 桌面端不动. */
@media (max-width: 768px) {
  .v3-chat-row { gap: 4px; }
  .v3-chat-bubble-bot { max-width: 100%; }
}
.v3-chat-history {
  width: 220px;
  border-right: 1px solid var(--c-border);
  overflow-y: auto;
  flex-shrink: 0;
  margin-right: 12px;
}
.v3-chat-input-bar {
  padding: 12px 16px;   /* 左右16防输入框/热词栏贴边,与消息区对齐 */
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
/* AI对话热词栏(2026-07-19): 单行横滚, 不换行不顶下输入框(治主人提的移动端/ web输入框被挤下去)。
   桌面5个chip一行展示得下, 移动端窄屏横滚浏览, 输入框永远贴底可见。滚动条隐藏美观。 */
.v3-chat-hot-q-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 12px;
  padding: 6px 4px 2px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox 隐藏滚动条 */
}
.v3-chat-hot-q-row::-webkit-scrollbar { display: none; } /* Chrome/Safari 隐藏 */
.v3-chat-hot-q-row > * { flex-shrink: 0; white-space: nowrap; } /* chip/label 不被压缩不换行 */
.v3-chat-welcome {
  text-align: center;
  padding: 30px 0 20px;
  color: var(--c-text-3);
  font-size: 13px;
  line-height: 1.6;
}
.v3-chat-welcome-icon {
  margin-bottom: 8px;
}
.v3-chat-warning {
  font-size: 12px;
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}
.v3-chat-quick-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.v3-chat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}
.v3-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-text-3);
  animation: typing-dot 1.2s ease infinite;
}
.v3-chat-typing span:nth-child(2) { animation-delay: .2s; }
.v3-chat-typing span:nth-child(3) { animation-delay: .4s; }

/* ─── 递进式分析步骤动画(子任务1) ─── */
.v3-chat-phases {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v3-chat-phase {
  font-size: 13px;
  color: var(--c-text-3);
  line-height: 1.4;
  animation: v3-phase-in .35s ease both;
}
.v3-chat-phase::before {
  content: '◦ ';
  color: var(--c-text-4);
}
@keyframes v3-phase-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ─── AI 思考动画(方案2·问题自适应: 脉动光环 + 步骤流) ───
   主人认可脉动光环主视觉; 步骤流逐条推进, 到"深度推理"步停住等后端。
   数据驱动: 步骤文案在 chat.js THINKING_STEPS_CONFIG, 改文案/加意图不改样式。 */
.v3-chat-bubble-bot.v3-thinking {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
/* 左: 脉动光环主图标 */
.v3-think-ring {
  position: relative;
  width: 46px; height: 46px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.v3-think-core {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5c542, var(--c-accent, #ECAA0B));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #1a1500;
  box-shadow: 0 0 16px rgba(236,170,11,.28);
  position: relative; z-index: 2;
  letter-spacing: .3px;
}
.v3-think-wave {
  position: absolute;
  width: 32px; height: 32px;
  border: 2px solid var(--c-accent, #ECAA0B);
  border-radius: 50%;
  opacity: 0;
}
.v3-think-wave.w1 { animation: v3ThinkPulse 2s ease-out infinite; }
.v3-think-wave.w2 { animation: v3ThinkPulse 2s ease-out infinite .66s; }
.v3-think-wave.w3 { animation: v3ThinkPulse 2s ease-out infinite 1.33s; }
@keyframes v3ThinkPulse {
  0% { transform: scale(.7); opacity: .85; }
  100% { transform: scale(2); opacity: 0; }
}
/* 右: 步骤流 */
.v3-think-steps {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 1px;
  padding-top: 2px;
  min-width: 0;
}
.v3-think-step {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; padding: 3px 0;
  transition: color .3s; line-height: 1.3;
}
.v3-think-step .si {
  width: 16px; height: 16px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.v3-think-step .st { flex: 1; min-width: 0; }
.v3-think-step.done { color: var(--c-text-3); }
.v3-think-step.done .si { color: var(--c-accent); }
.v3-think-step.active { color: var(--c-text); }
.v3-think-step.active .si .sp {
  width: 13px; height: 13px;
  border: 2px solid rgba(236,170,11,.25);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: v3ThinkSpin .8s linear infinite;
  display: inline-block;
}
.v3-think-step.active .st { animation: v3ThinkPulseTxt 1.5s ease-in-out infinite; }
.v3-think-step.pending { color: var(--c-text-3); opacity: .5; }
/* 等待提示(2026-07-23 主人定): 动画推进到「深度推理」步停住时渐显, 安抚用户耐心(复杂问题30-60s)。
   简单问题秒回(_removeLoading 早)不会推进到推理步→不显示, 天然只在慢问题上出现。 */
.v3-think-hint {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--c-border, rgba(255,255,255,.1));
  font-size: 11.5px; color: var(--c-text-3); line-height: 1.45;
  opacity: 0; transition: opacity .6s ease;
}
.v3-think-hint.show { opacity: 1; }
.v3-think-hint b { color: var(--c-accent, #ECAA0B); font-weight: 600; }
@keyframes v3ThinkSpin { to { transform: rotate(360deg); } }
@keyframes v3ThinkPulseTxt { 0%,100%{opacity:1;} 50%{opacity:.55;} }
/* 移动端: 主图标+字号微调(小米8等老 WebView 实测重点) */
@media (max-width: 768px) {
  .v3-think-ring { width: 40px; height: 40px; }
  .v3-think-core { width: 28px; height: 28px; }
  .v3-think-wave { width: 28px; height: 28px; }
  .v3-think-step { font-size: 12.5px; gap: 7px; }
  .v3-chat-bubble-bot.v3-thinking { gap: 10px; }
}

/* ─── History Item ─── */
.v3-history-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s;
}
.v3-history-item:hover {
  background: var(--c-surface-2);
}

/* ─── Settings Row ─── */
.v3-settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: var(--c-text);
  text-align: left;
  transition: background .12s;
}
.v3-settings-row:last-child { border-bottom: none; }
.v3-settings-row:hover { background: var(--c-surface-2); }

/* ─── Error Bar ─── */
.v3-error-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--c-down-bg);
  border-radius: var(--radius-md);
  color: var(--c-down);
  font-size: 13px;
}

/* ─── Mobile chat fix ─── */
@media (max-width: 768px) {
  #page-chat.active {
    padding: 0 var(--sp-sm);
  }
  .v3-chat-history {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px;
    width: 100%;
    height: auto;
    z-index: 150;
    background: var(--c-surface);
    margin-right: 0;
    border-right: none;
    padding: 16px;
    overflow-y: auto;
  }

}

/* ─── Settings Page ─── */
.v3-settings-header {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  margin-bottom: 28px;
}

.v3-settings-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
/* 需求⑤: 自定义头像 img 叠层(绝对定位铺满 avatar 容器, 404→onerror 自移除→露底层首字母+渐变) */
.v3-settings-avatar, .v3-header-avatar, .v3-sidebar-avatar { position: relative; overflow: hidden; }
.v3-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; }

/* 认证用户头像星标叠加层(需求5, 2026-08-12): 金色星标 absolute 叠在头像右下角 */
.v3-verified-star {
  position: absolute; bottom: -2px; right: -2px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; cursor: pointer; z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: transform .15s;
}
.v3-verified-star-icon { width: 12px; height: 12px; color: #D4A017; fill: #D4A017; }
.v3-verified-star:hover { transform: scale(1.15); }
/* 触摸目标扩44(审计P2): 头像padding外圈+星标位置——header头像padding 6px时星标bottom/right归零贴边 */
.v3-header-avatar .v3-verified-star { bottom: 6px; right: 6px; }  /* 贴32px视觉头像角(44框-6px padding), 原bottom:0会悬空贴44框角 */
.v3-header-avatar .v3-avatar-img { top: 6px; left: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }  /* 圈进32视觉圆(44框-6px padding×2); inset+auto对img替换元素会取原图128px固有尺寸, 必须显式calc */

/* 会员专属交流群按钮(2026-07-31 需求2): 头像右侧空白区, margin-left:auto 推到 header 右端;
   全员可见, 非付费灰态+付费金态, 点击分流 onMemberGroupTap */
.v3-settings-member-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-text-3);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .1s;
}
.v3-settings-member-btn:active { transform: scale(.94); }
.v3-settings-member-btn.is-paid {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: color-mix(in srgb, var(--c-accent) 12%, transparent);
}

.v3-settings-name {
  font-size: var(--t-h2);
  font-weight: 600;
}

.v3-settings-role {
  font-size: var(--t-meta);
  color: var(--c-text-3);
}

.v3-settings-section-label {
  font-size: var(--t-meta);
  color: var(--c-text-3);
  padding: var(--sp-md) var(--sp-lg) var(--sp-sm);
}

.v3-settings-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.v3-settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 12px var(--sp-lg);
  border: none;
  border-bottom: 1px solid var(--c-border);
  background: transparent;
  cursor: pointer;
  font-size: var(--t-body);
  font-family: inherit;
  color: var(--c-text);
  text-align: left;
  transition: background .12s;
}
.v3-settings-row:last-child { border-bottom: none; }
.v3-settings-row:hover { background: var(--c-surface-2); }

.v3-settings-row-icon {
  width: 20px;
  height: 20px;
  color: var(--c-text-2);
  flex-shrink: 0;
}

.v3-settings-row-label {
  flex: 1;
}

.v3-settings-row-chevron {
  width: 14px;
  height: 14px;
  color: var(--c-text-3);
  flex-shrink: 0;
}

.v3-settings-theme-bar {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-md);
}

.v3-settings-theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.v3-settings-danger {
  color: var(--c-down);
}

.v3-settings-footer {
  text-align: center;
  margin-top: 28px;
  font-size: var(--t-meta);
  color: var(--c-text-3);
}

/* ─── QR Modal (Donate / Group) ─── */
.v3-qr-cards {
  display: flex;
  gap: var(--sp-lg);
  justify-content: center;
  flex-wrap: wrap;
}
.v3-qr-card {
  text-align: center;
}
.v3-qr-img-wrap {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  margin-bottom: var(--sp-sm);
}
.v3-qr-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.v3-qr-label {
  font-size: var(--t-meta);
  color: var(--c-text-2);
}
.v3-qr-toggle-bar {
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px dashed var(--c-border-2);
  text-align: center;
}
.v3-qr-tip {
  font-size: var(--t-meta);
  color: var(--c-text-3);
  margin-top: var(--sp-sm);
  line-height: 1.5;
}

/* ─── Chat Markdown ─── */
.v3-chat-bubble-bot p { margin: 0 0 10px; line-height: 1.75; }
.v3-chat-bubble-bot p:last-child { margin-bottom: 0; }
.v3-chat-bubble-bot strong { color: var(--c-text); font-weight: 600; }
.v3-chat-bubble-bot ul, .v3-chat-bubble-bot ol {
  margin: 6px 0;
  padding-left: 20px;
}
.v3-chat-bubble-bot li {
  margin: 4px 0;
  line-height: 1.7;
}
.v3-chat-bubble-bot blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--c-accent);
  background: var(--c-surface-3);
  border-radius: 0 6px 6px 0;
  color: var(--c-text-2);
  font-size: 13px;
}
/* Bubble内标题层次 — 需求3 A+D(2026-07-07): h2加左竖条强标题感, 删旧冗余定义(DRY) */
.v3-md-h1 { font-size: 16px; font-weight: 700; margin: 14px 0 8px; color: var(--c-accent); }
.v3-md-h2 { font-size: 15px; font-weight: 700; margin: 14px 0 6px; padding: 4px 0 4px 10px; border-left: 3px solid var(--c-accent); border-bottom: 1px solid var(--c-border); color: var(--c-accent); }
.v3-md-h3 { font-size: 14px; font-weight: 600; margin: 10px 0 4px; color: var(--c-accent); }
/* 代码块容器(需求3 A+D,2026-07-07): 工具栏(lang+复制) + pre, 整体边框背景 */
.v3-md-code {
  margin: 8px 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-surface-3);
}
.v3-md-code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  border-bottom: 1px solid var(--c-border);
  background: rgba(255,255,255,0.03);
  font-size: 11px;
}
.v3-md-code-lang { color: var(--c-text-2); font-family: var(--font-mono); }
.v3-md-code-copy { color: var(--c-accent); cursor: pointer; user-select: none; font-size: 11px; }
.v3-md-code-copy:hover { opacity: 0.8; }
/* pre 保留 v3-md-codeblock class(兼容 app.js 横滑 closest 判断), 但样式瘦身成容器内层 */
.v3-md-codeblock {
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}
/* 数字胶囊(需求3 A+D,2026-07-07): 淡金背景圆角, 突出金额/规模/倍数类数字 */
.v3-md-num {
  background: var(--c-accent-bg);
  color: var(--c-accent);
  padding: 0 5px;
  border-radius: 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.v3-md-inline {
  background: var(--c-surface-3);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
/* 需求3(2026-07-07): markdown 表格样式——边框/表头底色/斑马行,对比数据一目了然 */
.v3-md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 13px;
  table-layout: fixed;     /* 固定布局列宽均分,窄屏(移动端375)不撑破气泡 */
}
.v3-md-table th, .v3-md-table td {
  border: 1px solid var(--c-border);
  padding: 6px 9px;
  text-align: left;
  word-break: break-word;  /* 长内容换行,绝不撑破气泡 */
}
.v3-md-table th {
  background: var(--c-accent-bg);
  color: var(--c-accent);
  font-weight: 600;
}
.v3-md-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.025);
}
.v3-md-hr {
  border: none;
  border-top: 1px solid var(--c-border-2);
  margin: 10px 0;
}
.v3-md-link { color: var(--c-accent); text-decoration: underline; }

/* ─── Pick Card (weibo) ─── */
.v3-pick-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .12s;
}
.v3-pick-card:hover { border-color: var(--c-accent-border); }
.v3-pick-cat {
  display: inline-block;
  font-size: var(--t-meta);
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  font-weight: 500;
  margin-bottom: 8px;
}
.v3-pick-text {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.v3-pick-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.v3-pick-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.v3-pick-comments {
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.v3-pick-comment {
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-text-2);
  padding: 3px 0;
}
.v3-pick-comment b {
  color: var(--c-accent);
  font-weight: 500;
}
.v3-pick-more {
  font-size: 11px;
  color: var(--c-text-3);
  padding-top: 4px;
}

/* ─── Tab Bar (video detail modal) ─── */
.v3-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--c-border);
  margin: 0 -20px;
  padding: 0 20px;
}
.v3-tab-btn {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--c-text-3);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: color .12s;
}
.v3-tab-btn:hover { color: var(--c-text-2); }
.v3-tab-btn.active { color: var(--c-accent); }
.v3-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
}
/* 转录tab一键复制按钮(2026-08-16): 会员复制全文, 非会员弹升级引导 */
.v3-copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--c-accent-border);
  border-radius: 14px;
  background: transparent;
  color: var(--c-accent);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, opacity .12s;
}
.v3-copy-btn:hover { background: var(--c-accent-bg); }
.v3-copy-btn:active { opacity: .8; }
/* 存图按钮：固定宽不挤tab，靠右 */
.v3-tab-shot {
  flex: none;
  padding: 8px 12px;
  border: none;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-left: auto;
  align-self: center;
  transition: background .12s;
}
.v3-tab-shot:hover { background: var(--c-accent-border); }
.v3-tab-shot:active { transform: scale(.96); }
.v3-tab-shot.loading { opacity: .6; pointer-events: none; }

/* ─── 移动端: 视频弹窗→贴底抽屉(2026-08-06, iOS Peek 半屏) ─── */
/* 桌面端保持居中弹窗(上面 .v3-modal 默认样式); 仅 ≤768px 改贴底抽屉 */
@media (max-width: 768px) {
  .v3-modal-overlay {
    align-items: flex-end;       /* 贴底 */
    padding: 0;
  }
  .v3-modal {
    width: 100% !important;      /* !important 压过 videos.js 内联 maxWidth:640 */
    max-width: none !important;
    height: 58vh;                /* Peek 半屏默认态 */
    max-height: none;
    border-radius: 16px 16px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    transition: height .3s ease;
    /* 顶部拖拽手柄(伪元素) */
    padding-top: 8px;
  }
  .v3-modal::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    border-radius: 2px;
    background: var(--c-border);
    margin: 0 auto 4px;
    flex-shrink: 0;
  }
  .v3-modal.expanded { height: 92vh; }
  .v3-modal-header { padding: 8px 12px 10px; }
  /* 5 个纯文字 tab 移动端微调防挤 */
  .v3-tab-btn { font-size: 12px; padding: 9px 0; }
  .v3-modal-back { padding: 4px 4px; }
  .v3-modal-shot { font-size: 17px; padding: 4px 5px; }
}

.v3-sticky-bar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(-1 * var(--sp-xl));
  z-index: 10;
  background: var(--c-bg);
  padding-top: var(--sp-xl);
  padding-bottom: 12px;
  margin-top: calc(-1 * var(--sp-xl));
  /* 强制创建新的堆叠上下文，防止 iOS Safari sticky 失效 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}
/* ─── Hide LightweightCharts watermark/branding ─── */
.v3-kline-chart a,
.v3-kline-chart [class*="copyright"],
.v3-kline-chart [class*="watermark"],
.v3-kline-chart [class*="apply-overflow"] + a {
  display: none !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

/* ─── Weibo Modal ─── */
.v3-weibo-item {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.v3-weibo-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.v3-weibo-text {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.v3-weibo-images {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.v3-weibo-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  cursor: pointer;
}
.v3-weibo-comments {
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.v3-weibo-comment {
  font-size: 12px;
  line-height: 1.6;
  color: var(--c-text-2);
  padding: 3px 0;
}
.v3-weibo-comment b {
  color: var(--c-accent);
  font-weight: 500;
}
.v3-weibo-cat {
  display: inline-block;
  font-size: var(--t-meta);
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--c-accent-bg);
  color: var(--c-accent);
  margin-bottom: 6px;
}

/* ─── Hot Comment (video detail) ─── */
.v3-comment-item {
  padding: 8px 10px;
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.v3-comment-text {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 4px;
}
.v3-comment-meta {
  font-size: 11px;
  color: var(--c-text-3);
  display: flex;
  gap: 8px;
  align-items: center;
}
.v3-comment-badge {
  font-size: var(--t-meta);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}
/* 评论图片缩略图(2026-07-20): flex-wrap 换行排列自适应弹窗宽度,
   禁止横向溢出(PWA窄屏不逼用户横划), 只随评论tab上下滚动.
   96px缩略图+8gap(主人2026-07-20要"再大些看着自然"), max-width:100%保证
   永不超评论区宽度——一行容几张由弹窗宽度自动决定, flex-wrap自动换行 */
.v3-comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  max-width: 100%;
}
.v3-comment-thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  background: var(--c-surface-3);
}

/* ─── K-line Chart ─── */
.v3-kline-section {
  padding: 16px 20px;
  background: var(--c-surface-2);
}
.v3-kline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.v3-kline-title {
  font-size: 12px;
  color: var(--c-text-3);
  font-weight: 600;
}
.v3-kline-periods {
  display: flex;
  gap: 4px;
}
.v3-kline-periods .v3-pill {
  font-size: 11px;
  padding: 3px 10px;
}
.v3-kline-chart {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
}
.v3-kline-legend {
  padding: 6px 0;
  font-size: 11px;
  color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
  line-height: 1.8;
  min-height: 20px;
}


/* ═══════════════════════════════════════════════════
   Dashboard video grid & compact cards
   ═══════════════════════════════════════════════════ */
.v3-dash-video-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.v3-dash-video-grid .v3-video-card .v3-video-cover {
  aspect-ratio: 3 / 4;
}
.v3-video-thumb {
  aspect-ratio: 3 / 4;
  background: var(--c-surface-2);
  overflow: hidden;
  position: relative;
}
.v3-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s;
}
.v3-video-card:hover .v3-video-thumb img {
  transform: scale(1.05);
}
.v3-video-info {
  padding: 6px 8px 8px;
}
.v3-video-info .v3-video-title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v3-video-info .v3-video-meta {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 3px;
}

/* ═══════════════════════════════════════════════════
   Mobile video grid — unified (must be last for priority)
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .v3-grid-videos,
  .v3-dash-video-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .v3-grid-videos .v3-video-card .v3-video-cover,
  .v3-dash-video-grid .v3-video-card .v3-video-cover {
    aspect-ratio: 3 / 4;
  }
}

/* 通知红点(社区 .v3-forum-badge 用; v239 顶栏 dot 改用 .v3-header-notif-dot 独立样式, 旧 sidebar .v3-notif-badge 系列 DOM 已删清死代码) */
.v3-bnav-item { position: relative; }
.v3-forum-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  margin-left: 6px;  /* 贴 svg 图标右上角(按钮内容居中, 中线右移6px≈图标右缘) */
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* 2026-08-02: APP 新版更新红点(顶部 nav "我的" + 底部 bnav "我的"按钮) — 仿 .v3-forum-badge 定位,
   纯圆点无数字,引流用户进设置页检查更新。只 APP 环境显(PWA 浏览器用户不被 APK 更新骚扰)。 */
.v3-nav-item, .v3-bnav-item { position: relative; }  /* bnav 已有,nav 补 relative 兜底红点定位 */

/* v262(2026-08-06): PC sidebar 论坛/聊天室未读红点(PC 无底栏走 sidebar 导航, 原只底栏有 badge PC 看不到) */
.v3-sidebar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.v3-tab-update-dot {
  position: absolute;
  top: 6px;
  right: 50%;
  margin-right: -16px;  /* 贴 svg 图标右上角(按钮内容居中, 中线右移≈图标右缘) */
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ec111a;
  box-shadow: 0 0 0 3px rgba(236,17,26,.22);
  display: none;
  z-index: 5;
}

/* ═══════════════════════════════════════════════════
 * 老内核 WebView 兜底（2026-07-01 主人小米8实锤 #14续：图片"没加载"真根因）
 * ═══════════════════════════════════════════════════
 * 病灶：aspect-ratio（Chrome88+/2021-01 才支持）老系统 WebView 不支持
 *      → 视频封面/缩略图/精选图容器高度塌陷为 0
 *      → background-image 和 img 虽加载但 0 高度看不见 = 主人说的"图片没加载"
 *      PWA 走 Chrome 浏览器（自动更新）没事，APP 走系统老 WebView（小米8 Android8.0 未更 WebView）中招
 *      （与上次 oklch 雪崩同套路：内核差异，非代码差异）
 * 修法：@supports not 检测不支持 aspect-ratio 时给 min-height 兜底
 *      新内核（支持 aspect-ratio）整块跳过，精确比例完全不受影响
 * ⚠️ 这是真·渐进增强：@supports 是特性检测（Chrome25+ 可靠）
 *      ≠ oklch 双声明错修（对 custom property 无效因变量不校验语法，已 #14 全删 oklch 根治）
 * ═══════════════════════════════════════════════════ */
@supports not (aspect-ratio: 3 / 4) {
  .v3-video-cover,
  .v3-video-cover-text,
  .v3-video-thumb { min-height: 180px; }
  .v3-pick-img { min-height: 100px; }
}

/* ═══════════════════════════════════════════════════
 * 需求⑥: "支持作者"提视觉等级（2026-07-01）
 *   首页低调横幅卡 + 我的页金边入口卡 + 打赏弹窗品牌渐变头图
 *   全用现有 CSS 变量贴合深黑+金色调性，YAGNI 不搞感谢墙
 * ═══════════════════════════════════════════════════ */

/* 我的页"支持作者"强化行：金边渐变卡（区别于普通 v3-settings-row）*/
.v3-settings-donate-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; margin-top: 8px;
  background: linear-gradient(135deg, rgba(236,170,11,.14), rgba(236,170,11,.03));
  border: 1px solid rgba(236,170,11,.32);
  border-radius: var(--radius-md);
  cursor: pointer; text-align: left;
  transition: border-color .15s, transform .1s;
}
.v3-settings-donate-row:active { transform: scale(.99); }
.v3-settings-donate-row-icon { color: var(--c-accent); flex-shrink: 0; display: flex; }
.v3-settings-donate-row-body { flex: 1; min-width: 0; }
.v3-settings-donate-row-label { font-size: 15px; font-weight: 600; color: var(--c-text); line-height: 1.3; }
.v3-settings-donate-row-sub { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.v3-settings-donate-row-arrow { color: var(--c-text-3); flex-shrink: 0; }

/* 打赏弹窗品牌渐变头图（body 内圆角卡片，金底深字）*/
.v3-donate-hero {
  margin-bottom: var(--sp-md);
  padding: 22px 16px;
  background: linear-gradient(135deg, #ECAA0B 0%, #B8800A 100%);
  border-radius: var(--radius-md);
  text-align: center; color: #1a1300;
}
.v3-donate-hero-icon { display: flex; justify-content: center; margin-bottom: 6px; }
.v3-donate-hero-title { font-size: 18px; font-weight: 700; }
.v3-donate-hero-slogan { font-size: 12px; opacity: .75; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════
   需求⑧ 微论坛样式 (2026-07-02)
   入口卡(dashboard) / 主页列表(forum.js) / 详情+评论+composer(forum-post.js)
   纯 DOM 配套样式，全用现有 CSS 变量(守 light/dark 双主题)，零硬编码色值
   ═══════════════════════════════════════════════════════ */

/* ─── 首页入口卡（dashboard，普通卡非金边——打赏独占金边强调 cross-review Y6）─── */
.v3-forum-entry {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.v3-forum-entry:active { transform: scale(.99); }
.v3-forum-entry-icon { color: var(--c-accent); flex-shrink: 0; display: flex; }
.v3-forum-entry-text { flex: 1; min-width: 0; }
.v3-forum-entry-title { font-size: 14px; font-weight: 600; color: var(--c-text); line-height: 1.3; }
.v3-forum-entry-sub { font-size: var(--t-meta); color: var(--c-text-3); margin-top: 2px; }
.v3-forum-entry-arrow { color: var(--c-text-3); flex-shrink: 0; }

/* ─── 论坛主页(forum.js) ─── */
.v3-forum-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.v3-forum-pills {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 12px; -webkit-overflow-scrolling: touch;
}
.v3-forum-pills::-webkit-scrollbar { display: none; }

.v3-forum-card {
  margin-bottom: 10px; padding: 14px; cursor: pointer;
  transition: border-color .15s;
}
.v3-forum-card:hover { border-color: var(--c-accent-border); }
.v3-forum-card-top { display: flex; align-items: center; gap: 10px; }
.v3-forum-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  position: relative; overflow: hidden;  /* 头像联动: .v3-avatar-img absolute需relative锚定否则占满屏 */
  background: var(--c-accent-bg); color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.v3-forum-avatar-sm { width: 26px; height: 26px; font-size: var(--t-meta); }
.v3-forum-card-meta { flex: 1; min-width: 0; }
.v3-forum-card-title {
  font-size: 16.5px; font-weight: 700; color: var(--c-text);
  margin-top: 8px; line-height: 1.4; letter-spacing: -0.2px;
}
.v3-forum-card-snippet {
  font-size: var(--t-meta); color: var(--c-text-2);
  margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v3-forum-card-foot {
  display: flex; gap: 18px; margin-top: 10px;
  padding-top: 8px; border-top: 1px solid var(--c-border);
  align-items: center;   /* 2026-08-10 需求4: stat/sep 垂直居中, 治分隔符竖线歪斜 */
}
.v3-forum-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--t-meta); color: var(--c-text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;   /* 2026-08-10 需求4: 等宽数字防位数变化跳动 */
}
.v3-forum-stat-on { color: var(--c-accent); }
/* 2026-08-10 需求3: 已点赞实心金心(CSS fill 覆盖 svg presentation attr fill:none, stat-on/act-on 全局仅用于点赞高亮) */
.v3-forum-stat-on svg, .v3-forum-act-on svg { fill: var(--c-accent); }
/* 2026-08-10 需求3: 点赞弹跳动画(详情页 toggle 点赞成功触发, 列表卡静态实心) */
@keyframes v3-heart-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.45); }
  55% { transform: scale(.82); }
  80% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.v3-heart-popping svg { animation: v3-heart-pop .42s cubic-bezier(.36,.07,.19,.97); transform-origin: center; }
.v3-forum-sep { width: 1px; height: 14px; background: var(--c-border-2); flex-shrink: 0; }   /* 2026-08-04 P0: 操作行竖线分组(社交|统计) */
.v3-pill-mini { padding: 2px 8px; font-size: 11px; border-radius: 4px; }
.v3-forum-deleted { opacity: .55; }
.v3-forum-deleted-tag {
  flex-shrink: 0; padding: 2px 8px; font-size: 11px;
  background: var(--c-surface-3); color: var(--c-text-3); border-radius: 4px;
}

/* ─── 任务② 置顶帖金边视觉(2026-07-06, DRY 金边渐变范式 L1470) ─── */
.v3-forum-card.v3-forum-pinned {
  background: linear-gradient(135deg, rgba(236,170,11,.10), rgba(236,170,11,.02));
  border-color: rgba(236,170,11,.38);
}
.v3-forum-pin-icon {                                  /* 标题前 📌 图标 */
  color: var(--c-accent); flex-shrink: 0; display: inline-flex; align-items: center;
}
.v3-forum-pin-btn {                                   /* admin 置顶/取消置顶按钮(foot 内, 仅管理员可见) */
  margin-left: auto; padding: 3px 10px; font-size: 11px; font-weight: 600;
  color: var(--c-accent); background: var(--c-accent-bg);
  border: 1px solid var(--c-accent-border); border-radius: 4px;
  cursor: pointer; font-family: inherit; transition: transform .1s;
}
.v3-forum-pin-btn:active { transform: scale(.97); }

/* ─── 需求5 帖子会员可见性锁定及打码遮罩 (2026-08-14) ─── */
.v3-forum-lock-card {
  position: relative;
  border: 1px dashed var(--c-accent-border) !important;
  background: var(--c-surface-2) !important;
}
.v3-forum-lock-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-accent);
  font-weight: 600;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--c-accent-bg);
  border-radius: 6px;
  border: 1px solid rgba(236, 170, 11, 0.15);
}
.v3-forum-lock-hint svg {
  color: var(--c-accent);
  flex-shrink: 0;
}
.v3-forum-lock-mask {
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 0;
  background: linear-gradient(180deg, rgba(var(--c-surface-rgb), 0) 0%, rgba(var(--c-surface-rgb), 0.3) 40%, rgba(var(--c-surface-rgb), 0.95) 90%, var(--c-surface) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  z-index: 5;
  pointer-events: none;
}

/* ─── 任务③ 管理员徽章(2026-07-06, 评论/子评论 author 旁) ─── */
.v3-admin-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: #1a1300; background: linear-gradient(135deg, #ECAA0B, #B8800A);
  border-radius: 3px; vertical-align: middle; line-height: 1.6; white-space: nowrap;
}
/* 2026-08-12 需求2: 会员类别标签(Plus/Pro) —— 金色边框 outline 风格, 与管理员实心区分 */
.v3-role-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; margin-left: 6px; font-size: 10px; font-weight: 700;
  color: var(--c-accent); border: 1px solid var(--c-accent);
  border-radius: 3px; vertical-align: middle; line-height: 1.6; white-space: nowrap;
  background: transparent;
}

/* ─── 全屏浮层(发帖 forum.js.openNewPost / 详情 forum-post.js.open 共用) ─── */
.v3-full-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000;
  background: var(--c-bg);
  display: flex; flex-direction: column;
}
.v3-full-topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  /* 2026-08-05: 让出安卓状态栏——dahubenhu/小米8 进论坛详情/发帖,顶栏(‹返回+标题)被系统状态栏吃掉 */
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.v3-full-back {
  background: none; border: none; color: var(--c-text);
  display: flex; align-items: center; cursor: pointer; padding: 4px;
}
.v3-full-title { font-size: 16px; font-weight: 600; color: var(--c-text); }
.v3-full-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px;
}
.v3-full-body-with-composer { padding-bottom: 80px; }   /* 底部 composer fixed 留白防遮 */

/* 桌面端详情/发帖浮层改居中面板(2026-08-01 主人定,治"点进去全屏+正文贴边"):
   原全屏 fixed inset:0 拉满屏宽 → 桌面宽屏文字贴屏幕边、点进去"又全屏"。
   主流社区(Reddit/掘金/即刻)详情都是居中列,对齐本站论坛列表/聊天室(480-760px margin:auto)布局。
   桌面:overlay 两侧半透明遮罩,topbar+body+composer 连成 680 居中面板(圆角+阴影),上下留白不贴屏边;
   移动端(<769px)保持原全屏(屏窄全屏合理),不动。 */
@media (min-width: 769px) {
  .v3-full-overlay {
    background: rgba(0, 0, 0, .55);   /* 两侧半透明遮罩,透出后面 app 上下文 */
    align-items: center;              /* flex column 下子元素水平居中成面板 */
    padding: 24px 0;                  /* 面板上下离屏边,治贴边 */
  }
  .v3-full-overlay > .v3-full-topbar {
    width: 100%; max-width: 680px;
    border-radius: 12px 12px 0 0;
    border-top: 1px solid var(--c-border);
    border-left: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  }
  .v3-full-overlay > .v3-full-body {
    width: 100%; max-width: 680px;
    background: var(--c-bg);
    border-left: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    padding: 18px 22px;               /* 正文边距加大,治文字贴边 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  }
  /* composer 原 fixed 全宽 → 桌面端也居中收窄,与面板连体(同 680 宽)
     v251(2026-08-05): 加 .v3-full-overlay 父选择器提特异性——治源码顺序覆盖:
     基础规则 .v3-forum-composer(下方 1844)写在 @media 之后,同特异性后者赢,
     致桌面 left:0(基础)覆盖 left:50%(本块)但 transform:translateX(-50%)(本块,基础没写)仍生效
     → left:0+translateX(-50%)+width:680 = 整体左偏 340px 跑到屏幕左侧。加父选择器拉高特异性根治。 */
  .v3-full-overlay .v3-forum-composer {
    left: 50%; right: auto; transform: translateX(-50%);
    width: 100%; max-width: 680px;
    border-radius: 0 0 12px 12px;
    border-left: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  }
}
.v3-field-label {
  font-size: var(--t-meta); color: var(--c-text-3);
  margin-bottom: 6px; font-weight: 500;
}
.v3-pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── 帖子详情(forum-post.js) ─── */
.v3-forum-detail { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--c-border-2); }  /* P1③: 主帖底边线,与评论区分隔 */
.v3-forum-detail-title {
  font-size: 22px; font-weight: 700; color: var(--c-text);
  margin-top: 14px; line-height: 1.3; letter-spacing: -0.3px;
}
.v3-forum-detail-content {
  font-size: var(--t-body); color: var(--c-text);
  line-height: 1.6; margin-top: 8px; white-space: pre-wrap; word-break: break-word;
}
.v3-forum-detail-acts {
  display: flex; gap: 16px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--c-border);
}
.v3-forum-act {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--c-text-3); font-size: var(--t-meta); font-family: inherit;
  padding: 4px 2px; transition: color .12s;
}
.v3-forum-act:hover { color: var(--c-text-2); }
.v3-forum-act-on { color: var(--c-accent); }           /* 已点赞高亮(源码顺序在后覆盖基础态) */
.v3-forum-act-danger { color: var(--c-down); }          /* 删除按钮红 */
.v3-forum-act-danger:hover { color: var(--c-down); opacity: .8; }

.v3-forum-cmt-title {
  font-size: var(--t-body); font-weight: 700; color: var(--c-text-2);
  margin: 14px 0 10px; padding: 8px 12px;
  background: var(--c-surface-2); border-radius: 8px;
  border-left: 3px solid var(--c-accent);              /* P1③: 评论标题浅背景条+金竖线锚点 */
}
/* 2026-08-12 #7: 评论排序切换按钮条 */
.v3-forum-sort-bar { display: flex; gap: 6px; margin: 12px 0 4px; }
.v3-forum-sort-btn {
  font-size: 12px; padding: 4px 14px; border-radius: 14px;
  border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-text-2); cursor: pointer; transition: all .15s;
}
/* 触摸目标扩44px(审计P2): 视觉不变, ::before隐形热区(26高→44) */
.v3-forum-sort-btn { position: relative; }
.v3-forum-sort-btn::before { content: ''; position: absolute; inset: -9px 0; }
.v3-forum-sort-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.v3-forum-sort-on, .v3-forum-sort-on:hover {
  background: var(--c-accent); color: #fff; border-color: var(--c-accent);
  font-weight: 600;
}
.v3-forum-date-divider {                          /* P1⑦: 日期分组分隔条(CSS原零定义裸div补样式,对比度提到text-2) */
  font-size: 11px; color: var(--c-text-2); text-align: center;
  margin: 16px 0 8px; letter-spacing: .5px;
}
.v3-forum-comment { margin-bottom: 8px; }
.v3-forum-cmt-head { display: flex; align-items: center; gap: 8px; }
.v3-forum-cmt-author { font-size: var(--t-meta); font-weight: 600; color: var(--c-text); }
.v3-forum-cmt-content {
  font-size: var(--t-body); color: var(--c-text); line-height: 1.55;
  margin-top: 4px; white-space: pre-wrap; word-break: break-word;
}
.v3-forum-cmt-acts { display: flex; gap: 14px; margin-top: 4px; }

/* 子评论(2层楼中楼)：竖线缩进(border-left 省 margin，B站/知乎范式) */
.v3-forum-children {
  margin-left: 12px; padding-left: 10px;
  border-left: 2px solid var(--c-border); margin-top: 6px;
}
.v3-forum-child { padding: 6px 0; }
.v3-forum-child + .v3-forum-child { border-top: 1px solid var(--c-border); }

/* 需求5: 我的帖子/评论/回复特殊标记(金边高亮+作者名金色"（我）") */
.v3-forum-mine {
  border: 1px solid var(--c-accent) !important;
  box-shadow: 0 0 0 2px var(--c-accent-bg);
  border-radius: var(--radius-md);
}
.v3-forum-mine .v3-forum-cmt-author { color: var(--c-accent); }
.v3-forum-expand {
  background: none; border: none; cursor: pointer;
  color: var(--c-accent); font-size: var(--t-meta); font-family: inherit;
  padding: 4px 0; margin-top: 2px;
}

/* 底部评论输入条(fixed，盖在 overlay 之上，z 高于 body) */
.v3-forum-composer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
  /* 2026-08-05: 让出安卓底部导航条 safe-area,回复输入条不被系统手势条/导航栏遮 */
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}

/* ═══ v252(2026-08-05) 小米8/窄屏(≤414px)样式收口 ═══
   断点 380→414(主人2026-08-05定): 小米8真机 WebView CSS 宽度≈412px>380, 原 @media380 对小米8不触发,
   v248e/v251 一堆窄屏修复全失效(铁律"只修小米8"反让小米8漏在断点外)。抬到 414 覆盖小米8(412)+常见 360-411 窄屏机。
   治用户反馈:①头像+昵称+管理员徽章挤一团 ②视频库筛选标签拥挤+热词栏无间距 ③顶栏头像误触铃铛。 */
@media (max-width: 414px) {
  /* ① 论坛评论:头像+昵称+徽章 收间距 */
  .v3-forum-cmt-head { gap: 4px; }
  /* 管理员徽章全局收(帖子/评论/列表卡所有徽章都缩,治咬昵称尾巴) */
  .v3-admin-badge { margin-left: 4px; padding: 1px 4px; font-size: 9px; }
  /* ① 个人设置:头像缩+昵称/会员群钮间距收 */
  .v3-settings-header { gap: var(--sp-sm); }
  .v3-settings-avatar { width: 44px; height: 44px; }  /* 40→44(审计P2): 移动端触摸目标达标 */
  .v3-settings-name { font-size: 15px; }
  /* ② 视频库筛选标签:padding/字号收,治一长串标签挤一行 */
  .v3-pill { padding: 5px 10px; font-size: 11px; }
  /* ② 热词栏间距(治"大家都在搜按钮无间距"): gap 4→6px 更明显 */
  #v3HotSearchRow { gap: 6px; }
  /* ② 热词栏按钮放大胶囊化(项6,2026-08-05 主人反馈"快捷按钮样式还是没解决"):
     原 .v3-pill 全局 5px 10px/11px/实测高26.5px 触摸目标远低 iOS HIG 44px + 深灰底 rgb(28,28,40)
     近似背景糊一片(对比度低看着小气)。scoped #v3HotSearchRow(特异性 0,2,0 > 全局 .v3-pill 0,1,0)
     不污染 forum-pills/kline-periods 等其他 .v3-pill。参考 vant Tag(round) 胶囊设计: 圆角999+
     边框+适中padding, min-height 提触摸目标, 配色提亮对比度。 */
  #v3HotSearchRow .v3-pill {
    padding: 6px 12px; font-size: 12px; min-height: 30px;
    border-radius: 999px; border: 1px solid var(--c-border-2);
    background: var(--c-surface-3); color: var(--c-text);   /* v253(项6): surface-3(#222230)+亮字(#E1E5EB)比 base surface-2+灰字对比度高一档, 深色主题不糊; 原用 surface-2/text-2 与 base 同值等于没覆盖=主人"没解决"真因 */
  }
  #v3HotSearchRow .v3-pill:active { background: var(--c-accent-bg); color: var(--c-accent); border-color: var(--c-accent-border); }
  /* ③ 顶栏头像误触铃铛治本(小米8窄屏): 间距加大防点头像左缘误触铃铛
     ⚠️ 必须加父级 .v3-page-header 提升特异性(0,2,0)>base(0,1,0),否则 base 规则(写在 @media 后)
        同特异性后写覆盖 @media 致缩小失效——铁律 [[css-source-order-overrides-media]] v248e 同根因
     2026-08-12 审计P2: 触摸目标回扩44×44(误触防线=gax 10px间距,与44标准不冲突;
     中心距36+10+30=76 → 44+10+44=98 反而更宽更不易误触) */
  .v3-page-header .v3-ph-actions { gap: 10px; }
  .v3-page-header .v3-header-bell { width: 44px; height: 44px; }
  .v3-page-header .v3-header-avatar { width: 44px; height: 44px; font-size: 13px; }
}
.v3-forum-reply-hint {
  font-size: var(--t-meta); color: var(--c-text-2);
  padding: 2px 0 6px; display: flex; align-items: center; gap: 8px;
}
.v3-forum-reply-cancel { color: var(--c-accent); cursor: pointer; font-size: var(--t-meta); }
.v3-forum-composer-row { display: flex; gap: 8px; align-items: center; }
.v3-forum-composer-input { flex: 1; font-size: 16px; }  /* 2026-08-10 16px 防 iOS focus 自动放大(<=16px 触发 zoom) */
.v3-forum-send { flex-shrink: 0; padding: 8px 12px; display: flex; align-items: center; }

/* 举报原因选择弹层(forum-post.js 用 v3-modal-mask+v3-modal-title，原 components.css 无此两类，补) */
.v3-modal-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1100;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.v3-modal-mask .v3-modal { width: 100%; max-width: 340px; }
.v3-modal-title {
  padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
}
.v3-forum-picker { padding: 4px 0; }

/* ─── 2026-08-03 需求2: 点赞人列表弹窗 ─── */
.v3-forum-likers { max-height: 70vh; display: flex; flex-direction: column; }
.v3-forum-likers-body { overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 56vh; padding: 4px 0; }
.v3-forum-liker-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid var(--c-border);
}
.v3-forum-liker-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  position: relative; overflow: hidden;  /* 头像联动: .v3-avatar-img absolute需relative锚定否则占满屏 */
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 600;
}
.v3-forum-liker-info { flex: 1; min-width: 0; }
.v3-forum-liker-name { font-size: 14px; font-weight: 600; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-forum-liker-role { font-size: 12px; margin-top: 1px; }
.v3-forum-likers-empty { padding: 28px 16px; text-align: center; color: var(--c-text-3); font-size: 14px; }
.v3-forum-liker-more { padding: 10px 16px; text-align: center; color: var(--c-text-3); font-size: 12px; }
/* role 配色(与 community.js 徽章语义一致:admin红/sub_admin紫/pro蓝/plus金/user灰) */
.v3-forum-liker-role.role-admin, .v3-forum-liker-role.role-sub_admin { color: var(--c-down, #ef4444); }
.v3-forum-liker-role.role-pro { color: var(--c-info, #3b82f6); }
.v3-forum-liker-role.role-promax { color: var(--c-info, #3b82f6); }
.v3-forum-liker-role.role-plus { color: var(--c-accent, #d4a017); }
.v3-forum-liker-role.role-user { color: var(--c-text-3); }
/* 点赞数字入口按钮(紧贴心形toggle,去掉左侧多余间距) */
.v3-forum-likers-num { padding-left: 2px !important; font-variant-numeric: tabular-nums; }

/* ─── 2026-08-04 点赞人列表 A方案: avatar stack(内嵌) + 底部 sheet(展开) ─── */
/* 触发态: 列表卡/详情主帖点赞数 → 前3头像重叠堆叠 + "+N" */
.v3-forum-stack-wrap { display: inline-flex; align-items: center; gap: 5px; }
.v3-forum-stack { display: inline-flex; align-items: center; vertical-align: middle; }
.v3-forum-stack-ava {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  position: relative; overflow: hidden;  /* 头像联动: .v3-avatar-img absolute需relative锚定否则占满屏 */
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
  margin-left: -7px; border: 1.5px solid var(--c-surface);   /* 边框=卡片底色做分隔,列表卡场景(--c-card 项目未定义,用--c-surface) */
}
.v3-forum-stack-ava:first-child { margin-left: 0; }
.v3-forum-stack-more {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--c-text-2);
  margin-left: -7px; border: 1.5px solid var(--c-surface);
  background: rgba(255,255,255,0.06);
}
/* 详情页 stack 在操作按钮里, 边框色对齐页面背景而非卡片底 */
.v3-forum-likers-stack { display: inline-flex; align-items: center; padding: 6px 4px 6px 8px !important; gap: 0; }
.v3-forum-likers-stack .v3-forum-stack-ava,
.v3-forum-likers-stack .v3-forum-stack-more { border-color: var(--c-bg); }

/* 展开态: 点 stack → 底部 sheet(替代居中重弹窗,移动端单手够得着) */
.v3-forum-likers-mask { align-items: flex-end; }   /* 蒙层内容底部对齐 */
.v3-forum-likers-sheet {
  width: 100%; max-width: 520px; margin: 0 auto; max-height: 72vh;
  background: var(--c-surface); border-radius: 18px 18px 0 0; border-top: 1px solid var(--c-border-2);
  padding: 8px 0 16px; display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  animation: v3-sheet-up .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes v3-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.v3-forum-sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--c-text-3); margin: 4px auto 8px; flex-shrink: 0; }
.v3-forum-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; border-bottom: 1px solid var(--c-border); flex-shrink: 0; }
.v3-forum-sheet-ttl { font-size: 15px; font-weight: 700; color: var(--c-text); }
.v3-forum-sheet-close { background: none; border: none; color: var(--c-text-2); font-size: 24px; line-height: 1; padding: 0 4px; cursor: pointer; }
.v3-forum-sheet-close:active { color: var(--c-text); }
/* sheet 内 body 随 sheet 弹性伸缩(覆盖原固定 max-height:56vh) */
.v3-forum-likers-sheet .v3-forum-likers-body { max-height: none; flex: 1; }
/* ─── 2026-08-03 需求3: 浏览次数(列表卡/详情操作行右端只读展示) ─── */
.v3-forum-stat-view { margin-left: auto; color: var(--c-text-3); }
.v3-forum-view-stat { margin-left: auto; color: var(--c-text-3); font-size: 13px; }
.v3-forum-reason-btn {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; background: none; border: none;
  color: var(--c-text); font-size: var(--t-body); font-family: inherit;
  cursor: pointer; transition: background .12s;
}
.v3-forum-reason-btn:hover { background: var(--c-surface-2); }
.v3-forum-reason-cancel {
  display: block; width: 100%; padding: 12px 16px;
  background: none; border: none; border-top: 1px solid var(--c-border);
  color: var(--c-text-3); font-size: var(--t-body); font-family: inherit; cursor: pointer;
}

/* 操作提示 toast(forum-post.js._toast，最高 z 盖一切) */
.v3-forum-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 1200;
  background: rgba(0,0,0,.85); color: #fff;
  padding: 10px 18px; border-radius: var(--radius-md);
  font-size: var(--t-meta);
  opacity: 1; transition: opacity .4s;
  max-width: 80vw; text-align: center;
}
.v3-forum-toast-out { opacity: 0; }

/* ═══════════════════════════════════════════════════════
   内容库容器(2026-07-02 主人定:视频+精选+标的三合一,底栏6→4)
   tab 栏复用 .v3-tab-bar/.v3-tab-btn;panel 用 .v3-lib-panel
   避开 _switchPage 的 .v3-page 全文档扫描(必修1,否则切走库 panel 被强制 remove active → 切回空白)
   ═══════════════════════════════════════════════════════ */

/* panel 显隐(非 .v3-page,不归 _switchPage 管,library 自管) */
.v3-lib-panel { display: none; }
.v3-lib-panel.active {
  display: block;
  animation: page-fade .15s ease;   /* 复用 layout.css 现成 keyframe,切 tab 淡入 */
}

/* 必修4: tab 栏吸顶 + 子页 sticky-bar 让位叠加(三子页 _render 同构注入 .v3-sticky-bar) */
#page-library .v3-lib-tabbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--c-bg);
  /* 覆盖 .v3-tab-bar 的 margin:0 -20px(那是 modal 通栏场景;内容库 panel 内不需要负 margin) */
  margin: 0;
  padding: 0 20px;
}
/* 子页 .v3-sticky-bar 原本 top:calc(-1*var(--sp-xl)) + margin-top负值(独立页贴 page 顶设计);
   内容库内 tab 栏已占顶,要让位:吸在 tab 栏下方,去掉 page 级负 margin/padding 留白 */
#page-library .v3-lib-panel > .v3-sticky-bar {
  top: 44px;            /* 吸在 tab 栏下方(实测 tab 栏高=44px,tab-btn min-height:44 撑高,见下) */
  padding-top: 8px;     /* 覆盖原 var(--sp-xl),tab 栏已占顶不需大留白 */
  margin-top: 0;        /* 覆盖原 calc(-1*var(--sp-xl)),不钻出 panel 顶钻到 tab 栏 */
}
/* tab 栏已标识当前内容(视频/精选/标的),子页 h1「标的池」等冗余,隐藏省垂直空间 */
#page-library .v3-lib-panel > .v3-sticky-bar h1 { display: none; }

/* 移动端触摸达标(主人铁律:tab 触摸高度≥44px 苹果HIG最小推荐);
   .v3-tab-btn 原 padding:10px 0 仅 39px,内容库限定撑到 44 + flex 垂直水平居中文字 */
#page-library .v3-lib-tabbar .v3-tab-btn {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   微论坛配图(2026-07-03 主人定:帖子+评论九宫格,客户端压缩后上传)
   九宫格画廊(列表摘要/详情大图/评论紧凑三态) + 发帖/评论配图选择器 UI
   全用现有 CSS 变量贴合深黑+金色调性;老内核 aspect-ratio 兜底照搬 b52f386 范式
   ═══════════════════════════════════════════════════════ */

/* ── 九宫格画廊容器(列表摘要/详情大图/评论紧凑三态) ── */
.v3-forum-images {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.v3-forum-images--list { gap: 4px; max-width: 240px; }       /* 列表卡摘要最多3小格,窄 */
.v3-forum-images--detail { gap: 8px; margin-top: 10px; }     /* 详情大图撑满宽 */
.v3-forum-images--comment {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;   /* 评论配图小缩略图横排不拉满(对齐小红书/掘金/即刻) */
}
.v3-forum-images--comment .v3-forum-images__cell {
  width: 80px; height: 80px; aspect-ratio: auto; flex: 0 0 auto;  /* 固定小方块,不随容器宽度拉伸 */
}
.v3-forum-images__cell {
  position: relative;
  aspect-ratio: 1 / 1;                 /* 九宫格正方格(Chrome88+,老内核下方 @supports 兜底) */
  overflow: hidden;
  border-radius: 6px;
  background: var(--c-surface-2);
  border: 0; padding: 0; cursor: pointer;
}
.v3-forum-images__cell:active { opacity: .85; }
.v3-forum-images__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v3-forum-images--comment .v3-forum-images__cell { border-radius: 4px; }

/* 老内核 WebView 兜底(aspect-ratio Chrome88+ 才支持,小米8塌陷铁律,照搬 1332 范式) */
@supports not (aspect-ratio: 1 / 1) {
  .v3-forum-images--list .v3-forum-images__cell { min-height: 72px; }
  .v3-forum-images--detail .v3-forum-images__cell { min-height: 110px; }
  .v3-forum-images--comment .v3-forum-images__cell { min-height: 64px; }
}

/* ── 发帖配图选择器(openNewPost 浮层内,3列九宫格 + 虚线添加钮) ── */
.v3-post-img-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.v3-post-img-add {
  aspect-ratio: 1 / 1;
  min-height: 80px;
  border: 1.5px dashed var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-surface-2);
  color: var(--c-text-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.v3-post-img-add:hover { border-color: var(--c-accent); color: var(--c-accent); }
.v3-post-img-add:disabled { opacity: .5; cursor: not-allowed; }
.v3-post-img-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-surface-2);
}
.v3-post-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v3-post-img-rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff;
  border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.v3-post-img-rm-sm { width: 18px; height: 18px; }    /* 评论紧凑版缩小 */

/* 发帖选择器老内核兜底 */
@supports not (aspect-ratio: 1 / 1) {
  .v3-post-img-add, .v3-post-img-thumb { min-height: 80px; }
}

/* ── 评论输入条紧凑配图(composer 内横向滚动预览,48px 缩略图) ── */
.v3-forum-composer-img {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.v3-forum-composer-img:hover { color: var(--c-accent); border-color: var(--c-accent-border); }
.v3-forum-composer-img:disabled { opacity: .5; cursor: not-allowed; }
.v3-forum-composer-thumbs {
  display: flex; gap: 6px;
  overflow-x: auto;
  padding: 6px 0 2px;
  -webkit-overflow-scrolling: touch;
}
.v3-forum-composer-thumbs::-webkit-scrollbar { display: none; }
.v3-forum-composer-thumb {
  position: relative;
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface-2);
}
.v3-forum-composer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══════════════════════════════════════════════════
   图片大图灯箱(主人2026-07-03需求:所有图片支持点大图+下载)
   关键布局样式内联在 app.js V3.previewImage 保证零依赖可用,
   这里仅做 hover 增强 + 老内核 inset 兜底(小米8范式 b52f386)。
   ═══════════════════════════════════════════════════ */
.v3-img-preview__dl:hover { filter: brightness(1.08); }
@supports not (inset: 0) {
  .v3-img-preview { top: 0; left: 0; right: 0; bottom: 0; }
}

/* ═══════════════════════════════════════════════════
   v62-20260706c: 论坛编辑功能 + admin删除 + 视频元素问AI
   ①② forum-post.js 编辑/admin删除入口
   ③ chat.js+videos.js 视频弹窗4类元素问AI快速入口
   ═══════════════════════════════════════════════════ */

/* —— 「已编辑」灰色小标记(标题旁+评论内容旁) —— */
.v3-edited-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: var(--t-meta);
  color: var(--c-text-3);
  background: var(--c-surface-2);
  border-radius: var(--radius-sm);
  vertical-align: middle;
  font-weight: normal;
}

/* —— 编辑按钮(铅笔风格,常规次要色) —— */
.v3-edit-btn {
  color: var(--c-text-2);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--t-meta);
  padding: 2px 6px;
}
.v3-edit-btn:hover { color: var(--c-text-1); text-decoration: underline; }

/* —— admin 删除按钮(红字,区别于作者删除常规色) —— */
.v3-admin-del-btn {
  color: var(--c-down);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: var(--t-meta);
  padding: 2px 6px;
}
.v3-admin-del-btn:hover { text-decoration: underline; }

/* 编辑浮层复用 forum.js 的 .v3-full-* 系列(已存在),提示条圆角 */
#v3EditMsg { border-radius: var(--radius-sm); }

/* —— 视频弹窗元素旁"问AI"小按钮(紧凑,不抢主体视觉) —— */
.v3-elem-askai {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  line-height: 1;
  padding: 3px 8px;
  color: var(--c-accent);
  background: var(--c-accent-bg);
  border: 1px solid var(--c-accent-border);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
  vertical-align: middle;
}
.v3-elem-askai:hover { background: var(--c-accent); color: #fff; }
@media (max-width: 480px) {
  .v3-elem-askai { padding: 4px 10px; }
}

/* —— _renderVideoWelcome 元素摘要行(标题下方) —— */
.v3-elem-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: -4px 0 10px;
  padding: 6px 10px;
  background: var(--c-accent-bg);
  border: 1px solid var(--c-accent-border);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}
.v3-elem-summary .v3-elem-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  color: var(--c-accent);
  background: rgba(0,0,0,0);
  border-radius: 4px;
  letter-spacing: .5px;
}
.v3-elem-summary .v3-elem-text {
  font-size: 12px;
  color: var(--c-text-2);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

/* —— 问题5(2026-07-08): 元素问AI的用户气泡上下文胶囊 ——
   主人诉求: 用户气泡要显示"带着啥问的"(视频+元素), 不只原文
   用户气泡背景是 --c-accent-bg(琥珀金淡), 胶囊用中性半透灰叠层
   (亮暗主题都可见, rgba 老 WebView 兼容, 避 task#157 inset 简写坑) */
.v3-ask-ctx {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(127,127,127,0.2);
}
.v3-ask-ctx-video {
  font-size: 11px;
  opacity: 0.78;
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-all;
}
.v3-ask-ctx-elem {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  background: rgba(127,127,127,0.13);
  border-radius: 6px;
  padding: 3px 8px;
  line-height: 1.4;
}
.v3-ask-ctx-elem .v3-elem-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  opacity: 0.85;
}
.v3-ask-ctx-elem .v3-elem-text {
  font-size: 11.5px;
  opacity: 0.8;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}
.v3-ask-ctx-msg {
  margin-top: 2px;
}
@media (max-width: 768px) {
  .v3-ask-ctx-video { font-size: 10.5px; }
  .v3-ask-ctx-elem .v3-elem-text { font-size: 11px; }
}

/* ══════════════ 付费计划调研投票页（survey.js，2026-07-16）══════════════ */
/* v87(2026-07-16治iOS PWA"背景页"bug):overlay 退化为纯盖板(对齐灯箱写法),
   不自身滚动——iOS WebKit standalone 下"fixed全屏 + 自身overflow滚动"会触发合成层层叠 bug,
   内容画到 .v3-app 之下成"背景页"。滚动下沉到 .v3-survey-wrap 内层,overlay 只当不透明盖板。 */
.v3-survey-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--c-bg); z-index: 10000;
  display: flex; flex-direction: column; overflow: hidden;
}
.v3-survey-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  /* task#8(2026-08-11): safe-area-top 防安卓状态栏遮挡（belt-and-suspenders 第三层） */
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px; background: var(--c-bg);
  border-bottom: 1px solid var(--c-border); max-width: 680px; margin: 0 auto; box-sizing: border-box;
}
.v3-survey-back {
  width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--c-text); cursor: pointer; border-radius: 8px;
}
.v3-survey-back:active { background: var(--c-surface-2); }
.v3-survey-title { flex: 1; text-align: center; font-weight: 600; font-size: 15px; color: var(--c-text); }
/* v87:wrap 承接滚动(原 overlay 自滚下沉到此),flex:1 占满 overlay 减 header 余高
   v88:补 min-height:0 —— flex column 子项默认 min-height:auto 会撑开 item 阻止 overflow 生效,
       Chrome83(MIUI WebView)尤甚;min-height:0 是 flex 滚动容器标准写法,防 wrap 拿不到高度致内容不可滚 */
.v3-survey-wrap { max-width: 680px; width: 100%; margin: 0 auto; padding: 16px 16px 48px; box-sizing: border-box; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.v3-survey-intro {
  background: linear-gradient(160deg, var(--c-accent-bg), transparent 70%);
  border: 1px solid var(--c-accent-border); border-radius: 14px; padding: 18px 16px; margin-bottom: 16px;
}
.v3-survey-intro-badge {
  display: inline-block; font-size: 11px; color: var(--c-accent); background: var(--c-accent-bg);
  padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; font-weight: 600;
}
.v3-survey-intro-h { font-size: 16px; font-weight: 600; color: var(--c-text); margin-bottom: 10px; }
.v3-survey-intro-p { font-size: 13px; line-height: 1.7; color: var(--c-text-2); margin-bottom: 10px; }
.v3-survey-intro-p:last-child { margin-bottom: 0; }

.v3-survey-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 14px;
  padding: 16px; margin-bottom: 12px;
}
.v3-survey-card-readonly { opacity: 0.92; }
.v3-survey-card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.v3-survey-card-no {
  flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--c-accent-bg); color: var(--c-accent);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.v3-survey-card-title { font-size: 14.5px; font-weight: 600; color: var(--c-text); line-height: 1.45; flex: 1; padding-top: 2px; }
.v3-survey-card-desc { font-size: 12px; color: var(--c-text-3); margin: 6px 0 10px 36px; line-height: 1.5; }
.v3-survey-opts { margin-top: 10px; }

.v3-survey-opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 11px 12px; margin-bottom: 8px; text-align: left; cursor: pointer;
  background: var(--c-surface-2); border: 1px solid var(--c-border-2); border-radius: 10px;
  color: var(--c-text); font-size: 13.5px; line-height: 1.5; transition: border-color .15s, background .15s;
}
.v3-survey-opt:active { background: var(--c-surface-3); }
.v3-survey-opt.selected { border-color: var(--c-accent); background: var(--c-accent-bg); }
.v3-survey-opt-radio {
  flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--c-text-3); box-sizing: border-box; transition: all .15s;
}
.v3-survey-opt.selected .v3-survey-opt-radio { border-color: var(--c-accent); background: var(--c-accent); box-shadow: inset 0 0 0 3px var(--c-surface); }
.v3-survey-opt-check {
  flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; border-radius: 4px;
  border: 2px solid var(--c-text-3); box-sizing: border-box; transition: all .15s;
}
.v3-survey-opt.selected .v3-survey-opt-check { border-color: var(--c-accent); background: var(--c-accent); }
.v3-survey-opt.selected .v3-survey-opt-check::after {
  content: ''; display: block; width: 4px; height: 8px; margin: 1px auto; border: solid var(--c-accent-text);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.v3-survey-opt-body { flex: 1; }
.v3-survey-opt-label { display: block; }
.v3-survey-opt-sub { display: block; font-size: 11.5px; color: var(--c-text-3); margin-top: 3px; }
.v3-survey-other-input {
  width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 10px 12px; resize: vertical;
  background: var(--c-surface-2); border: 1px solid var(--c-border-2); border-radius: 10px;
  color: var(--c-text); font-size: 13px; font-family: inherit; line-height: 1.5;
}

.v3-survey-text {
  width: 100%; box-sizing: border-box; padding: 12px; resize: vertical;
  background: var(--c-surface-2); border: 1px solid var(--c-border-2); border-radius: 10px;
  color: var(--c-text); font-size: 13px; font-family: inherit; line-height: 1.6;
}
.v3-survey-imgs { margin-top: 12px; }
.v3-survey-img-tip { font-size: 11.5px; color: var(--c-text-3); margin-bottom: 8px; }
.v3-survey-img-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.v3-survey-img-add {
  width: 72px; height: 72px; border: 1px dashed var(--c-border-2); border-radius: 10px;
  background: var(--c-surface-2); color: var(--c-text-3); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px;
}
.v3-survey-img-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; }
.v3-survey-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v3-survey-img-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none; font-size: 14px; line-height: 1; cursor: pointer;
}

.v3-survey-footer { margin-top: 16px; }
.v3-survey-deadline { font-size: 12px; color: var(--c-text-3); text-align: center; margin-bottom: 12px; line-height: 1.5; }
.v3-survey-submit { width: 100%; padding: 13px; font-size: 15px; font-weight: 600; border-radius: 10px; }

.v3-survey-locked { text-align: center; padding: 28px 16px 8px; }
.v3-survey-locked-icon {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--c-down-bg); color: var(--c-down); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.v3-survey-locked-msg { font-size: 14px; color: var(--c-text-2); line-height: 1.6; }

.v3-survey-review { margin-top: 8px; padding-left: 36px; }
.v3-survey-review-val { font-size: 13px; color: var(--c-text); padding: 8px 12px; background: var(--c-accent-bg); border-radius: 8px; }
.v3-survey-review-bullet { font-size: 13px; color: var(--c-text); padding: 6px 12px; background: var(--c-accent-bg); border-radius: 8px; margin-bottom: 6px; }
.v3-survey-review-text { font-size: 13px; color: var(--c-text-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 768px) {
  .v3-survey-card { padding: 14px; }
  .v3-survey-opt { padding: 10px; }
}

/* ============================================================
 * 2026-07-24 全量辩证分析: 输入区开关 + 锚点卡 + 导出按钮
 * 配色: accent 金 #ECAA0B 强调; ⚠️提醒用琥珀 #C08000(非红绿, 避A股撞色——红涨绿跌, 正面禁绿)
 * ============================================================ */

/* 开关行: 输入区上方独立一行(开关+提醒横排, 移动端窄屏提醒换行) */
.v3-chat-dialectics-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 4px 0;
  font-size: 12px;
}

/* toggle 开关(label 包裹隐藏的 checkbox, 用 span 画滑块) */
.v3-dia-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.v3-dia-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.v3-dia-switch {
  position: relative; width: 34px; height: 18px; border-radius: 999px;
  background: rgba(255,255,255,0.14); transition: background .2s; flex-shrink: 0;
}
.v3-dia-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.v3-dia-toggle input:checked + .v3-dia-switch { background: #ECAA0B; }  /* 开=accent 金 */
.v3-dia-toggle input:checked + .v3-dia-switch::after { transform: translateX(16px); }
.v3-dia-label { font-size: 13px; font-weight: 600; color: var(--c-text); }

/* ⚠️ 提醒文案: 琥珀色(醒目但不撞 A 股跌色绿) */
.v3-dia-tip { color: #C08000; font-size: 11.5px; }

/* 辩证增强视觉卡 v5(2026-07-24 全量分析专用, LLM <<<DIA>>> 9行结构化契约块渲染 6 组件)
   配色: 看多=红 #CF4040 / 看空=绿 #00AC4E(A股红涨绿跌惯例, 绿=负面符合项目避撞色约束) */
.v3-dia2-wrap { margin-top: 12px; }
.v3-dia2 { background: var(--c-accent-bg); border: 1px solid var(--c-accent-border); border-radius: 10px; padding: 11px 12px; }
.v3-dia2 .a-conf { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin-bottom: 8px; }
.v3-dia2 .a-conf .lb { font-size: 9.5px; font-weight: 700; background: #ECAA0B; color: #0c0c14; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; }
.v3-dia2 .a-conf .tx { color: var(--c-text); line-height: 1.5; }
/* ⓪ 核心结论前置 TLDR 速览卡(2026-08-09): 对标 WorkBuddy 开头结论卡, 卡顶部 3 秒抓重点(金渐变结论条+3 关键标签chip) */
.v3-dia2 .a-tldr { background: linear-gradient(135deg, rgba(236,170,11,.12), rgba(236,170,11,.04)); border: 1px solid var(--c-accent-border); border-radius: 10px; padding: 9px 11px; margin-bottom: 9px; }
.v3-dia2 .a-tldr-ess { display: flex; gap: 7px; align-items: baseline; font-size: 12.5px; line-height: 1.5; }
.v3-dia2 .a-tldr-ess .lb { font-size: 9px; font-weight: 700; background: #ECAA0B; color: #0c0c14; padding: 2px 6px; border-radius: 3px; flex-shrink: 0; }
.v3-dia2 .a-tldr-ess .tx { color: var(--c-text); font-weight: 500; }
.v3-dia2 .a-tldr-kw { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.v3-dia2 .a-tldr-kw .kw-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; background: rgba(236,170,11,.10); border: 1px solid rgba(236,170,11,.25); color: #ECAA0B; line-height: 1.5; }
/* ⑪ 矛盾转化条件(提升清单第2条,2026-08-09): 突破金/受阻蓝中性配色不暗示涨跌 */
.v3-dia2 .a-cond { background: rgba(255,255,255,.03); border: 1px solid var(--c-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.v3-dia2 .a-cond .h { font-size: 9.5px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.v3-dia2 .a-cond .cd { display: flex; gap: 7px; align-items: baseline; font-size: 11.5px; line-height: 1.5; padding: 3px 0; }
.v3-dia2 .a-cond .cd .lb { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; flex-shrink: 0; }
.v3-dia2 .a-cond .cd.up .lb { background: rgba(236,170,11,.18); color: #ECAA0B; }
.v3-dia2 .a-cond .cd.dn .lb { background: rgba(91,163,232,.18); color: #5BA3E8; }
.v3-dia2 .a-cond .cd .tx { color: var(--c-text); }
/* ⑫ 关键观测变量(提升清单第3条,2026-08-09): "接下来盯什么"锚点清单 */
.v3-dia2 .a-watch { background: rgba(255,255,255,.03); border: 1px solid var(--c-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.v3-dia2 .a-watch .h { font-size: 9.5px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.v3-dia2 .a-watch .w-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 11px; padding: 4px 0; line-height: 1.5; border-top: 1px dashed rgba(255,255,255,.06); }
.v3-dia2 .a-watch .w-row:first-of-type { border-top: none; padding-top: 0; }
.v3-dia2 .a-watch .nm { font-size: 11.5px; font-weight: 600; color: #ECAA0B; }
.v3-dia2 .a-watch .st { color: var(--c-text-2); font-size: 10.5px; }
.v3-dia2 .a-watch .sg { color: #5BA3E8; font-size: 10.5px; }
/* ⑬ 辩证框架说明(提升清单第6条,2026-08-09): 原生details可选折叠, 纯前端静态零LLM */
.v3-dia2 .a-legend { margin-top: 6px; border-top: 1px dashed rgba(255,255,255,.08); padding-top: 6px; }
.v3-dia2 .a-legend summary { font-size: 10.5px; color: var(--c-text-3); cursor: pointer; list-style: none; padding: 2px 0; }
.v3-dia2 .a-legend summary::-webkit-details-marker { display: none; }
.v3-dia2 .a-legend summary::before { content: "▸ "; }
.v3-dia2 .a-legend[open] summary::before { content: "▾ "; }
.v3-dia2 .a-legend .lg-body { padding-top: 6px; }
.v3-dia2 .a-legend .lg-item { display: flex; gap: 8px; font-size: 10.5px; line-height: 1.6; padding: 1px 0; }
.v3-dia2 .a-legend .lg-k { color: #ECAA0B; flex-shrink: 0; min-width: 88px; }
.v3-dia2 .a-legend .lg-v { color: var(--c-text-2); }
.v3-dia2 .a-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: rgba(255,255,255,.03); border: 1px solid var(--c-border); padding: 8px; border-radius: 10px; margin-bottom: 8px; }
.v3-dia2 .a-duo .cl { font-size: 10px; font-weight: 700; margin-bottom: 4px; }
.v3-dia2 .a-duo .up { color: #CF4040; }
.v3-dia2 .a-duo .dn { color: #00AC4E; }
.v3-dia2 .a-duo ul { list-style: none; margin: 0; padding: 0; }
.v3-dia2 .a-duo li { font-size: 11.5px; padding: 1px 0 1px 9px; position: relative; color: var(--c-text); line-height: 1.5; }
.v3-dia2 .a-duo li::before { content: ""; position: absolute; left: 0; top: 7px; width: 4px; height: 4px; border-radius: 50%; }
.v3-dia2 .a-duo .up-list li::before { background: #CF4040; }
.v3-dia2 .a-duo .dn-list li::before { background: #00AC4E; }
.v3-dia2 .a-pct { background: rgba(255,255,255,.03); border: 1px solid var(--c-border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.v3-dia2 .a-pct .h { font-size: 9.5px; font-weight: 700; color: var(--c-text-2); margin-bottom: 6px; }
.v3-dia2 .a-pct .pbar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; }
.v3-dia2 .a-pct .pbar .u { background: #CF4040; }
.v3-dia2 .a-pct .pbar .d { background: #00AC4E; }
.v3-dia2 .a-pct .pleg { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; }
.v3-dia2 .a-pct .pleg .up { color: #CF4040; font-weight: 600; }
.v3-dia2 .a-pct .pleg .dn { color: #00AC4E; font-weight: 600; }
.v3-dia2 .a-q { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--c-border); padding: 7px 10px; border-radius: 10px; font-size: 11.5px; margin-bottom: 8px; }
.v3-dia2 .a-q .lb { font-size: 9.5px; font-weight: 700; color: #ECAA0B; flex-shrink: 0; }
.v3-dia2 .a-q .bar { flex: 1; height: 6px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.v3-dia2 .a-q .bar .f { height: 100%; background: linear-gradient(90deg, #C08000, #ECAA0B); border-radius: 4px; }
.v3-dia2 .a-q .v { color: #ECAA0B; font-weight: 600; font-size: 10.5px; flex-shrink: 0; }
.v3-dia2 .a-pe { display: flex; align-items: stretch; gap: 5px; font-size: 11px; margin-bottom: 8px; }
.v3-dia2 .a-pe .box { flex: 1; padding: 7px 8px; border-radius: 7px; }
.v3-dia2 .a-pe .phen { background: rgba(255,255,255,.05); color: var(--c-text-2); border: 1px solid var(--c-border); }
.v3-dia2 .a-pe .ess { background: rgba(236,170,11,.10); color: var(--c-text); border: 1px solid var(--c-accent-border); }
.v3-dia2 .a-pe .box .lb { font-size: 9px; font-weight: 700; display: block; margin-bottom: 2px; }
.v3-dia2 .a-pe .phen .lb { color: var(--c-text-3); }
.v3-dia2 .a-pe .ess .lb { color: #ECAA0B; }
.v3-dia2 .a-pe .arr { display: flex; align-items: center; color: #ECAA0B; font-size: 13px; }
/* === 2026-07-24 方案B 新增组件(三时段/催化剂风险/可能性) === */
/* 2026-08-08 合规止血: 操作建议信号灯(.a-act)整块下线, 6 行样式移除 */
/* ⑦ 三时段推演: 短/中/长期三栏, 按方向着色(原⑧, 信号灯删后顺位前移) */
.v3-dia2 .a-time { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; background: rgba(255,255,255,.03); border: 1px solid var(--c-border); padding: 8px; border-radius: 10px; margin-bottom: 8px; }
.v3-dia2 .a-time .tc { padding: 5px 4px; border-radius: 6px; background: rgba(255,255,255,.03); text-align: center; }
.v3-dia2 .a-time .tc .tlb { font-size: 9px; font-weight: 700; color: var(--c-text-2); margin-bottom: 3px; }
.v3-dia2 .a-time .tc .tv { font-size: 10.5px; line-height: 1.4; }
.v3-dia2 .a-time .tc.up .tv { color: #CF4040; }
.v3-dia2 .a-time .tc.dn .tv { color: #00AC4E; }
.v3-dia2 .a-time .tc.flat .tv { color: var(--c-text-2); }
/* ⑨ 催化剂 vs 风险: 左正向红/右负向绿 */
.v3-dia2 .a-cat { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.v3-dia2 .a-cat .ccb { padding: 7px 8px; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.v3-dia2 .a-cat .ccb.pos { background: rgba(207,64,64,.08); border: 1px solid rgba(207,64,64,.3); }
.v3-dia2 .a-cat .ccb.neg { background: rgba(0,172,78,.08); border: 1px solid rgba(0,172,78,.3); }
.v3-dia2 .a-cat .ccb .hlb { font-size: 9.5px; font-weight: 700; margin-bottom: 3px; display: block; }
.v3-dia2 .a-cat .ccb.pos .hlb { color: #CF4040; }
.v3-dia2 .a-cat .ccb.neg .hlb { color: #00AC4E; }
/* ⑩ 可能性现实性: 大概率金/小概率灰 */
.v3-dia2 .a-pos { background: rgba(255,255,255,.03); border: 1px solid var(--c-border); padding: 8px 10px; border-radius: 10px; margin-bottom: 8px; font-size: 11px; line-height: 1.55; }
.v3-dia2 .a-pos .pl { display: flex; gap: 6px; margin-bottom: 3px; }
.v3-dia2 .a-pos .pl:last-child { margin-bottom: 0; }
.v3-dia2 .a-pos .pl .k { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; height: fit-content; }
.v3-dia2 .a-pos .pl .k.hi { background: rgba(236,170,11,.2); color: #ECAA0B; }
.v3-dia2 .a-pos .pl .k.lo { background: rgba(255,255,255,.08); color: var(--c-text-2); }
/* ✦ 博主观点 × 数据辩证 交叉验证(护城河组件, 2026-08-09): 双栏博主🎬金/数据📊蓝 + 关系条(背离红/印证绿/中性灰)
   对标 WorkBuddy 纯数据单视角——这里多一栏"模型先生博主视角", 是抄不走的差异化 */
.v3-dia2 .a-cv-wrap { background: rgba(255,255,255,.03); border: 1px solid var(--c-border); padding: 8px; border-radius: 10px; margin-bottom: 8px; }
.v3-dia2 .a-cv-lab { font-size: 9.5px; font-weight: 700; color: #ECAA0B; margin-bottom: 7px; }
.v3-dia2 .a-cv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.v3-dia2 .a-cv .cvb { padding: 7px 8px; border-radius: 8px; font-size: 11px; line-height: 1.5; }
.v3-dia2 .a-cv .cvb .lb { font-size: 9.5px; font-weight: 700; margin-bottom: 3px; display: block; }
.v3-dia2 .a-cv .cvb .dir { font-weight: 700; font-size: 12px; display: block; }
.v3-dia2 .a-cv .cvb .tx { font-size: 10.5px; color: var(--c-text); margin-top: 2px; display: block; }
.v3-dia2 .a-cv .cvb.view { background: rgba(236,170,11,.10); border: 1px solid rgba(236,170,11,.32); }
.v3-dia2 .a-cv .cvb.view .lb, .v3-dia2 .a-cv .cvb.view .dir { color: #ECAA0B; }
.v3-dia2 .a-cv .cvb.data { background: rgba(91,163,232,.08); border: 1px solid rgba(91,163,232,.32); }
.v3-dia2 .a-cv .cvb.data .lb, .v3-dia2 .a-cv .cvb.data .dir { color: #5BA3E8; }
.v3-dia2 .a-rel { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600; line-height: 1.45; }
.v3-dia2 .a-rel.warn { background: rgba(207,64,64,.08); border: 1px solid rgba(207,64,64,.3); color: #CF4040; }
.v3-dia2 .a-rel.ok { background: rgba(0,172,78,.08); border: 1px solid rgba(0,172,78,.3); color: #00AC4E; }
.v3-dia2 .a-rel.flat { background: rgba(255,255,255,.04); border: 1px solid var(--c-border); color: var(--c-text-2); }
.v3-dia2 .a-rel .ic { font-size: 14px; flex-shrink: 0; }
/* LITE 简版朴素化(更紧凑, 拉开与 full 视觉差距) */
.v3-dia2.lite .a-pct { padding: 6px 8px; }
.v3-dia2 .dia-sum { background: rgba(236,170,11,.10); border: 1px solid var(--c-accent-border); border-radius: 10px; padding: 9px 11px; font-size: 12.2px; color: var(--c-text); line-height: 1.65; }
.v3-dia2 .dia-sum .hh { font-size: 10px; font-weight: 700; color: #ECAA0B; margin-bottom: 4px; }

/* 导出长图按钮(secondary 描边, accent 金字) */
.v3-dia-export {
  margin-top: 10px; padding: 5px 14px; font-size: 12px; width: auto;
  border-color: var(--c-accent-border); color: #ECAA0B;
}
.v3-dia-export:disabled { opacity: .7; cursor: wait; }  /* 修正② 导出中禁用 */
.v3-dia-export .v3-dia-spin {  /* 修正② 等待动画 spinner */
  display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px;
  border: 2px solid rgba(236,170,11,.35); border-top-color: #ECAA0B; border-radius: 50%;
  animation: v3-dia-spin .7s linear infinite;
}
@keyframes v3-dia-spin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
  .v3-dia-tip { font-size: 11px; }
}

/* ═══ 第三批B(2026-07-31): 评论发送 loading 态(防老人以为卡死重复点) ═══ */
.v3-forum-send.is-loading { opacity: .7; }
.v3-forum-send.is-loading svg { display: none; }
.v3-forum-send.is-loading::after { content: '发送中'; font-size: var(--t-meta); }

/* ═══ 第三批(2026-07-31): 论坛触摸目标全达标 44px(移动端) ═══ */
/* 报告 REPORT-2026-07-30-community-audit #6: .v3-forum-act 22-26 / expand 22 / send 34 / composer-img 36 / pin-btn 22 全不达 iOS HIG 44×44;
   桌面端鼠标精确保持紧凑不动,仅移动端撑高治误触;放文件末尾确保同特异性覆盖前面基础规则(后定义生效) */
@media (max-width: 768px) {
  .v3-forum-act { min-height: 44px; padding: 10px 8px; }                    /* 赞/评论/举报/删除(帖子底+评论区通用) */
  .v3-forum-expand { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 4px; }  /* 楼中楼展开N条回复 */
  .v3-forum-send { min-height: 44px; }                                      /* 评论发送钮 */
  .v3-forum-composer-img { width: 44px; height: 44px; }                     /* 发图钮 36→44 */
  .v3-forum-reply-cancel { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }  /* 取消回复小链接 */
  .v3-forum-pin-btn { min-height: 44px; padding: 8px 12px; }                /* admin 置顶/取消置顶钮 */
}

/* ═══ 第三批(2026-07-31): 论坛桌面 max-width 居中(对齐聊天室 cr-stream 760 范式) ═══ */
/* 报告 REPORT-2026-07-30-community-audit: 论坛列表/详情桌面满宽(1384px)长文本一行拉满不可读,
   与聊天室已收窄的 760 不一致。论坛内容含九宫格配图+标题,比纯文字稍宽,820 合理。
   滚动容器 .cr-forum-panel(community.css:196)是论坛列表+详情统一主内容区,
   居中收窄其对齐聊天室体验。仅桌面>768 生效,移动端满宽贴边(沉浸式不变)。 */
@media (min-width: 769px) {
  .cr-forum-panel {
    max-width: 820px; margin-left: auto; margin-right: auto; width: 100%;
  }
}

/* === 音频原声条(2026-08-03 Pro专属, 视频弹窗博主口播原音播放) === */
.v3-audio-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; margin: 0;
  background: var(--c-surface); border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
/* 自定义播放器(2026-08-03 主人4需求): 无原生下载钮=禁下载 + 音量竖向浮层独立不挡进度条 */
.v3-aud-player { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.v3-aud-player audio { display: none; } /* 隐藏原生audio只用它播放, 控制全走自定义DOM */
.v3-aud-play { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--c-accent); color: #1a1a26; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; }
.v3-aud-play svg { display: block; } /* SVG block 级去掉行内基线空隙, 天然精准居中金色圆圈 */
.v3-aud-play:active { transform: scale(.94); }
.v3-aud-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.v3-aud-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.v3-aud-title { color: var(--c-accent); font-weight: 600; font-size: 12px; white-space: nowrap; }
.v3-aud-time { font-size: 11px; color: var(--c-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v3-aud-time b { color: var(--c-text); font-weight: 500; }
.v3-aud-seek { position: relative; height: 6px; background: rgba(255,255,255,.10); border-radius: 3px; cursor: pointer;
  touch-action: none; } /* 拖拽时禁浏览器默认水平滚动, pointer事件独占 */
.v3-aud-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: var(--c-accent); border-radius: 3px; }
.v3-aud-thumb { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin-left: -6px;
  transform: translateY(-50%); background: var(--c-accent); border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.45); pointer-events: none; transition: transform .12s; } /* 圆点thumb, pointer-events:none让事件穿透到bar */
.v3-aud-seek:hover .v3-aud-thumb { transform: translateY(-50%) scale(1.15); }
.v3-audio-label {
  font-size: 12px; color: var(--c-text-2); white-space: nowrap; flex-shrink: 0;
}
/* 锁态: 非Pro点升级 */
.v3-audio-locked {
  cursor: pointer; gap: 12px; padding: 10px 14px;
  background: linear-gradient(90deg, rgba(255,224,138,.10), rgba(156,110,8,.06));
  transition: background .15s;
}
.v3-audio-locked:active { background: linear-gradient(90deg, rgba(255,224,138,.18), rgba(156,110,8,.10)); }
.v3-audio-locked:hover { background: linear-gradient(90deg, rgba(255,224,138,.16), rgba(156,110,8,.08)); }
.v3-audio-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.v3-audio-text b { font-size: 13px; color: var(--c-accent); font-weight: 600; }
.v3-audio-text small { font-size: 11px; color: var(--c-text-2); }
.v3-audio-arrow { color: var(--c-accent); font-size: 14px; flex-shrink: 0; }
@media (max-width: 768px) {
  .v3-aud-play { width: 32px; height: 32px; }
}

/* ═══ v237(2026-08-04) 全局常驻顶栏右区组件: 🔔通知钮 + 👤头像钮(移动端底栏砍"我的", 挪顶栏头像) ═══ */
.v3-header-bell, .v3-header-avatar {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-text-2);
  -webkit-tap-highlight-color: transparent;
}
.v3-header-bell { width: 44px; height: 44px; border-radius: var(--radius-md); }
.v3-header-bell:active { background: var(--c-surface-2); }
.v3-header-bell svg { width: 20px; height: 20px; }
/* v241: i-bell 是纯 path(fill 型), 双主题靠 var(--c-text-2) 自适应(需求2 主题适配);
   顶栏 + sidebar footer 铃铛共用此规则。 */
.v3-header-bell svg, .v3-sidebar-bell svg { fill: var(--c-text-2); stroke: none; }
/* 通知红点(顶栏铃铛 dot, 独立 ID #v3HeaderNotifBadge 由 feedback.js _refreshBadge 显隐) */
.v3-header-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-accent); border: 1.5px solid var(--c-bg);
}
.v3-header-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  /* 触摸目标扩44px(审计P2): 视觉32不变, 透明padding外圈=隐形热区 */
  padding: 6px; background-clip: content-box;
  /* v241: 固定渐变删, 让位 JS _renderAvatar 行内设深色系渐变(需求4 首字母+配色块, 白字 #fff) */
  color: #fff; font-weight: 700; font-size: 14px;
}

/* ═══ v241(2026-08-04) sidebar footer(PC 专用, 需求1: PC 删顶栏后入口挪 sidebar 底部) ═══ */
/* 变体A: 主题/🔔/头像 三按钮垂直堆叠, 紧凑省事, 靠 sidebar flex 末尾自然贴底 */
.v3-sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
  margin-top: 4px;
}
.v3-sidebar-footer button {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c-text-2);
  -webkit-tap-highlight-color: transparent;
  transition: color .12s, background .12s;
}
.v3-sidebar-footer button:hover { color: var(--c-text); background: var(--c-surface); }
/* sidebar 主题单钮(循环 light↔dark, 图标由 app.js _syncSidebarThemeToggle 切 i-sun/i-moon) */
.v3-sidebar-theme-toggle { width: 40px; height: 40px; border-radius: var(--radius-md); }
.v3-sidebar-theme-toggle svg { width: 18px; height: 18px; }
.v3-sidebar-bell { width: 40px; height: 40px; border-radius: var(--radius-md); }
.v3-sidebar-bell:active { background: var(--c-surface-2); }
.v3-sidebar-bell svg { width: 20px; height: 20px; }
/* sidebar 通知红点(独立 ID #v3SidebarNotifBadge, feedback.js _refreshBadge 多实例显隐) */
.v3-sidebar-notif-dot {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-accent); border: 1.5px solid var(--c-bg);
}
.v3-sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 14px;
  /* background 由 app.js _renderAvatar 行内设深色系渐变 */
}

/* ─── Batch B(2026-08-05) 关注按钮 + 个人主页弹窗(forum-profile.js) ─── */
.v3-full-close {
  margin-left: auto;             /* 推到顶栏右端 */
  background: none; border: none; color: var(--c-text-2);
  display: flex; align-items: center; cursor: pointer; padding: 4px;
}
.v3-follow-btn {
  /* v261(2026-08-06): 描边小号风(主人定B变体), 实心金棕块在profile头部太抢眼→透明底+金棕描边柔和不抢主题 */
  flex-shrink: 0; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 14px; border: 1px solid var(--c-accent); cursor: pointer;
  min-height: 26px; background: transparent; color: var(--c-accent);
}
.v3-follow-btn:active { opacity: .7; }
.v3-follow-btn:disabled { opacity: .6; }
.v3-follow-btn.v3-follow-btn-sm { font-size: 11px; padding: 3px 9px; min-height: 24px; }
.v3-follow-btn.v3-follow-btn-on {
  background: var(--c-surface-2); color: var(--c-text-3);
  border: 1px solid var(--c-border);
}
.v3-profile-head {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0 14px; border-bottom: 1px solid var(--c-border);
}
.v3-profile-avatar { width: 52px; height: 52px; font-size: 22px; }
.v3-profile-info { flex: 1; min-width: 0; }
.v3-profile-tabs {
  display: flex; gap: 8px; padding: 12px 0 8px;
  border-bottom: 1px solid var(--c-border);
}
.v3-profile-tab {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--c-text-3);
  padding: 8px 10px; border-radius: 8px; min-height: 40px;
}
.v3-profile-tab.v3-profile-tab-on {
  color: var(--c-text); font-weight: 600; background: var(--c-surface-2);
}
.v3-profile-content { padding-top: 10px; }
.v3-profile-postcard { padding: 10px 12px; margin-bottom: 8px; }
.v3-profile-userrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
}
