@charset "UTF-8";
/* =============================================================================
 * HAP UI 2026 —— 前端设计系统（JustNews 覆盖层）
 * =============================================================================
 * 目标：不改主题一行代码，把视觉/交互整体抬一档。
 *
 * 分层
 * ----
 *   §0  设计令牌      —— 优先改主题自带的 27 个 `--theme-*`，一处收口全局生效
 *   §1  基础与排版
 *   §2  头部 / 导航 / 搜索 / 用户区
 *   §3  首页 Hero 轮播
 *   §4  页签（分段控件）
 *   §5  卡片与列表
 *   §6  视频角标（动态）
 *   §7  侧栏组件
 *   §8  按钮 / 加载更多
 *   §9  编辑框（搜索 / 评论 / 登录 / 订阅）
 *   §10 悬浮动作（返回顶部、分享、目录）
 *   §11 文章页排版
 *   §12 页脚
 *   §13 动效工具（滚动入场 / 图片淡入 / 骨架）
 *   §14 响应式
 *   §15 无障碍与降级
 *
 * 🔴 约定
 *   · 所有选择器带 `body.hap-ui` 前缀 —— 站点「额外 CSS」在本文件之后输出，
 *     靠前缀把特异性抬到 0,3+ 才稳赢，不滥用 `!important`。
 *   · 除令牌外**不碰布局宽度**（容器宽度由主题与站点额外 CSS 决定），只改观感与节奏。
 *   · 全部颜色来自令牌，方便将来做暗色主题（当前仅浅色）。
 * ========================================================================== */

/* ============================ §0 设计令牌 ================================= */
body.hap-ui {
  /* —— 品牌色（沿用《品牌关键词统一铁律》的红 #DC2626） —— */
  --hap-red: #DC2626;
  --hap-red-hover: #B91C1C;
  --hap-red-soft: #FEF2F2;
  --hap-red-line: #FECACA;
  --hap-gold: #F0B429;
  --hap-gold-soft: #FFFBEB;

  /* —— 墨色梯度（带 2% 冷调，比纯灰更有质感） —— */
  --hap-ink: #0F1826;
  --hap-ink-2: #344054;
  --hap-ink-3: #667085;
  --hap-ink-4: #98A2B3;
  --hap-ink-5: #C4CBD6;

  /* —— 面与线 —— */
  --hap-surface: #FFFFFF;
  --hap-surface-2: #F6F7F9;
  --hap-line: #EBEEF3;
  --hap-line-2: #F2F4F7;

  /* —— 圆角 —— */
  --hap-r-xs: 8px;
  --hap-r-sm: 10px;
  --hap-r: 14px;
  --hap-r-lg: 18px;
  --hap-r-pill: 999px;

  /* —— 阴影（三层递进，避免"糊一层黑"） —— */
  --hap-sh-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --hap-sh-2: 0 4px 10px -2px rgba(16, 24, 40, .06), 0 10px 26px -6px rgba(16, 24, 40, .10);
  --hap-sh-3: 0 10px 30px -8px rgba(16, 24, 40, .16), 0 24px 48px -12px rgba(16, 24, 40, .12);
  --hap-sh-red: 0 6px 18px -4px rgba(220, 38, 38, .28);

  /* —— 动效曲线 —— */
  --hap-ease: cubic-bezier(.22, 1, .36, 1);
  --hap-ease-io: cubic-bezier(.4, 0, .2, 1);

  /* —— 版式 —— */
  --hap-ff: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB",
            system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans CJK SC", sans-serif;
  --hap-ff-num: "SF Pro Display", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  /* ================= 主题令牌（真正的收口点） ================= */
  /* 主强调色：蓝 → 品牌红 */
  --theme-color: #DC2626;
  --theme-hover: #B91C1C;
  --action-color: #DC2626;

  /* 墨色 HSL 底盘：纯灰 → 微冷墨（标题更挺、正文更稳） */
  --theme-color-h: 220;
  --theme-color-s: 16%;
  --theme-color-l: 10%;
  --theme-color-hsl: var(--theme-color-h), var(--theme-color-s), var(--theme-color-l);

  --theme-body-bg-color: #F5F6F8;
  --theme-el-bg-color: #FFFFFF;
  --theme-line-color: rgba(16, 24, 40, .07);
  --theme-border-color: rgba(16, 24, 40, .12);

  /* 圆角：3/5/8/12 → 6/10/14/18 */
  --theme-border-radius-s: 6px;
  --theme-border-radius-m: 10px;
  --theme-border-radius-l: 14px;
  --theme-border-radius-xl: 18px;

  /* 间距节奏 */
  --theme-content-sidebar-gap: 26px;
  --menu-item-gap: 20px;
  --logo-height: 30px;

  /* 头部 */
  --header-bg-color: #0B1220;

  --theme-font-family: var(--hap-ff);
  font-family: var(--hap-ff);
}

