/* 小红书对标图 · 样式
 * ===========================================================================
 * 视觉设定（改之前先读）：
 *   · 板块性格色 = **深墨 #22222A → #2C2C36** + **小红书红 #FF2442** 点缀。
 *     为什么用红：功能就叫"小红书对标图"，红色是这个平台最强的识别符号，
 *     一眼能认出来"这是干小红书的活"。
 *   · 🔴 **主行动按钮一律品牌橙 var(--primary, #f95901)** —— 站内铁律：主色不许换。
 *     板块可以有个性，动作色必须全站统一，否则用户找不到"该点哪个"。
 *   · 风险三档沿用站内体系：红（必须改）/ 琥珀（建议改）/ 绿（没问题）。
 *
 * 三条工程约束（本项目踩过，照做）：
 *   ① 含 position:absolute 装饰物的容器**必须自带 position:relative** ——
 *      否则装饰物按 right:-30% 溢出撑宽 document，手机端整页缩成 77%、右侧留白。
 *   ② 手机端底部要给固定 TabBar 让位（实测 74px 高，留 96px 稳妥）。
 *   ③ 数字列用 tabular-nums，否则字数/百分比那几列会跳。
 *   ⚠️ CSS 注释里禁止出现 "星号+斜杠" 序列（会提前结束注释，本项目踩过）。
 * =========================================================================== */

/* ---------- 外壳 ---------- */
#sub-xhs {
  padding-bottom: 96px;          /* ② 给 TabBar 让位 */
  --xh-red: #FF2442;
  --xh-ink: #22222A;
  --xh-ink2: #2C2C36;
  --xh-line: #ECE9E4;
  --xh-sub: #8A8177;
  --xh-soft: #FAF8F5;
}
#sub-xhs * { box-sizing: border-box; }

/* ---------- 顶栏与页头 ---------- */
.xh-top { margin-bottom: 14px; }
.xh-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0 10px;
}
.xh-back {
  cursor: pointer; user-select: none;
  width: 30px; height: 30px; line-height: 27px; text-align: center;
  border-radius: 10px; font-size: 20px; color: var(--xh-ink);
  background: #fff; border: 1px solid var(--xh-line);
}
.xh-back:active { background: var(--xh-soft); }
.xh-bar-t { font-size: 15.5px; font-weight: 700; color: var(--xh-ink); letter-spacing: .2px; }
.xh-sub { margin: 6px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--xh-sub); }

