/* 天涯社区示例页 — 自定义类统一 kehua- 前缀 */

:root {
  --kehua-primary: #0056b3;
  --kehua-primary-dark: #004494;
  --kehua-accent: #ff7a18;
  /* 页面大背景：中性浅灰（原冷灰蓝 #e8eef5） */
  --kehua-bg: #ececec;
  --kehua-card: #ffffff;
  --kehua-text: #2c3e50;
  --kehua-muted: #6b7c93;
  --kehua-border: #d8e1ec;
  --kehua-footer-bg: #333333;
  --kehua-footer-text: #bdbdbd;
  --kehua-radius: 8px;
  --kehua-card-pad-y: 16px;
  --kehua-card-pad-x: 18px;
  --kehua-card-head-bg: #eef5ff;
  --kehua-card-head-text: #0066cc;
  --kehua-card-head-icon: #0056b3;
  --kehua-card-head-border: #444444;
  --kehua-shadow: 0 2px 12px rgba(0, 40, 100, 0.08);
  /* 版心 1299；侧栏各 331 固定时中间栏 flex 收缩（内宽约 1267 = 1299 - 32 padding） */
  --kehua-max: 1299px;
  --kehua-layout-gap: 20px;
  --kehua-col-left: 331px;
  --kehua-col-right: 331px;
  --kehua-col-center: 686px;
}