/* ============================ §1 基础与排版 ============================== */
body.hap-ui {
  background-color: var(--hap-surface-2);
  color: var(--hap-ink-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

body.hap-ui a { transition: color .18s var(--hap-ease-io), opacity .18s var(--hap-ease-io); }

/* 选中态 */
body.hap-ui ::selection { background: rgba(220, 38, 38, .16); color: var(--hap-ink); }

/* 细滚动条（桌面） */
@media (hover: hover) and (pointer: fine) {
  body.hap-ui * { scrollbar-width: thin; scrollbar-color: #D4D9E1 transparent; }
  body.hap-ui ::-webkit-scrollbar { width: 10px; height: 10px; }
  body.hap-ui ::-webkit-scrollbar-thumb {
    background: #D4D9E1; border-radius: 99px;
    border: 3px solid transparent; background-clip: content-box;
  }
  body.hap-ui ::-webkit-scrollbar-thumb:hover { background: #B9C0CC; background-clip: content-box; }
  body.hap-ui ::-webkit-scrollbar-track { background: transparent; }
}

/* 键盘可达性：只在键盘导航时显示焦点环 */
body.hap-ui :focus-visible {
  outline: 2px solid var(--hap-red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 数字对齐（时间/评论数） */
body.hap-ui .item-meta-right,
body.hap-ui .item-meta-items,
body.hap-ui .item-date,
body.hap-ui .hap-sl-item .item-date {
  font-family: var(--hap-ff-num);
  font-variant-numeric: tabular-nums;
}

/* ======================= §2 头部 / 导航 / 搜索 ========================== */
body.hap-ui > header.header {
  background: linear-gradient(180deg, #0B1220 0%, #111C31 100%);
  background-image: linear-gradient(180deg, #0B1220 0%, #111C31 100%);
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: box-shadow .3s var(--hap-ease), backdrop-filter .3s;
}

/* 滚动后：加深 + 毛玻璃 + 投影 */
body.hap-ui > header.header.hap-scrolled {
  background-image: linear-gradient(180deg, rgba(11, 18, 32, .92) 0%, rgba(17, 28, 49, .92) 100%);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 6px 24px -8px rgba(4, 10, 22, .55);
}

/* 顶部一条品牌渐变细线（视觉锚点） */
body.hap-ui > header.header::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--hap-red) 0%, #F0653E 38%, var(--hap-gold) 72%, transparent 100%);
  opacity: .9;
  pointer-events: none;
}

/* —— Logo —— */
body.hap-ui > header.header .logo { margin: 0; line-height: 1; }
body.hap-ui > header.header .logo a {
  display: inline-flex; align-items: center; gap: 10px;
  color: #FFFFFF;
  font-size: 21px;
  /* 🔴 不要用 800：PingFang SC / 微软雅黑 没有 800 字重 ⇒ 浏览器**合成加粗**，会发虚。600 有真实字面。 */
  font-weight: 600;
  /* 🔴 letter-spacing 必须为 0（或整数）：`.4px` 会让第 2 个字起全部落在**半像素**上，
     1 倍屏（绝大多数 Windows 屏）下整串中文都会被横向重采样 ⇒ 看起来发虚、像有重影。
     实测：有 .4px 时字形覆盖 56.6%，去掉后 66.2%，边缘锐度肉眼可见提升。 */
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 🔴 站名**不用 background-clip:text 渐变字**：
   ① 后半段 #F0B429（亮度≈170）压 #0B1220（亮度≈18），对比度只有白字的 1/3 ⇒ 观感像"灰影/被遮住"；
   ② 渐变裁剪字在 1 倍屏会强制灰度抗锯齿 + 半像素采样，边缘更糊；
   ③ `-webkit-text-fill-color:transparent` 在旧内核/部分 App 内置浏览器上会直接**渲染成空**。
   品牌金留在 logo 菱形图标、顶部品牌线、菜单悬停下划线上，文字保持纯白最清晰。 */
body.hap-ui > header.header .hap-text-logo {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: #FFFFFF;
  text-shadow: none;
}
/* 品牌标记：菱形 + 内点，隐喻 K 线拐点 */
body.hap-ui > header.header .logo a::before {
  content: "";
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, #FFFFFF 0 2.1px, transparent 2.4px),
    conic-gradient(from 45deg, var(--hap-red) 0 25%, #FF6A3D 25% 50%, var(--hap-gold) 50% 75%, #FF6A3D 75% 100%);
  box-shadow: 0 2px 10px -2px rgba(220, 38, 38, .55), inset 0 0 0 1px rgba(255, 255, 255, .18);
  transform: rotate(0deg);
  transition: transform .5s var(--hap-ease);
}
body.hap-ui > header.header .logo a:hover::before { transform: rotate(-90deg) scale(1.06); }

/* —— 主菜单 —— */
body.hap-ui > header.header .nav > li > a {
  position: relative;
  color: rgba(255, 255, 255, .82);
  font-size: 15px; font-weight: 600; letter-spacing: .2px;
  line-height: 64px;
  padding: 0 var(--menu-item-padding, 14px);
  transition: color .2s var(--hap-ease-io);
}
body.hap-ui > header.header .nav > li > a::after {
  content: "";
  position: absolute; left: 50%; bottom: 12px;
  width: calc(100% - 24px); height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--hap-gold), #FF8A4C);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .28s var(--hap-ease);
  pointer-events: none;
}
body.hap-ui > header.header .nav > li:hover > a,
body.hap-ui > header.header .nav > li > a:hover { color: #FFFFFF; }
body.hap-ui > header.header .nav > li:hover > a::after,
body.hap-ui > header.header .nav > li.hap-active > a::after { transform: translateX(-50%) scaleX(1); }
body.hap-ui > header.header .nav > li.hap-active > a { color: var(--hap-gold); }

/* 下拉面板：圆角 + 浮起 */
body.hap-ui > header.header .dropdown-menu {
  border: 1px solid var(--hap-line);
  border-radius: var(--hap-r);
  box-shadow: var(--hap-sh-3);
  padding: 8px;
  margin-top: 6px;
  animation: hap-drop .22s var(--hap-ease) both;
}
@keyframes hap-drop {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
body.hap-ui > header.header .dropdown-menu > li > a {
  border-radius: var(--hap-r-xs);
  color: var(--hap-ink-2);
  padding: 9px 12px;
  transition: background .16s, color .16s;
}
body.hap-ui > header.header .dropdown-menu > li > a:hover {
  background: var(--hap-red-soft); color: var(--hap-red);
}

/* —— 搜索 —— */
body.hap-ui > header.header .navbar-search-icon {
  width: 36px; height: 36px; border-radius: var(--hap-r-pill);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .85);
  transition: background .18s, color .18s;
}
body.hap-ui > header.header .navbar-search-icon:hover {
  background: rgba(255, 255, 255, .10); color: #FFFFFF;
}
body.hap-ui > header.header .navbar-search-inner {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--hap-r-pill);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
body.hap-ui > header.header .navbar-search-inner:focus-within {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(240, 180, 41, .7);
  box-shadow: 0 0 0 4px rgba(240, 180, 41, .16);
}
body.hap-ui > header.header .navbar-search-input {
  color: #FFFFFF; font-size: 14px; height: 38px;
  background: transparent; border: 0;
}
body.hap-ui > header.header .navbar-search-input::placeholder { color: rgba(255, 255, 255, .55); }
body.hap-ui > header.header .navbar-search-btn { color: rgba(255, 255, 255, .9); }
body.hap-ui > header.header .navbar-search-btn:hover { color: var(--hap-gold); }

/* —— 用户区 —— */
body.hap-ui > header.header .navbar-action .login {
  color: rgba(255, 255, 255, .86);
  font-size: 14px; font-weight: 600;
  border-radius: var(--hap-r-pill);
  padding: 7px 14px;
  transition: background .18s, color .18s;
}
body.hap-ui > header.header .navbar-action .login:hover {
  background: rgba(255, 255, 255, .12); color: #FFFFFF;
}
body.hap-ui > header.header .navbar-action .login:first-child::after { display: none; }
body.hap-ui > header.header .navbar-action .login.register {
  background: linear-gradient(135deg, var(--hap-red), #F0653E);
  color: #FFFFFF; box-shadow: 0 4px 14px -4px rgba(220, 38, 38, .55);
}
body.hap-ui > header.header .navbar-action .login.register:hover {
  background: linear-gradient(135deg, var(--hap-red-hover), #E05430);
  color: #FFFFFF;
}
body.hap-ui > header.header .navbar-action .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }

/* —— 移动端汉堡 —— */
/* 🔴 主题把 .navbar-toggle 设成 display:flex，但没给 flex-direction ⇒ 三条 icon-bar
   是**横排**的（实测 rect x=310/330/350，拼成一根 60px 长条），打开态的两条 rotate
   也拼不成 X（渲染成两条斜杠）。强制竖排后，主题自带的 translateY(±7.07px)+rotate(±45°)
   正好把上下两条叠成完美 X。 */
body.hap-ui > header.header .navbar-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}
body.hap-ui > header.header .icon-bar {
  background: rgba(255, 255, 255, .92);
  width: 20px;
  height: 2px; border-radius: 2px;
  transition: transform .28s var(--hap-ease), opacity .18s;
}
body.hap-ui > header.header .navbar-toggle:hover .icon-bar { background: var(--hap-gold); }

/* =========================== §3 首页 Hero 轮播 =========================== */
body.hap-ui .feature-posts-wrap .item { border-radius: var(--hap-r-lg); }
body.hap-ui .feature-posts-wrap .item-inner,
body.hap-ui .feature-posts-wrap .item {
  border-radius: var(--hap-r-lg);
  overflow: hidden;
}
body.hap-ui .feature-posts-wrap .item-bg { transform: scale(1.02); transition: transform 6s linear; }
body.hap-ui .feature-posts-wrap:hover .item-bg { transform: scale(1.06); }
body.hap-ui .feature-posts-wrap .item::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 68%;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0) 0%, rgba(6, 10, 18, .55) 46%, rgba(6, 10, 18, .88) 100%);
  pointer-events: none;
}
body.hap-ui .feature-posts-wrap .item-title {
  font-size: 22px; font-weight: 800; letter-spacing: .2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  line-height: 1.45;
}
body.hap-ui .feature-posts-wrap .item-category {
  background: rgba(220, 38, 38, .92);
  color: #FFF; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--hap-r-pill);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px -2px rgba(220, 38, 38, .5);
}

/* ========================= §4 页签（分段控件） ========================== */
body.hap-ui .main-list .sec-panel-head {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--hap-line);
}
body.hap-ui .main-list-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px 0 12px;
  border-bottom: 0;
}
body.hap-ui .main-list-tabs .main-list-tab { margin: 0; }
body.hap-ui .main-list-tabs .main-list-tab > a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14.5px; font-weight: 600;
  color: var(--hap-ink-3);
  border-radius: var(--hap-r-pill);
  line-height: 1.4;
  transition: color .18s, background .18s, box-shadow .2s, transform .18s;
}
body.hap-ui .main-list-tabs .main-list-tab > a:hover {
  color: var(--hap-ink);
  background: var(--hap-surface-2);
}
body.hap-ui .main-list-tabs .main-list-tab.active > a {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--hap-red), #F0653E);
  box-shadow: var(--hap-sh-red);
}
body.hap-ui .main-list-tabs .main-list-tab.active > a:hover {
  color: #FFFFFF; background: linear-gradient(135deg, var(--hap-red-hover), #E05430);
}
/* 主题自带的下划线指示器与本设计冲突，隐藏 */
body.hap-ui .main-list-tabs .tab-underscore { display: none; }

/* ============================ §5 卡片与列表 ============================= */
/* 覆盖范围：`.post-loop > li.item` —— 这一条同时命中
   「最新」主列表(.main-list)、大盘预测图(.modules-category-posts)、
   三图条(.modules-feature-posts)、相关阅读(.entry-related)，避免只美化首屏。 */
body.hap-ui .post-loop > .item .item-inner {
  border-radius: var(--hap-r);
  border: 1px solid var(--hap-line);
  background: var(--hap-surface);
  box-shadow: var(--hap-sh-1);
  overflow: hidden;
  transition: transform .28s var(--hap-ease), box-shadow .28s var(--hap-ease), border-color .28s;
}
body.hap-ui .post-loop > .item:hover .item-inner {
  transform: translateY(-5px);
  box-shadow: var(--hap-sh-3);
  border-color: transparent;
}
body.hap-ui .post-loop > .item .item-img { border-radius: 0; overflow: hidden; }
body.hap-ui .post-loop > .item .item-img img {
  transition: transform .55s var(--hap-ease);
  will-change: transform;
}
body.hap-ui .post-loop > .item:hover .item-img img { transform: scale(1.055); }

body.hap-ui .post-loop > .item .item-title {
  font-size: 15.5px; font-weight: 700; line-height: 1.58;
  color: var(--hap-ink);
  letter-spacing: .1px;
  transition: color .18s;
}
body.hap-ui .post-loop > .item:hover .item-title { color: var(--hap-red); }

/* 三图条（feature-posts style-2）卡片偏大，标题相应放大一档 */
body.hap-ui .modules-feature-posts .post-loop > .item .item-title { font-size: 16.5px; }

/* 分类胶囊：压在图上，玻璃质感 */
body.hap-ui .post-loop > .item .item-category {
  position: absolute; left: 10px; top: 10px; z-index: 3;
  display: inline-block;
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
  color: #FFFFFF;
  background: rgba(15, 24, 38, .55);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--hap-r-pill);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  backdrop-filter: blur(8px) saturate(160%);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .35);
  transition: background .2s, transform .2s;
}
body.hap-ui .post-loop > .item:hover .item-category {
  background: rgba(220, 38, 38, .92);
  transform: translateY(-1px);
}
/* 卡片没有图片时，胶囊不要浮在半空 */
body.hap-ui .post-loop > .item .item-img:not(:has(img)) .item-category { position: static; }