/* ---------- 首屏主卡 ---------- */
.xh-hero {
  position: relative;                 /* ① 装饰物必需 */
  overflow: hidden;
  margin-bottom: 13px; padding: 20px 18px 19px;
  border-radius: 18px; color: #fff;
  background: linear-gradient(158deg, #2E2E3A 0%, #1C1C24 100%);
  box-shadow: 0 8px 22px rgba(28,28,36,.22);
}
.xh-hero::after {
  content: ''; position: absolute; right: -52px; top: -58px; width: 168px; height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,36,66,.30), rgba(255,36,66,0) 70%);
  pointer-events: none;
}
.xh-hero-tag {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 10.5px; letter-spacing: .4px;
  background: rgba(255,36,66,.18); color: #FF9CB0;
  border: 1px solid rgba(255,36,66,.34);
}
.xh-hero-t {
  margin: 11px 0 0; font-size: 22px; font-weight: 800; line-height: 1.42;
  letter-spacing: .3px;
}
.xh-hero-s {
  margin: 10px 0 0; font-size: 12.5px; line-height: 1.78; color: rgba(255,255,255,.76);
}
.xh-hero-s b { color: #fff; font-weight: 600; }

/* ---------- 通用卡片 ---------- */
.xh-card {
  position: relative; overflow: hidden;
  margin-bottom: 12px; padding: 15px 15px 14px;
  background: #fff; border: 1px solid var(--xh-line); border-radius: 15px;
  box-shadow: 0 1px 3px rgba(58,42,26,.04);
}
.xh-card-t {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--xh-ink);
}
.xh-req {
  padding: 2px 7px; border-radius: 8px; font-size: 10.5px; font-weight: 600;
  background: #FFF1F3; color: var(--xh-red); border: 1px solid #FFD9DF;
}
.xh-cnt {
  margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--xh-sub);
  font-variant-numeric: tabular-nums;      /* ③ */
}
.xh-cnt.warn { color: #C77700; }
.xh-cnt.bad { color: #C0392B; font-weight: 700; }

/* ---------- 输入 ---------- */
.xh-ta {
  width: 100%; min-height: 104px; resize: vertical;
  padding: 11px 12px; font-size: 14px; line-height: 1.7; color: var(--xh-ink);
  background: var(--xh-soft); border: 1px solid #E6E1D9; border-radius: 12px;
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
.xh-ta:focus { outline: none; border-color: #C9BEB0; background: #fff; box-shadow: 0 0 0 3px rgba(34,34,42,.05); }
.xh-ta-sm { min-height: 66px; }
.xh-ta-lg { min-height: 210px; }
.xh-ta::placeholder { color: #B5ACA1; }
.xh-in {
  width: 100%; padding: 10px 12px; font-size: 14.5px; color: var(--xh-ink);
  background: var(--xh-soft); border: 1px solid #E6E1D9; border-radius: 11px;
  font-family: inherit; font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none;
}
.xh-in:focus { outline: none; border-color: #C9BEB0; background: #fff; }
.xh-in-sm { font-size: 13.5px; padding: 8px 10px; }

.xh-inbar { margin-top: 8px; min-height: 17px; }
.xh-hint { font-size: 11.5px; color: var(--xh-sub); }
.xh-hint.is-link { color: #B45309; }
.xh-hint.is-text { color: #2E7D53; }

/* ---------- 动作区 ---------- */
.xh-acts { display: flex; flex-direction: column; gap: 9px; margin-top: 13px; }
.xh-acts-l { margin-top: 4px; }
.xh-go {
  width: 100%; cursor: pointer; padding: 13px 18px; border: none; border-radius: 13px;
  background: var(--primary, #f95901); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  box-shadow: 0 4px 14px rgba(249,89,1,.22);
  transition: transform .12s, opacity .2s;
  font-family: inherit;
}
.xh-go:active { transform: scale(.985); }
.xh-go:disabled { opacity: .5; box-shadow: none; cursor: default; transform: none; }
.xh-ghost {
  width: 100%; cursor: pointer; padding: 11px 18px; border-radius: 12px;
  background: #fff; border: 1px solid var(--xh-line); color: #6B6258;
  font-size: 13.5px; font-family: inherit;
}
.xh-ghost:active { background: var(--xh-soft); }
.xh-mini {
  cursor: pointer; padding: 9px 14px; border-radius: 10px; white-space: nowrap;
  background: #fff; border: 1px solid var(--xh-line); color: var(--xh-ink);
  font-size: 13px; font-family: inherit;
}
.xh-mini:active { background: var(--xh-soft); }

.xh-tip { margin-top: 10px; font-size: 11.5px; line-height: 1.72; color: var(--xh-sub); }
.xh-tip b { color: var(--xh-ink); }
.xh-err {
  margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: #FDF3F1; border: 1px solid #F3D6CF; color: #B03A2E;
  font-size: 12.5px; line-height: 1.68;
}
.xh-muted { margin: 6px 0; font-size: 12px; color: var(--xh-sub); line-height: 1.7; }

/* ---------- 解析等待 ---------- */
.xh-parse {
  display: flex; align-items: center; gap: 9px;
  margin-top: 13px; padding: 12px 13px; border-radius: 12px;
  background: var(--xh-soft); border: 1px dashed #DCD5CA;
  font-size: 12.5px; color: #6B6258;
}
.xh-dots { display: inline-flex; gap: 4px; align-items: center; }
.xh-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--xh-ink);
  animation: xhDot 1.1s infinite ease-in-out;
}
.xh-dots i:nth-child(2) { animation-delay: .16s; }
.xh-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes xhDot {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---------- 说明区 ---------- */
.xh-about { padding: 6px 15px 8px; }
.xh-about-row {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 0; border-top: 1px dashed var(--xh-line);
}
.xh-about-row:first-child { border-top: none; }
.xh-about-i { font-size: 17px; line-height: 1.3; flex: none; }
.xh-about-row b { display: block; font-size: 13px; color: var(--xh-ink); margin-bottom: 3px; }
.xh-about-row p { margin: 0; font-size: 12px; line-height: 1.7; color: #6B6258; }

/* ---------- 原笔记卡 ---------- */
.xh-orig {
  margin-bottom: 12px; padding: 13px 14px; border-radius: 14px;
  background: var(--xh-soft); border: 1px solid var(--xh-line);
}
.xh-orig-t { font-size: 11px; color: var(--xh-sub); letter-spacing: .3px; margin-bottom: 7px; }
.xh-orig-title { font-size: 14px; font-weight: 650; color: var(--xh-ink); line-height: 1.5; }
.xh-orig-body {
  margin-top: 6px; font-size: 12px; line-height: 1.72; color: #6B6258;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.xh-orig-imgs { margin-top: 8px; font-size: 11.5px; color: var(--xh-sub); }
.xh-orig-imgs span { color: var(--xh-ink); font-weight: 600; }
.xh-orig-imgs b { color: var(--xh-red); }

/* ---------- 流式区 ---------- */
.xh-stream {
  margin-bottom: 12px; border-radius: 15px; overflow: hidden;
  background: #fff; border: 1px solid var(--xh-line);
}
.xh-stream-hd {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--xh-ink);
  background: linear-gradient(120deg, #F7F5F1, #FBFAF7);
  border-bottom: 1px solid #F1EDE6;
}
.xh-stream-body { padding: 13px 14px 16px; font-size: 13.5px; line-height: 1.86; color: #3A342C; }
.xh-stream-body p { margin: 8px 0; }
.xh-stream-body h4 {
  margin: 14px 0 7px; font-size: 13.8px; font-weight: 700; color: var(--xh-ink);
}
.xh-stream-body h4:first-child { margin-top: 0; }
.xh-stream-body ul { margin: 7px 0; padding-left: 19px; }
.xh-stream-body li { margin: 4px 0; }
.xh-stream-body b { color: var(--xh-ink); }
.xh-fd {
  display: inline-block; padding: 1px 6px; margin-right: 4px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700;
  background: #F2EFF9; color: #5B4B8A;
}
.xh-caret {
  display: inline-block; width: 7px; height: 15px; margin-left: 2px;
  background: var(--xh-ink); vertical-align: -2px;
  animation: xhBlink 1s step-end infinite;
}
@keyframes xhBlink { 50% { opacity: 0; } }

/* ---------- 判断不了块（高亮不折叠） ---------- */
.xh-unknown {
  margin-bottom: 12px; padding: 13px 14px; border-radius: 14px;
  background: #FFFBF2; border: 1px solid #F0E2BE; border-left: 4px solid #D99A00;
}
.xh-unknown-t { font-size: 13px; font-weight: 700; color: #A86A00; margin-bottom: 6px; }
.xh-unknown-b { font-size: 12.5px; line-height: 1.78; color: #5A4A2E; }
.xh-unknown-f { margin-top: 8px; font-size: 11.5px; line-height: 1.7; color: #8A7B55; }

.xh-angles { font-size: 13px; line-height: 1.85; color: #3A342C; white-space: pre-wrap; }

/* ---------- 标题候选 ---------- */
.xh-titles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.xh-title {
  display: flex; align-items: flex-start; gap: 9px; text-align: left;
  cursor: pointer; padding: 10px 11px; border-radius: 12px;
  background: var(--xh-soft); border: 1.5px solid transparent;
  font-family: inherit; transition: border-color .14s, background .14s;
}
.xh-title.on { border-color: var(--xh-red); background: #FFF6F8; }
.xh-title.over .xh-title-c { color: #C0392B; font-weight: 700; }
.xh-title-n {
  flex: none; width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 7px; font-size: 11.5px; font-weight: 700;
  background: #fff; border: 1px solid var(--xh-line); color: var(--xh-sub);
}
.xh-title.on .xh-title-n { background: var(--xh-red); border-color: var(--xh-red); color: #fff; }
.xh-title-t { flex: 1; font-size: 13.5px; line-height: 1.55; color: var(--xh-ink); }
.xh-title-c { flex: none; font-size: 11px; color: var(--xh-sub); font-variant-numeric: tabular-nums; padding-top: 2px; }

/* ---------- 话题 ---------- */
.xh-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.xh-topic {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 6px 5px 10px; border-radius: 20px;
  font-size: 12.5px; color: #B4334C; background: #FFF1F3; border: 1px solid #FFDCE2;
}
.xh-topic i {
  cursor: pointer; font-style: normal; font-size: 14px; line-height: 1;
  color: #D98A9A; padding: 0 3px;
}
.xh-topic i:active { color: var(--xh-red); }
.xh-tadd { display: flex; gap: 8px; align-items: center; }

/* ---------- 封面文案 ---------- */
.xh-cover {
  padding: 18px 15px; border-radius: 13px; text-align: center;
  background: linear-gradient(150deg, #2E2E3A, #1C1C24);
}
.xh-cover-main { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: .6px; line-height: 1.4; }
.xh-cover-sub { margin-top: 7px; font-size: 12.5px; color: rgba(255,255,255,.66); }

/* ---------- 体检 ---------- */
.xh-report { font-size: 12.5px; line-height: 1.75; }
.xh-ok {
  padding: 10px 12px; border-radius: 11px; margin-bottom: 9px;
  background: #F2FAF5; border: 1px solid #CDEBD9; color: #2E7D53;
}

/* 相似度块：三档配色 —— 高红 / 中琥珀 / 低绿，另加"无法比对"中性档 */
.xh-sim { padding: 12px 13px; border-radius: 13px; margin-bottom: 10px; }
.xh-sim-l { font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.xh-sim-k { font-size: 12.5px; line-height: 1.7; }
.xh-sim-k b { font-size: 14px; }
.xh-sim-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.xh-sim-list span {
  padding: 3px 8px; border-radius: 8px; font-size: 12px;
  background: rgba(192,57,43,.08); color: #A03325;
}
.xh-sim-adv { margin: 8px 0 0; padding-left: 18px; }
.xh-sim-adv li { margin: 4px 0; font-size: 12.5px; }
.xh-sim-d { margin-top: 9px; font-size: 11.5px; line-height: 1.7; opacity: .72; }
.xh-sim-high { background: #FDF3F1; border: 1px solid #F3D6CF; color: #8E3527; }
.xh-sim-high .xh-sim-l { color: #C0392B; }
.xh-sim-mid { background: #FFFBF2; border: 1px solid #F0E2BE; color: #6B5528; }
.xh-sim-mid .xh-sim-l { color: #A86A00; }
.xh-sim-low { background: #F2FAF5; border: 1px solid #CDEBD9; color: #2E6B4A; }
.xh-sim-low .xh-sim-l { color: #2E7D53; }
.xh-sim-na { background: var(--xh-soft); border: 1px solid var(--xh-line); color: var(--xh-sub); }
.xh-sim-na .xh-sim-l { color: var(--xh-ink); }

.xh-blk {
  padding: 12px 13px; border-radius: 13px; margin-bottom: 10px;
  background: #FDF3F1; border: 1px solid #F3D6CF; border-left: 4px solid #C0392B;
}
.xh-blk-t { font-size: 13px; font-weight: 700; color: #B03A2E; margin-bottom: 7px; }
.xh-blk-i { font-size: 12.5px; line-height: 1.75; color: #6B3A32; margin: 5px 0; }
.xh-blk-s { margin-top: 4px; font-size: 11.5px; color: #8A5A50; }

.xh-warn {
  padding: 12px 13px; border-radius: 13px; margin-bottom: 10px;
  background: #FFFBF2; border: 1px solid #F0E2BE; border-left: 4px solid #D99A00;
}
.xh-warn-t { font-size: 13px; font-weight: 700; color: #A86A00; margin-bottom: 7px; }
.xh-warn-i { font-size: 12.5px; line-height: 1.75; color: #5A4A2E; margin: 5px 0; }

.xh-tips { padding: 11px 13px; border-radius: 12px; margin-bottom: 10px; background: var(--xh-soft); border: 1px solid var(--xh-line); }
.xh-tips-t { font-size: 12.5px; font-weight: 700; color: var(--xh-ink); margin-bottom: 6px; }
.xh-tips-i { font-size: 12px; line-height: 1.72; color: #6B6258; margin: 4px 0; }

.xh-lex {
  padding: 12px 13px; border-radius: 13px; margin-top: 10px;
  background: #FFF9FA; border: 1px solid #F6DCE1;
}
.xh-lex-t { font-size: 13px; font-weight: 700; color: #B4334C; margin-bottom: 8px; }
.xh-lex-i {
  padding: 7px 9px; border-radius: 9px; margin-bottom: 6px;
  background: #fff; border: 1px solid #F3E3E7;
  font-size: 12.5px; line-height: 1.6;
}
.xh-lex-i b { color: var(--xh-ink); }
.xh-lex-i span { display: block; margin-top: 2px; font-size: 11px; color: var(--xh-sub); }
.xh-lex-i em { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: #2E7D53; }
.xh-lex-high { border-left: 3px solid #C0392B; }
.xh-lex-mid { border-left: 3px solid #D99A00; }
.xh-lex-hint { border-left: 3px solid #D8D2C8; }

.xh-self { font-size: 12.5px; line-height: 1.8; color: #3A342C; white-space: pre-wrap; }

/* ---------- 页脚 ---------- */
.xh-foot {
  margin: 16px 0 4px; padding: 0 4px;
  font-size: 11.5px; line-height: 1.7; color: #A89E92; text-align: center;
}

/* ---------- toast ---------- */
.xh-toast {
  position: fixed; left: 50%; bottom: 108px; transform: translate(-50%, 12px);
  z-index: 9999; max-width: 80vw;
  padding: 11px 16px; border-radius: 12px;
  background: rgba(34,34,42,.94); color: #fff;
  font-size: 13px; line-height: 1.5; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.xh-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 375px 窄屏 ---------- */
@media (max-width: 420px) {
  .xh-hero { padding: 17px 15px 16px; }
  .xh-hero-t { font-size: 20px; }
  .xh-cover-main { font-size: 19px; }
  .xh-ta { min-height: 92px; }
  .xh-ta-lg { min-height: 180px; }
  .xh-title-t { font-size: 13px; }
}

/* ---------- 边界说明（拆解页顶部常驻）----------
   必须显眼但不刺眼：它承担"我们没在编"的诚实交代 ——
   我们只拿到标题+正文+图，没有互动数据，说"它为什么火"就是编。 */
.xh-note {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 12px;
  background: #F6F5FB; border: 1px solid #E4E1F0; border-left: 3px solid #7B6BB0;
  font-size: 11.5px; line-height: 1.72; color: #575084;
}
.xh-note b { color: #4A4278; }