/* 桌面端：页面大背景由 #ececec 改为 #f5f6f8（与 style.css --color-bg 对齐）；窄屏仍用 :root 中的 #ececec */
@media (min-width: 769px) {
  :root {
    --kehua-bg: #f5f6f8;
  }

  .kehua-auth-main {
    background:
      radial-gradient(ellipse 85% 60% at 15% 10%, rgba(0, 86, 179, 0.07) 0%, transparent 55%),
      radial-gradient(ellipse 70% 50% at 90% 85%, rgba(255, 122, 24, 0.06) 0%, transparent 50%),
      linear-gradient(180deg, #e6ebf2 0%, #f5f6f8 35%, #eaeef4 100%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 搜索路由：避免继承 style.css 旧规则；整页通栏，版心由 .kehua-container */
body.kehua-body.kehua-search-page {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.kehua-body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--kehua-text);
}

.kehua-container {
  width: 100%;
  max-width: var(--kehua-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* 压过 style.css 的 .kehua-header-inner（max-width:1250、padding:20px），与正文 .kehua-container 严格同宽同边距；避免弹窗/重排后顶栏与主版心左右不对齐 */
body.kehua-body .kehua-site-header .kehua-container {
  max-width: var(--kehua-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* ----- Header ----- */
.kehua-site-header {
  background: var(--kehua-primary);
  color: #fff;
  box-shadow: var(--kehua-shadow);
}

.kehua-header-bar {
  padding: 14px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* 顶栏：左 Logo / 中搜索 / 右操作；中间列用 minmax 封顶宽度，避免 auto+固定宽在视口/滚动条变化时把两侧 1fr 挤向中间 */
.kehua-site-header .kehua-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.kehua-site-header .kehua-header-slot--left {
  justify-self: start;
  min-width: 0;
}

.kehua-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.kehua-brand-icon {
  font-size: 1.6rem;
}

.kehua-brand--logo .kehua-brand-img {
  display: block;
  max-height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.kehua-site-header .kehua-search-wrap {
  display: flex;
  flex: none;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  justify-self: stretch;
}

.kehua-search-input {
  flex: 1;
  border: none;
  border-radius: var(--kehua-radius) 0 0 var(--kehua-radius);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  min-width: 0;
}

.kehua-search-btn {
  border: none;
  background: var(--kehua-accent);
  color: #fff;
  padding: 0 18px;
  border-radius: 0 var(--kehua-radius) var(--kehua-radius) 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.kehua-search-btn:hover {
  filter: brightness(1.05);
}

.kehua-site-header .kehua-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 0;
  justify-self: end;
}

/* 天涯顶栏深色背景：仅头像 + 悬停菜单（结构同主顶栏） */
.kehua-site-header .kehua-header-user-pop {
  position: relative;
  z-index: 20;
}

.kehua-site-header .kehua-user-avatar--signed {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.kehua-site-header .kehua-user-avatar--signed:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* 顶栏签到、消息（与个人中心入口一致；深色条上用浅色图标） */
.kehua-site-header .kehua-site-header-icon-btn {
  color: rgba(255, 255, 255, 0.92);
}

.kehua-site-header .kehua-site-header-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}



.kehua-link-action {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kehua-link-action:hover {
  text-decoration: underline;
}

.kehua-nav-bar {
  background: var(--kehua-primary-dark);
}

/* 电脑端：须在上方 .kehua-site-header / .kehua-nav-bar 背景声明之后，否则同优先级会被后文覆盖而「看不出变化」 */
@media (min-width: 768px) {
  .kehua-site-header,
  .kehua-nav-bar {
    background: #0066cd;
  }
}

.kehua-nav-inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 隐藏滚动条（保留触摸板/拖拽滚动），避免导航栏右侧出现白条控件 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kehua-nav-inner::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.kehua-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  min-height: 44px;
  align-items: stretch;
}

.kehua-nav-item {
  position: relative;
  flex-shrink: 0;
}

.kehua-site-header .kehua-nav-bar .kehua-has-dropdown:hover,
.kehua-site-header .kehua-nav-bar .kehua-has-dropdown:focus-within {
  z-index: 5;
}

.kehua-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  height: 100%;
  white-space: nowrap;
}

.kehua-site-header .kehua-nav-bar .kehua-nav-link:visited,
.kehua-site-header .kehua-nav-bar .kehua-nav-link:active {
  color: #fff;
}

.kehua-nav-link--active,
.kehua-nav-link:hover,
.kehua-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.kehua-has-dropdown .kehua-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  left: 0;
  top: calc(100% + 2px);
  min-width: 196px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dde4ee;
  border-radius: var(--kehua-radius);
  box-shadow: 0 10px 32px rgba(0, 40, 100, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 500;
  pointer-events: none;
  -webkit-overflow-scrolling: touch;
}

/* 主导航条与面板之间留缝时仍保持悬停命中（含移入子菜单过程） */
.kehua-site-header .kehua-nav-bar .kehua-has-dropdown .kehua-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

/* 小屏：仅点击展开（由 JS 加 .kehua-is-open） */
.kehua-has-dropdown.kehua-is-open .kehua-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.kehua-dropdown-menu li {
  margin: 0;
  list-style: none;
}

.kehua-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: var(--kehua-text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.kehua-dropdown-menu a:hover,
.kehua-dropdown-menu a.kehua-dropdown-link--active {
  background: #eef5ff;
  color: var(--kehua-primary);
}

.kehua-dropdown-menu a.kehua-dropdown-link--active {
  font-weight: 600;
}

/* 天涯顶栏主导航：下拉触发器与文字链视觉一致 */
.kehua-site-header .kehua-nav-bar .kehua-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  text-align: left;
  color: #fff;
}

.kehua-site-header .kehua-nav-bar .kehua-dropdown-toggle i {
  font-size: 1.05rem;
  opacity: 0.88;
}

/* 窄屏：天涯首页/发现/阅读/板块/搜索/个人中心/作者主页 与发帖/编帖（body.kehua-post-editor-tianya-header）一致使用 .kehua-header；宽屏仍用天涯站点顶栏 */
.kehua-classic-header-slot--mobile {
  display: none;
}

@media (max-width: 992px) {
  body.kehua-dual-topnav-mobile .kehua-site-header-slot--desktop {
    display: none !important;
  }

  body.kehua-dual-topnav-mobile .kehua-classic-header-slot--mobile {
    display: block;
  }
}

/* 发帖/编帖：与双顶栏相同的窄屏切换，但不加 body.kehua-dual-topnav-mobile，以免手机主区顶距被改写 */
@media (max-width: 992px) {
  body.kehua-post-editor-tianya-header .kehua-site-header-slot--desktop {
    display: none !important;
  }

  body.kehua-post-editor-tianya-header .kehua-classic-header-slot--mobile {
    display: block;
  }
}

@media (min-width: 993px) {
  /* 天涯站点顶栏在文档流，勿再叠 style 为 fixed .kehua-header 预留的 header-h */
  body.kehua-post-editor-tianya-header.kehua-body .kehua-layout-shell > .kehua-layout {
    padding-top: 24px;
  }
}

/*
 * 双顶栏窄屏：仅余 fixed .kehua-header，原「天涯顶栏在文档流」假设下的 16px/24px 顶距会被遮挡。
 * 天涯首页手机 Tab 需紧贴顶栏：此处只用 --header-h + 安全区，勿加 --top-gap（否则会露出 body 灰底一条）。
 * 其它路由仍与 style.css .kehua-layout 一致用 --top-gap。
 */
@media (max-width: 992px) {
  body.kehua-dual-topnav-mobile.kehua-tianya-home .kehua-container.kehua-layout {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
  }

  body.kehua-dual-topnav-mobile.kehua-tianya-home .kehua-thread-list-main > .kehua-container--forum-thread {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
  }

  /* 勿叠全局 .kehua-main 的 24px 顶距：fixed 顶栏占位已在 .kehua-container，再垫一层会露出 body 灰底 */
  body.kehua-dual-topnav-mobile.kehua-tianya-home .kehua-main {
    padding-top: 0;
  }

  body.kehua-dual-topnav-mobile.kehua-body.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-top: calc(var(--header-h) + var(--top-gap) + env(safe-area-inset-top, 0px)) !important;
  }

  /* 发现页 main 自带 24px 顶距，外层已含顶栏占位后略收紧，避免空白过大 */
  body.kehua-dual-topnav-mobile.kehua-body.kehua-discovery-route .kehua-discover-main {
    padding-top: 16px;
  }

  /* 发现页（手机）：搜索区要紧贴顶栏，去掉 --top-gap 与 main 额外顶距（否则导航栏下露 body 灰底一条） */
  body.kehua-dual-topnav-mobile.kehua-body.kehua-page-discover.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
  }

  body.kehua-dual-topnav-mobile.kehua-body.kehua-page-discover.kehua-discovery-route .kehua-discover-main {
    padding-top: 0;
  }

  /* 阅读页（新版 read-layout + 侧栏 DOM）：对齐固定顶栏占位；勿加 --top-gap（否则导航底与正文之间露 body 灰底一条） */
  body.kehua-dual-topnav-mobile.kehua-page-read.kehua-body:has(.kehua-site-header) .kehua-read-layout:has(> aside.kehua-read-sidebar) {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  body.kehua-dual-topnav-mobile.kehua-page-read.kehua-body:has(.kehua-site-header) .kehua-read-layout:has(> aside.kehua-read-sidebar) main.kehua-main.kehua-post-page {
    padding-top: 0;
  }

  /* 旧版单栏阅读：顶距在 main 上（同上，勿叠 --top-gap） */
  body.kehua-dual-topnav-mobile.kehua-page-read.kehua-body .kehua-read-layout:not(:has(> aside.kehua-read-sidebar)) main.kehua-main.kehua-post-page {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  /* 底栏 Tab：无侧栏阅读页原先未加长底距，末尾正文易被遮住 */
  body.kehua-dual-topnav-mobile.kehua-page-read.kehua-body.kehua-mobile-tabbar-on .kehua-read-layout:not(:has(> aside.kehua-read-sidebar)) {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }

  /* 个人中心（route=my + 天涯顶栏）：与首页相同出 fixed .kehua-header；kehua_my_minimal 天涯版 24px 顶距会在其下被挡 */
  body.kehua-dual-topnav-mobile.kehua-my-route .kehua-my-wrap {
    padding-top: calc(var(--header-h) + var(--top-gap) + env(safe-area-inset-top, 0px));
  }

  /* 用户个人主页 /user-{uid}：原 8px 顶距按文档流顶栏设计，窄屏改为 fixed 顶栏后须让出头图与角标按钮 */
  body.kehua-dual-topnav-mobile.kehua-user-profile-page .kehua-user-profile-wrap {
    padding-top: calc(var(--header-h) + var(--top-gap) + env(safe-area-inset-top, 0px));
  }

  /* 底栏 Tab：略加长底距，避免文末/签名区贴底栏（与 .kehua-layout 移动端 70px 量级对齐） */
  body.kehua-dual-topnav-mobile.kehua-user-profile-page.kehua-mobile-tabbar-on .kehua-user-profile-wrap {
    padding-bottom: calc(28px + 70px + env(safe-area-inset-bottom, 0px));
  }
}

/* 桌面：鼠标移入父级即显示二级菜单；放开 overflow 避免下拉被裁切 */
@media (min-width: 768px) {
  .kehua-site-header .kehua-nav-bar .kehua-nav-list {
    overflow: visible;
  }

  .kehua-nav-inner {
    overflow: visible;
  }

  .kehua-has-dropdown:hover .kehua-dropdown-menu,
  .kehua-has-dropdown:focus-within .kehua-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .kehua-has-dropdown .kehua-dropdown-toggle i {
    transition: transform 0.2s ease;
  }

  .kehua-has-dropdown:hover .kehua-dropdown-toggle i,
  .kehua-has-dropdown:focus-within .kehua-dropdown-toggle i {
    transform: rotate(180deg);
  }
}

@media (max-width: 767px) {
  .kehua-nav-inner {
    overflow-x: auto;
    overflow-y: visible;
  }

  /* 窄屏：未点击展开时，即便有悬停态也不显示（避免误触） */
  .kehua-has-dropdown:hover:not(.kehua-is-open) .kehua-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
  }
}

/* ----- Layout ----- */
.kehua-main {
  padding: 24px 0 40px;
}

.kehua-layout {
  display: flex;
  gap: var(--kehua-layout-gap);
  align-items: flex-start;
  flex-wrap: nowrap;
}

.kehua-col--left {
  flex: 0 0 28%;
  min-width: 0;
  max-width: 320px;
}

.kehua-col--center {
  flex: 1 1 50%;
  min-width: 0;
}

.kehua-col--right {
  flex: 0 0 26%;
  min-width: 0;
}

/* 大屏：左右对称 331px，中间最大 686px；视口变窄时中间栏优先收缩 */
@media (min-width: 1200px) {
  .kehua-col--left {
    flex: 0 0 var(--kehua-col-left);
    width: var(--kehua-col-left);
    max-width: var(--kehua-col-left);
    flex-shrink: 0;
  }

  .kehua-col--center {
    flex: 1 1 var(--kehua-col-center);
    min-width: 0;
    max-width: var(--kehua-col-center);
  }

  .kehua-col--right {
    flex: 0 0 var(--kehua-col-right);
    width: var(--kehua-col-right);
    max-width: var(--kehua-col-right);
    flex-shrink: 0;
  }

  /* 中栏加宽后的版式微调 */
  .kehua-col--center .kehua-card {
    --kehua-card-pad-y: 18px;
    --kehua-card-pad-x: 22px;
  }

  .kehua-hot-rank {
    width: 30px;
    height: 30px;
    font-size: 15px;
    border-radius: 8px;
  }

  /* 必须与 .kehua-hot-list a.kehua-hot-title 同步：单独 .kehua-hot-title 拼不过 style.css 的 .kehua-hot-list a */
  .kehua-hot-list a.kehua-hot-title {
    font-size: 16px;
    line-height: 1.45;
  }

  .kehua-hot-item {
    padding: 14px 0;
  }

  .kehua-article-card {
    gap: 18px;
    padding: 18px 0;
  }

  .kehua-article-thumb {
    width: 80px;
    height: 80px;
  }

  .kehua-article-title {
    font-size: 17px;
    line-height: 1.4;
  }

  .kehua-article-snippet {
    line-height: 1.62;
    font-size: 14px;
  }

  .kehua-article-headline {
    gap: 12px;
  }

  /* 右侧栏与左侧同宽时的版式 */
  .kehua-col--right .kehua-card {
    --kehua-card-pad-y: 18px;
    --kehua-card-pad-x: 20px;
  }

  .kehua-col--right .kehua-user-row {
    gap: 14px;
    padding: 14px 0;
  }

  .kehua-col--right .kehua-user-bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .kehua-col--right .kehua-table th:nth-child(2),
  .kehua-col--right .kehua-table td:nth-child(2),
  .kehua-col--right .kehua-table th:nth-child(3),
  .kehua-col--right .kehua-table td:nth-child(3) {
    text-align: right;
    white-space: nowrap;
  }

  .kehua-col--right .kehua-table th:first-child,
  .kehua-col--right .kehua-table td:first-child {
    padding-right: 8px;
  }
}

/* 天涯首页右栏侧栏图广告：与 .kehua-card 圆角/阴影一致；下边距与同栏 .kehua-card 的 margin-bottom 一致（style.css 对广告写了 margin:0） */
.kehua-col--right .kehua-index-sidebar-ad {
  margin-bottom: 20px;
}
.kehua-col--right .kehua-index-sidebar-ad img {
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
}

/* 右栏友情链接：外壳与「活跃板块」同为 .kehua-card，正文区与表卡内容对齐 */
.kehua-col--right .kehua-card.kehua-widget--index-friendlinks-desktop-only .kehua-friend-links--card {
  padding-top: 2px;
  padding-bottom: 2px;
}

/* ----- Cards ----- */
.kehua-card {
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  padding: var(--kehua-card-pad-y) var(--kehua-card-pad-x);
  margin-bottom: 20px;
  overflow: hidden;
}

/* 板块标题条：浅蓝底、上圆角、底部分隔线（与截图一致） */
.kehua-card-head {
  margin: calc(-1 * var(--kehua-card-pad-y)) calc(-1 * var(--kehua-card-pad-x)) var(--kehua-card-pad-y)
    calc(-1 * var(--kehua-card-pad-x));
  padding: 13px var(--kehua-card-pad-x) 12px;
  background: var(--kehua-card-head-bg);
  border-bottom: 1px solid var(--kehua-card-head-border);
  border-radius: var(--kehua-radius) var(--kehua-radius) 0 0;
}

.kehua-card-head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kehua-card-head--split .kehua-tabs {
  background: transparent;
  box-shadow: none;
}

/* 手机端信息流：仅 Tab 筛选条（无标题） */
.kehua-card-head--mobile-feed-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 14px;
  padding-bottom: 13px;
}

.kehua-tabs--mobile-feed {
  margin: 0;
  padding: 0;
  width: 100%;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  background: transparent;
  box-shadow: none;
}

.kehua-tabs--mobile-feed .kehua-tab {
  flex: 1;
  max-width: 112px;
  border: 1px solid #e1e6ed;
  background: #fff;
  color: #333;
  box-shadow: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.kehua-tabs--mobile-feed .kehua-tab:hover:not(.kehua-tab--active) {
  border-color: var(--kehua-primary);
  color: var(--kehua-primary);
  box-shadow: none;
}

.kehua-tabs--mobile-feed .kehua-tab--active {
  background: var(--kehua-primary);
  border-color: var(--kehua-primary);
  color: #fff;
  box-shadow: none;
}

.kehua-tabs--mobile-feed .kehua-tab--active:hover {
  color: #fff;
  border-color: var(--kehua-primary);
  filter: brightness(1.03);
  box-shadow: none;
}

.kehua-tabs--mobile-feed .kehua-tab--active:focus,
.kehua-tabs--mobile-feed .kehua-tab--active:focus-visible,
.kehua-tabs--mobile-feed .kehua-tab--active:active {
  color: #fff;
}

.kehua-tabs--mobile-feed .kehua-tab--active:focus {
  outline: none;
}

.kehua-tabs--mobile-feed .kehua-tab--active:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .kehua-mobile-feed {
    display: none !important;
  }
}

.kehua-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--kehua-card-head-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kehua-card-title i {
  color: var(--kehua-card-head-icon);
  font-size: 1.15em;
}

.kehua-card-title .kehua-cat-icon-img {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  flex-shrink: 0;
}

.kehua-card-title--hot i,
.kehua-card-title--star i {
  color: var(--kehua-card-head-icon);
}

.kehua-card-more {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid #dde4ee;
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-card-head-text);
  text-decoration: none;
  box-sizing: border-box;
}

.kehua-card-more:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

.kehua-card-more-inline {
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-card-head-text);
  text-decoration: none;
}

.kehua-card-more-inline:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

/* ----- Left: categories ----- */
.kehua-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-cat-item {
  border-bottom: 1px solid #f0f3f7;
}

.kehua-cat-item:last-child {
  border-bottom: none;
}

.kehua-cat-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--kehua-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.kehua-cat-link span:first-of-type {
  flex: 1;
}

.kehua-cat-link i {
  color: var(--kehua-primary);
  font-size: 1.05rem;
}

.kehua-cat-link .kehua-cat-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.kehua-cat-link .kehua-cat-forum-cover {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
}

.kehua-cat-link:hover {
  color: var(--kehua-primary);
}

.kehua-badge {
  font-size: 13px;
  line-height: 1.2;
  background: #e8eaed;
  color: #5a6270;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.kehua-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kehua-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #e8f1ff;
  color: var(--kehua-primary);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
}

.kehua-tag:hover {
  background: #d6e6ff;
}

/* ----- Hot list ----- */
.kehua-hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: kehua-hot;
}

.kehua-hot-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-hot-item:last-child {
  border-bottom: none;
}

.kehua-hot-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 6px;
}

.kehua-hot-title-row .kehua-hot-title {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.kehua-thread-badge {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}

.kehua-thread-badge--rec {
  background: #52c41a;
}

.kehua-thread-badge--essence {
  background: #fa8c16;
}

.kehua-thread-badge--pick {
  background: #fa8c16;
}

/* 与手机首页经典流 .kehua-thread-tag-inline 一致（板块精选 / 今日热门标题前标签） */
.kehua-article-head-main .kehua-thread-tag-inline,
.kehua-hot-title-row .kehua-thread-tag-inline {
  display: inline-block;
  flex-shrink: 0;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: #fff;
  border-radius: 3px;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kehua-article-head-main .kehua-thread-tag-inline--top,
.kehua-hot-title-row .kehua-thread-tag-inline--top {
  background: #ff7a1a;
}

.kehua-article-head-main .kehua-thread-tag-inline--digest,
.kehua-hot-title-row .kehua-thread-tag-inline--digest {
  background: #ea580c;
}

.kehua-article-head-main .kehua-thread-tag-inline--recommend,
.kehua-hot-title-row .kehua-thread-tag-inline--recommend {
  background: #16a34a;
}

.kehua-article-head-main .kehua-thread-tag-inline--hot,
.kehua-hot-title-row .kehua-thread-tag-inline--hot {
  background: #ef4444;
}

.kehua-meta--mobile {
  display: none;
}

@media (min-width: 768px) {
  .kehua-meta--mobile {
    display: none !important;
  }

  /* 今日热门：标题下仅一行 — 作者、阅读、评论 */
  .kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop {
    flex-wrap: nowrap;
  }
}

.kehua-hot-rank {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  /* 默认与第 4 名及之后一致：浅灰底深字（不再用主题蓝） */
  background: #e8eaed;
  color: #5a6270;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kehua-hot-item:nth-child(1) .kehua-hot-rank {
  background: #ff6b35;
  color: #fff;
}

.kehua-hot-item:nth-child(2) .kehua-hot-rank {
  background: #ff9f43;
  color: #fff;
}

.kehua-hot-item:nth-child(3) .kehua-hot-rank {
  background: #f4b400;
  color: #fff;
}

.kehua-hot-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.kehua-hot-title {
  display: block;
  color: var(--kehua-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* style.css 中 .kehua-hot-list a 含 font-size:14px、display:flex，须用更高特异性覆盖字号与布局（否则标题永远 14px） */
.kehua-hot-list a.kehua-hot-title {
  display: block;
  align-items: unset;
  gap: unset;
  min-width: 0;
  font-size: 15px;
  line-height: 1.4;
}

.kehua-hot-title:hover {
  color: var(--kehua-primary);
}

.kehua-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--kehua-muted);
}

.kehua-meta i {
  margin-right: 4px;
  vertical-align: -2px;
}

/* ----- Tabs & articles ----- */
.kehua-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.kehua-tab {
  border: none;
  background: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--kehua-muted);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 3px rgba(0, 50, 100, 0.08);
}

/* 仅未选中 Tab 悬停变色；避免 :hover 盖过 .kehua-tab--active 导致蓝底蓝字 */
.kehua-tab:hover:not(.kehua-tab--active) {
  color: var(--kehua-primary);
  box-shadow: 0 2px 6px rgba(0, 50, 100, 0.1);
}

.kehua-tab--active {
  background: var(--kehua-primary);
  color: #fff;
  box-shadow: none;
}

.kehua-tab--active:hover {
  color: #fff;
  filter: brightness(1.03);
}

/* 点击/聚焦时保持白字，避免浏览器默认或 :focus 把字变成蓝/深色 */
.kehua-tab--active:focus,
.kehua-tab--active:focus-visible,
.kehua-tab--active:active {
  color: #fff;
}

.kehua-tab--active:focus {
  outline: none;
}

.kehua-tab--active:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.kehua-panel--hidden {
  display: none !important;
}

.kehua-article-card {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-article-card:last-of-type {
  border-bottom: none;
}

.kehua-article-thumb {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e8ecf0;
}

.kehua-article-thumb--has-img {
  background: none !important;
  overflow: hidden;
}

.kehua-article-thumb--has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.kehua-article-main {
  min-width: 0;
  flex: 1;
}

.kehua-article-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.kehua-article-head-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.kehua-article-head-main .kehua-article-title {
  flex: 1;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kehua-article-title {
  color: var(--kehua-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
}

.kehua-article-title:hover {
  color: var(--kehua-primary);
}

.kehua-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  padding: 3px 9px;
  border-radius: 4px;
  background: #eef4ff;
  color: var(--kehua-primary);
  white-space: nowrap;
}

a.kehua-pill {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

a.kehua-pill:hover {
  background: #dce8ff;
  color: var(--kehua-accent);
}

.kehua-article-snippet {
  margin: 0 0 10px;
  color: var(--kehua-muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 板块精选摘要：进详情，视觉保持灰色（非默认链接色 / 已访问不变色） */
a.kehua-article-snippet {
  text-decoration: none;
  cursor: pointer;
}
a.kehua-article-snippet:link,
a.kehua-article-snippet:visited,
a.kehua-article-snippet:hover,
a.kehua-article-snippet:active {
  color: var(--kehua-muted);
}
a.kehua-article-snippet:focus {
  outline: none;
}
a.kehua-article-snippet:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.22);
  outline-offset: 2px;
}

.kehua-article-footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--kehua-muted);
}

.kehua-article-foot-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.kehua-article-foot-stats {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 14px;
  margin-left: auto;
}

.kehua-article-crown {
  display: none;
  color: #ff4d4f;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.kehua-author {
  font-weight: 400;
  color: var(--kehua-muted);
}

.kehua-author--vip {
  color: #ff4d4f;
}

.kehua-stat i {
  margin-right: 4px;
  vertical-align: -2px;
}

.kehua-load-more {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--kehua-border);
  border-radius: var(--kehua-radius);
  background: #fafcfe;
  color: var(--kehua-primary);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.kehua-load-more:hover {
  background: #f0f5fb;
}

.kehua-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ----- Right column ----- */
.kehua-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-user-row:last-child {
  border-bottom: none;
}

.kehua-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #adb5bd, #868e96);
}

.kehua-avatar--a {
  background: linear-gradient(145deg, #74c0fc, #339af0);
}

.kehua-avatar--b {
  background: linear-gradient(145deg, #b197fc, #7950f2);
}

.kehua-avatar--c {
  background: linear-gradient(145deg, #ff922b, #fd7e14);
}

.kehua-avatar--sm {
  width: 28px;
  height: 28px;
}

.kehua-avatar--mod {
  background: linear-gradient(145deg, #94a3b8, #64748b);
}

.kehua-avatar--has-img {
  background: none !important;
  overflow: hidden;
  padding: 0;
}

.kehua-avatar--has-img > .kehua-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.kehua-thread-row--empty {
  border-bottom: none !important;
  background: transparent !important;
}

.kehua-user-info {
  flex: 1;
  min-width: 0;
}

.kehua-user-name {
  font-weight: 700;
  font-size: 14px;
}

.kehua-user-bio {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--kehua-muted);
  line-height: 1.35;
}

.kehua-user-celeb-stats {
  margin: 4px 0 0;
  padding: 0;
  font-size: 12px;
  color: var(--kehua-muted);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
}

.kehua-user-celeb-stats__sep {
  color: #cbd5e1;
  user-select: none;
}

.kehua-btn-follow {
  flex-shrink: 0;
  border: 1px solid var(--kehua-primary);
  color: var(--kehua-primary);
  background: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

a.kehua-btn-follow {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.kehua-btn-follow:hover {
  background: #eef4ff;
}

button.kehua-btn-follow {
  font-family: inherit;
}

.kehua-btn-follow--self {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  border-color: #ced4da;
  color: var(--kehua-muted);
  background: #f8f9fa;
}

.kehua-btn-follow--followed {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
  border-color: #ced4da;
  color: var(--kehua-muted);
  background: #f8f9fa;
}

a.kehua-article-thumb {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.kehua-user-name a {
  color: inherit;
  text-decoration: none;
}

.kehua-user-name a:hover {
  color: var(--kehua-primary);
}

a.kehua-avatar.kehua-celeb-avatar--has-img {
  text-decoration: none;
  color: inherit;
}

.kehua-hot-user-link {
  color: inherit;
  text-decoration: none;
  display: inline;
}

.kehua-hot-user-link:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

/* 今日热门桌面端：人物图标与昵称强制同一行（链接触发块级或 100% 宽时不应挤到下一行） */
.kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop .kehua-hot-meta-user {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
}

.kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop .kehua-hot-meta-user > i {
  flex-shrink: 0;
}

.kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop .kehua-hot-meta-user .kehua-hot-user-link,
.kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop .kehua-hot-meta-user .kehua-hot-user-txt {
  min-width: 0;
  color: var(--kehua-muted);
}

.kehua-card[aria-labelledby="kehua-hot-title"] .kehua-meta--desktop .kehua-hot-meta-user .kehua-hot-user-link:hover {
  color: var(--kehua-primary);
}

.kehua-article-footer a.kehua-author {
  text-decoration: none;
  color: inherit;
}

.kehua-article-footer a.kehua-author:hover {
  color: var(--kehua-primary);
}

.kehua-user-row--empty {
  justify-content: center;
  padding: 16px 0;
}
.kehua-user-row--empty .kehua-user-bio {
  margin: 0;
  text-align: center;
}

.kehua-table-wrap {
  overflow-x: auto;
}

.kehua-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.kehua-table th,
.kehua-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-table th {
  color: var(--kehua-muted);
  font-weight: 600;
}

/* ----- Footer ----- */
.kehua-footer {
  background: var(--kehua-footer-bg);
  color: var(--kehua-footer-text);
  padding-top: 36px;
}

.kehua-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
  padding-bottom: 28px;
}

.kehua-footer-heading {
  margin: 0 0 14px;
  color: #fff;
  font-size: 15px;
}

.kehua-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-footer-links li {
  margin-bottom: 8px;
}

.kehua-footer-links a {
  color: var(--kehua-footer-text);
  text-decoration: none;
  font-size: 14px;
}

.kehua-footer-links a:hover {
  color: #fff;
}

.kehua-social {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.kehua-social-link {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
}

.kehua-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.kehua-social-link--nohref {
  cursor: default;
  pointer-events: none;
}

.kehua-footer-social-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.kehua-contact {
  margin: 6px 0 0;
  font-size: 13px;
}

.kehua-footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 24px;
  text-align: center;
  font-size: 13px;
  color: #888;
}

.kehua-footer-copy p {
  margin: 0;
}

/* ----- Responsive ----- */
@media (min-width: 768px) and (max-width: 1199px) {
  .kehua-col--left {
    flex: 0 0 260px;
    max-width: 300px;
  }

  .kehua-col--center {
    flex: 1 1 48%;
    min-width: 0;
  }

  .kehua-col--right {
    flex: 0 0 240px;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .kehua-site-header .kehua-header-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .kehua-site-header .kehua-search-wrap {
    max-width: none;
    width: 100%;
    order: 3;
    justify-self: stretch;
  }

  .kehua-site-header .kehua-header-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .kehua-layout {
    flex-direction: column;
  }

  .kehua-col--left,
  .kehua-col--center,
  .kehua-col--right {
    flex: 1 1 auto;
    width: 100%;
  }

  /* 手机端隐藏左栏：板块分类、热门标签 */
  .kehua-col--left {
    display: none !important;
  }

  /* 手机端隐藏整站顶栏（品牌/搜索/登录注册 + 主导航） */
  .kehua-site-header {
    display: none !important;
  }

  /* 手机端隐藏页脚（链接区、联系方式、版权条） */
  .kehua-footer {
    display: none !important;
  }

  /* 手机端隐藏：今日热门、板块精选（含 Tab、列表、加载更多）、天涯名人 */
  .kehua-card[aria-labelledby="kehua-hot-title"],
  .kehua-card[aria-labelledby="kehua-featured-title"],
  .kehua-card[aria-labelledby="kehua-user-title"] {
    display: none !important;
  }

  /* ----- 今日热门 / 手机「发现」列表（手机端）：标题行 + 底栏元信息 ----- */
  .kehua-hot-rank {
    display: none !important;
  }

  .kehua-hot-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom-color: #f0f0f0;
  }

  .kehua-hot-list a.kehua-hot-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kehua-meta--desktop {
    display: none !important;
  }

  .kehua-meta--mobile {
    display: flex;
    align-items: center;
    align-self: stretch;
    width: 100%;
    gap: 8px;
    font-size: 12px;
    color: #999;
  }

  .kehua-meta--mobile i {
    margin-right: 3px;
    vertical-align: -2px;
    color: #bbb;
  }

  .kehua-mobile-meta-start {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1 1 0;
  }

  .kehua-mobile-meta-start .kehua-mobile-posted {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kehua-mobile-author {
    flex-shrink: 0;
    font-weight: 500;
    color: #999;
  }

  a.kehua-mobile-author {
    text-decoration: none;
  }

  a.kehua-mobile-author:not(.kehua-mobile-author--vip):hover {
    color: var(--kehua-primary);
  }

  .kehua-mobile-author--vip {
    color: #ff4d4f;
  }

  .kehua-mobile-crown {
    flex-shrink: 0;
    color: #ff4d4f;
    font-size: 14px;
    line-height: 1;
  }

  .kehua-mobile-meta-end {
    flex-shrink: 0;
    margin-left: auto;
    text-align: right;
  }

  .kehua-mobile-replies {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #999;
    font-variant-numeric: tabular-nums;
  }

  .kehua-article-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom-color: #f0f0f0;
  }

  .kehua-article-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }

  .kehua-article-headline {
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 8px;
  }

  .kehua-article-head-main {
    align-items: center;
    min-width: 0;
  }

  .kehua-pill {
    display: none;
  }

  .kehua-article-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kehua-article-snippet {
    display: none;
  }

  .kehua-article-footer {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
  }

  .kehua-article-foot-cluster {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
  }

  .kehua-article-foot-stats {
    display: flex;
    flex-shrink: 0;
    align-items: center;
  }

  .kehua-stat--views,
  .kehua-stat--likes {
    display: none !important;
  }

  .kehua-author--vip {
    flex-shrink: 0;
  }

  .kehua-article-footer .kehua-author:not(.kehua-author--vip) {
    color: #999;
    font-weight: 400;
  }

  .kehua-article-footer .kehua-date {
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kehua-article-footer .kehua-date::before {
    content: "发表于 ";
  }

  .kehua-author--vip + .kehua-article-crown {
    display: inline-block;
  }

  .kehua-stat--replies {
    margin: 0;
    display: inline-flex;
    align-items: center;
    color: #999;
  }

  .kehua-stat--replies i {
    color: #bbb;
    margin-right: 3px;
  }

  .kehua-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 479px) {
  .kehua-footer-grid {
    grid-template-columns: 1fr;
  }

  .kehua-tabs {
    width: 100%;
    justify-content: center;
  }
}

/* ----- 帖子详情页 ----- */
.kehua-post-page .kehua-main,
main.kehua-main.kehua-post-page {
  padding-top: 16px;
}

/* 阅读页：仅旧版「侧栏在 main 内的 .kehua-post-layout」时，read-layout 用 block，避免外层 flex 双列挤压 */
/* 新版 thread.htm：aside.kehua-read-sidebar 与 main 并列于 .kehua-read-layout 下，须保留 style.css 的 flex，否则侧栏会落到主栏下方 */
/* 天涯顶栏为文档流（非 fixed），勿再叠加 style.css 的 header-h+top-gap，与首页 .kehua-main 顶距一致 */
body.kehua-page-read.kehua-body .kehua-read-layout:not(:has(> aside.kehua-read-sidebar)) {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 40px;
  box-sizing: border-box;
}

body.kehua-page-read.kehua-body main.kehua-main.kehua-post-page {
  padding-top: 24px;
  padding-bottom: 40px;
}

body.kehua-page-read.kehua-body .kehua-read-layout:not(:has(> aside.kehua-read-sidebar)) > main.kehua-read-main {
  width: 100%;
  max-width: 100%;
}

/* 天涯站点顶栏（.kehua-site-header 文档流）：新版阅读页 main+侧栏 与首页 .kehua-container.kehua-layout 同版心（1299 + 左右 16px + gap 20px）；顶距用 24px（与同页 main.kehua-post-page 节奏一致），勿再用 style 的 header-h+top-gap */
body.kehua-page-read.kehua-body:has(.kehua-site-header) .kehua-read-layout:has(> aside.kehua-read-sidebar) {
  max-width: var(--kehua-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding-top: 24px;
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 40px;
  gap: var(--kehua-layout-gap);
}

@media (min-width: 993px) {
  /* 天涯顶栏在文档流：top 与 .kehua-read-layout 顶距对齐；sticky 行为对齐 plugin/theme .kehua-sidebar-right */
  body.kehua-page-read.kehua-body:has(.kehua-site-header) aside.kehua-read-sidebar {
    width: var(--kehua-col-right);
    position: sticky;
    top: 24px;
    align-self: flex-start;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
  }

  /* 左侧互动条：与新版心 --kehua-max 对齐，顶距随文档流顶栏（非固定 64px） */
  body.kehua-page-read.kehua-body:has(.kehua-site-header) .kehua-article-rail {
    top: 24px;
    --kehua-ar-left: max(8px, calc((100vw - min(var(--kehua-max), calc(100vw - 32px))) / 2 - var(--kehua-layout-gap) - 52px));
  }
}

@media (max-width: 768px) {
  /* 阅读页：白底通栏左右贴边（与 style.css 正文/评论区 border-radius:0 配套）；顶距与固定导航贴齐，勿用 16px 小块垫高 */
  body.kehua-page-read.kehua-body:has(.kehua-site-header) .kehua-read-layout:has(> aside.kehua-read-sidebar) {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    padding-bottom: 28px;
    padding-left: 0;
    padding-right: 0;
  }

  body.kehua-page-read.kehua-body.kehua-mobile-tabbar-on:has(.kehua-site-header) .kehua-read-layout:has(> aside.kehua-read-sidebar) {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }
}

.kehua-post-author-avatar.kehua-post-author-avatar--has-img {
  background: none;
  overflow: hidden;
  display: block;
}

.kehua-post-author-avatar.kehua-post-author-avatar--has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.kehua-comment-avatar.kehua-comment-avatar--has-img {
  background: none;
  overflow: hidden;
}

.kehua-comment-avatar.kehua-comment-avatar--has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.kehua-breadcrumb {
  margin-bottom: 16px;
}

.kehua-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--kehua-muted);
}

.kehua-breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #b8c4d6;
  pointer-events: none;
}

.kehua-breadcrumb-item a {
  color: var(--kehua-primary);
  text-decoration: none;
}

.kehua-breadcrumb-item a:hover {
  text-decoration: underline;
}

.kehua-breadcrumb-item--current {
  color: var(--kehua-text);
  font-weight: 600;
}

.kehua-post-layout {
  display: flex;
  gap: var(--kehua-layout-gap);
  align-items: flex-start;
  width: 100%;
}

/* 与首页同一容器宽度：主栏占满剩余空间，侧栏与首页右栏同宽 */
.kehua-post-primary {
  flex: 1 1 0;
  min-width: 0;
}

.kehua-post-aside {
  flex: 0 0 var(--kehua-col-right);
  width: var(--kehua-col-right);
  max-width: var(--kehua-col-right);
  min-width: 0;
}

/* 帖子详情侧栏：统一纵向栈 + gap，避免 max-width:991 时 grid 双列在弹窗开关后因视口宽度抖动而错位 */
body.kehua-page-read main.kehua-post-page .kehua-post-aside {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
}

/*
 * 右侧固定竖条（.kehua-layout-rail）在 style.css 里按 max-width:1250 的版心右缘 + gap 定位；
 * 帖子详情天涯壳子为 .kehua-container（--kehua-max 1299 + 左右各 16px 内边距），若仍用 1250 算，
 * 竖条会比真实内容区右缘偏左约 24px，与 331px 侧栏叠加后只剩个位数像素缝（其它页无此组合故正常）。
 * 此处用与容器一致的几何：内区右缘 = 版心右边界 − 16px，再 + --kehua-layout-gap。
 */
@media (min-width: 993px) {
  body.kehua-page-read.kehua-body:has(.kehua-post-layout) .kehua-layout-shell > .kehua-layout-rail {
    --kehua-rail-left: calc(
      (100vw + min(var(--kehua-max), calc(100vw - 48px))) / 2 - 16px + var(--kehua-layout-gap)
    );
    left: min(var(--kehua-rail-left), calc(100vw - 58px));
  }
}

.kehua-post-card {
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  padding: 28px 32px 24px;
  margin-bottom: 20px;
}

.kehua-post-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8ecf2;
}

.kehua-post-title {
  margin: 0 0 16px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--kehua-text);
}

.kehua-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 13px;
  color: var(--kehua-muted);
  margin-bottom: 14px;
}

.kehua-post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kehua-post-meta-item a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-post-meta-item a:hover {
  text-decoration: underline;
}

/* 帖子详情页：覆盖 style.css 中列表卡片的 .kehua-post-header / .kehua-post-meta（避免标题与 meta 左右分列、meta 纵向堆叠） */
.kehua-post-page .kehua-post-card .kehua-post-header {
  display: block;
  align-items: stretch;
}

.kehua-post-page .kehua-post-card .kehua-post-title {
  margin: 0 0 12px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.35;
}

.kehua-post-page .kehua-post-card .kehua-post-meta {
  flex: none;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px 20px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.kehua-post-page .kehua-post-card .kehua-post-meta::-webkit-scrollbar {
  height: 4px;
}

.kehua-post-page .kehua-post-card .kehua-post-meta-item {
  flex-shrink: 0;
  white-space: nowrap;
}

.kehua-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kehua-post-taglink {
  font-size: 12px;
  color: var(--kehua-primary);
  text-decoration: none;
  font-weight: 600;
}

.kehua-post-taglink:hover {
  text-decoration: underline;
}

.kehua-post-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--kehua-text);
}

.kehua-post-body p {
  margin: 0 0 1.1em;
}

.kehua-post-body strong {
  font-weight: 700;
  color: var(--kehua-text);
}

.kehua-post-quote {
  margin: 1.25em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--kehua-primary);
  background: #f4f8fc;
  color: var(--kehua-muted);
  font-size: 15px;
  line-height: 1.7;
}