/* 元信息行 */
body.hap-ui .post-loop > .item .item-meta-items { color: var(--hap-ink-4); font-size: 12.5px; }
body.hap-ui .post-loop > .item .item-meta-li { color: var(--hap-ink-4); transition: color .18s; }
body.hap-ui .post-loop > .item .item-meta-li:hover { color: var(--hap-red); }
body.hap-ui .post-loop > .item .item-meta-author { border-top: 1px solid var(--hap-line-2); }
body.hap-ui .post-loop > .item .item-meta-author .avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--hap-surface), 0 0 0 3px var(--hap-line);
}
body.hap-ui .post-loop > .item .item-meta-author span { color: var(--hap-ink-3); font-weight: 600; }
body.hap-ui .post-loop > .item .item-meta-right { color: var(--hap-ink-4); font-size: 12.5px; }

/* 其它列表形态（list / default）统一观感 */
body.hap-ui :is(.post-loop-list, .post-loop-default) > .item .item-title a:hover { color: var(--hap-red); }
body.hap-ui :is(.post-loop-list, .post-loop-default) .item-img { border-radius: var(--hap-r-sm); overflow: hidden; }

/* ========================= §6 视频角标（动态图标） ====================== */
/* 主题用 iconbg 字体画了一个静态播放圆 —— 这里改成玻璃质感 + 呼吸光环 */
body.hap-ui :is(.post-loop-card, .post-loop-image, .post-loop-masonry) .item-video::after,
body.hap-ui .post-loop-card .item-video::after {
  content: "";
  background: rgba(15, 24, 38, .42) center/13px 14px no-repeat;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Cpath fill='%23fff' d='M1 1.2v11.6c0 .8.9 1.3 1.6.9l9.1-5.8a1 1 0 0 0 0-1.7L2.6.3A1 1 0 0 0 1 1.2z'/%3E%3C/svg%3E");
  border: 1px solid rgba(255, 255, 255, .38);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  backdrop-filter: blur(6px) saturate(180%);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .5);
  transition: transform .3s var(--hap-ease), background-color .3s, box-shadow .3s;
}
body.hap-ui .post-loop > .item:hover .item-video::after,
body.hap-ui .hap-sl-item:hover .item-video::after {
  background-color: var(--hap-red);
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 22px -4px rgba(220, 38, 38, .6);
}
/* 呼吸光环（只在卡片悬停时启动，避免全页动画耗电） */
body.hap-ui .post-loop > .item:hover .item-video::before,
body.hap-ui .hap-sl-item:hover .item-video::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55);
  animation: hap-pulse 1.6s var(--hap-ease-io) infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes hap-pulse {
  0%   { transform: scale(.9);  opacity: .8; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ============================ §7 侧栏组件 =============================== */
body.hap-ui .sidebar .widget {
  border-radius: var(--hap-r);
  border: 1px solid var(--hap-line);
  background: var(--hap-surface);
  box-shadow: var(--hap-sh-1);
  padding: 18px 18px 8px;
  margin-bottom: 18px;
  transition: box-shadow .3s var(--hap-ease);
}
body.hap-ui .sidebar .widget:hover { box-shadow: var(--hap-sh-2); }

body.hap-ui .sidebar .widget-title {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; font-weight: 800; letter-spacing: .3px;
  color: var(--hap-ink);
  padding: 0 0 12px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--hap-line-2);
}
body.hap-ui .sidebar .widget-title::before {
  content: "";
  width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--hap-red), #F0653E);
  box-shadow: 0 0 8px -1px rgba(220, 38, 38, .5);
}
body.hap-ui .sidebar .widget-title > span { flex: 1 1 auto; }

