/* ============================================================
   Brief 转笔记 · 预览抽屉 / 实时联动 / 预览细节（P0 + P1 + P2）
   只做新增，不覆盖既有类（.xhs-* / .bf-* 原有规则保持不动）
   依赖：css/brief-note.css 之后加载
   ============================================================ */

/* ------------------------------------------------------------
   P0-2  预览抽屉：宽屏第三列开合，窄屏整屏覆盖
   ---------------------------------------------------------- */
.bf-cols {
  transition: grid-template-columns .34s var(--ease, cubic-bezier(.4, 0, .2, 1));
}
.bf-col-right {
  transition: opacity .26s var(--ease, cubic-bezier(.4, 0, .2, 1)),
              transform .34s var(--ease, cubic-bezier(.4, 0, .2, 1));
  min-width: 0;
}
/* 收起态：预览列宽度归零并向右滑出
   2026-10-17 fe-brief：左栏宽度从写死的 232px 改为读 --bf-col-left。
   原来收起 232 / 展开 264 两个值，切一下预览左栏和版本卡就整体跳一次宽度
   （实测 vitem 194 <-> 226，模型名跟着换行状态变）。现在只动第三列。 */
.bf-wrap:not(.bf-pv-open) .bf-cols {
  grid-template-columns: var(--bf-col-left, 264px) minmax(0, 1fr) 0px;
}
.bf-wrap:not(.bf-pv-open) .bf-col-right {
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  overflow: hidden;
}
/* 展开态 */
.bf-wrap.bf-pv-open .bf-col-right {
  opacity: 1;
  transform: none;
}

/* 窄屏 / 移动端：展开时整屏覆盖，收起时彻底不占位 */
@media (max-width: 1024px) {
  .bf-wrap:not(.bf-pv-open) .bf-cols {
    grid-template-columns: var(--bf-col-left, 208px) minmax(0, 1fr);
  }
  .bf-wrap:not(.bf-pv-open) .bf-col-right { display: none; }
  .bf-wrap.bf-pv-open .bf-col-right {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--bg, #fff);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: bfPvIn .28s var(--ease, cubic-bezier(.4, 0, .2, 1));
  }
  .bf-wrap.bf-pv-open #bfPreviewPane {
    max-height: none;
    overflow: visible;
    padding: 12px 12px 76px;
  }
}
@keyframes bfPvIn {
  from { transform: translateX(100%); opacity: .35; }
  to   { transform: none; opacity: 1; }
}

/* 窄屏悬浮关闭按钮（P0-2：要一个明显的关闭入口） */
.bf-pv-close {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 140;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: #E02039;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255, 36, 66, .34);
  transition: transform .18s var(--ease, cubic-bezier(.4, 0, .2, 1));
}
.bf-pv-close:active { transform: scale(.94); }
@media (max-width: 1024px) {
  body.bf-pv-open .bf-pv-close { display: inline-flex; }
}
/* 2026-10-10 夜：关闭按钮原本 bottom:24px，在手机上正好压住底部 TabBar 的「更多」
   —— 实测 390×844 两者重叠，elementFromPoint 命中的是关闭按钮而不是 TabBar，
   「更多」点不动。同时它还得让开已经抬到 TabBar 之上的任务卡（AI 任务中心）。
   统一抬到「TabBar + 任务卡带」之上（任务卡胶囊约 45px 高，留 12px 余量）。 */
@media (max-width: 899px) {
  body.bf-pv-open .bf-pv-close { bottom: calc(var(--tabbar-h, 56px) + 62px); }
}

/* ------------------------------------------------------------
   P0-1  左侧编辑区
   ---------------------------------------------------------- */