.kehua-post-list {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.kehua-post-list li {
  margin-bottom: 0.45em;
}

.kehua-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e8ecf2;
}

/* 阅读页正文下已有 .kehua-article-actions 顶栏，勿叠加天涯帖子卡条目的边距/分割线 */
body.kehua-page-read .kehua-article-actions .kehua-post-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-wrap: nowrap;
  justify-content: center;
}

.kehua-post-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--kehua-radius);
  background: #f0f4fa;
  color: var(--kehua-text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.kehua-post-action:hover {
  background: #e2eafc;
}

.kehua-post-action--link {
  margin-left: auto;
  background: transparent;
  color: var(--kehua-muted);
}

.kehua-post-action--link:hover {
  background: #f5f5f5;
  color: var(--kehua-text);
}

.kehua-post-like.kehua-is-liked,
.kehua-post-like.kehua-liked {
  background: #e8f1ff;
  color: var(--kehua-primary);
}

.kehua-post-action.js-kehua-favorite.kehua-favorited {
  background: #fff8e6;
  color: #c27803;
}

.kehua-post-like-count {
  font-weight: 700;
}

.kehua-post-comment-count {
  font-weight: 500;
  font-size: 14px;
  color: var(--kehua-muted);
}

.kehua-comment-form {
  padding: 0 0 16px;
  margin: 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-comment-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--kehua-border);
  border-radius: var(--kehua-radius);
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 96px;
}

.kehua-comment-textarea:focus {
  outline: none;
  border-color: var(--kehua-primary);
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.12);
}

.kehua-comment-form-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.kehua-comment-submit {
  padding: 8px 22px;
  border: none;
  border-radius: var(--kehua-radius);
  background: var(--kehua-primary);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.kehua-comment-submit:hover {
  filter: brightness(1.05);
}

.kehua-comment-list {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
}

.kehua-comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-comment-item:last-child {
  border-bottom: none;
}

.kehua-comment-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #74c0fc, #339af0);
}

.kehua-comment-avatar--b {
  background: linear-gradient(145deg, #b197fc, #7950f2);
}

.kehua-comment-body {
  flex: 1;
  min-width: 0;
}

.kehua-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 8px;
  font-size: 13px;
}

.kehua-comment-author {
  font-weight: 700;
  color: var(--kehua-text);
}

.kehua-comment-floor {
  color: var(--kehua-muted);
}

.kehua-comment-time {
  color: #9aa8bc;
  font-size: 12px;
}

.kehua-comment-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--kehua-text);
}

.kehua-comment-foot {
  margin-top: 8px;
}

.kehua-comment-reply {
  padding: 0;
  border: none;
  background: none;
  color: var(--kehua-primary);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.kehua-comment-reply:hover {
  text-decoration: underline;
}

.kehua-post-comments .kehua-load-more {
  margin-top: 12px;
}

.kehua-post-author-body {
  padding: 4px 0 8px;
}

.kehua-post-author-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #74c0fc, #339af0);
}

.kehua-post-author-name {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--kehua-text);
}

.kehua-post-author-name a {
  color: inherit;
  text-decoration: none;
}

.kehua-post-author-name a:hover {
  color: var(--kehua-accent);
  text-decoration: underline;
}

.kehua-post-author-bio {
  text-align: center;
  margin: 0 0 14px;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kehua-muted);
}

/* 作者栏：主题 / 回帖 / 积分 */
.kehua-author-stats {
  display: flex;
  align-items: stretch;
  margin: 0 calc(-1 * var(--kehua-card-pad-x));
  padding: 10px var(--kehua-card-pad-x) 14px;
}

.kehua-author-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 0 6px;
}

.kehua-author-stat:not(:last-child) {
  border-right: 1px solid #e8ecf2;
}

.kehua-author-stat-label {
  font-size: 12px;
  color: var(--kehua-muted);
  line-height: 1.2;
}

.kehua-author-stat-value {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

/* 已关注 + 发消息 */
.kehua-author-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 18px;
}

.kehua-author-btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  height: auto;
  line-height: 1.25;
  box-sizing: border-box;
  }

.kehua-author-btn:hover {
  filter: brightness(1.06);
}

.kehua-author-btn--follow {
  background: #3071f2;
}

.kehua-author-btn--message {
  background: #ff6951;
}

/* 覆盖 style.css 中 height/line-height:36px，避免与内层 .haya-follow-btn 叠加后文字下沉 */
body.kehua-body .kehua-post-aside .kehua-author-actions .kehua-author-btn,
body.kehua-body .kehua-post-author-body .kehua-author-actions .kehua-author-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 40px;
  padding: 0 12px;
  line-height: 1.25;
}

body.kehua-body .kehua-post-aside .kehua-author-actions .kehua-author-btn .haya-follow-btn {
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}

/* 作者近期发帖 */
.kehua-author-posts {
  text-align: left;
}

.kehua-author-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-author-post-item {
  padding: 12px 0;
  border-bottom: 1px dashed #cfd8e3;
}

.kehua-author-post-item:last-of-type {
  border-bottom: none;
}

.kehua-author-post-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.45;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kehua-author-post-title:hover {
  color: var(--kehua-primary);
}

.kehua-author-post-time {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #9aa8bc;
}

.kehua-author-posts-more {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-size: 13px;
  color: #9aa8bc;
  text-decoration: none;
}

.kehua-author-posts-more:hover {
  color: var(--kehua-primary);
}

.kehua-author-posts-more i {
  vertical-align: -2px;
}

.kehua-post-related {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-post-related li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f3f7;
  font-size: 14px;
  line-height: 1.45;
}

.kehua-post-related li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.kehua-post-related a {
  color: var(--kehua-text);
  text-decoration: none;
}

.kehua-post-related a:hover {
  color: var(--kehua-primary);
}

/* 阅读页侧栏广告：无卡片区背景，宽度与侧栏 .kehua-card 通栏一致 */
.kehua-post-aside .kehua-thread-sidebar-ad {
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: none;
  box-shadow: none !important;
  border-radius: var(--kehua-radius);
  overflow: hidden;
  line-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.kehua-post-aside .kehua-thread-sidebar-ad a {
  display: block;
  line-height: 0;
}

.kehua-post-aside .kehua-thread-sidebar-ad img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--kehua-radius);
  vertical-align: top;
}

.kehua-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .kehua-post-aside {
    flex: 0 0 240px;
    width: 240px;
    max-width: 240px;
  }
}

/* 搜索结果页 body.kehua-search-page 需保持主栏+侧栏横排（与修罗 search 双列一致），不可套用下列「平板叠栏」 */
@media (max-width: 991px) {
  body:not(.kehua-search-page) .kehua-post-layout {
    flex-direction: column;
  }

  body:not(.kehua-search-page) .kehua-post-aside {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .kehua-post-aside {
    display: none !important;
  }

  .kehua-post-card {
    padding: 20px 18px 18px;
  }

  .kehua-post-title {
    font-size: 1.35rem;
  }

  .kehua-post-action--link {
    margin-left: 0;
  }

  .kehua-post-actions {
    justify-content: flex-start;
  }
}

/* ----- 发现页：全部版块（修罗 discover 版式） ----- */
/* 顶/底留白与首页 main.kehua-main 一致（kehua_tianya .kehua-main：24px 0 40px）；勿再叠 header-h */
.kehua-discover-main {
  padding: 24px 0 40px;
  box-sizing: border-box;
}

body.kehua-discovery-route .kehua-layout .kehua-main.kehua-discover-main,
body.kehua-body.kehua-discovery-route main.kehua-main.kehua-discover-main {
  max-width: none !important;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

/* 发现页：主栏与顶栏、主导航共用同一版心；上下留白对齐首页三栏容器 */
body.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
  max-width: var(--kehua-max);
  padding-left: 16px;
  padding-right: 16px;
}

body.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
  padding-top: 0 !important;
  /* 底部留白由 .kehua-discover-main 与首页 .kehua-main 一致承担，避免与 main 的 40px 重复 */
  padding-bottom: 0;
}

@media (max-width: 768px) {
  body.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-top: 16px !important;
    padding-bottom: 28px;
  }

  /* 发现入口页：勿叠 16px 顶距（无固定顶栏占位时也与搜索工具栏贴紧） */
  body.kehua-page-discover.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-top: 0 !important;
  }

  body.kehua-mobile-tabbar-on.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }

  /* 发现页底栏固定：外层勿再垫一整块「底栏高度」，否则版心下露灰条（见分栏下大块空白）
   * 勿依赖 .kehua-body：无天涯壳时 style.css 仍会施加 70px+54px 底距，此处须总能盖住 */
  body.kehua-mobile-tabbar-on.kehua-page-discover.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
}