/* 侧栏条目 */
body.hap-ui .sidebar :is(.item, .hap-sl-item) {
  border-radius: var(--hap-r-sm);
  transition: background .18s;
}
body.hap-ui .sidebar :is(.item, .hap-sl-item):hover { background: var(--hap-surface-2); }
body.hap-ui .sidebar .item-img,
body.hap-ui .sidebar .hap-sl-thumb {
  border-radius: var(--hap-r-sm);
  overflow: hidden;
}
body.hap-ui .sidebar .item-img img,
body.hap-ui .sidebar .hap-sl-thumb img {
  transition: transform .5s var(--hap-ease);
}
body.hap-ui .sidebar :is(.item, .hap-sl-item):hover .item-img img,
body.hap-ui .sidebar .hap-sl-item:hover .hap-sl-thumb img { transform: scale(1.06); }
body.hap-ui .sidebar .item-title,
body.hap-ui .sidebar .item-title a {
  color: var(--hap-ink); font-weight: 600; line-height: 1.55;
  transition: color .18s;
}
body.hap-ui .sidebar :is(.item, .hap-sl-item):hover .item-title a { color: var(--hap-red); }
body.hap-ui .sidebar .item-date { color: var(--hap-ink-4); font-size: 12.5px; }

/* 直播小节（插件插入的 hap-sl-section） */
body.hap-ui .hap-sl-subtitle {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--hap-ink-2);
  padding: 2px 0 10px;
}
body.hap-ui .hap-sl-subtitle > span::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px; margin-right: 7px; border-radius: 50%;
  background: var(--hap-red);
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .45);
  animation: hap-live-dot 2s ease-out infinite;
  vertical-align: 1px;
}
@keyframes hap-live-dot {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); }
  70%  { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
body.hap-ui .hap-sl-more {
  margin-left: auto;
  font-size: 12.5px; font-weight: 600; color: var(--hap-ink-4);
  padding: 3px 9px; border-radius: var(--hap-r-pill);
  transition: color .18s, background .18s;
}
body.hap-ui .hap-sl-more::after { content: " ›"; }
body.hap-ui .hap-sl-more:hover { color: var(--hap-red); background: var(--hap-red-soft); }

/* 侧栏小节分隔线（视频段与图文段之间） */
body.hap-ui .hap-sl-section + .hap-sl-section,
body.hap-ui .hap-sl-section ~ ul { margin-top: 6px; }

/* ========================= §8 按钮 / 加载更多 =========================== */
body.hap-ui .wpcom-btn {
  border-radius: var(--hap-r-pill);
  font-weight: 700;
  padding: 10px 22px;
  transition: transform .2s var(--hap-ease), box-shadow .25s, background .2s, color .2s;
}
body.hap-ui .wpcom-btn:hover { transform: translateY(-1px); }
body.hap-ui .wpcom-btn:active { transform: translateY(0) scale(.99); }

body.hap-ui .load-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 320px; margin: 6px auto 0;
  padding: 12px 20px;
  font-size: 14.5px; font-weight: 700;
  color: var(--hap-ink-2);
  background: var(--hap-surface);
  border: 1px solid var(--hap-line);
  border-radius: var(--hap-r-pill);
  box-shadow: var(--hap-sh-1);
}
body.hap-ui .load-more::after {
  content: "";
  width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .25s var(--hap-ease);
}
body.hap-ui .load-more:hover {
  color: var(--hap-red);
  border-color: var(--hap-red-line);
  background: var(--hap-red-soft);
  box-shadow: 0 6px 18px -6px rgba(220, 38, 38, .28);
}
body.hap-ui .load-more:hover::after { transform: rotate(90deg); }
body.hap-ui .load-more.loading::after {
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  background: none;
  -webkit-mask: none; mask: none;
  animation: hap-spin .7s linear infinite;
}
@keyframes hap-spin { to { transform: rotate(360deg); } }