.bf-edbox { margin-top: 10px; }
.bf-editor {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #ECE6E9;
  border-radius: 10px;
  background: #FCFAFB;
  animation: bfEdIn .2s var(--ease, cubic-bezier(.4, 0, .2, 1));
}
.bf-editor[hidden] { display: none; }
@keyframes bfEdIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.bf-edl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6B7078;
  margin: 10px 0 5px;
}
.bf-edl:first-child { margin-top: 0; }
.bf-edn { font-weight: 400; color: #6E6869; margin-left: 4px; }
.bf-edn.warn { color: var(--xhs-red-text, #D81B37); }

/* ------------------------------------------------------------
   P1-1  图片占位：粉色色块 -> 虚线规划卡片
   ---------------------------------------------------------- */
.xhs-plan {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px;
  border: 1.5px dashed #D8CDD3;
  border-radius: 12px;
  background: #FBF9FA;
  text-align: left;
}
.xhs-plan .p-idx {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--xhs-red-text, #D81B37);
  background: #fff;
  border: 1px solid #FFE1E6;
  border-radius: 999px;
  padding: 2px 10px;
}
.xhs-plan .p-scene {
  font-size: 13px;
  line-height: 1.55;
  color: #6B7078;
}
.xhs-plan .p-scene b { color: #4A4348; font-weight: 600; }
.xhs-plan .p-ov {
  font-size: 15px;
  font-weight: 700;
  color: #4A4348;
  line-height: 1.4;
  padding-left: 9px;
  border-left: 3px solid #FF2442;
}
.xhs-plan .p-note { font-size: 12px; color: #6E6869; }
.xhs-plan .p-go {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--xhs-red-text, #D81B37);
  background: #fff;
  border: 1px solid #FFD7DE;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .18s var(--ease, cubic-bezier(.16,1,.3,1)), transform .18s var(--ease, cubic-bezier(.16,1,.3,1));
}
.xhs-plan .p-go:hover { background: #FFF2F4; }
.xhs-plan .p-go:active { transform: scale(.95); }

/* ------------------------------------------------------------
   P1-2  标签改蓝色 + 正文里的 #话题高亮
   ---------------------------------------------------------- */
.xhs-tags a { color: #2A5FD9 !important; }
.xhs-body .tag-hl { color: #2A5FD9; }

/* ------------------------------------------------------------
   P1-3  互动栏：补转发 + 「数据发布后更新」说明
   ---------------------------------------------------------- */
.xhs-bar { flex-wrap: wrap; gap: 14px; }
.xhs-bar .ic {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #666;
  cursor: default;
}
.xhs-bar .ic svg { width: 18px; height: 18px; }
.xhs-bar .pv-tip {
  margin-left: auto;
  font-size: 12px;
  color: #6E6869;
  background: #F6F7F8;
  border-radius: 999px;
  padding: 2px 8px;
}

/* ------------------------------------------------------------
   P1-5  顶部操作提示：长文案 -> (i) 悬停气泡
   ---------------------------------------------------------- */
.xhs-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6E6869;
  cursor: help;
  margin: 0 0 10px;
}
.xhs-help .i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid #C9C3C8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-style: italic;
  color: #6E6869;
  flex: 0 0 auto;
}
.xhs-help .bub {
  position: absolute;
  left: 0;
  top: 20px;
  z-index: 30;
  width: 240px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #4A4348;
  color: #fff;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s var(--ease, cubic-bezier(.16,1,.3,1)), transform .18s var(--ease, cubic-bezier(.16,1,.3,1)), visibility .18s;
}
.xhs-help:hover .bub,
.xhs-help:focus-within .bub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ------------------------------------------------------------
   P1-6  复制按钮：点中变绿
   ---------------------------------------------------------- */
.xhs-copy.done {
  background: #3BA272 !important;
  color: #fff !important;
}

/* ------------------------------------------------------------
   P1-4  评论区：真实置顶评论 + 首字头像
   ---------------------------------------------------------- */
.xhs-cmt .cmt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}
.xhs-cmt .cmt-head h5 { margin: 0; }
.xhs-cmt .cmt-head .pin {
  font-size: 12px;
  color: var(--xhs-red-text, #D81B37);
  background: #FFF0F2;
  border-radius: 999px;
  padding: 1px 8px;
}
.xhs-cmt li { display: flex; gap: 8px; align-items: flex-start; }
.xhs-cmt .av {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FFB3C1, #FF7A93);
}
.xhs-cmt .av.b { background: linear-gradient(135deg, #A5C8FF, #6A9BFF); }
.xhs-cmt .av.c { background: linear-gradient(135deg, #FFD79A, #FFB454); }
.xhs-cmt .ct { flex: 1; min-width: 0; }
.xhs-cmt .ct b { display: block; color: #6E6869; font-weight: 400; font-size: 12px; margin-bottom: 1px; }
.xhs-cmt .ct span { color: #333; }

/* ------------------------------------------------------------
   P2-1  预览区就地编辑
   ---------------------------------------------------------- */
.bf-pv-editable {
  position: relative;
  outline: none;
  border-radius: 6px;
  transition: box-shadow .18s var(--ease, cubic-bezier(.16,1,.3,1)), background .18s var(--ease, cubic-bezier(.16,1,.3,1));
}
.bf-pv-editable:hover {
  box-shadow: 0 0 0 1.5px #FFE1E6;
  background: #FFFCFD;
}
.bf-pv-editable[contenteditable="true"]:focus {
  box-shadow: 0 0 0 2px #FF2442;
  background: #fff;
}
.bf-pv-editbar {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6E6869;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bf-pv-editbar .dot {
  width: 5px; height: 5px; border-radius: 50%; background: #FF2442; flex: 0 0 auto;
}
/* 2026-10-11 补：就地编辑升级后的三件套 —— 已修改徽标 / 还原按钮 / 自动存草稿提示 */
.bf-pv-edited {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--xhs-red-text, #D81B37);
  background: rgba(255, 36, 66, .1);
}
.bf-pv-revert {
  flex: 0 0 auto;
  padding: 2px 9px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid rgba(255, 36, 66, .35);
  border-radius: 999px;
  background: #fff;
  color: var(--xhs-red-text, #D81B37);
  cursor: pointer;
  transition: background .18s cubic-bezier(.22, 1, .36, 1), transform .18s cubic-bezier(.22, 1, .36, 1);
}
.bf-pv-revert:hover { background: rgba(255, 36, 66, .08); }
.bf-pv-revert:active { transform: scale(.94); }
.bf-pv-tip { flex: 0 0 auto; color: #6E6869; }
/* 左栏版本列表：改过的版本标出来 */
.bf-vedited {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--xhs-red-text, #D81B37);
  border: 1px solid rgba(255, 36, 66, .3);
}

/* ------------------------------------------------------------
   P2-2  空状态插画 + 骨架屏
   ---------------------------------------------------------- */
.bf-pv-empty {
  padding: 34px 18px;
  text-align: center;
  color: #6E6869;
}
.bf-pv-empty .illu {
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
  display: block;
}
.bf-pv-empty .t { font-size: 14px; font-weight: 600; color: #4A4348; margin-bottom: 5px; }
.bf-pv-empty .s { font-size: 13px; line-height: 1.7; }

.bf-pv-skel { padding: 14px; }
.bf-pv-skel .sk {
  background: linear-gradient(90deg, #F1EEEF 25%, #F8F6F7 37%, #F1EEEF 63%);
  background-size: 400% 100%;
  animation: bfSk 1.3s ease infinite;
  border-radius: 8px;
}
@keyframes bfSk {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.bf-pv-skel .sk.img { height: 190px; border-radius: 12px; margin-bottom: 14px; }
.bf-pv-skel .sk.l1 { height: 17px; width: 72%; margin-bottom: 9px; }
.bf-pv-skel .sk.l2 { height: 13px; width: 100%; margin-bottom: 7px; }
.bf-pv-skel .sk.l3 { height: 13px; width: 88%; margin-bottom: 7px; }
.bf-pv-skel .sk.l4 { height: 13px; width: 54%; margin-bottom: 16px; }
.bf-pv-skel .sk.tg { height: 20px; width: 120px; border-radius: 999px; }

/* ------------------------------------------------------------
   动效偏好：尊重系统设置
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bf-cols, .bf-col-right, .bf-editor, .bf-pv-close { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------
   多模型改造（2026-10-08）：版本卡标模型 / 评分悬停气泡
   ---------------------------------------------------------- */
.bf-vitem { position: relative; }
.bf-vmodel {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #6E6869;
  letter-spacing: .2px;
}
/* 爆款潜力分悬停气泡：把五维交叉评分摊开 */
.bf-star { position: relative; cursor: help; }
.bf-jbub {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: none;
  min-width: 208px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #2B2F36;
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}
.bf-star:hover + .bf-jbub,
.bf-jbub:hover { display: block; }
.bf-jbub .jb-t {
  display: block;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  color: #6E6869;
  font-size: 12px;
}
.bf-jbub .jr { display: flex; justify-content: space-between; gap: 14px; }
.bf-jbub .jr b { color: #137A52; font-weight: 600; }
.bf-jbub .jb-d {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #D81B37;
  white-space: normal;
}


/* ==================== 2026-10-08 追加：历史浮层 / 上传进度 / 算法面板 ==================== */

/* 历史抽屉要相对 .bf-wrap 定位，所以给外层一个定位上下文 */
.bf-wrap { position: relative; }

/* ---------- 历史记录：浮层抽屉（不挤布局） ---------- */
/* 之前它占在左栏里，展开时把版本列表整块顶下去，收起又弹回来 —— 布局抖那一下很廉价。
   现在浮在上层：absolute 脱离文档流，下面的版本列表纹丝不动，点遮罩或按 Esc 收起。 */
#bfHistory {
  position: absolute;
  top: 0;
  left: 0;
  width: 360px;
  max-width: 92vw;
  max-height: 100%;
  overflow: auto;
  z-index: calc(var(--z-float, 800) + 60);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(17, 17, 17, .18);
  transform: translateX(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), opacity .22s ease;
}
#bfHistory[data-open="1"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.bf-his-scrim {
  position: absolute;
  inset: 0;
  z-index: calc(var(--z-float, 800) + 50);
  background: rgba(17, 17, 17, .28);
  border-radius: 14px;
  animation: bfFade .18s ease;
}
@keyframes bfFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 560px) {
  /* 窄屏直接铺满：360px 的抽屉在小屏上只剩一条缝，没法操作 */
  #bfHistory { width: auto; right: 0; }
}

/* ---------- 分片上传进度 ---------- */
.bf-prog-wrap { display: flex; flex-direction: column; gap: 8px; }
.bf-prog-txt { font-size: 13px; color: #333; }
.bf-prog {
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, .08);
  overflow: hidden;
}
.bf-prog > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2e4d, #ff6b81);
  transition: width .25s cubic-bezier(.2, .8, .3, 1);
}

/* ---------- 算法优化建议面板 ---------- */
.bf-algo-ic { margin-right: 6px; }
.bf-algo-score {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff2e4d, #ff6b81);
}
.bf-algo-blk { margin-top: 14px; }
.bf-algo-blk .bf-bt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bf-algo-pool {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #D81B37;
  background: rgba(255, 46, 77, .1);
}
.bf-algo-pool.warn { color: #8A5A00; background: rgba(255, 176, 32, .14); }

/* CES 五维条形图 */
.bf-ces { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.bf-ces-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bf-ces-k { flex: 0 0 74px; color: #555; }
.bf-ces-bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, .07);
  overflow: hidden;
}
.bf-ces-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb020, #ff2e4d);
  transition: width .4s cubic-bezier(.2, .8, .3, 1);
}
.bf-ces-v { flex: 0 0 46px; text-align: right; color: #333; font-variant-numeric: tabular-nums; }

/* 六级流量池进度 */
.bf-pool { margin-top: 8px; }
.bf-pool-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, .07);
  overflow: hidden;
}
.bf-pool-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc9d1, #ff2e4d);
  transition: width .5s cubic-bezier(.2, .8, .3, 1);
}
.bf-pool-lv {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #6E6869;
}
.bf-pool-lv .on { color: #D81B37; font-weight: 600; }
.bf-pool-lv .cur { text-decoration: underline; }

/* 自检清单 */
.bf-checks { margin-top: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bf-chk {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(17, 17, 17, .04);
  font-size: 12px;
}
.bf-chk > i { flex: 0 0 14px; font-style: normal; font-weight: 700; }
.bf-chk.ok > i { color: #137A52; }
.bf-chk.no > i { color: #D81B37; }
.bf-chk b { font-weight: 600; color: #333; }
.bf-chk span { color: #6E6869; }
@media (max-width: 560px) { .bf-checks { grid-template-columns: 1fr; } }

/* ---------- 深色主题 ---------- */
[data-theme="dark"] .bf-prog { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .bf-prog-txt { color: #e8e8ea; }
[data-theme="dark"] .bf-ces-bar,
[data-theme="dark"] .bf-pool-bar { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .bf-ces-k { color: #b9b9c0; }
[data-theme="dark"] .bf-ces-v { color: #e8e8ea; }
[data-theme="dark"] .bf-chk { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .bf-chk b { color: #e8e8ea; }
[data-theme="dark"] .bf-chk span { color: #9b9ba5; }
[data-theme="dark"] .bf-chk.no > i { color: #ff6b81; }
[data-theme="dark"] .bf-his-scrim { background: rgba(0, 0, 0, .5); }

/* ---------- 尊重 prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #bfHistory { transition: none; }
  .bf-prog > i, .bf-ces-bar > i, .bf-pool-bar > i { transition: none; }
  .bf-his-scrim { animation: none; }
}

/* ==================================================================
   高保真小红书详情页预览（2026-10-08）· 全部限定 #page-brief 内
   对齐真实 App：磨砂悬浮导航 / 花字压图 / 画中画 / 页码胶囊 /
   猜你想搜 / 预估互动数据 / 仿真评论区 / 深色模式
   ================================================================== */
#page-brief .xhs.xp {
  position: relative;
  max-width: 414px;
  margin: 0 auto;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  /* 2026-10-09：子元素的 backdrop-filter 会把自己单独合成一层，绕过父级的圆角裁剪，
     顶部两角因此被导航空成直角。isolation 把 backdrop root 收进卡片内，裁剪重新生效。 */
  isolation: isolate;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .14);
}
#page-brief .xp-scroll {
  max-height: 76vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#page-brief .xp-scroll::-webkit-scrollbar { display: none; }

/* ---- 顶部导航：悬浮磨砂，滚动后渐变纯白 ---- */
#page-brief .xp-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  /* 双保险：万一某个浏览器仍不裁剪，导航条自己带圆角也不会把卡片两角填方 */
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #fff;
  /* 2026-10-17 final-audit P1：.38 压在纯白用户图上白字实测 2.68:1（WCAG 需 4.5），
     加深到 .56 后最坏情况 4.94:1 达标；白字 lum≥0.80 未改暗，只加深底（园园铁律）。 */
  background: rgba(0, 0, 0, .56);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .25s var(--ease, ease), box-shadow .25s var(--ease, ease);
}
#page-brief .xp-nav .xp-back {
  font-size: 26px; line-height: 1; padding: 0 4px;
  background: none; border: 0; cursor: pointer;
  color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
#page-brief .xp-nav .xp-nav-user {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0;
}
#page-brief .xp-nav .xp-nav-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #E02039, #FF8A9B);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#page-brief .xp-nav .xp-nav-nm {
  font-size: 14px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-brief .xp-nav .xp-follow {
  border: 1px solid #FF2442; color: var(--xhs-red-text, #D81B37);
  background: rgba(255, 255, 255, .95);
  border-radius: 999px; font-size: 12px; font-weight: 600;
  padding: 3px 13px; cursor: pointer; flex-shrink: 0;
}
#page-brief .xp-nav .xp-follow:active { transform: scale(.94); }
#page-brief .xp-nav .xp-share {
  background: none; border: 0; cursor: pointer;
  font-size: 18px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
/* 滚动超过 40px：整条变白、字变黑 */
#page-brief .xhs.xp-solid .xp-nav { background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
#page-brief .xhs.xp-solid .xp-nav .xp-back,
#page-brief .xhs.xp-solid .xp-nav .xp-share { color: #333; text-shadow: none; }
#page-brief .xhs.xp-solid .xp-nav .xp-nav-nm { color: #333; text-shadow: none; }

/* ---- 图片区：花字 / 画中画 / 页码胶囊 / 圆点居中 ---- */
#page-brief .xp-hua {
  position: absolute;
  left: 5%; top: 26%;
  max-width: 72%;
  z-index: 3;
  font-size: 21px; font-weight: 800; letter-spacing: .5px;
  color: #fff; line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 2px rgba(0, 0, 0, .35);
  pointer-events: none;
}
#page-brief .xp-pip {
  position: absolute;
  right: 10px; bottom: 46px;
  width: 27%; aspect-ratio: 3 / 4;
  z-index: 3;
  border: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  overflow: hidden;
  background: linear-gradient(150deg, #FFD9C2, #FF8A65);
  display: flex; align-items: flex-end;
  pointer-events: none;
}
#page-brief .xp-pip span {
  display: block; width: 100%;
  padding: 3px 5px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, .56); text-align: center;  /* final-audit：3.12:1→6.01:1 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-brief .xhs.xp .xhs-count {
  top: auto; bottom: 12px; right: 12px;
  background: rgba(0, 0, 0, .62);
  font-size: 12px; padding: 3px 10px;
}
#page-brief .xhs.xp .xhs-dots {
  left: 50%; right: auto; transform: translateX(-50%);
  bottom: 12px;
  background: transparent; padding: 4px 0;
}

/* ---- 内容信息区 ---- */
#page-brief .xp-main { padding: 2px 16px 8px; }
#page-brief .xp-author {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 0 0;
}
#page-brief .xp-author .xp-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #E02039, #FF8A9B);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#page-brief .xp-author .xp-nm {
  font-size: 14px; font-weight: 600; color: #333;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-brief .xp-author .xp-follow2 {
  border: 1px solid #FF2442; color: var(--xhs-red-text, #D81B37); background: #fff;
  border-radius: 999px; font-size: 12px; font-weight: 600;
  padding: 3px 13px; cursor: pointer;
}
#page-brief .xp-author .xp-more { color: #666; font-size: 16px; letter-spacing: 1px; }
#page-brief .xhs.xp .xhs-title {
  font-size: 19px; font-weight: 700; color: #222;
  line-height: 1.45; margin: 10px 0 6px;
}
#page-brief .xhs.xp .xhs-body {
  font-size: 16px; line-height: 1.75; color: #333;
  white-space: pre-wrap; word-break: break-word;
}
#page-brief .xhs.xp .xhs-body.clamp { -webkit-line-clamp: 5; }
#page-brief .xhs.xp .xhs-tags { gap: 4px 8px; margin-top: 10px; }
#page-brief .xhs.xp .xhs-tags a,
#page-brief .xhs.xp .tag-hl { color: #13386c !important; }
#page-brief .xhs.xp .xhs-tags a:active { opacity: .55; }

/* ---- 猜你想搜 ---- */
#page-brief .xp-search {
  margin: 12px 0 2px;
  display: inline-flex; align-items: center; gap: 6px;
  background: #F5F6F7; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; color: #333;
  cursor: pointer; user-select: none;
}
#page-brief .xp-search .lab { color: #6E6869; }
#page-brief .xp-search .sep { color: #6E6869; }
#page-brief .xp-search b { font-weight: 600; color: #333; }
#page-brief .xp-search:active { background: #EDEEF0; }

/* ---- 仿真评论区 ---- */
#page-brief .xp-cmtsec {
  margin-top: 14px;
  padding: 12px 0 18px;
  border-top: 1px solid #F0F0F0;
}
#page-brief .xp-chead {
  font-size: 14px; font-weight: 600; color: #333;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
#page-brief .xp-chead .ops { color: #6E6869; font-size: 16px; }
#page-brief .xp-cinput {
  display: flex; align-items: center; gap: 8px;
  background: #F5F6F7; border-radius: 999px;
  padding: 6px 10px; margin-bottom: 14px;
}
#page-brief .xp-cinput .ph { flex: 1; font-size: 13px; color: #6E6869; }
#page-brief .xp-cinput .mic, #page-brief .xp-cinput .pic { font-size: 14px; opacity: .7; }
#page-brief .xp-clist, #page-brief .xp-clist ul { list-style: none; margin: 0; padding: 0; }
#page-brief .xp-cmt { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; }
#page-brief .xp-cmt.xp-sub { padding: 6px 0 0; }
#page-brief .xp-cav {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--xhs-red-solid, #E01230);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#page-brief .xp-cmt.xp-sub .xp-cav { width: 24px; height: 24px; font-size: 12px; }
#page-brief .xp-cmain { flex: 1; min-width: 0; }
#page-brief .xp-cnick { font-size: 13px; color: #6E6869; margin-bottom: 2px; }
#page-brief .xp-ctext { font-size: 14px; color: #333; line-height: 1.55; }
#page-brief .xp-cmeta { font-size: 12px; color: #6E6869; margin-top: 3px; }
#page-brief .xp-cmeta a { color: #6E6869; margin-left: 8px; cursor: pointer; }
#page-brief .xp-cside {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: #6E6869; flex-shrink: 0; padding-top: 14px;
}
#page-brief .xp-cside .lk::before { content: '♡ '; }
#page-brief .xp-cside .fc { font-size: 15px; opacity: .75; }
#page-brief .xp-cexp {
  display: block;
  margin: 2px 0 0 42px;
  font-size: 13px; color: #6E6869; cursor: pointer;
}
#page-brief .xp-cexp:active { color: #666; }
#page-brief .xp-replies {
  margin-top: 6px; padding-left: 2px;
  border-left: 2px solid #F0F0F0;
  padding-left: 10px;
}

/* ---- 底部固定操作栏 ---- */
#page-brief .xhs.xp .xhs-foot {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--xhs-line, #F0F0F0);
  background: #fff;
}
#page-brief .xhs.xp .xhs-foot .say {
  flex: 1; height: 34px; border-radius: 999px;
  background: #F5F5F5; border: 0; padding: 0 14px;
  font-size: 13px; color: #6E6869;
  display: flex; align-items: center;
}
#page-brief .xp-stats {
  position: relative;
  display: flex; align-items: center; gap: 14px;
}
#page-brief .xp-stats .ic {
  font-size: 14px; color: #333; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 3px;
}
#page-brief .xp-stats .xp-est {
  position: absolute; top: -11px; right: 0;
  font-size: 12px; color: #6E6869; white-space: nowrap;
}

/* ---- 深色模式（仅预览卡片内）---- */
#page-brief .xhs.xp-dark { background: #111; }
#page-brief .xhs.xp-dark .xp-nav { background: rgba(30, 30, 30, .35); }
#page-brief .xhs.xp-dark.xp-solid .xp-nav { background: #1b1b1b; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
#page-brief .xhs.xp-dark .xhs-title { color: #F0F0F0; }
#page-brief .xhs.xp-dark .xhs-body { color: #D6D6D6; }
#page-brief .xhs.xp-dark .xhs-tags a,
#page-brief .xhs.xp-dark .tag-hl { color: #7FA6D9; }
#page-brief .xhs.xp-dark .xp-author .xp-nm { color: #E0E0E0; }
#page-brief .xhs.xp-dark .xp-author .xp-follow2 { background: transparent; }
#page-brief .xhs.xp-dark .xp-search { background: #242424; }
#page-brief .xhs.xp-dark .xp-search b { color: #DDD; }
#page-brief .xhs.xp-dark .xp-cmtsec { border-top-color: #2A2A2A; }
#page-brief .xhs.xp-dark .xp-chead { color: #E0E0E0; }
#page-brief .xhs.xp-dark .xp-cinput { background: #242424; }
#page-brief .xhs.xp-dark .xp-cnick { color: #7C828A; }
#page-brief .xhs.xp-dark .xp-ctext { color: #D0D0D0; }
#page-brief .xhs.xp-dark .xp-cmeta { color: #5E646B; }
#page-brief .xhs.xp-dark .xp-cmeta a { color: #7C828A; }
#page-brief .xhs.xp-dark .xp-cside { color: #7C828A; }
#page-brief .xhs.xp-dark .xp-replies { border-left-color: #2A2A2A; }
#page-brief .xhs.xp-dark .xhs-foot { background: #111; border-top-color: #2A2A2A; }
#page-brief .xhs.xp-dark .xhs-foot .say { background: #242424; color: #A39DA0; }
#page-brief .xhs.xp-dark .xp-stats .ic { color: #E0E0E0; }

/* ---- 窄屏：全屏化 + 刘海屏安全区；评论区/底栏不再隐藏 ---- */
@media (max-width: 768px) {
  #page-brief { padding-left: 0 !important; padding-right: 0 !important; }
  #page-brief #bfPreviewPane { padding-left: 0; padding-right: 0; }
  #page-brief .xhs.xp { max-width: 100%; border-radius: 0; box-shadow: none; }
  #page-brief #bfPreviewPane .card.card-pad { padding: 0; border: 0; box-shadow: none; background: transparent; }
  #page-brief #bfPreviewPane .sec-title,
  #page-brief #bfPreviewPane .xhs-help { display: none; }   /* 窄屏全屏预览：隐藏工具行文案 */
  #page-brief .xp-scroll { max-height: calc(100vh - 140px); }
  max-height: calc(100dvh - 140px);
  #page-brief .xhs.xp .xhs-foot { display: flex; }
  #page-brief .xhs.xp .xhs-foot .say { display: flex; }
  #page-brief .xp-nav { padding-top: calc(8px + env(safe-area-inset-top)); }
  #page-brief .xhs.xp .xhs-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  #page-brief .xp-cside { display: none; }   /* 窄屏收起侧边♥数，密度优先 */
}

/* ---- 动效减免 ---- */
@media (prefers-reduced-motion: reduce) {
  #page-brief .xp-nav, #page-brief .xhs-count, #page-brief .xhs-dots i { transition: none !important; }
}

/* ==================================================================
   阶段三（2026-10-09）：手机壳 + 375px 固定宽 + 16px 内边距 + 字号/间距表
   ------------------------------------------------------------------
   本节规则全部追加在文件末尾（同特异性下后者胜出），只作用于 #page-brief。
   字号表（对齐真实小红书详情页的层级）：
     顶部导航昵称 14/700   博主昵称 14/600   标题 17/700
     正文 15/400 lh1.7    标签 14          猜你想搜 13
     评论昵称 13          评论内容 14      底部输入 13
   垂直间距表：
     图片区→作者区 12px   作者区→标题 12px   标题→正文 6px
     正文→标签 10px       标签→猜你想搜 12px 内容区→评论区 14px
     评论区标题→输入框 12px   评论条目行距 9px   底部栏上下 10px
   ================================================================== */

/* ---- P1 修复：外层卡片壳让位，手机壳由 .xhs.xp 本体承担 ---- */
#page-brief #bfPreviewPane .card.card-pad {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
/* 标题行 / 操作提示 / 工具按钮 / 导出区不再吃卡片 padding，自己补 18px */
#page-brief #bfPreviewPane .card > .sec-title,
#page-brief #bfPreviewPane .card > .xhs-help,
#page-brief #bfPreviewPane .card > .bf-tools,
#page-brief #bfPreviewPane .card > #bfExport { padding-left: 18px; padding-right: 18px; }
#page-brief #bfPreviewPane .card > .bf-tools { margin-top: 14px; }

/* ---- 右栏底衬：浅灰渐变托住手机，手机壳感更真 ----
   只在宽屏三栏态生效；<=1024 整屏覆盖模式的 padding（留关闭按钮位）保持原样 */
@media (min-width: 1025px) {
  #page-brief #bfPreviewPane {
    background: linear-gradient(180deg, #FBF9FA, #F3EFEF);
    border-radius: 20px;
    padding: 14px 0 20px;
  }
  [data-theme="dark"] #page-brief #bfPreviewPane {
    background: linear-gradient(180deg, #201D1F, #17151A);
  }
}

/* ---- 手机壳：375px 固定宽 + 浅色边框壳 + 悬浮投影 ---- */
#page-brief .xhs.xp {
  width: 375px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 32px;
  border: 1px solid rgba(31, 27, 29, .12);
  box-shadow: 0 0 0 8px #fff,
              0 0 0 9px rgba(31, 27, 29, .10),
              0 26px 60px rgba(31, 27, 29, .18);
}
#page-brief .xhs.xp .xp-scroll { max-height: min(76vh, 700px); }

/* ---- P3 修复：所有内容区左右 16px ---- */
#page-brief .xp-nav { padding: 10px 16px; }              /* 顶部导航 12 -> 16 */
#page-brief .xp-cmtsec { padding: 12px 16px 18px; }      /* 评论区 0 -> 16 */
#page-brief .xp-cinput { padding: 8px 12px; }            /* 评论输入框手感更接近 App */

/* ---- 字号表 ---- */
/* 规范：标题→正文 16px（原来是 6px）。margin-top 12 保持，博主→标题仍是 12px。 */
#page-brief .xhs.xp .xhs-title { font-size: 17px; margin: 12px 0 16px; }
/* 2026-10-10 综合测试：规范口径是正文 15px / line-height 1.6（=24px）。
   这条规则在同特异性里排最后、会覆盖上面的 1.75 与 16px，改这里才生效。 */
#page-brief .xhs.xp .xhs-body { font-size: 15px; line-height: 1.6; }

/* ---- 垂直间距表 ---- */
#page-brief .xp-main { padding: 2px 16px 12px; }
#page-brief .xp-author { padding: 12px 0 0; }
#page-brief .xp-cmt { padding: 9px 0; }
#page-brief .xhs.xp .xhs-foot { padding: 10px 16px; }

/* ---- P6 修复：操作提示对比度 3.22 -> 4.98（WCAG AA 达标） ---- */
#page-brief .xhs-help { color: #6B7078; }
#page-brief .xhs-help .i { color: #6B7078; border-color: #A9AFB8; }

/* ---- 窄屏 / 单栏：手机壳退场，回到全宽沉浸预览 ---- */
@media (max-width: 768px) {
  #page-brief .xhs.xp {
    width: 100%;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  #page-brief #bfPreviewPane {
    background: transparent;
    border-radius: 0;
    padding: 0;
  }
}
/* 平板整屏覆盖模式（<=1024 展开预览）：同样不要壳的投影，居中即可 */
@media (max-width: 1024px) and (min-width: 769px) {
  #page-brief .bf-wrap.bf-pv-open .xhs.xp {
    box-shadow: 0 0 0 8px #fff, 0 0 0 9px rgba(31, 27, 29, .10), 0 18px 44px rgba(31, 27, 29, .16);
  }
}

/* ---- 动效减免 ---- */
@media (prefers-reduced-motion: reduce) {
  #page-brief .xhs.xp { transition: none !important; }
}

/* ==================================================================
 * 2026-10-11 视觉修复（三项）
 * ================================================================== */
/* ① 手机壳磨砂导航圆角必须与壳一致（32px）：不一致时 backdrop-filter
      自成合成层、逃出父级圆角裁剪，导航灰底会从壳外露出一截。 */
#page-brief .xp-nav { border-radius: 32px 32px 0 0; }

/* ② 版本卡五维评分悬停气泡：全局 .card 的 overflow:hidden 会把气泡底边裁掉。
      版本卡内没有需要裁角的子元素，这里放开。 */
#page-brief .card.bf-vlist { overflow: visible; }

/* ③ 自检清单：标题与说明改上下两行。原来 flex 一行排，说明一长就把
      标题挤成一行一个字（用户截图实锤）。 */
.bf-checks .bf-chk {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: 6px;
  row-gap: 2px;
  align-items: start;
}
.bf-checks .bf-chk > i { grid-row: 1 / span 2; flex: none; }
.bf-checks .bf-chk b,
.bf-checks .bf-chk span { grid-column: 2; min-width: 0; overflow-wrap: anywhere; }

/* ==========================================================================
   R69（2026-10-14 前端专家评审修复）
   本文件在 index.html:91 最后加载，同特异性规则可覆盖 brief-note.css(:90)。
   ========================================================================== */

/* F-01 P0 响应式：≤768 强制单栏
   根因：上面 @media(max-width:1024px) 的规则特异性 (0,3,0) 一路覆盖到 0px，
   把 brief-note.css:361 的 @media(max-width:768px){.bf-cols{minmax(0,1fr)}}(0,1,0) 顶掉；
   实测 375 下中栏只剩 208px、左栏反占 151px。order 交换是正确顺序，保留不动。 */
@media (max-width: 768px) {
  .bf-wrap .bf-cols,
  .bf-wrap:not(.bf-pv-open) .bf-cols,
  .bf-wrap.bf-pv-open .bf-cols { grid-template-columns: minmax(0, 1fr); }
  .bf-wrap > .bf-cols > .bf-col { min-width: 0; }
  .bf-wrap:not(.bf-pv-open) .bf-col-right { display: none; }
  .bf-wrap.bf-pv-open .bf-col-right {
    position: fixed; inset: 0; z-index: 120;
    background: var(--bg, #fff); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bf-wrap.bf-pv-open #bfPreviewPane {
    max-height: none; overflow: visible; padding: 12px 12px 76px;
  }
}

/* F-03 P1 触控目标：重绘/删除按钮实测 24×38、复选框 24×24，均 < 44px */
.bf-img-bar button,
.bf-img-bar a {
  min-width: 44px; min-height: 44px;
  padding: 2px 10px;
  display: inline-flex; align-items: center; justify-content: center;
}
/* 园园实测「结合热点选框太大」：下面这条把 #bfUseHot 撑到 44×44 的方块。
   触控目标契约保留在「点得中的区域」上（label 撑够 44px 高），
   复选框本体回到 16px 视觉尺寸。 */
#bfUseHot {
  min-width: 0; min-height: 0;
  width: 16px; height: 16px; flex: none;
}
#page-brief .bf-hot {
  min-height: 44px;          /* 命中区域仍 ≥44px，契约不破 */
  align-items: center;
}
#page-brief .bf-hot-tip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 600px) {
  #page-brief .bf-hot { flex-wrap: wrap; }
  #page-brief .bf-hot-tip { flex: 1 1 100%; white-space: normal; }
}

/* F-04 P1 对比度：7 处低于 WCAG AA 4.5:1，只动颜色不动布局 */
/* ① .bf-aigc #767076(2.55) → #6B7280(对白底 4.83) */
.bf-aigc, .bf-vaigc { color: var(--text-muted, #5B5457); }
/* ② .bf-vmodel #767076(2.40) → #6B7280(对 #FFF1F3 为 4.62)，字号 11 → 12 */
.bf-vmodel { font-size: 12px; color: var(--text-muted, #5B5457); }
/* ③ 选中态版本项 #FF2442 压 #FFF1F3 只有 3.43 → 深红 #D81E3C(4.71) */
.bf-vitem.on { color: #D81E3C; font-weight: 600; }
/* ④ 同属「红压粉底」的 .sopt / .bf-step（3.52）统一深红 */
#page-brief .sopt, #page-brief .sopt.on { color: #D81E3C; }
.bf-step, .bf-step.on { color: #D81E3C; }
/* ⑤ .bf-main-dot 白字压 #ff2e4d(3.65) → 底色深一档 #E0142C(4.62) */
.bf-main-dot { background: #E0142C; }
/* ⑥ .bf-badge.outline 白字压渐变浅端 #FF6B80(2.74) → 渐变收窄到深端 */
.bf-badge.outline { background: linear-gradient(135deg, #E02039, #E0142C); color: #fff; }

/* ------------------------------------------------------------
   左栏版本列表：「最像真人」徽章（2026-10-18）
   依据：后端 markRecommended() 按 JUDGE realness（真实感）最高标出。
   实测（168 篇盲评）：realness 与真人真读分 Pearson r=+0.328~+0.509，
   case 内命中真读最优 79%~93%，选版增益 +0.190~+0.298。
   配色：深青 #0B7A5E 底 + 白字（对比度 4.77，过 WCAG AA），
   刻意区别于红色系的「未过检 / 主推 / 已改」，避免语义混淆。
   ---------------------------------------------------------- */
.bf-vrec {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
  color: #fff;
  background: #0B7A5E;
  cursor: help;
}