/* 版心水平边距已由外层 layout 承担，内层不再重复 16px，避免比顶栏内容区更窄 */
body.kehua-discovery-route .kehua-discover-main > .kehua-container.kehua-discover-inner {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* 与首页首块对齐：主容器顶 padding 已为 0，标题区不再额外下移 */
body.kehua-body.kehua-discovery-route .kehua-discover-intro {
  margin-top: 0;
}

.kehua-discover-breadcrumb {
  margin-top: 8px;
}

/* 与顶栏、主导航共用 .kehua-container 版心，勿再套更小 max-width，避免左右与菜单错位 */
.kehua-discover {
  width: 100%;
  min-width: 0;
}

.kehua-discover-intro {
  margin: 8px 0 22px;
}

.kehua-discover-title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--kehua-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.kehua-discover-title i {
  color: var(--kehua-primary);
  font-size: 1.35em;
}

.kehua-discover-lead {
  margin: 0;
  font-size: 15px;
  color: var(--kehua-muted);
  line-height: 1.55;
}

.kehua-discover-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-bottom: 18px;
}

/* 去掉页头演示标题后，与原先 intro 上间距大致对齐 */
.kehua-discover > .kehua-discover-toolbar:first-child {
  margin-top: 8px;
}

.kehua-discover-search-wrap {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px solid #e6eaf0;
}

.kehua-discover-search-icon {
  color: var(--kehua-muted);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.kehua-discover-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--kehua-text);
}

.kehua-discover-search::placeholder {
  color: #9aa5b8;
}

.kehua-discover-stats {
  margin: 0;
  font-size: 14px;
  color: var(--kehua-muted);
  flex-shrink: 0;
}

.kehua-discover-stats-main {
  margin-right: 10px;
}

.kehua-discover-stats-main strong {
  color: var(--kehua-primary);
  font-size: 1.1em;
}

.kehua-discover-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.kehua-discover-chip {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  border: 1px solid #dce3ec;
  background: #f8fafc;
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kehua-discover-chip:hover:not(.kehua-discover-chip--active) {
  border-color: var(--kehua-primary);
  color: var(--kehua-primary);
  background: #fff;
}

.kehua-discover-chip--active {
  background: var(--kehua-primary);
  border-color: var(--kehua-primary);
  color: #fff;
}

.kehua-discover-chip--active:hover {
  color: #fff;
  filter: brightness(1.04);
}

.kehua-discover-section {
  margin-bottom: 36px;
}

.kehua-discover-section-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e293b;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--kehua-primary);
  display: inline-block;
}

.kehua-discover-section-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--kehua-muted);
}

.kehua-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.kehua-board-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 14px;
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px solid #e8edf4;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  min-height: 132px;
}

.kehua-board-card:hover {
  border-color: rgba(0, 86, 179, 0.45);
  box-shadow: 0 8px 24px rgba(0, 40, 100, 0.1);
  transform: translateY(-2px);
}

.kehua-board-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #eef5ff 0%, #e0ebfb 100%);
  color: var(--kehua-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.kehua-board-card-icon .kehua-board-card-icon-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.kehua-board-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.kehua-board-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.kehua-board-card-desc {
  font-size: 13px;
  color: var(--kehua-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kehua-board-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 12px;
  color: #8896a8;
  margin-top: auto;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.kehua-board-card-meta i {
  margin-right: 4px;
  vertical-align: -2px;
  color: #a8b4c4;
}

.kehua-board-card--hidden {
  display: none !important;
}

.kehua-discover-section--empty {
  display: none !important;
}

.kehua-discover-empty {
  text-align: center;
  padding: 36px 16px;
  margin: 20px 0 0;
  color: var(--kehua-muted);
  font-size: 15px;
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px dashed #cfd8e6;
}

/* 桌面：包装层不参与布局，顺序仍为工具栏 → 大类 → 主栏 */
.kehua-discover-mob-split {
  display: contents;
}

.kehua-discover-mob-main {
  display: block;
  min-width: 0;
}

/* 发现页手机端：隐藏顶栏、页脚版权区与右侧竖条（返回顶部等），仅保留主内容（含 768 与 style 移动端断点一致） */
@media (max-width: 768px) {
  .kehua-page-discover .kehua-site-header,
  .kehua-page-discover .kehua-footer,
  .kehua-page-discover .kehua-layout-rail {
    display: none !important;
  }

  .kehua-page-discover .kehua-nav-bar {
    display: none;
  }

  /*
   * fixed 顶栏/底栏不占文档流：仅给 .kehua-layout 设 min-height 无法撑满视口（父级 .kehua-layout-shell 高度仍随内容收缩），
   * 分栏 flex:1 无效 → 下方整段 body 灰底露出。由 shell 承担「顶～底栏之间」最小高度，子级再 flex 铺满。
   */
  body.kehua-page-discover.kehua-discovery-route .kehua-layout-shell {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* fixed 顶栏不占流：顶距已在 .kehua-layout padding-top 内，此处勿再减 --header-h，否则主区偏矮、分栏 flex 撑不满 */
    min-height: 100vh;
    min-height: 100dvh;
  }

  body.kehua-mobile-tabbar-on.kehua-page-discover.kehua-discovery-route .kehua-layout-shell {
    min-height: calc(100vh - 54px - env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - 54px - env(safe-area-inset-bottom, 0px));
  }

  /* 手机发现：版心左右贴边；在 shell 内纵向铺满 */
  body.kehua-page-discover.kehua-discovery-route .kehua-layout.kehua-layout-no-left {
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }

  body.kehua-page-discover .kehua-discover-inner {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0 !important;
  }

  body.kehua-mobile-tabbar-on.kehua-page-discover .kehua-discover-inner {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  body.kehua-page-discover .kehua-discover-main {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  body.kehua-page-discover .kehua-discover-inner.kehua-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  body.kehua-page-discover .kehua-discover > .kehua-discover-toolbar:first-child {
    margin-top: 0;
  }

  body.kehua-page-discover .kehua-discover-toolbar {
    margin: 0;
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
  }

  body.kehua-page-discover .kehua-discover-search-wrap {
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: #f3f4f6;
  }

  body.kehua-page-discover .kehua-discover-stats {
    display: none;
  }

  /* 左分类 + 右列表：占满搜索条以下、底栏以上的视口，避免下方整块 body 灰底 */
  body.kehua-page-discover .kehua-discover-mob-split {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  body.kehua-page-discover .kehua-discover-chips {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 0 0 30%;
    max-width: 112px;
    min-width: 88px;
    margin: 0;
    padding: 8px 0;
    gap: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f7f7f7;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.06);
    align-self: stretch;
    min-height: 0;
    overscroll-behavior: contain;
  }

  body.kehua-page-discover .kehua-discover-chip {
    flex-shrink: 0;
    width: 100%;
    text-align: left;
    border-radius: 0;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    padding: 14px 10px 14px 9px;
    box-sizing: border-box;
    margin: 0;
    line-height: 1.35;
  }

  body.kehua-page-discover .kehua-discover-chip:hover:not(.kehua-discover-chip--active) {
    background: rgba(0, 0, 0, 0.03);
    color: inherit;
  }

  body.kehua-page-discover .kehua-discover-chip--active {
    background: #fff;
    border-left-color: var(--kehua-primary);
    color: var(--kehua-primary);
    font-weight: 600;
  }

  body.kehua-page-discover .kehua-discover-chip--active:hover {
    filter: none;
    color: var(--kehua-primary);
  }

  body.kehua-page-discover .kehua-discover-mob-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: #fff;
  }

  /* 固定底栏盖住底部：仅在右侧列表滚动区内留白，不再整块版心垫高 */
  body.kehua-mobile-tabbar-on.kehua-page-discover .kehua-discover-mob-main {
    padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  }

  body.kehua-page-discover .kehua-discover-section {
    margin-bottom: 0;
  }

  body.kehua-page-discover .kehua-discover-section-title {
    margin: 0;
    padding: 14px 14px 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    border-bottom: none;
    display: block;
  }

  body.kehua-page-discover .kehua-discover-section-desc {
    display: none;
  }

  body.kehua-page-discover .kehua-board-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  body.kehua-page-discover .kehua-board-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.09);
    padding: 12px 14px;
    min-height: 0;
  }

  body.kehua-page-discover .kehua-board-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.09);
  }

  body.kehua-page-discover .kehua-board-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  body.kehua-page-discover .kehua-board-card-icon .kehua-board-card-icon-img {
    border-radius: 50%;
  }

  body.kehua-page-discover .kehua-board-card-body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  body.kehua-page-discover .kehua-board-card-name {
    font-size: 15px;
  }

  body.kehua-page-discover .kehua-board-card-desc {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  body.kehua-page-discover .kehua-board-card-meta {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 0;
    padding-top: 0;
    font-size: 11px;
    color: #8a8a8a;
  }

  body.kehua-page-discover .kehua-discover-empty {
    border-radius: 0;
    border: none;
    background: #f9fafb;
    margin: 0;
  }

  body.kehua-page-discover .kehua-discover-title {
    font-size: 1.4rem;
  }

  body.kehua-page-discover [data-kehua-discover] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    min-width: 0;
  }
}

/* ----- 帖子列表页（版块主题列表） ----- */
.kehua-thread-list-main {
  padding-bottom: 36px;
}

.kehua-board-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 22px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f7fd 100%);
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px solid #e2e8f0;
}

.kehua-board-hero-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 280px;
}

.kehua-board-hero-icon.kehua-board-hero-icon--cover {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #eef2f7;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.kehua-board-hero-icon--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kehua-board-hero-text {
  min-width: 0;
}

.kehua-board-hero-title {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  color: #1a2332;
  letter-spacing: -0.02em;
}

.kehua-board-hero-desc {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--kehua-muted);
  line-height: 1.55;
}

.kehua-board-hero-desc a {
  color: var(--kehua-primary);
  text-decoration: none;
}

.kehua-board-hero-desc a:hover {
  text-decoration: underline;
}

.kehua-board-hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.kehua-board-hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kehua-board-hero-stats strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--kehua-primary);
  font-variant-numeric: tabular-nums;
}

.kehua-board-hero-stats span {
  font-size: 12px;
  color: #8896a8;
}

.kehua-board-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.kehua-board-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--kehua-radius);
  background: var(--kehua-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
  border: none;
  cursor: pointer;
  box-shadow: none;
}

.kehua-board-post-btn:hover {
  filter: brightness(1.06);
}

.kehua-board-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--kehua-radius);
  border: 1px solid #cfd8e6;
  background: #fff;
  color: var(--kehua-text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
}

.kehua-board-bookmark-btn:hover {
  border-color: var(--kehua-primary);
  color: var(--kehua-primary);
}

.kehua-board-bookmark-btn.kehua-favorited {
  border-color: var(--kehua-primary);
  color: var(--kehua-primary);
  background: rgba(0, 86, 179, 0.06);
}

.kehua-my-fav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.kehua-my-fav-tab {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.kehua-my-fav-tab:hover {
  color: var(--kehua-primary, #0056b3);
}

.kehua-my-fav-tab.kehua-active {
  color: var(--kehua-primary, #0056b3);
  border-bottom-color: var(--kehua-primary, #0056b3);
}

.kehua-fav-forum-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kehua-fav-forum-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.kehua-fav-forum-card__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.kehua-fav-forum-card__link:hover {
  background: rgba(15, 23, 42, 0.04);
}

.kehua-fav-forum-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.kehua-fav-forum-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kehua-fav-forum-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kehua-fav-forum-card__name {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.kehua-fav-forum-card__desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.kehua-fav-forum-card__meta {
  font-size: 12px;
  color: #94a3b8;
}

.kehua-fav-forum-card__go {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
}

/* 帖子列表标题行：Grid 单行 + 行垂直居中，左侧「帖子列表」与右侧 Tab 同一水平中线 */
.kehua-thread-list-card .kehua-thread-list-head.kehua-card-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: unset;
}

.kehua-thread-list-card .kehua-thread-list-head .kehua-card-title {
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
}

.kehua-thread-list-card .kehua-thread-list-head .kehua-card-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.kehua-thread-list-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  justify-self: end;
}

.kehua-thread-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 148px) 72px 72px 132px;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
}

.kehua-thread-col--num {
  text-align: right;
}

.kehua-thread-col--last {
  text-align: right;
}

.kehua-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 桌面：不参与布局，子格仍作为 .kehua-thread-row 的 5 列网格子项 */
.kehua-thread-row-meta {
  display: contents;
}

.kehua-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 148px) 72px 72px 132px;
  gap: 8px;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  transition: background 0.12s ease;
}

.kehua-thread-row:last-child {
  border-bottom: none;
}

.kehua-thread-row:hover {
  background: #fafcfe;
}

.kehua-thread-row--top {
  background: linear-gradient(90deg, #fff9f0 0%, #ffffff 100%);
}

.kehua-thread-row--top:hover {
  background: linear-gradient(90deg, #fff4e6 0%, #fafcfe 100%);
}

.kehua-thread-cell--main {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.kehua-thread-cell--main > .kehua-thread-title-row {
  flex: 1 1 0;
  min-width: 0;
}

.kehua-thread-cell--main > .kehua-thread-pin {
  flex-shrink: 0;
}

.kehua-thread-cell--main > .kehua-thread-row-title {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kehua-thread-cell--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

a.kehua-thread-cell--num {
  color: inherit;
  text-decoration: none;
}

a.kehua-thread-cell--num:hover {
  color: var(--kehua-primary, var(--color-primary));
}

.kehua-thread-cell--author {
  color: #576073;
  min-width: 0;
}

.kehua-thread-author-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kehua-thread-author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.kehua-thread-author-name {
  color: inherit;
  text-decoration: none;
}

a.kehua-thread-author-name:hover {
  color: var(--kehua-accent);
  text-decoration: underline;
}

.kehua-thread-cell--last {
  text-align: right;
  font-size: 13px;
  color: #64748b;
}

.kehua-thread-last-user {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--kehua-primary);
  font-weight: 500;
}

a.kehua-thread-last-user {
  text-decoration: none;
}

a.kehua-thread-last-user:hover {
  color: var(--kehua-accent);
  text-decoration: underline;
}

a.kehua-thread-author-avatar-link {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 999px;
  line-height: 0;
}

a.kehua-thread-author-avatar-link:hover .kehua-avatar-img {
  opacity: 0.9;
}

.kehua-thread-cell--last time {
  font-size: 12px;
  color: #94a3b8;
}

.kehua-thread-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  background: #ffedd5;
  vertical-align: middle;
}

.kehua-thread-title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.kehua-thread-title-row .kehua-thread-badge {
  flex-shrink: 0;
}

.kehua-thread-row-title {
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.45;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kehua-thread-row-title:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

.kehua-thread-list-card .kehua-pagination {
  margin-top: 8px;
  padding: 16px 14px 6px;
  border-top: 1px solid #eef2f7;
}

.kehua-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}

.kehua-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--kehua-text);
  border: 1px solid #dce3ec;
  background: #fff;
}

.kehua-page-link:hover:not(.kehua-page-link--current):not(.kehua-page-link--disabled) {
  border-color: var(--kehua-primary);
  color: var(--kehua-primary);
}

.kehua-page-link--current {
  background: var(--kehua-primary);
  border-color: var(--kehua-primary);
  color: #fff;
}

.kehua-page-link--disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.kehua-page-ellipsis {
  padding: 8px 4px;
  color: #94a3b8;
  font-size: 13px;
}

.kehua-thread-aside-list,
.kehua-thread-mods,
.kehua-thread-hot-mini {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 14px;
  color: var(--kehua-muted);
  line-height: 1.55;
}

.kehua-thread-aside-list li {
  margin-bottom: 8px;
}

.kehua-thread-aside-prose {
  font-size: 14px;
  color: var(--kehua-muted);
  line-height: 1.55;
  padding: 0 16px 16px;
  word-break: break-word;
}

.kehua-thread-aside-prose p {
  margin: 0 0 10px;
}

.kehua-thread-aside-prose p:last-child {
  margin-bottom: 0;
}

.kehua-thread-aside-prose a {
  color: var(--kehua-primary);
}

.kehua-thread-aside-empty {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 14px;
  color: #94a3b8;
}

.kehua-thread-mods {
  list-style: none;
  padding: 0;
}

.kehua-thread-mods li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-thread-mods li:last-child {
  border-bottom: none;
}

.kehua-thread-mod-name {
  font-weight: 600;
  color: var(--kehua-text);
}