/* 搜索/空状态按钮 */
body.hap-ui .sec-panel .search-form .btn,
body.hap-ui .btn-primary {
  background: linear-gradient(135deg, var(--hap-red), #F0653E);
  border: 0; color: #fff; border-radius: var(--hap-r-pill);
  box-shadow: var(--hap-sh-red);
}

/* ======================== §9 编辑框（输入 / 表单） ====================== */
/* 只作用于前台可辨识的表单容器，避免误伤后台/会员中心结构化控件 */
body.hap-ui :is(.navbar-search-input, .search-form input[type="text"], .search-form input[type="search"],
                .widget input[type="text"], .widget input[type="search"],
                .comment-form input[type="text"], .comment-form input[type="email"],
                .comment-form input[type="url"], .comment-form textarea,
                .member-form input[type="text"], .member-form input[type="email"],
                .member-form input[type="password"], .member-form input[type="tel"],
                .member-form textarea, .entry-content input[type="text"],
                .entry-content input[type="email"], .entry-content textarea) {
  height: 44px;
  padding: 10px 15px;
  font-size: 14.5px;
  color: var(--hap-ink);
  background: var(--hap-surface);
  border: 1px solid #E3E7EE;
  border-radius: var(--hap-r-sm);
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
body.hap-ui :is(.comment-form textarea, .member-form textarea, .entry-content textarea) {
  height: auto; min-height: 120px; line-height: 1.7; resize: vertical;
}
body.hap-ui :is(.navbar-search-input, .search-form input, .widget input,
                .comment-form input, .comment-form textarea,
                .member-form input, .member-form textarea,
                .entry-content input, .entry-content textarea)::placeholder {
  color: var(--hap-ink-4);
}
body.hap-ui :is(.search-form input, .widget input, .comment-form input, .comment-form textarea,
                .member-form input, .member-form textarea,
                .entry-content input, .entry-content textarea):focus {
  border-color: var(--hap-red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10);
  background: #FFFFFF;
  outline: 0;
}
/* 搜索表单：输入 + 按钮拼成一个整体 */
body.hap-ui .search-form { display: flex; gap: 0; align-items: stretch; }
body.hap-ui .search-form input[type="text"],
body.hap-ui .search-form input[type="search"] {
  border-top-right-radius: 0; border-bottom-right-radius: 0;
  border-right: 0;
}
body.hap-ui .search-form .btn,
body.hap-ui .search-form button {
  border-top-left-radius: 0; border-bottom-left-radius: 0;
  height: 44px; padding: 0 18px; line-height: 44px;
}

/* ====================== §10 悬浮动作（返回顶部等） ====================== */
body.hap-ui .action .action-item,
body.hap-ui .action-item.gotop {
  border-radius: 50%;
  background: var(--hap-surface);
  border: 1px solid var(--hap-line);
  box-shadow: var(--hap-sh-2);
  color: var(--hap-ink-2);
  transition: transform .22s var(--hap-ease), box-shadow .25s, color .2s, background .2s;
}
body.hap-ui .action .action-item:hover,
body.hap-ui .action-item.gotop:hover {
  transform: translateY(-3px);
  color: var(--hap-red);
  border-color: var(--hap-red-line);
  box-shadow: 0 10px 24px -8px rgba(220, 38, 38, .35);
}

/* 阅读进度条（mu-plugin hap-ux-upgrade 已输出，这里统一配色） */
body.hap-ui #hap-ux-progress {
  height: 3px;
  background: linear-gradient(90deg, var(--hap-red), #F0653E 55%, var(--hap-gold));
  box-shadow: 0 0 8px rgba(220, 38, 38, .45);
}

/* 目录 */
body.hap-ui #hap-ux-toc {
  border-radius: var(--hap-r);
  border-color: var(--hap-line);
  box-shadow: var(--hap-sh-2);
  padding: 12px 8px 12px 0;
}

/* 🔴 宽屏停靠模式（JS 把 #hap-ux-toc 移进 .sidebar）
   原实现是 `position:fixed; right:16px` —— 在 1440px 下会**直接压在侧栏作者卡上**，
   把头像和统计挡住（2026-10-20 实测）。停靠进侧栏后既不再遮挡，又能在滚动时吸附。 */
body.hap-ui .sidebar #hap-ux-toc.hap-toc-docked {
  position: sticky;
  top: 76px;
  right: auto;
  width: auto;
  max-height: calc(100vh - 100px);
  margin: 0 0 18px;
  padding: 14px 8px 14px 0;
  background: var(--hap-surface);
  border: 1px solid var(--hap-line);
  border-radius: var(--hap-r);
  box-shadow: var(--hap-sh-1);
}
body.hap-ui .sidebar #hap-ux-toc.hap-toc-docked .hap-ux-toc-hd { padding-left: 14px; }
/* 停靠后不再需要浮动开关 */
body.hap-ui .sidebar #hap-ux-toc.hap-toc-docked ~ #hap-ux-toc-toggle,
body.hap-ui #hap-ux-toc.hap-toc-docked + #hap-ux-toc-toggle { display: none !important; }