a.kehua-thread-mod-name {
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

a.kehua-thread-mod-name:hover {
  color: var(--kehua-accent);
  text-decoration: underline;
}

.kehua-thread-mod-role {
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}

.kehua-thread-hot-mini {
  list-style: decimal;
  padding-left: 22px;
}

.kehua-thread-hot-mini li {
  margin-bottom: 10px;
}

.kehua-thread-hot-mini a {
  color: var(--kehua-primary);
  text-decoration: none;
}

.kehua-thread-hot-mini a:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .kehua-thread-list-page .kehua-post-aside {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: none;
  }

  /*
   * 窄屏为纵排时交叉轴为横向；若仍为 flex-start，主栏宽度会随内容收缩（无帖时仅一字「无」即半屏留白）。
   * 桌面横排仍走全局 .kehua-post-layout 的 align-items:flex-start。
   */
  .kehua-thread-list-page .kehua-post-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .kehua-thread-list-page .kehua-post-primary {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 767px) {
  /* 避免列表区曾加的负边距把文档撑出横向滚动，影响底栏 fixed */
  body.kehua-thread-list-page {
    overflow-x: hidden;
  }

  .kehua-thread-list-page .kehua-tianya-index-wrap,
  .kehua-thread-list-page .kehua-thread-list-main {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 版块头：抵消容器左右 16px，与列表区同宽；勿改容器 padding（与 body.kehua-tianya-home 规则统一，避免整页横向错位） */
  .kehua-thread-list-page .kehua-board-hero {
    position: relative;
    width: calc(100% + 32px);
    max-width: none;
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 0;
    padding: 14px 16px 12px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: none;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.96) 45%, rgba(248, 250, 252, 0.98) 100%);
    gap: 12px;
    align-items: stretch;
    flex-wrap: nowrap;
    flex-direction: column;
  }

  .kehua-thread-list-page .kehua-board-hero-main {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
    flex: 1;
    min-width: 0;
  }

  .kehua-thread-list-page .kehua-board-hero-icon.kehua-board-hero-icon--cover {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  }

  .kehua-thread-list-page .kehua-board-hero-text {
    text-align: left;
    flex: 1;
    min-width: 0;
  }

  .kehua-thread-list-page .kehua-board-hero-title {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #0f172a;
  }

  .kehua-thread-list-page .kehua-board-hero-desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  .kehua-thread-list-page .kehua-board-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .kehua-thread-list-page .kehua-board-hero-stats li {
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    padding: 0;
    border-radius: 0;
    background: none;
    border: none;
  }

  .kehua-thread-list-page .kehua-board-hero-stats strong {
    font-size: 0.95rem;
    font-weight: 800;
  }

  .kehua-thread-list-page .kehua-board-hero-stats span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
  }

  .kehua-thread-list-page .kehua-board-hero-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
    margin: 0;
    padding-top: 2px;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
  }

  .kehua-thread-list-page .kehua-board-post-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: none;
  }

  .kehua-thread-list-page .kehua-board-bookmark-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: none;
  }

  .kehua-thread-list-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
  }

  .kehua-thread-table-head {
    display: none;
  }

  /* 帖子列表卡：与首页信息流相同，取消左右内边距，仅抵消外层容器 16px；顶不留缝，与版块头紧贴 */
  .kehua-thread-list-page .kehua-thread-list-card {
    --kehua-card-pad-y: 14px;
    --kehua-card-pad-x: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  .kehua-thread-list-page .kehua-thread-list-card .kehua-card-head--split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    padding: 12px 16px 10px;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
  }

  /* 表格 / 经典：列表区通栏（仅抵消 .kehua-container--forum-thread 的 16px） */
  .kehua-thread-list-page .kehua-thread-list-card {
    overflow: visible;
  }

  /*
   * 列表区勿再负边距加宽：与卡片内手机顶栏同宽，避免整块列表比顶栏/头区更宽导致横向滚动，
   * 进而把视口撑开、底栏 fixed 表现异常。
   */
  .kehua-thread-list-page .kehua-thread-list-card #kehua-forum-feed[data-list-style="table"],
  .kehua-thread-list-page .kehua-thread-list-card--forum-classic-feed #kehua-forum-feed.kehua-feed--list-classic {
    --kehua-forum-list-bleed-x: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    background: #fff !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 经典流各行：与 style.css 首页 .kehua-post-card--classic-row-bbs 完全一致（压过 .kehua-post-card 默认同级 padding） */
  .kehua-thread-list-page #kehua-forum-feed.kehua-feed--list-classic .kehua-post-card.kehua-post-card--classic-row-bbs {
    padding: 16px 18px !important;
    border-bottom: 1px solid #e8eaed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    margin-bottom: 0 !important;
  }

  .kehua-thread-list-page #kehua-forum-feed.kehua-feed--list-classic .kehua-post-card.kehua-post-card--classic-row-bbs:hover {
    background: #fafbfc !important;
  }

  .kehua-thread-list-page #kehua-forum-feed.kehua-feed--list-classic .kehua-post-card.kehua-post-card--classic-row-bbs:last-child {
    border-bottom: none !important;
  }

  /* 帖子列表手机端：表格模式 — 与首页经典 BBS 行同款（左圆头像 + 标题 + 底栏 meta） */
  .kehua-thread-list-page .kehua-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    background: #fff;
  }

  .kehua-thread-list-page .kehua-thread-row {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 8px;
    align-items: start;
    padding: 16px 18px;
    margin: 0;
    background: #fff;
    border: none;
    border-bottom: 1px solid #e8eaed;
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
  }

  .kehua-thread-list-page .kehua-thread-row:hover {
    background: #fafbfc;
  }

  .kehua-thread-list-page .kehua-thread-row--top {
    background: #fffbf5;
    border-bottom-color: #fde8d4;
  }

  .kehua-thread-list-page .kehua-thread-row:last-child {
    border-bottom: none;
  }

  .kehua-thread-list-page .kehua-thread-cell--main {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
  }

  .kehua-thread-list-page .kehua-thread-cell--author {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 46px;
    max-width: 46px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    margin: 0;
  }

  .kehua-thread-list-page .kehua-thread-cell--author .kehua-thread-author-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .kehua-thread-list-page .kehua-thread-cell--author .kehua-thread-author-inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .kehua-thread-list-page .kehua-thread-cell--author .kehua-thread-author-avatar-link {
    display: block;
    width: 46px;
    height: 46px;
    line-height: 0;
    border-radius: 50%;
    overflow: hidden;
  }

  .kehua-thread-list-page .kehua-thread-cell--author .kehua-avatar--sm {
    width: 46px;
    height: 46px;
    border-radius: 50%;
  }

  .kehua-thread-list-page .kehua-thread-cell--author .kehua-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    display: block;
  }

  .kehua-thread-list-page .kehua-thread-row-meta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #9ca3af;
  }

  /* DOM 顺序为「回复、浏览、最后列」；视觉顺序与首页经典卡一致：左主信息、右统计 */
  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num:nth-child(1) {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num:nth-child(2) {
    order: 3;
    flex-shrink: 0;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #b8c0cc;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num::before {
    display: none;
    content: none;
  }

  /* 与首页经典卡 .kehua-post-classic-ico #ri-chat-smile-2-line 同形（非实心聊天气泡） */
  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num[data-label="回复"]::before {
    display: inline-block;
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b8c0cc' d='M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711ZM7 12H9C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12H17C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12Z'/%3E%3C/svg%3E")
      center / contain no-repeat;
    opacity: 0.92;
    flex-shrink: 0;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num[data-label="浏览"]::before {
    display: inline-block;
    content: "";
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239ca3af'%3E%3Cpath d='M1.181 12C2.121 6.88 5.608 3 12 3c6.392 0 9.878 3.88 10.819 9-.94 5.12-4.427 9-10.819 9-6.392 0-9.878-3.88-10.819-9zM12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0-2a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E")
      center / contain no-repeat;
    opacity: 0.85;
    flex-shrink: 0;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num + .kehua-thread-cell--num {
    margin-left: 12px;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--last {
    order: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 10px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    text-align: left;
    color: inherit;
    overflow: hidden;
  }

  .kehua-thread-list-page .kehua-thread-row-meta a.kehua-thread-cell--num {
    color: inherit;
    text-decoration: none;
  }

  .kehua-thread-list-page .kehua-thread-row-meta a.kehua-thread-cell--num:hover {
    color: var(--kehua-primary, var(--color-primary));
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--last::before {
    display: none;
    content: none;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-last-user {
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    margin-right: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .kehua-thread-list-page .kehua-thread-row-meta a.kehua-thread-last-user:hover {
    color: var(--kehua-primary, var(--color-primary));
    text-decoration: underline;
  }

  .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--last time {
    color: #9ca3af;
    font-size: 13px;
    white-space: nowrap;
  }

  .kehua-thread-list-page .kehua-thread-row--top .kehua-thread-pin {
    margin-bottom: 4px;
  }

  .kehua-thread-list-page .kehua-thread-row-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: #111827;
    letter-spacing: 0;
  }

  .kehua-thread-list-page .kehua-thread-row-title:hover {
    color: var(--kehua-primary, var(--color-primary));
  }

  /* 与 style.css 首页经典流一致：≤640px 仅保留回复数（隐藏浏览等 span 类统计的同款策略） */
  @media (max-width: 640px) {
    .kehua-thread-list-page .kehua-thread-row-meta .kehua-thread-cell--num[data-label="浏览"] {
      display: none !important;
    }
  }

  .kehua-thread-list-page .kehua-pagination {
    padding-left: 0;
    padding-right: 0;
    gap: 5px;
  }

  .kehua-thread-list-page .kehua-page-link {
    min-width: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .kehua-author-page .kehua-post-layout {
    flex-direction: column;
  }

  .kehua-author-page .kehua-post-aside {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
  }

  .kehua-author-hero-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px 16px;
    padding: 0 18px 16px;
    margin-top: -44px;
  }

  .kehua-author-hero-avatar-wrap {
    margin-left: auto;
    margin-right: auto;
  }

  .kehua-author-hero-info {
    align-items: center;
    gap: 6px;
  }

  .kehua-author-hero-meta {
    justify-content: center;
    gap: 8px 14px;
  }

  .kehua-author-hero-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2px;
  }

  .kehua-author-hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
  }

  .kehua-author-hero-stats li {
    min-width: 56px;
  }

  .kehua-author-feed-head {
    flex-direction: column;
    align-items: stretch !important;
  }

  .kehua-tabs--author {
    width: 100%;
    justify-content: flex-start;
  }

  .kehua-tabs--author .kehua-tab {
    flex: 1;
    justify-content: center;
    min-width: 0;
    font-size: 13px;
    padding: 8px 10px;
  }

  .kehua-author-hero-stats li:not(:last-child) {
    border-right: none;
  }
}

/*
 * 版块页 #kehua-forum-tabs（手机）：与首页 body.kehua-tianya-home .kehua-tianya-topnav-tab 同款视觉。
 * 灰字 / 选中加深字色 + 17px 粗体 + 底部分割线色条；≥769px 不受影响。
 */
@media (max-width: 768px) {
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-thread-list-title {
    display: none !important;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head.kehua-card-head--split {
    padding: 6px 0 0 !important;
    gap: 0 !important;
    border-bottom: 1px solid #e8eaed;
    background: #fff;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 16px !important;
    gap: 2px !important;
    justify-content: flex-start;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    position: relative;
    margin: 0;
    padding: 10px 10px 12px !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #8b96a8 !important;
    -webkit-text-fill-color: currentColor;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, font-size 0.15s ease, font-weight 0.15s ease;
    z-index: 0;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab:not(.kehua-active):not(.kehua-tab--active)::after {
    display: none !important;
    content: none !important;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab:hover:not(.kehua-tab--active):not(.kehua-active) {
    color: #5c677a !important;
    box-shadow: none !important;
    filter: none;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: currentColor;
    font-size: 17px !important;
    font-weight: 700 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active::after,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--kehua-primary, #2b6be0);
    display: block !important;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active:hover,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active:hover {
    color: #1a1a1a !important;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active:focus,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active:focus-visible,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active:active,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active:focus,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active:focus-visible,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active:active {
    color: #1a1a1a !important;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-tab--active:focus-visible,
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-thread-list-head #kehua-forum-tabs.kehua-tabs .kehua-tab.kehua-active:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--kehua-primary) 45%, transparent);
    outline-offset: 2px;
  }
}

/* 版块帖子列表 · 经典流：宽屏取消窄屏通栏，避免负边距/加宽影响电脑端 */
@media (min-width: 768px) {
  .kehua-thread-list-page .kehua-thread-list-card--forum-classic-feed #kehua-forum-feed.kehua-feed--list-classic {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
  }
}

/* ----- 作者主页 ----- */
.kehua-author-main {
  padding-bottom: 40px;
}

.kehua-author-hero {
  margin-bottom: 20px;
  background: var(--kehua-card);
  border-radius: 0 0 var(--kehua-radius) var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  position: relative;
}

.kehua-author-hero-cover {
  position: relative;
  height: 108px;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  width: 100%;
}

.kehua-author-hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(30, 58, 95, 0.08) 100%);
}

.kehua-author-hero-cover-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.kehua-author-hero-cover-layer--base {
  z-index: 0;
  background: linear-gradient(118deg, #1a3550 0%, #1e4770 40%, #0056b3 100%);
}

.kehua-author-hero-cover-layer--glow {
  z-index: 1;
  mix-blend-mode: normal;
  opacity: 0.55;
  background: radial-gradient(ellipse 95% 120% at 12% -5%, rgba(255, 255, 255, 0.38) 0%, transparent 58%);
}

.kehua-author-hero-cover-layer--grid {
  z-index: 2;
  opacity: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
}

.kehua-author-hero-body {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  padding: 0 22px 20px;
  margin-top: -48px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .kehua-author-hero-body {
    align-items: flex-start;
  }

  .kehua-author-hero-info,
  .kehua-author-hero-actions {
    padding-top: 52px;
  }
}

.kehua-author-hero-avatar-wrap {
  flex-shrink: 0;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(160deg, #dbeafe 0%, #60a5fa 38%, #0056b3 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.65),
    0 8px 22px rgba(0, 50, 110, 0.14);
}

.kehua-author-hero-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 3px solid var(--kehua-card);
  background: linear-gradient(145deg, #adb5bd, #868e96);
  box-sizing: border-box;
}

.kehua-author-hero-avatar--a {
  background: linear-gradient(145deg, #74c0fc, #339af0);
}

.kehua-author-hero-info {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kehua-author-hero-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.kehua-author-hero-name {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.kehua-author-badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
}

.kehua-author-badge-vip i {
  font-size: 14px;
}

.kehua-author-hero-bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--kehua-muted);
}

.kehua-author-hero-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: #64748b;
}

.kehua-author-hero-meta i {
  margin-right: 5px;
  color: #94a3b8;
  vertical-align: -2px;
}

.kehua-author-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  flex-shrink: 0;
}

.kehua-author-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--kehua-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: filter 0.15s ease, background 0.15s ease;
}

.kehua-author-hero-btn--primary {
  background: var(--kehua-primary);
  color: #fff;
}

.kehua-author-hero-btn--primary:hover {
  filter: brightness(1.05);
}

.kehua-author-hero-btn--ghost {
  background: #fff;
  color: var(--kehua-primary);
  border: 1px solid #c7d7eb;
}

.kehua-author-hero-btn--ghost:hover {
  background: #f0f6ff;
}

.kehua-author-hero-stats {
  list-style: none;
  margin: 0;
  padding: 14px 20px 18px;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 6px;
  border-top: 1px solid #e8edf3;
  background: linear-gradient(180deg, #f6f8fb 0%, #ffffff 38%);
}

.kehua-author-hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 8px 8px;
  border-radius: 10px;
}

.kehua-author-hero-stats li:not(:last-child) {
  border-right: 1px solid #e8ecf2;
}

.kehua-author-hero-stats strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--kehua-primary);
  font-variant-numeric: tabular-nums;
}

.kehua-author-hero-stats span {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kehua-author-feed-card .kehua-author-feed-head {
  align-items: flex-start;
}

.kehua-tabs--author {
  background: transparent;
  box-shadow: none;
  gap: 6px;
}

.kehua-tabs--author .kehua-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid #e1e6ed;
  box-shadow: none;
}

.kehua-tabs--author .kehua-tab:not(.kehua-tab--active) {
  background: #fafbfc;
}

.kehua-author-feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-author-feed-item {
  padding: 16px 0;
  border-bottom: 1px solid #eef2f7;
}

.kehua-author-feed-item:last-child {
  border-bottom: none;
}

.kehua-author-feed-title {
  display: inline;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.45;
}

.kehua-author-feed-title:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

.kehua-author-feed-snippet {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kehua-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kehua-author-feed-foot {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-size: 12px;
  color: #94a3b8;
}

.kehua-author-feed-board {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-author-feed-board:hover {
  text-decoration: underline;
}

.kehua-author-feed-foot i {
  margin-right: 3px;
  vertical-align: -2px;
}

.kehua-author-feed-dot {
  color: #cbd5e1;
  user-select: none;
}

.kehua-author-like-note {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.kehua-author-like-note i {
  color: var(--kehua-primary);
  margin-right: 4px;
}

.kehua-author-feed-item--compact .kehua-author-feed-title {
  font-size: 15px;
}

.kehua-author-reply-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-author-reply-item {
  padding: 16px 0;
  border-bottom: 1px solid #eef2f7;
}

.kehua-author-reply-item:last-child {
  border-bottom: none;
}

.kehua-author-reply-preview {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--kehua-text);
}

.kehua-author-reply-to {
  font-size: 13px;
  color: var(--kehua-muted);
  margin-bottom: 6px;
}

.kehua-author-reply-to a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-author-reply-to a:hover {
  text-decoration: underline;
}

.kehua-author-reply-time {
  font-size: 12px;
  color: #94a3b8;
}

.kehua-author-feed-card .kehua-load-more {
  margin-top: 8px;
}

.kehua-author-aside-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--kehua-muted);
}

.kehua-author-aside-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.kehua-author-aside-facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f7;
}

.kehua-author-aside-facts li:last-child {
  border-bottom: none;
}

.kehua-author-aside-k {
  color: #94a3b8;
  flex-shrink: 0;
}

.kehua-author-aside-v {
  color: var(--kehua-text);
  font-weight: 500;
  text-align: right;
}

.kehua-author-boards {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: authorboard;
}

.kehua-author-boards li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f7;
  font-size: 14px;
}

.kehua-author-boards li:last-child {
  border-bottom: none;
}

.kehua-author-boards a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-author-boards a:hover {
  text-decoration: underline;
}

.kehua-author-boards span {
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.kehua-author-aside-muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kehua-muted);
}

.kehua-author-aside-muted a {
  color: var(--kehua-primary);
}

@media (min-width: 768px) and (max-width: 991px) {
  .kehua-author-page .kehua-post-aside {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: none;
  }
}

/* ----- 搜索结果页 ----- */
.kehua-search-main {
  padding-bottom: 36px;
}

/* 版心与顶栏一致；顶距与首页相同：天涯顶栏在文档流内，勿再叠 style.css 的 header-h+top-gap（首页用 .kehua-container.kehua-layout 的 padding:0 16px 40px） */
body.kehua-body.kehua-search-page .kehua-layout.kehua-layout-no-left {
  max-width: var(--kehua-max);
  padding: 0 16px 40px;
  box-sizing: border-box;
}

/* 窄屏：与 body.kehua-tianya-home .kehua-container.kehua-layout 的顶/底留白一致；左右通栏（刘海区保留 safe-area） */
@media (max-width: 768px) {
  body.kehua-body.kehua-search-page .kehua-layout.kehua-layout-no-left,
  body.kehua-search-page .kehua-layout.kehua-layout-no-left {
    padding-top: 16px;
    padding-bottom: 28px;
    padding-left: max(0px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(0px, env(safe-area-inset-right, 0px)) !important;
  }

  body.kehua-body.kehua-search-page.kehua-mobile-tabbar-on .kehua-layout.kehua-layout-no-left,
  body.kehua-search-page.kehua-mobile-tabbar-on .kehua-layout.kehua-layout-no-left {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }
}

/*
 * 搜索页窄屏与首页一致启用双顶栏（classic fixed .kehua-header）；须为 .kehua-layout 留出顶栏高度，
 * 且本段放在 max-width:768 搜索规则之后，以免 padding-top:16px 盖住占位。
 */
@media (max-width: 992px) {
  /*
   * 搜索路由外层往往是 .kehua-layout 而无 .kehua-layout-no-left（左侧栏仍在 DOM 时 header 不会加该类），
   * 若只匹配 no-left 则会漏掉规则，窄屏仍吃 style.css 的 header-h + --top-gap，导航底下露一条与 --top-gap 等高的 body 底色。
   */
  body.kehua-dual-topnav-mobile.kehua-search-page .kehua-layout {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)) !important;
  }

  body.kehua-dual-topnav-mobile.kehua-search-page .kehua-main.kehua-search-main {
    padding-top: 0;
  }
}

body.kehua-body.kehua-search-page .kehua-main.kehua-search-main > .kehua-container {
  padding-left: 0;
  padding-right: 0;
}

/* 解除 style.css 中 .kehua-main 默认 max-width（约 640px），否则在 .kehua-layout flex 内仅占左缘；版心居中由内部 .kehua-container 负责 */
body.kehua-search-page .kehua-layout .kehua-main.kehua-search-main {
  max-width: none;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

/* 与上条同义：不依赖 .kehua-layout 包裹，避免主栏仍被 640px 限制、侧栏被挤出视口 */
body.kehua-body.kehua-search-page main.kehua-main.kehua-search-main {
  max-width: none !important;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

/* 搜索页：768px 起主栏+侧栏横排；侧栏纵向栈（与修罗 search 一致）。全局已排除 kehua-search-page 的 991px column，此处补全侧栏 flex 与宽度 */
@media (min-width: 768px) and (max-width: 1199px) {
  body.kehua-search-page .kehua-post-layout {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
  }

  body.kehua-search-page .kehua-post-aside {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
    flex: 0 0 240px !important;
    width: 240px !important;
    max-width: 240px !important;
    min-width: 0 !important;
    grid-template-columns: none !important;
  }
}

@media (min-width: 1200px) {
  body.kehua-search-page .kehua-post-layout {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
  }

  body.kehua-search-page .kehua-post-aside {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px;
    flex: 0 0 var(--kehua-col-right) !important;
    width: var(--kehua-col-right) !important;
    max-width: var(--kehua-col-right) !important;
    flex-shrink: 0 !important;
    grid-template-columns: none !important;
  }
}

/* 「全部」结果多，标题/摘要易出现超长不换行或内嵌内容撑宽 min-content，flex 主栏会把侧栏挤出视口；强制收缩与换行 */
body.kehua-search-page .kehua-container {
  min-width: 0;
}

body.kehua-search-page .kehua-post-layout {
  min-width: 0;
}

body.kehua-search-page .kehua-post-primary {
  min-width: 0 !important;
  max-width: 100%;
  overflow-x: hidden;
}

body.kehua-search-page .kehua-search-card,
body.kehua-search-page .kehua-panel,
body.kehua-search-page .kehua-search-list {
  min-width: 0;
  max-width: 100%;
}

body.kehua-search-page .kehua-search-item-body {
  min-width: 0;
}

body.kehua-search-page .kehua-search-item-title,
body.kehua-search-page .kehua-search-item-snippet,
body.kehua-search-page .kehua-search-item-meta {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.kehua-search-hero {
  margin-bottom: 18px;
  padding: 18px 20px 16px;
  background: var(--kehua-card);
  border-radius: var(--kehua-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--kehua-shadow);
}

.kehua-search-hero-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.kehua-search-hero-field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid #ced8e4;
  border-radius: var(--kehua-radius);
  background: #fbfcfe;
}

@media (min-width: 768px) {
  .kehua-search-hero-field {
    min-width: 200px;
  }
}

.kehua-search-hero-field:focus-within {
  border-color: var(--kehua-primary);
  background: #fff;
}

.kehua-search-hero-icon {
  font-size: 1.25rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.kehua-search-hero-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.kehua-search-hero-submit {
  flex-shrink: 0;
  padding: 12px 22px;
  border: none;
  border-radius: var(--kehua-radius);
  background: var(--kehua-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.kehua-search-hero-submit:hover {
  filter: brightness(1.05);
}

.kehua-search-hero-stats {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--kehua-muted);
}

.kehua-search-hero-stats strong {
  color: var(--kehua-text);
  font-weight: 700;
}

.kehua-search-hero-dot {
  margin: 0 6px;
  opacity: 0.55;
}

.kehua-search-card-head {
  align-items: center;
}

/* 与全局 .kehua-card-head 上 13px / 下 12px 略不对称区分，搜索条内 Tab 视觉更易垂直居中 */
body.kehua-search-page .kehua-search-card .kehua-search-card-head.kehua-card-head {
  padding-top: 12px;
  padding-bottom: 12px;
}

.kehua-search-card-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: flex-end;
  column-gap: 12px;
  row-gap: 10px;
}

@media (min-width: 768px) {
  .kehua-search-card-tools {
    flex-wrap: nowrap;
  }
}

.kehua-search-sort-hint {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

/* 覆盖 style.css 全局 .kehua-tabs 的 margin-bottom + border-bottom，否则 Tab 条下方多出空白，四个按钮在浅蓝条内视觉「贴底」 */
.kehua-tabs--search {
  display: inline-flex;
  flex: 0 1 auto;
  align-self: center;
  background: transparent;
  box-shadow: none;
  gap: 6px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

.kehua-tabs--search .kehua-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.25;
  border: 1px solid #e1e6ed;
  box-shadow: none;
  text-decoration: none;
  box-sizing: border-box;
  vertical-align: middle;
}

/* style.css 中 .kehua-tab.kehua-active::after 下划线；搜索页用胶囊样式，去掉以免占位 */
.kehua-tabs--search .kehua-tab::after {
  display: none !important;
  content: none !important;
}

.kehua-tabs--search .kehua-tab:not(.kehua-tab--active) {
  background: #fafbfc;
}

.kehua-tabs--search .kehua-tab:hover:not(.kehua-tab--active) {
  background: #f0f4f9;
  color: var(--kehua-text);
}

.kehua-search-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kehua-search-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 14px;
  padding: 16px 0;
  border-bottom: 1px solid #eef2f7;
  align-items: start;
}

.kehua-search-item:last-child {
  border-bottom: none;
}

.kehua-search-item--solo {
  grid-template-columns: 1fr;
}

.kehua-search-item--solo .kehua-search-item-tag {
  display: none;
}

.kehua-search-item-tag {
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
  background: #f1f5f9;
  line-height: 1.4;
}

.kehua-search-item--user .kehua-search-item-tag {
  color: #1d4ed8;
  background: #eff6ff;
}

.kehua-search-item--board .kehua-search-item-tag {
  color: #c2410c;
  background: #ffedd5;
}

.kehua-search-item-body--user,
.kehua-search-item-body--board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.kehua-search-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #74c0fc, #339af0);
}

a.kehua-search-user-avatar {
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.kehua-search-user-avatar--b {
  background: linear-gradient(145deg, #94d4a8, #37b36d);
}

.kehua-search-user-text {
  min-width: 0;
  flex: 1;
}

.kehua-search-board-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  background: #f1f5f9;
}

.kehua-search-board-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  vertical-align: top;
}

.kehua-search-item-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  line-height: 1.45;
}

.kehua-search-item-title:hover {
  color: var(--kehua-primary);
  text-decoration: underline;
}

.kehua-search-item-title--plain {
  display: inline-block;
}

.kehua-search-item-snippet {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--kehua-muted);
}

.kehua-search-item-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  font-size: 12px;
  color: #94a3b8;
}

.kehua-search-item-meta a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-search-item-meta a:hover {
  text-decoration: underline;
}

.kehua-search-item-dot {
  margin: 0 4px;
  opacity: 0.65;
}

.kehua-search-hit {
  padding: 0 2px;
  margin: 0 1px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 3px;
}

.kehua-search-item .red {
  padding: 0 2px;
  margin: 0 1px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 3px;
}

.kehua-tabs--search a.kehua-tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
}

.kehua-search-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.kehua-search-pagination {
  margin-top: 8px;
  padding: 16px 0 8px;
  border-top: 1px solid #eef2f7;
}

.kehua-search-aside-tips {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--kehua-muted);
}

.kehua-search-aside-tips li {
  margin-bottom: 10px;
}

.kehua-search-aside-tips li:last-child {
  margin-bottom: 0;
}

.kehua-search-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kehua-search-hot-link {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-primary);
  background: #f0f6ff;
  border: 1px solid #d4e4f7;
  text-decoration: none;
}

.kehua-search-hot-link:hover {
  background: #e8f1ff;
  text-decoration: none;
}

@media (max-width: 991px) {
  .kehua-search-page .kehua-post-layout {
    align-items: stretch;
  }

  .kehua-search-page .kehua-post-primary {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
  }

  .kehua-search-page .kehua-search-hero,
  .kehua-search-page .kehua-search-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .kehua-search-page .kehua-post-layout {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  /* 主栏含 overflow-x:hidden + flex:1 1 0 时，窄屏纵排可能被算成最小高度 0，导致整块主栏（搜索框+结果）不可见 */
  body.kehua-search-page .kehua-post-primary {
    flex: 0 0 auto !important;
    min-height: min-content;
    align-self: stretch;
    width: 100%;
    overflow-x: visible;
  }

  /*
   * 窄屏侧栏仅「搜索提示 + 热门搜索」；产品要求手机端不展示，与桌面右侧栏区分。
   * 保持与全局 max-width:767px .kehua-post-aside { display:none } 一致，避免底部两块占高、主栏视觉上变窄。
   */
  body.kehua-search-page .kehua-post-aside {
    display: none !important;
  }

  /*
   * 窄屏通栏：layout 左右 padding 已在上方 max-width:768px 规则置零；
   * 此处不再用负 margin（易被 .kehua-post-primary 的 overflow 裁切或与断点 768 错位）。
   */
  body.kehua-search-page .kehua-search-hero,
  body.kehua-search-page .kehua-search-card.kehua-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-left: none;
    border-right: none;
  }

  .kehua-search-hero {
    padding: 12px 12px 10px;
    margin-bottom: 14px;
  }

  .kehua-search-hero-form {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .kehua-search-hero-field {
    flex: 0 0 auto;
    flex-basis: auto;
    width: 100%;
    min-width: 0;
    padding: 0 4px 0 10px;
    min-height: 0;
    align-self: stretch;
  }

  .kehua-search-hero-icon {
    font-size: 1.05rem;
  }

  .kehua-search-hero-input {
    padding: 8px 0;
    font-size: 16px;
    line-height: 1.35;
    min-height: 0;
    appearance: none;
    -webkit-appearance: none;
  }

  .kehua-search-hero-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }

  .kehua-search-hero-submit {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.3;
  }

  .kehua-search-hero-stats {
    margin-top: 8px;
    font-size: 12px;
  }

  .kehua-search-card-tools {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    row-gap: 8px;
  }

  .kehua-search-sort-hint {
    white-space: normal;
  }

  .kehua-tabs--search {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    align-self: stretch;
    padding-bottom: 0 !important;
  }

  .kehua-tabs--search .kehua-tab {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  .kehua-search-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .kehua-search-item-tag {
    margin-top: 0;
    justify-self: start;
  }
}

/* ----- 登录 / 注册 ----- */
.kehua-auth-main {
  flex: 1 0 auto;
  padding: 28px 0 40px;
  background:
    radial-gradient(ellipse 85% 60% at 15% 10%, rgba(0, 86, 179, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 85%, rgba(255, 122, 24, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #e6ebf2 0%, #ececec 35%, #eaeef4 100%);
}

.kehua-auth-page.kehua-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.kehua-auth-container {
  max-width: 920px;
  margin: 0 auto;
}

.kehua-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 36px 48px;
  align-items: start;
}

.kehua-auth-layout--solo {
  grid-template-columns: 1fr;
  justify-items: center;
}

.kehua-auth-layout--solo .kehua-auth-shell {
  justify-self: center;
  max-width: 400px;
  width: 100%;
}

.kehua-auth-aside-custom-html {
  font-size: 14px;
  line-height: 1.65;
  color: var(--kehua-muted);
}

.kehua-auth-aside-custom-html a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-auth-aside-custom-html a:hover {
  text-decoration: underline;
}

.kehua-auth-aside {
  padding: 12px 8px 0 0;
}

.kehua-auth-aside-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kehua-primary);
}

.kehua-auth-aside-title {
  margin: 0 0 14px;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.kehua-auth-aside-desc {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--kehua-muted);
}

.kehua-auth-aside-desc a {
  color: var(--kehua-primary);
  font-weight: 600;
  text-decoration: none;
}

.kehua-auth-aside-desc a:hover {
  text-decoration: underline;
}

.kehua-auth-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: #475569;
}

.kehua-auth-aside-list i {
  margin-right: 10px;
  color: var(--kehua-primary);
  vertical-align: -3px;
  font-size: 1.15rem;
}

.kehua-auth-shell {
  width: 100%;
  max-width: 400px;
  justify-self: end;
}

.kehua-auth-card {
  background: var(--kehua-card);
  border-radius: 12px;
  border: 1px solid #dce3ec;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 12px 40px rgba(0, 40, 100, 0.1);
  overflow: hidden;
}

.kehua-auth-card-tabs {
  padding: 16px 16px 0;
  background: linear-gradient(180deg, #f4f7fb 0%, #fafbfd 100%);
  border-bottom: 1px solid #e8edf3;
}

.kehua-tabs--auth {
  width: 100%;
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 10px;
  background: #e8ecf2;
  box-shadow: none;
}

.kehua-tabs--auth .kehua-tab {
  flex: 1;
  justify-content: center;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
}

.kehua-tabs--auth .kehua-tab:not(.kehua-tab--active):hover {
  color: var(--kehua-text);
  background: rgba(255, 255, 255, 0.45);
}

.kehua-tabs--auth .kehua-tab--active {
  background: #fff;
  color: var(--kehua-primary);
  box-shadow: 0 1px 4px rgba(0, 40, 100, 0.08);
}

.kehua-auth-card .kehua-panel {
  padding: 22px 20px 20px;
}

.kehua-auth-form {
  margin: 0;
}

.kehua-auth-field {
  margin-bottom: 16px;
}

.kehua-auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.kehua-auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid #c5d0df;
  border-radius: var(--kehua-radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--kehua-text);
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kehua-auth-input::placeholder {
  color: #94a3b8;
}

.kehua-auth-input:hover {
  border-color: #9eb2c9;
}

.kehua-auth-input:focus {
  outline: none;
  border-color: var(--kehua-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.kehua-auth-email-code-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.kehua-auth-email-code-input {
  flex: 1 1 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

.kehua-auth-send-code {
  flex-shrink: 0;
  padding: 0 16px;
  min-width: 108px;
  white-space: nowrap;
  border: 1px solid var(--kehua-primary);
  border-radius: var(--kehua-radius);
  background: #fff;
  color: var(--kehua-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kehua-auth-send-code:hover:not(:disabled) {
  background: #f0f6ff;
}

.kehua-auth-send-code:disabled {
  cursor: not-allowed;
  border-color: #cfd8e6;
  background: #f4f6f9;
  color: #64748b;
}

.kehua-auth-field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #94a3b8;
}

.kehua-auth-row {
  margin-bottom: 18px;
}

.kehua-auth-row--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}

.kehua-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--kehua-muted);
  cursor: pointer;
}

.kehua-auth-check--block {
  margin-bottom: 18px;
}

.kehua-auth-check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.kehua-auth-check a {
  color: var(--kehua-primary);
}

.kehua-auth-legal-fallback {
  color: #94a3b8;
  font-weight: 600;
  cursor: default;
}

.kehua-auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-primary);
  text-decoration: none;
}

.kehua-auth-link:hover {
  text-decoration: underline;
}

.kehua-auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 13px 20px;
  border: none;
  border-radius: var(--kehua-radius);
  background: linear-gradient(180deg, #0066cc 0%, var(--kehua-primary) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 86, 179, 0.35);
}