body.hap-ui #hap-ux-toc .hap-ux-toc-hd { font-weight: 800; color: var(--hap-ink); }
body.hap-ui #hap-ux-toc a { border-radius: 0 var(--hap-r-xs) var(--hap-r-xs) 0; color: var(--hap-ink-2); }
body.hap-ui #hap-ux-toc a:hover { background: var(--hap-red-soft); color: var(--hap-red); }
body.hap-ui #hap-ux-toc a.hap-ux-cur {
  background: var(--hap-red-soft); color: var(--hap-red); font-weight: 700;
  border-left-color: var(--hap-red);
}
body.hap-ui #hap-ux-toc-toggle {
  border-radius: var(--hap-r-pill);
  border-color: var(--hap-line);
  box-shadow: var(--hap-sh-2);
  font-weight: 700;
}

/* ========================== §11 文章页排版 ============================== */
body.hap-ui .entry-content {
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: .012em;
  color: #26303E;
  word-break: break-word;
}
body.hap-ui .entry-content > * { margin-bottom: 1.15em; }
body.hap-ui .entry-content p { margin-bottom: 1.15em; }

body.hap-ui .entry-content h2 {
  position: relative;
  margin: 2em 0 .9em;
  padding-left: 15px;
  font-size: 21px; font-weight: 800; line-height: 1.5;
  color: var(--hap-ink);
  letter-spacing: .2px;
}
body.hap-ui .entry-content h2::before {
  content: "";
  position: absolute; left: 0; top: .28em; bottom: .28em;
  width: 4px; border-radius: 3px;
  background: linear-gradient(180deg, var(--hap-red), #F0653E);
  box-shadow: 0 0 10px -2px rgba(220, 38, 38, .5);
}
body.hap-ui .entry-content h3 {
  margin: 1.7em 0 .7em;
  font-size: 18px; font-weight: 800; color: var(--hap-ink); line-height: 1.55;
}
body.hap-ui .entry-content h3::before {
  content: ""; display: inline-block;
  width: 7px; height: 7px; margin-right: 9px; border-radius: 2px;
  background: var(--hap-red); transform: rotate(45deg); vertical-align: 2px;
}
body.hap-ui .entry-content h4 { font-size: 16.5px; font-weight: 700; color: var(--hap-ink-2); }

body.hap-ui .entry-content strong { color: var(--hap-ink); font-weight: 800; }
body.hap-ui .entry-content a {
  color: var(--hap-red);
  text-decoration: none;
  background-image: linear-gradient(var(--hap-red-line), var(--hap-red-line));
  background-position: 0 100%; background-repeat: no-repeat; background-size: 100% 1px;
  transition: background-size .2s, color .2s;
}
body.hap-ui .entry-content a:hover {
  color: var(--hap-red-hover);
  background-image: linear-gradient(var(--hap-red), var(--hap-red));
}

body.hap-ui .entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--hap-red-soft);
  border-left: 4px solid var(--hap-red);
  border-radius: 0 var(--hap-r-sm) var(--hap-r-sm) 0;
  color: #7A2A2A;
}
body.hap-ui .entry-content blockquote p:last-child { margin-bottom: 0; }

body.hap-ui .entry-content img {
  border-radius: var(--hap-r-sm);
  box-shadow: var(--hap-sh-1);
  height: auto;
}
body.hap-ui .entry-content figure { margin: 1.6em 0; }
body.hap-ui .entry-content figcaption,
body.hap-ui .entry-content .wp-caption-text {
  font-size: 13px; color: var(--hap-ink-4); text-align: center; margin-top: 8px;
}

body.hap-ui .entry-content ul,
body.hap-ui .entry-content ol { padding-left: 1.4em; }
body.hap-ui .entry-content li { margin-bottom: .5em; }
body.hap-ui .entry-content ul > li::marker { color: var(--hap-red); }

body.hap-ui .entry-content code {
  background: #F3F5F8; color: #B42318;
  padding: 2px 6px; border-radius: 5px;
  font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
body.hap-ui .entry-content pre {
  background: #0F1826; color: #E6EAF2;
  padding: 16px 18px; border-radius: var(--hap-r-sm);
  overflow: auto; font-size: 13.5px; line-height: 1.7;
}
body.hap-ui .entry-content pre code { background: none; color: inherit; padding: 0; }

body.hap-ui .entry-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--hap-line); border-radius: var(--hap-r-sm);
  overflow: hidden; font-size: 14.5px;
}
body.hap-ui .entry-content thead th {
  background: var(--hap-surface-2); color: var(--hap-ink);
  font-weight: 800; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--hap-line);
}
body.hap-ui .entry-content tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--hap-line-2);
  color: var(--hap-ink-2);
}
body.hap-ui .entry-content tbody tr:last-child td { border-bottom: 0; }
body.hap-ui .entry-content tbody tr:hover td { background: #FBFCFD; }
body.hap-ui .hap-ux-tablewrap { border-radius: var(--hap-r-sm); }

/* 文章头 */
body.hap-ui .article-header .article-title,
body.hap-ui .entry-title { font-weight: 800; letter-spacing: .2px; color: var(--hap-ink); }

/* 模块区标题（大盘预测图 / 股票培训 / 股票AI研报 等分类模块共用）
   结构：`.sec-panel-head > h2 > span > a` + `small`（副标题）+ `a.more`（更多） */
body.hap-ui .sec-panel-head > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
}
body.hap-ui .sec-panel-head > h2::before {
  content: "";
  flex: 0 0 4px;
  width: 4px;
  height: 17px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--hap-red), #F0653E);
  box-shadow: 0 0 8px -1px rgba(220, 38, 38, .5);
}
body.hap-ui .sec-panel-head > h2 > span > a,
body.hap-ui .sec-panel-head > h2 > span {
  color: var(--hap-ink);
  font-weight: 800;
  letter-spacing: .3px;
}
body.hap-ui .sec-panel-head > h2 > span > a:hover { color: var(--hap-red); }
/* 模块副标题多为无信息量的样板文案（"根据分类显示文章"），前端隐藏 */
body.hap-ui .sec-panel-head > h2 > small { display: none; }
body.hap-ui .sec-panel-head > h2 > .more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hap-ink-4);
  background: var(--hap-surface-2);
  border-radius: var(--hap-r-pill);
  transition: color .18s, background .18s;
}
body.hap-ui .sec-panel-head > h2 > .more:hover {
  color: var(--hap-red);
  background: var(--hap-red-soft);
}
body.hap-ui .sec-panel-head > h2 > .more .wpcom-icon { font-size: 11px; transition: transform .2s; }
body.hap-ui .sec-panel-head > h2 > .more:hover .wpcom-icon { transform: translateX(2px); }

/* ============================= §12 页脚 ================================= */
body.hap-ui .footer {
  background: linear-gradient(180deg, #0B1220 0%, #0E1626 100%);
  color: rgba(255, 255, 255, .62);
  border-top: 0;
  margin-top: 40px;
}
body.hap-ui .footer a { color: rgba(255, 255, 255, .7); }
body.hap-ui .footer a:hover { color: var(--hap-gold); }
body.hap-ui .footer .footer-nav li a { border-radius: 6px; padding: 4px 8px; transition: background .18s, color .18s; }
body.hap-ui .footer .footer-nav li a:hover { background: rgba(255, 255, 255, .07); }

/* ==================== §13 动效工具（入场 / 淡入 / 骨架） ================= */
/* 滚动入场：JS 加 .hap-in，未启用 JS 时元素保持可见（无 FOUC 风险） */
body.hap-ui .hap-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--hap-ease), transform .5s var(--hap-ease);
  will-change: opacity, transform;
}
body.hap-ui .hap-reveal.hap-in { opacity: 1; transform: none; }
/* 逐格错峰，最多 6 档，避免长列表延迟感 */
body.hap-ui .hap-reveal[data-hap-d="1"] { transition-delay: .05s; }
body.hap-ui .hap-reveal[data-hap-d="2"] { transition-delay: .10s; }
body.hap-ui .hap-reveal[data-hap-d="3"] { transition-delay: .15s; }
body.hap-ui .hap-reveal[data-hap-d="4"] { transition-delay: .20s; }
body.hap-ui .hap-reveal[data-hap-d="5"] { transition-delay: .25s; }

/* 图片淡入：容器先给一层柔和底色（骨架），图到了停掉 shimmer
   🔴 不能把 img 设成 opacity:0 —— 懒加载图未入视口时不会 load，
      卡片会变成"白块 + 播放角标"，移动端看着就是"图挂了"（2026-10-20 实测踩过）。
      正确做法：img 始终可见，骨架只是垫在它下面。 */