.kehua-auth-submit:hover {
  filter: brightness(1.06);
}

.kehua-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 12px;
  color: #94a3b8;
}

.kehua-auth-divider::before,
.kehua-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dce3ec 20%, #dce3ec 80%, transparent);
}

.kehua-auth-social {
  display: flex;
  gap: 10px;
}

.kehua-auth-social-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dce3ec;
  border-radius: var(--kehua-radius);
  background: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #475569;
  cursor: not-allowed;
  opacity: 0.72;
  text-decoration: none;
  box-sizing: border-box;
}

a.kehua-auth-social-btn--active {
  cursor: pointer;
  opacity: 1;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

a.kehua-auth-social-btn--active:hover {
  border-color: #94a3b8;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  color: #334155;
}

a.kehua-auth-social-btn--active:focus-visible {
  outline: 2px solid var(--kehua-accent, #3b82f6);
  outline-offset: 2px;
}

.kehua-auth-social-btn i {
  font-size: 1.25rem;
}

.kehua-auth-footnote {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--kehua-muted);
}

@media (max-width: 767px) {
  .kehua-auth-main {
    padding: 16px 0 28px;
  }

  .kehua-auth-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .kehua-auth-aside {
    padding: 0;
    text-align: center;
    order: 1;
  }

  .kehua-auth-aside-title {
    font-size: 1.45rem;
  }

  .kehua-auth-aside-list {
    text-align: left;
    max-width: 360px;
    margin: 0 auto;
  }

  .kehua-auth-shell {
    justify-self: center;
    order: 2;
    max-width: none;
  }

  .kehua-auth-card .kehua-panel {
    padding: 18px 16px 16px;
  }

  .kehua-auth-email-code-row {
    flex-direction: column;
  }

  .kehua-auth-send-code {
    width: 100%;
    min-width: 0;
    padding: 11px 16px;
  }

  /* 认证页顶栏已与首页一致走双顶栏 slot；窄屏见 .kehua-header，无需再强制显示 .kehua-site-header */

  .kehua-auth-page .kehua-footer {
    display: block !important;
  }
}

/* ----- 忘记密码 ----- */
.kehua-forgot-breadcrumb {
  margin-bottom: 18px;
}

.kehua-forgot-layout {
  align-items: stretch;
}

.kehua-forgot-card {
  padding: 0;
}

.kehua-forgot-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, #eef5ff 0%, #f4f7fb 100%);
  border-bottom: 1px solid #e8edf3;
}

.kehua-forgot-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff 0%, #dbeafe 100%);
  color: var(--kehua-primary);
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 86, 179, 0.12);
}

.kehua-forgot-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.kehua-forgot-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--kehua-muted);
}

.kehua-forgot-card-inner {
  padding: 20px 20px 18px;
}

.kehua-forgot-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  gap: 10px;
}

.kehua-forgot-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  min-width: 0;
}

.kehua-forgot-step-num {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.kehua-forgot-step--active {
  border-color: rgba(0, 86, 179, 0.35);
  background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
  color: var(--kehua-primary);
}

.kehua-forgot-step--active .kehua-forgot-step-num {
  background: var(--kehua-primary);
  color: #fff;
}

.kehua-forgot-step-label {
  line-height: 1.25;
}

.kehua-forgot-captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

.kehua-forgot-captcha-input {
  flex: 1 1 120px;
  min-width: 0;
}

.kehua-forgot-captcha-fake {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--kehua-radius);
  background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  user-select: none;
}

.kehua-forgot-captcha-chars {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #334155;
  transform: rotate(-4deg);
}

.kehua-forgot-captcha-refresh {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid #c5d0df;
  border-radius: var(--kehua-radius);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-primary);
  font-family: inherit;
  cursor: pointer;
}

.kehua-forgot-captcha-refresh:hover {
  background: #f0f6ff;
}

.kehua-forgot-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
}

.kehua-forgot-done {
  text-align: center;
  padding: 8px 0 12px;
}

.kehua-forgot-done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
  font-size: 1.65rem;
}

.kehua-forgot-done-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.kehua-forgot-done-text {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--kehua-muted);
}

.kehua-forgot-done-text strong {
  color: var(--kehua-text);
}

.kehua-forgot-done-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: #94a3b8;
}

.kehua-forgot-done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.kehua-forgot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--kehua-radius);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.kehua-forgot-btn--primary {
  background: var(--kehua-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 86, 179, 0.3);
}

.kehua-forgot-btn--primary:hover {
  filter: brightness(1.05);
}

.kehua-forgot-btn--ghost {
  background: #fff;
  color: var(--kehua-primary);
  border: 1px solid #c5d0df;
}

.kehua-forgot-btn--ghost:hover {
  background: #f8fafc;
}

.kehua-forgot-back {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
  text-align: center;
}

.kehua-forgot-back a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 767px) {
  .kehua-forgot-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 16px 14px;
  }

  .kehua-forgot-card-inner {
    padding: 16px 14px 14px;
  }

  .kehua-forgot-steps {
    gap: 8px;
  }

  .kehua-forgot-step {
    padding: 8px 6px;
    font-size: 11px;
  }

  .kehua-forgot-captcha-row {
    flex-direction: column;
  }

  .kehua-forgot-captcha-fake {
    min-height: 44px;
  }

  .kehua-forgot-captcha-refresh {
    width: 100%;
    padding: 10px 14px;
  }
}

/* 天涯名人：圆头像（含默认图） */
.kehua-celeb-avatar--has-img {
  background: none !important;
  overflow: hidden;
}
.kehua-celeb-avatar--has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ========== 与 style.css 隔离：天涯首页顶栏搜索 + 三栏布局 ========== */
/* 全站 .kehua-search-input 在 style.css 中为「全屏搜索层」设为透明背景，顶栏必须单独白底 */
.kehua-site-header .kehua-site-header-search-input,
.kehua-site-header .kehua-search-wrap .kehua-search-input {
  background: #ffffff !important;
  color: #2c3e50 !important;
  -webkit-appearance: none;
  appearance: none;
}

.kehua-site-header .kehua-site-header-search-input::placeholder {
  color: #8a96a8;
}

/* style.css 的 .kehua-layout 含左侧栏占位 padding，与天涯三栏 .kehua-layout 类名冲突：必须整段重置 */
body.kehua-tianya-home .kehua-tianya-index-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.kehua-tianya-home .kehua-main {
  flex: none !important;
  max-width: none !important;
  width: 100%;
  min-width: 0;
}

/* 版块主题列表：与首页同一 kehua-tianya-index-wrap，版心对齐顶栏 .kehua-container */
body.kehua-tianya-home .kehua-thread-list-main {
  flex: none !important;
  max-width: none !important;
  width: 100%;
  min-width: 0;
  padding-bottom: 0;
}

body.kehua-tianya-home .kehua-thread-list-main > .kehua-container--forum-thread {
  max-width: var(--kehua-max) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 16px 40px !important;
  box-sizing: border-box !important;
}

body.kehua-tianya-home .kehua-container.kehua-layout {
  display: flex !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: var(--kehua-layout-gap) !important;
  max-width: var(--kehua-max) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0px 16px 40px !important;
  box-sizing: border-box !important;
}