body.hap-ui .item-img,
body.hap-ui .hap-sl-thumb {
  background: linear-gradient(100deg, #EFF1F5 8%, #F7F8FA 18%, #EFF1F5 33%);
  background-size: 220% 100%;
  animation: hap-shimmer 1.6s linear infinite;
}
body.hap-ui .item-img.hap-img-ready,
body.hap-ui .hap-sl-thumb.hap-img-ready {
  animation: none;
  background: var(--hap-surface-2);
}
@keyframes hap-shimmer {
  from { background-position: 140% 0; }
  to   { background-position: -40% 0; }
}

/* ======================= §13.5 搜索即时建议面板 ======================== */
/* 挂在 body 上 + fixed 定位（JS 按输入框 rect 算位置）：
   搜索容器有 overflow:hidden、移动抽屉有 max-height+overflow:auto ⇒ 塞进容器必被裁 */
.hap-suggest {
  display: none;
  position: fixed;
  z-index: 3000;
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #FFFFFF;
  border: 1px solid var(--hap-line);
  border-radius: var(--hap-r-sm);
  box-shadow: var(--hap-sh-3);
  padding: 6px;
  transform: translateY(-4px);
  opacity: 0;
  transition: opacity .16s var(--hap-ease), transform .16s var(--hap-ease);
}
.hap-suggest.is-open { display: block; opacity: 1; transform: translateY(0); }
.hap-suggest a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--hap-ink);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .16s, color .16s;
}
.hap-suggest a .t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hap-suggest a .d {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--hap-ink-4);
  font-variant-numeric: tabular-nums;
}
.hap-suggest a:hover,
.hap-suggest a.is-cur { background: #FEF2F2; color: var(--hap-red); }
.hap-suggest a:hover .d,
.hap-suggest a.is-cur .d { color: #C2410C; }

/* ============================= §14 响应式 =============================== */
@media (max-width: 991px) {
  /* 🔴 Logo 必须能"收"，否则会压到汉堡按钮（用户截图反馈的"三个白横杠遮挡"）：
     实测 .logo 是自然宽（图标 22 + 间距 10 + 文字 167.6 ≈ 197.6px），
     而 .navbar-header 在 263px 视口下只有 238px，加上 44px 汉堡 = 241.6 ⇒ **先天溢出 3.6px**；
     再叠加不同设备字体回退的字形差（PingFang / HarmonyOS / 微软雅黑 宽度差 10%+），
     文字就会直接钻到汉堡下面。对策：给汉堡固定留 56px（44 + 12 间距），
     其余全部可收缩 + 溢出裁剪成省略号 —— 与字体度量彻底解耦，任何设备都不会再撞。 */
  body.hap-ui > header.header .navbar-header { min-width: 0; }
  body.hap-ui > header.header .logo {
    min-width: 0;
    max-width: calc(100% - 56px);
    overflow: hidden;
  }
  body.hap-ui > header.header .logo a { min-width: 0; max-width: 100%; overflow: hidden; }
  body.hap-ui > header.header .hap-text-logo {
    display: block;
    min-width: 0; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  body.hap-ui > header.header .nav > li > a { line-height: 52px; font-size: 14.5px; }
  body.hap-ui .feature-posts-wrap .item-title { font-size: 18px; }
  body.hap-ui .main-list-tabs { gap: 4px; }
  body.hap-ui .main-list-tabs .main-list-tab > a { padding: 7px 13px; font-size: 13.5px; }
}

@media (max-width: 767px) {
  /* 移动端导航面板做成"卡片抽屉"
     🔴 主题用 body.navbar-on{transform:translateX(312px)} 整页右移做抽屉 ⇒ header（含 Logo）
        被推出屏幕；抽屉顶部只剩主题自带的 .navbar-collapse::before 纯红条（#C62828 / 48px）
        ⇒ 观感就是"顶部一块红 + Logo 不见了"。
        正解：把这个 ::before 直接改造成「抽屉品牌栏」，品牌在抽屉里重新出现，红块同时消失。 */
  body.hap-ui > header.header .navbar-collapse {
    background: #0B1220;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6);
    padding: 0 12px 14px;
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.hap-ui > header.header .navbar-collapse::before {
    content: "神奇赢家AI选股系统";
    box-sizing: border-box;
    align-self: stretch;
    flex: 0 0 auto;
    /* 单行文字垂直居中：用 display:block + line-height = height 最确定
       （flex + align-items:center 在伪元素匿名文本项上会偏高 ~7px，实测过） */
    display: block;
    line-height: 54px;
    width: 100%;
    height: 54px;
    margin: 0 0 8px;
    padding: 0 0 0 44px;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #0B1220;
    background-image:
      /* 菱形品牌标记（与桌面端 Logo 同款） */
      conic-gradient(from 45deg, #DC2626 0 25%, #F0B429 0 50%, #DC2626 0 75%, #EF4444 0),
      /* 底部品牌细线 */
      linear-gradient(90deg, #DC2626 0%, #F0B429 55%, rgba(240, 180, 41, 0) 100%);
    background-repeat: no-repeat, no-repeat;
    background-size: 22px 22px, 100% 2px;
    background-position: 10px center, left bottom;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  body.hap-ui > header.header .nav > li > a {
    display: block;
    border-radius: var(--hap-r-sm);
    line-height: 46px;
    padding: 0 14px;
    color: rgba(255, 255, 255, .88);
  }
  body.hap-ui > header.header .nav > li > a::after { display: none; }
  body.hap-ui > header.header .nav > li.hap-active > a,
  body.hap-ui > header.header .nav > li > a:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--hap-gold);
  }
  /* Logo 在移动端的字号（收窄逻辑见 §14 的 max-width:991px 块） */
  body.hap-ui > header.header .logo a {
    font-size: 18px; gap: 8px;
  }
  body.hap-ui > header.header .logo a::before { width: 22px; height: 22px; flex-basis: 22px; }

  /* 页签：改成横向滑动条（换行会把首屏吃掉两行） */
  body.hap-ui .main-list .sec-panel-head { margin-bottom: 14px; }
  body.hap-ui .main-list-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -15px;
    padding: 4px 15px 10px;
    scroll-padding-left: 15px;
  }
  body.hap-ui .main-list-tabs::-webkit-scrollbar { display: none; }
  body.hap-ui .main-list-tabs .main-list-tab { flex: 0 0 auto; }
  body.hap-ui .main-list-tabs .main-list-tab > a { padding: 7px 13px; font-size: 13.5px; white-space: nowrap; }

  body.hap-ui .post-loop > .item .item-title { font-size: 14.5px; }
  body.hap-ui .entry-content { font-size: 16.5px; line-height: 1.85; }
  body.hap-ui .entry-content h2 { font-size: 19px; }
  body.hap-ui .sidebar .widget { padding: 15px 14px 6px; }
  body.hap-ui .load-more { max-width: none; }

  /* Hero：移动端标题压在图上，加强遮罩保证可读 */
  body.hap-ui .feature-posts-wrap .item::after {
    height: 100%;
    background: linear-gradient(180deg, rgba(6, 10, 18, .18) 0%, rgba(6, 10, 18, .12) 38%, rgba(6, 10, 18, .72) 72%, rgba(6, 10, 18, .94) 100%);
  }
}

/* —— 窄屏逐级让位：品牌宁可小一点，也不许被汉堡压住或截成省略号 ——
   390px 是主流手机宽度（18px 刚好放得下）；
   380 以下开始收字号，330 以下再收一档，让 263~330px 这种"分屏 / 窄窗口"也能显示全名。 */
@media (max-width: 380px) {
  body.hap-ui > header.header .logo a { font-size: 16.5px; gap: 7px; letter-spacing: 0; }
  body.hap-ui > header.header .logo a::before { width: 20px; height: 20px; flex-basis: 20px; }
}
@media (max-width: 330px) {
  body.hap-ui > header.header .logo a { font-size: 15.5px; gap: 6px; letter-spacing: 0; }
  body.hap-ui > header.header .logo a::before { width: 18px; height: 18px; flex-basis: 18px; }
}

/* 触摸设备：去掉 hover 位移（避免"点一下粘住"） */
@media (hover: none) {
  body.hap-ui .post-loop > .item:hover .item-inner { transform: none; box-shadow: var(--hap-sh-1); }
  body.hap-ui .post-loop > .item:hover .item-img img { transform: none; }
  body.hap-ui .wpcom-btn:hover { transform: none; }
}

/* ========================= §15 无障碍与降级 ============================= */
/* 尊重系统"减少动态效果"：关掉所有装饰动画，保留状态变化 */
@media (prefers-reduced-motion: reduce) {
  body.hap-ui *,
  body.hap-ui *::before,
  body.hap-ui *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  body.hap-ui .hap-reveal { opacity: 1; transform: none; }
  body.hap-ui .item-img img, body.hap-ui .hap-sl-thumb img { opacity: 1; }
  body.hap-ui .item-img, body.hap-ui .hap-sl-thumb { animation: none; background: var(--hap-surface-2); }
}

/* 打印：去掉装饰，保证可读 */
@media print {
  body.hap-ui > header.header, body.hap-ui .sidebar, body.hap-ui .action,
  body.hap-ui #hap-ux-toc, body.hap-ui #hap-ux-progress, body.hap-ui .footer { display: none !important; }
  body.hap-ui .entry-content { font-size: 12pt; line-height: 1.6; color: #000; }
  body.hap-ui .entry-content a { color: #000; text-decoration: underline; }
}