@media (max-width: 992px) {
  body.kehua-tianya-home .kehua-container.kehua-layout {
    padding-left: 16px !important;
    padding-right: 16px !important;
    flex-wrap: wrap !important;
  }

  body.kehua-tianya-home .kehua-thread-list-main > .kehua-container--forum-thread {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* style.css 768px 会给 .kehua-layout 加大 padding-top；天涯首页不在 .kehua-layout-shell 内，需避免顶栏下重复留白 */
@media (max-width: 768px) {
  body.kehua-tianya-home .kehua-container.kehua-layout {
    padding-top: 16px !important;
    padding-bottom: 28px !important;
  }

  body.kehua-tianya-home.kehua-mobile-tabbar-on .kehua-container.kehua-layout {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.kehua-tianya-home .kehua-thread-list-main > .kehua-container--forum-thread {
    padding-top: 16px !important;
    padding-bottom: 28px !important;
  }

  body.kehua-tianya-home.kehua-mobile-tabbar-on .kehua-thread-list-main > .kehua-container--forum-thread {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /*
   * 版块列表：#kehua-forum-inf-footer 在容器外，main 默认透明会透出 body 灰底；仅窄屏列表页铺白，桌面不变。
   */
  body.kehua-thread-list-page .kehua-thread-list-main {
    background-color: #fff;
  }

  /*
   * 窄屏不再隐藏整块 .kehua-thread-list-head：否则 #kehua-forum-tabs（最新回复/发帖/热门）不可见。
   * 「帖子列表」标题仍由下方 body.kehua-thread-list-page … #kehua-thread-list-title 规则隐藏；桌面 ≥769px 不受影响。
   */
  body.kehua-thread-list-page .kehua-thread-list-card {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    max-width: none;
    box-sizing: border-box;
  }

  /* 天涯首页窄屏：去掉「活跃板块」表卡（桌面三栏仍显示侧栏）；移动端列表见 .kehua-mobile-feed--latest-threads */
  body.kehua-tianya-home section.kehua-card[aria-labelledby="kehua-board-title"] {
    display: none !important;
  }

  /* 与 my_thread 信息流一致：经典列表在卡内通栏；左右通屏、无圆角（抵消 .kehua-container 左右 16px） */
  body.kehua-tianya-home .kehua-mobile-feed--latest-threads {
    padding: 0;
    overflow: visible;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    max-width: none;
    box-sizing: border-box;
    background: #fff !important;
  }

  body.kehua-tianya-home .kehua-mobile-feed--latest-threads .kehua-card-more {
    margin: 0;
  }

  /* 压过 style.css `.kehua-feed--list-classic` 的圆角/描边/阴影，与 Tab 下沿通栏平齐 */
  body.kehua-tianya-home #kehua-tianya-mobile-feed.kehua-feed--list-classic {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible;
  }

  /* 手机首页列表顶：白底、下划线选中态（与列表同色，无灰条） */
  body.kehua-tianya-home .kehua-tianya-mobile-topnav {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 0;
    padding: 6px 0 0;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    box-sizing: border-box;
  }

  body.kehua-tianya-home .kehua-tianya-mobile-topnav-tabs {
    display: flex;
    align-items: flex-end;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
    padding: 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.kehua-tianya-home .kehua-tianya-mobile-topnav-tabs::-webkit-scrollbar {
    display: none;
  }

  body.kehua-tianya-home .kehua-tianya-topnav-tab {
    flex: 0 0 auto;
    position: relative;
    margin: 0;
    padding: 10px 10px 12px;
    border: none;
    background: none;
    color: #8b96a8;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, font-size 0.15s ease, font-weight 0.15s ease;
  }

  body.kehua-tianya-home .kehua-tianya-topnav-tab--active {
    color: #1a1a1a;
    font-size: 17px;
    font-weight: 700;
  }

  body.kehua-tianya-home .kehua-tianya-topnav-tab--active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--kehua-primary, #2b6be0);
  }

  /* 版块帖子列表手机顶栏 Tab：截图样式（仅本页 .kehua-forum-mobile-topnav；首页不受影响） */
  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 0;
    padding: 4px 0 0;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #eeeeee;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav .kehua-tianya-mobile-topnav-tabs {
    display: flex;
    align-items: flex-end;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 0;
    min-width: 0;
    padding: 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: space-between;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav .kehua-tianya-mobile-topnav-tabs::-webkit-scrollbar {
    display: none;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav .kehua-tianya-topnav-tab {
    flex: 1 1 0;
    position: relative;
    margin: 0;
    padding: 12px 6px 14px;
    border: none;
    background: none;
    color: #999999;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, font-weight 0.15s ease;
    text-align: center;
    min-width: 0;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav .kehua-tianya-topnav-tab--active {
    color: #333333;
    font-weight: 700;
  }

  body.kehua-thread-list-page .kehua-thread-list-card .kehua-forum-mobile-topnav .kehua-tianya-topnav-tab--active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: #007bff;
  }
}

/* 版块列表（桌面）：隐藏与首页同款的手机顶栏，避免在宽屏出现多余一行 */
@media (min-width: 769px) {
  body.kehua-thread-list-page .kehua-forum-mobile-topnav {
    display: none !important;
  }
}

/* 板块精选 Tab：压过 style.css 的 .kehua-tab / .kehua-tab:hover（失焦后仍保持白字）；并去掉 tabs 底边线/外边距以利垂直居中 */
body.kehua-tianya-home .kehua-card-head--split:has([data-kehua-tab-group="featured"]) {
  padding-top: 12px;
  padding-bottom: 12px;
  align-items: center;
}

body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] {
  margin-bottom: 0 !important;
  border-bottom: none !important;
  align-self: center;
}

body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active,
body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active:hover,
body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active:focus,
body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active:focus-visible,
body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

body.kehua-tianya-home .kehua-card-head--split .kehua-tabs[data-kehua-tab-group="featured"] .kehua-tab.kehua-tab--active::after {
  display: none !important;
  content: none !important;
}

/* 手机端信息流三 Tab 同步：避免 hover/focus 后字色被 style.css 改回主题蓝 */
body.kehua-tianya-home .kehua-tabs--mobile-feed .kehua-tab.kehua-tab--active,
body.kehua-tianya-home .kehua-tabs--mobile-feed .kehua-tab.kehua-tab--active:hover,
body.kehua-tianya-home .kehua-tabs--mobile-feed .kehua-tab.kehua-tab--active:focus,
body.kehua-tianya-home .kehua-tabs--mobile-feed .kehua-tab.kehua-tab--active:focus-visible,
body.kehua-tianya-home .kehua-tabs--mobile-feed .kehua-tab.kehua-tab--active:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

/* 仅桌面：加高优先级，避免与手机端「搜索区 width:100%」冲突 */
/* 帖子阅读页（天涯）无 kehua-tianya-home，需与首页同一搜索区宽度，顶栏才一致 */
/* 搜索结果页仅有 kehua-search-page，须同上，否则顶栏搜索框仍为 760px 与首页 520px 不一致 */
/* 发现页默认走 760px，与天涯首页 520px 不一致，须纳入下同宽规则 */
/* 发帖/编帖（kehua-post-editor-tianya-header）默认走 760px，须与首页同为 520px */
/* 登录 / 注册 / 找回密码：与天涯/经典首页同为 520px；宽搜索栏首页为 760px，见 body.kehua-auth-header-search-wide */
@media (min-width: 768px) {
  body.kehua-tianya-home .kehua-site-header .kehua-header-inner,
  body.kehua-page-read.kehua-body .kehua-site-header .kehua-header-inner,
  body.kehua-search-page .kehua-site-header .kehua-header-inner,
  body.kehua-page-discover .kehua-site-header .kehua-header-inner,
  body.kehua-discovery-route .kehua-site-header .kehua-header-inner,
  body.kehua-auth-page:not(.kehua-auth-header-search-wide) .kehua-site-header .kehua-header-inner,
  body.kehua-user-profile-page:not(.kehua-auth-header-search-wide) .kehua-site-header .kehua-header-inner,
  body.kehua-post-editor-tianya-header .kehua-site-header .kehua-header-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr);
  }
}

/* ---------- 用户主页（作者页）：与天涯首页同一背景/版心/顶底栏，卡片与主色对齐 ---------- */
body.kehua-user-profile-page .kehua-user-profile-wrap {
  max-width: var(--kehua-max);
  margin: 0 auto;
  padding: 0 16px 40px;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 768px) {
  /* 手机：作者页版心左右贴边（桌面仍用 wrap 的 16px 左右距） */
  body.kehua-user-profile-page .kehua-user-profile-wrap {
    padding-top: 8px;
    padding-bottom: 28px;
    padding-left: 0;
    padding-right: 0;
  }

  body.kehua-user-profile-page.kehua-mobile-tabbar-on .kehua-user-profile-wrap {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }

  /* 双顶栏：≤768 去掉 --top-gap，头图顶缘紧贴固定导航（避免导航与背景图之间露灰底；宽屏/平板仍用上方 992 规则） */
  body.kehua-dual-topnav-mobile.kehua-user-profile-page .kehua-user-profile-wrap {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main {
    padding-left: 0;
    padding-right: 0;
  }

  /* 手机：仅头图 + 头像/资料操作区全宽、无圆角；统计卡与 .kehua-up-hero-panel 内资料块保持左右缩进与圆角 */
  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero {
    background: var(--kehua-card);
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-bottom: 12px;
    overflow: hidden;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner {
    border-radius: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-overlap {
    padding-left: 0;
    padding-right: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card {
    margin-left: 12px;
    margin-right: 12px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-panel {
    border-radius: 0;
    padding-left: 12px;
    padding-right: 12px;
    background: transparent;
  }
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-inner {
  width: 100%;
  min-width: 0;
}

@media (min-width: 769px) {
  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero {
    background: var(--kehua-card);
    border-radius: var(--kehua-radius);
    border: 1px solid var(--kehua-border);
    box-shadow: var(--kehua-shadow);
    overflow: hidden;
    margin-bottom: 20px;
  }
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner {
  position: relative;
  height: 260px;
  border-radius: 0;
  background-color: var(--kehua-card-head-bg);
  background-image: none;
  background-size: cover;
  background-position: center bottom;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner.kehua-up-banner--custom::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.45) 50%, var(--kehua-card) 92%);
  pointer-events: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner.kehua-up-banner--custom {
  background-color: #fff;
  background-image: none;
}

body.kehua-user-profile-page .kehua-up-banner-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

body.kehua-user-profile-page .kehua-up-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--kehua-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--kehua-text);
  cursor: pointer;
  box-shadow: var(--kehua-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

body.kehua-user-profile-page .kehua-up-banner-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 40, 100, 0.12);
}

body.kehua-user-profile-page .kehua-up-banner-btn svg {
  flex-shrink: 0;
}

body.kehua-user-profile-page .kehua-up-banner-btn--del {
  padding: 8px 12px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  border-color: transparent;
}

body.kehua-user-profile-page .kehua-up-banner-btn--del:hover {
  background: #b91c1c;
}

@keyframes kehua-user-spin {
  to {
    transform: rotate(360deg);
  }
}

body.kehua-user-profile-page .kehua-spin {
  animation: kehua-user-spin 1s linear infinite;
}

body.kehua-user-profile-page .kehua-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

body.kehua-user-profile-page .kehua-confirm-overlay.show {
  opacity: 1;
}

body.kehua-user-profile-page .kehua-confirm-box {
  background: var(--kehua-card);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  width: 320px;
  max-width: 90vw;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.kehua-user-profile-page .kehua-confirm-overlay.show .kehua-confirm-box {
  transform: scale(1) translateY(0);
}

body.kehua-user-profile-page .kehua-confirm-body {
  padding: 28px 24px 20px;
  text-align: center;
}

body.kehua-user-profile-page .kehua-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--kehua-card-head-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.kehua-user-profile-page .kehua-confirm-icon svg {
  width: 24px;
  height: 24px;
  color: var(--kehua-primary);
}

body.kehua-user-profile-page .kehua-confirm-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--kehua-text);
  margin: 0 0 8px;
}

body.kehua-user-profile-page .kehua-confirm-msg {
  font-size: 14px;
  color: var(--kehua-muted);
  margin: 0;
  line-height: 1.5;
}

body.kehua-user-profile-page .kehua-confirm-actions {
  display: flex;
  border-top: 1px solid var(--kehua-border);
}

body.kehua-user-profile-page .kehua-confirm-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

body.kehua-user-profile-page .kehua-confirm-btn:first-child {
  color: var(--kehua-muted);
  border-right: 1px solid var(--kehua-border);
}

body.kehua-user-profile-page .kehua-confirm-btn:first-child:hover {
  background: #f6f8fb;
}

body.kehua-user-profile-page .kehua-confirm-btn:last-child {
  color: #dc2626;
}

body.kehua-user-profile-page .kehua-confirm-btn:last-child:hover {
  background: #fef2f2;
}

body.kehua-user-profile-page .kehua-confirm-btn.kehua-confirm-btn--single {
  color: var(--kehua-muted);
  border-radius: 0 0 16px 16px;
}

body.kehua-user-profile-page .kehua-confirm-btn.kehua-confirm-btn--single:hover {
  background: #f6f8fb;
}

body.kehua-user-profile-page .kehua-confirm-btn.kehua-confirm-btn--primary {
  color: var(--kehua-primary);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.kehua-user-profile-page .kehua-confirm-btn.kehua-confirm-btn--primary:hover {
  background: var(--kehua-card-head-bg);
}

body.kehua-user-profile-page .kehua-confirm-icon--vip {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

body.kehua-user-profile-page .kehua-confirm-icon--vip svg {
  color: #d97706;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-overlap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  margin-top: -168px;
  position: relative;
  z-index: 2;
  padding-bottom: 20px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-left {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-avatar-wrap {
  position: relative;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-avatar {
  width: 132px;
  height: 132px;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid var(--kehua-card);
  box-shadow: 0 8px 28px rgba(0, 40, 100, 0.12);
  background: var(--kehua-card);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-crown {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #e85a68 0%, #c6303e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(198, 48, 62, 0.35);
  border: 2px solid #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-crown svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-username {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kehua-text);
  margin: 14px 0 8px;
  line-height: 1.3;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-username.kehua-vip-username {
  color: #c6303e;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--kehua-card-head-bg);
  color: var(--kehua-card-head-text);
  border: 1px solid rgba(0, 86, 179, 0.12);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-tag-dark {
  background: var(--kehua-primary);
  color: #fff;
  border-color: transparent;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card {
  width: 100%;
  background: var(--kehua-card-head-bg);
  border-radius: var(--kehua-radius);
  padding: 12px 6px;
  box-shadow: none;
  border: 1px solid rgba(0, 86, 179, 0.12);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card .kehua-up-stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 4px 4px;
  border-left: 1px solid rgba(0, 86, 179, 0.1);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card .kehua-up-stat:first-child {
  border-left: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kehua-text);
  letter-spacing: -0.02em;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stat-label {
  font-size: 11px;
  color: var(--kehua-muted);
  margin-top: 2px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main button.kehua-up-stat--tab {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, box-shadow 0.15s;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main button.kehua-up-stat--tab:hover {
  background: rgba(255, 255, 255, 0.65);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main button.kehua-up-stat--tab.is-active {
  background: #fff;
  box-shadow: 0 1px 0 0 rgba(0, 86, 179, 0.25), 0 4px 12px rgba(0, 40, 100, 0.06);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main #kehua-user-masonry-wrap.kehua-up-feed--user-relations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main #kehua-user-masonry-wrap.kehua-up-feed--user-relations .kehua-user-relation-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

body.kehua-user-profile-page
  .kehua-main.kehua-user-main
  #kehua-user-masonry-wrap.kehua-up-feed--user-relations
  > article.kehua-post-card:not(.kehua-user-relation-card) {
  grid-column: 1 / -1;
  justify-self: stretch;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-user-relation-card.kehua-post-card {
  overflow: hidden;
  border-radius: var(--kehua-radius);
  box-shadow: var(--kehua-shadow);
  border: 1px solid var(--kehua-border);
  padding: 0;
  background: var(--kehua-card);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__banner {
  position: relative;
  height: 112px;
  background-color: var(--kehua-card-head-bg);
  background-size: cover;
  background-position: center bottom;
  background-image: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__banner.kehua-ur-card__banner--custom {
  background-image: none;
  background-color: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__banner.kehua-ur-card__banner--custom::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.5) 50%, #fff 92%);
  pointer-events: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__body {
  position: relative;
  padding: 0 18px 18px;
  margin-top: -40px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__row1 {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-height: 48px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__avatar {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 40, 100, 0.1);
  background: #fff;
  overflow: hidden;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__nameblock {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--kehua-text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__name a {
  color: inherit;
  text-decoration: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__name a:hover {
  color: var(--kehua-primary);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__badges-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__badges-inline .kehua-vip-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__badges-inline .kehua-vip-badge--active {
  color: #c6303e;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__badges-inline .kehua-vip-badge--inactive {
  color: #9ca3af;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__uid {
  font-size: 12px;
  color: var(--kehua-muted);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__stats {
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  padding: 4px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__stat {
  flex: 1;
  min-width: 0;
  text-align: center;
  border: none;
  border-left: 1px solid var(--kehua-border);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__stat:first-child {
  border-left: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--kehua-text);
  line-height: 1.2;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--kehua-muted);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--kehua-radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--kehua-border);
  background: var(--kehua-card);
  color: var(--kehua-text);
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn:hover {
  background: var(--kehua-card-head-bg);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn--pm .kehua-ur-card__ic {
  color: #22c55e;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn--follow {
  border: none;
  background: var(--kehua-primary);
  color: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn--follow:hover {
  background: var(--kehua-primary-dark);
  color: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn--followed {
  border: none;
  background: #e8ecf1;
  color: #374151;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn--followed:hover {
  background: #dde3ea;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-ur-card__btn .haya-follow-btn {
  pointer-events: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-panel {
  padding: 6px 24px 22px;
  background: var(--kehua-card);
  border-radius: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-grid {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-left-col {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-left {
  width: 100%;
  background: var(--kehua-card-head-bg);
  border: 1px solid rgba(0, 86, 179, 0.12);
  border-radius: var(--kehua-radius);
  padding: 16px 18px;
  box-sizing: border-box;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-left .kehua-up-actions--hero {
  margin-top: 16px;
  width: 100%;
  max-width: 420px;
  justify-content: center;
  align-self: center;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-block {
  background: var(--kehua-card-head-bg);
  border: 1px solid rgba(0, 86, 179, 0.12);
  border-radius: var(--kehua-radius);
  padding: 16px 18px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-block .kehua-up-vip-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-top: 0;
  border-radius: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--kehua-card-head-text);
  margin-bottom: 10px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-section-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--kehua-card-head-icon);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-info-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0, 86, 179, 0.15);
  font-size: 13px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-info-item:last-child {
  border-bottom: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-info-k {
  color: var(--kehua-muted);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-info-v {
  color: var(--kehua-text);
  text-align: right;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-sig-text {
  font-size: 14px;
  color: var(--kehua-text);
  line-height: 1.65;
  word-break: break-word;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-sig-text a {
  color: var(--kehua-primary);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-card {
  background: var(--kehua-card);
  border: 1px solid var(--kehua-border);
  border-radius: var(--kehua-radius);
  padding: 18px 20px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-cap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-cap-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: #c6303e;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-cap-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--kehua-muted);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-name {
  font-size: 17px;
  font-weight: 700;
  color: #c6303e;
  letter-spacing: -0.02em;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-date {
  font-size: 12px;
  color: var(--kehua-muted);
  white-space: nowrap;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-bar {
  height: 6px;
  background: #e8ecf1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-fill {
  height: 100%;
  background: #c6303e;
  border-radius: 999px;
  transition: width 0.25s ease;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-exp {
  color: var(--kehua-text);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-vip-need {
  color: #c6303e;
  font-weight: 500;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--kehua-radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn-primary {
  background: var(--kehua-primary);
  color: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn-primary:hover {
  background: var(--kehua-primary-dark);
  color: #fff;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn-light {
  background: #fff;
  color: var(--kehua-text);
  border-color: var(--kehua-border);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn-light:hover {
  background: var(--kehua-card-head-bg);
  color: var(--kehua-text);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-btn-danger {
  background: #fef2f2;
  color: #dc3545;
  border-color: rgba(220, 38, 38, 0.25);
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-body {
  width: 100%;
  min-width: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-feed {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-infinite-footer {
  margin-top: 0;
}

@media (max-width: 900px) {
  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner {
    height: 200px;
  }

  body.kehua-user-profile-page .kehua-up-banner-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
  }

  body.kehua-user-profile-page .kehua-up-banner-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  body.kehua-user-profile-page .kehua-up-banner-btn span {
    display: none;
  }

  body.kehua-user-profile-page .kehua-up-banner-btn--del {
    padding: 6px 8px;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-overlap {
    flex-direction: column;
    align-items: center;
    margin-top: -52px;
    padding-left: 16px;
    padding-right: 16px;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-left {
    width: 100%;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-left .kehua-up-actions--hero {
    max-width: 100%;
    margin-top: 12px;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-col-right {
    width: 100%;
    padding-bottom: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-row {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card .kehua-up-stat {
    flex: 1 1 31%;
    min-width: 5rem;
    border-left: none;
    padding: 6px 4px;
    box-sizing: border-box;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-grid {
    flex-direction: column;
    align-items: stretch;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-right {
    width: 100%;
    max-width: 100%;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-left-col {
    width: 100%;
    max-width: 100%;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-block {
    width: 100%;
    box-sizing: border-box;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-detail-left {
    width: 100%;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main #kehua-user-masonry-wrap.kehua-up-feed--user-relations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 768px) {
  body.kehua-user-profile-page .kehua-main.kehua-user-main #kehua-user-masonry-wrap.kehua-up-feed--user-relations {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* 必须写在本文件靠后位置：盖过 max-width:900px 内规则；头图区全宽直角，资料/统计卡保持缩进 */
  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero {
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-bottom: 12px;
    background: var(--kehua-card);
    overflow: hidden;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-banner {
    border-radius: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-overlap {
    padding-left: 0;
    padding-right: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-stats-card {
    margin-left: 12px;
    margin-right: 12px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-up-hero-panel {
    border-radius: 0;
    padding-left: 12px;
    padding-right: 12px;
    background: transparent;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-feed.kehua-feed--list-classic {
    border-radius: 0;
  }

  body.kehua-user-profile-page .kehua-main.kehua-user-main .kehua-feed.kehua-feed--list-classic .kehua-post-card.kehua-post-card--classic-row {
    border-radius: 0;
  }
}

/* ========== xn_tag 整合：板块筛选条与列表标签（刻画样式） ========== */
.kehua-forum-tags {
  margin-top: 12px;
  max-width: 100%;
}

.kehua-forum-tags-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kehua-board-hero-text .kehua-forum-tags {
  margin-top: 10px;
}

.kehua-forum-tag-group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
}

.kehua-forum-tag-group-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.9;
  min-width: 3em;
  padding-top: 5px;
}

.kehua-board-hero-text .kehua-forum-tag-group-label {
  color: var(--kehua-muted);
}

.kehua-forum-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.kehua-forum-tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease;
  /* 作为 .kehua-forum-tag-pills 的 flex 子项时禁止被压窄，避免手机端整词折行；横向滚动由外层承担 */
  flex-shrink: 0;
  white-space: nowrap;
}

.kehua-forum-tag-pill--all {
  font-weight: 500;
  padding-left: 9px;
  padding-right: 9px;
}

.kehua-board-hero-text .kehua-forum-tag-pill--all.kehua-forum-tag-pill--off {
  background: #fff;
  border-style: dashed;
  color: #64748b;
}

.kehua-board-hero-text .kehua-forum-tag-pill--off {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.kehua-board-hero-text .kehua-forum-tag-pill--off:hover {
  background: #e8f1ff;
  color: var(--kehua-primary);
  border-color: #bfdbfe;
}

.kehua-board-hero-text a.kehua-forum-tag-pill.kehua-forum-tag-pill--on {
  background: #0066cd;
  color: #fff;
  border-color: rgba(0, 102, 205, 0.35);
  box-shadow: none;
}

.kehua-board-hero-text a.kehua-forum-tag-pill.kehua-forum-tag-pill--on:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* xn_tag 后台 style 字段：primary / success / danger / warning 等 */
.kehua-board-hero-text .kehua-forum-tag-pill--primary {
  background: #e8f1ff;
  color: #0d6efd;
  border-color: #b6d4fe;
}

.kehua-board-hero-text .kehua-forum-tag-pill--success {
  background: #e7f7ee;
  color: #198754;
  border-color: #b8e0c8;
}

.kehua-board-hero-text .kehua-forum-tag-pill--danger {
  background: #fde8ea;
  color: #dc3545;
  border-color: #f5c2c7;
}

.kehua-board-hero-text .kehua-forum-tag-pill--warning {
  background: #fff6da;
  color: #b45309;
  border-color: #fde68a;
}

.kehua-board-hero-text .kehua-forum-tag-pill--secondary,
.kehua-board-hero-text .kehua-forum-tag-pill--dark {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.kehua-thread-xn-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.kehua-thread-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.kehua-thread-title-row .kehua-thread-xn-tags {
  margin-left: 0;
  flex-basis: 100%;
  margin-top: 2px;
}

.kehua-thread-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  word-break: break-all;
}

.kehua-thread-tag-pill:hover {
  background: #e8f1ff;
  color: var(--kehua-primary);
  border-color: #bfdbfe;
}

.kehua-thread-tag-pill--primary {
  background: #e8f1ff;
  color: #0d6efd;
  border-color: #b6d4fe;
}

.kehua-thread-tag-pill--success {
  background: #e7f7ee;
  color: #198754;
  border-color: #b8e0c8;
}

.kehua-thread-tag-pill--danger {
  background: #fde8ea;
  color: #dc3545;
  border-color: #f5c2c7;
}

.kehua-thread-tag-pill--warning {
  background: #fff6da;
  color: #b45309;
  border-color: #fde68a;
}

.kehua-thread-tag-pill--secondary,
.kehua-thread-tag-pill--dark {
  background: #eef2f7;
  color: #475569;
  border-color: #dde4ee;
}

/* 用户主页式卡片：标签独占一行 */
.kehua-user-card-title + .kehua-thread-xn-tags {
  display: flex;
  margin-left: 0;
  margin-top: 6px;
  width: 100%;
}

/* 经典列表：标题与标签同在 .kehua-post-classic-title-main 内，勿设 width:100%，否则 nowrap 下会把标题挤到 0 宽 */
.kehua-feed.kehua-feed--list-classic .kehua-post-card--classic-row-bbs .kehua-post-classic-title-main > .kehua-thread-xn-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: auto;
  max-width: 100%;
  margin-left: 0;
  margin-top: 0;
  flex: 0 1 auto;
}

.kehua-post-meta .kehua-thread-xn-tags {
  display: flex;
  margin-left: 0;
  margin-top: 6px;
  width: 100%;
}

/* 帖子详情：正文与附件之后、左侧对齐的标签区 */
.kehua-article-body-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}
.kehua-article-body-tags__pills {
  flex: 1 1 auto;
  min-width: 0;
}
.kehua-article-body-tags .kehua-thread-xn-tags {
  margin-left: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  max-width: 100%;
}

@media (max-width: 768px) {
  /* 与 PC 一致：分类文字与标签同一行；标签过多时横向滑动，避免整行折到「分类」下面 */
  .kehua-forum-tag-group {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px 8px;
  }

  .kehua-forum-tag-group-label {
    flex: 0 0 auto;
    padding-top: 0;
    align-self: center;
  }

  .kehua-forum-tag-pills {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .kehua-forum-tag-pills::-webkit-scrollbar {
    height: 4px;
  }

  .kehua-forum-tag-pills::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 4px;
  }
}
