/* ============================================================
   navix-pc-page-home — PC 端社区首页
   配色：浅色底 + 可配主色（--nh-primary，后台设置下发）
   ============================================================ */

.nhop {
  --nh-primary: #1677ff;
  --nh-primary-soft: rgba(22, 119, 255, 0.12);
  /* 公告条配色：默认跟随主色，后台可单独配 */
  --nh-notice-accent: var(--nh-primary);
  --nh-notice-soft: var(--nh-primary-soft);
  --nh-notice-text: var(--nh-text-2);
  --nh-bg: #f5f6f8;
  --nh-card: #fff;
  --nh-line: #f0f0f0;
  --nh-line-2: #e8e8e8;
  --nh-text: #1a1a1a;
  --nh-text-2: #666;
  --nh-muted: #999;
  --nh-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--nh-text);
  background: var(--nh-bg);
  min-height: 100vh;
  padding-bottom: 24px;
}

.nhop * { box-sizing: border-box; }
.nhop a { text-decoration: none; color: inherit; }
.nhop ul, .nhop ol { list-style: none; margin: 0; padding: 0; }
.nhop input, .nhop button, .nhop textarea { font-family: inherit; }
.nhop img { max-width: 100%; }

/* ---------------- 布局 ---------------- */
.nh-container {
  max-width: var(--nh-max-width, 1440px);
  margin: 0 auto; padding: 20px 24px;
  display: flex; gap: 20px; align-items: flex-start;
}

/* ---------------- 左侧栏 ---------------- */
.nh-sidebar { width: 236px; flex-shrink: 0; position: sticky; top: 76px; }
.nh-side-panel {
  background: var(--nh-card); border: 1px solid var(--nh-line); border-radius: var(--nh-radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 96px); overflow: hidden;
}
.nh-side-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  /* 默认看不到滚动条，鼠标移进侧栏才浮出来（Firefox 走 scrollbar-color） */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.nh-side-scroll::-webkit-scrollbar { width: 3px; height: 3px; }
.nh-side-scroll::-webkit-scrollbar-track { background: transparent; }
.nh-side-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.nh-side-panel:hover .nh-side-scroll { scrollbar-color: rgba(0, 0, 0, .2) transparent; }
.nh-side-panel:hover .nh-side-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .2); }
.nh-side-section { padding: 8px 0; }
.nh-side-section + .nh-side-section { border-top: 1px solid #f5f5f5; }
.nh-side-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--nh-muted); padding: 8px 16px 6px;
}
.nh-side-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; cursor: pointer; font-size: 13px; color: var(--nh-text); transition: background .15s;
}
.nh-side-list li:hover { background: #f9f9f9; }
/* 侧栏所有行的图标列都对齐到同一套尺寸：16px 图标 + 18px 固定宽 + 10px 间距。
   快捷入口是 <a> 包着图标+文字，论坛/标签是 .nh-bbs-row —— 两边必须同规格，
   否则图标和文字会贴在一起（.nh-bbs-row 有 gap，<a> 没有）。 */
.nh-side-list li > a {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  flex: 1; color: inherit;
}
.nh-side-list li > a > .remix-icon {
  font-size: 16px; width: 18px; text-align: center;
  color: var(--nh-muted); flex-shrink: 0;
}
.nh-side-list li > a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-side-list li > a:hover { color: var(--nh-primary); }
.nh-side-list li > a:hover > .remix-icon { color: var(--nh-primary); }
.nh-bbs-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nh-bbs-row i { font-size: 16px; width: 18px; text-align: center; color: var(--nh-muted); }
.nh-bbs-avatar { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.nh-bbs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-tag-hash { color: var(--nh-primary); font-weight: 600; width: 18px; text-align: center; }
.nh-side-count { color: #aaa; font-size: 12px; flex-shrink: 0; }
.nh-side-empty { justify-content: center !important; color: var(--nh-muted); font-size: 12px; cursor: default !important; }
.nh-side-expand {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 0 4px; color: var(--nh-muted); font-size: 12px; cursor: pointer;
}
.nh-side-expand:hover { color: var(--nh-primary); }
.nh-side-custom { padding: 12px 16px; font-size: 12px; color: var(--nh-text-2); }
.nh-signin {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-top: 1px solid #f5f5f5; flex-shrink: 0;
}
.nh-signin-title { font-size: 13px; }
.nh-signin-days { font-size: 11px; color: var(--nh-muted); }
.nh-signin-btn {
  background: var(--nh-primary-soft); color: var(--nh-primary); border: none;
  padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .2s;
}
.nh-signin-btn:hover:not(:disabled) { background: rgba(22, 119, 255, .22); }
.nh-signin-btn:disabled { opacity: .6; cursor: default; }
/* 已签到：不再是「一个灰掉的按钮」，而是「一个状态」——实心淡灰、不透明、无 hover */
.nh-signin-btn.is-done,
.nh-signin-btn.is-done:disabled {
  background: #f2f3f5; color: var(--nh-muted); opacity: 1; font-weight: 400;
}

/* ---------------- 主区 ---------------- */
.nh-main {
  flex: 1; min-width: 0; background: var(--nh-card);
  border: 1px solid var(--nh-line); border-radius: var(--nh-radius);
  display: flex; flex-direction: column;
}

/* 菜单栏 */
.nh-tabs-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 50px; border-bottom: 1px solid var(--nh-line);
  overflow: hidden;
}
/* 菜单条：横向可滚动但绝不显示滚动条。
   注意 overflow-x:auto 会把另一个方向的 visible 算成 auto —— 不显式写
   overflow-y:hidden 时，行高溢出 1px 就会冒出上下滚动条。 */
.nh-tabs {
  display: flex;
  gap: 24px;
  height: 100%;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nh-tabs::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nh-tab {
  display: flex; align-items: center; gap: 4px; height: 100%; position: relative;
  font-size: 14px; color: var(--nh-text-2); cursor: pointer; white-space: nowrap; transition: color .2s;
}
.nh-tab:hover, .nh-tab.is-active { color: var(--nh-primary); font-weight: 500; }
.nh-tab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.nh-tab-name { font-size: 14px; }
/* 菜单里配了 desc 才出现（本站菜单没配，所以照旧一行高，不影响原版式） */
.nh-tab-desc { font-size: 11px; font-weight: 400; color: var(--nh-muted); }
.nh-tab:hover .nh-tab-desc { color: var(--nh-primary); }
/* show_count 那一栏的总数角标 */
.nh-tab-count {
  align-self: center; flex-shrink: 0; margin-left: 2px;
  min-width: 16px; padding: 0 5px; border-radius: 9px;
  background: var(--nh-bg); color: var(--nh-muted);
  font-size: 11px; font-weight: 400; line-height: 16px; text-align: center;
}
.nh-tab.is-active .nh-tab-count { background: var(--nh-primary-soft); color: var(--nh-primary); }
.nh-tab.is-active::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--nh-primary); border-radius: 2px;
}
.nh-tab .remix-icon { font-size: 15px; }
.nh-view-toggle { display: flex; gap: 4px; background: var(--nh-bg); border-radius: 6px; padding: 2px; flex-shrink: 0; }
.nh-vt-icon {
  width: 28px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--nh-muted); cursor: pointer; font-size: 15px; transition: all .2s;
}
.nh-vt-icon.is-active { color: var(--nh-primary); background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* 首页模块卡片 */
.nh-card {
  margin: 16px 20px; padding: 14px 16px;
  border: 1px solid var(--nh-line); border-radius: var(--nh-radius); background: #fff;
}
.nh-mod-head {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--nh-text); margin-bottom: 10px;
}
.nh-mod-head i { color: var(--nh-primary); font-size: 15px; }
.nh-mod-more { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--nh-muted); cursor: pointer; }
.nh-mod-more:hover { color: var(--nh-primary); }
.nh-mod-count { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--nh-muted); }

/* 快捷发布 */
.nh-publish { cursor: pointer; padding: 12px 16px; }
.nh-pub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nh-pub-input {
  flex: 1; display: flex; align-items: center; gap: 8px; background: var(--nh-bg);
  border-radius: 20px; padding: 9px 16px; color: var(--nh-muted); font-size: 13px;
}
.nh-pub-actions { display: flex; gap: 6px; flex-shrink: 0; }
.nh-pub-act {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--nh-text-2); background: var(--nh-bg); font-size: 16px; transition: all .2s;
}
.nh-pub-act:hover { color: var(--nh-primary); background: var(--nh-primary-soft); }

/* 公告条：卡片式，左侧主色竖条 + 淡渐变底 */
.nh-notice-bar {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin: 16px 20px 0;
  padding: 11px 14px 11px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--nh-notice-soft) 0%, rgba(255,255,255,0) 62%), var(--nh-bg);
  border: 1px solid var(--nh-line);
  font-size: 13px; color: var(--nh-text); cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.nh-notice-bar,
a.nh-notice-bar { color: var(--nh-text); text-decoration: none; }
a.nh-notice-bar:visited { color: var(--nh-text); }
a.nh-notice-bar:focus-visible { outline: 2px solid var(--nh-notice-accent); outline-offset: 2px; }
.nh-notice-bar::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--nh-notice-accent);
}
.nh-notice-bar:hover { border-color: var(--nh-notice-accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.nh-notice-bar > i:first-child {
  flex-shrink: 0; font-size: 15px; color: var(--nh-notice-accent);
}
.nh-notice-tag {
  flex-shrink: 0; background: var(--nh-notice-accent); color: #fff;
  font-size: 10px; line-height: 1.6; padding: 1px 7px; border-radius: 20px; font-weight: 500;
}
.nh-notice-text {
  flex: 1; min-width: 0; color: var(--nh-notice-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nh-notice-bar > i:last-child { flex-shrink: 0; color: var(--nh-muted); font-size: 15px; transition: transform .2s, color .2s; }
.nh-notice-bar:hover > i:last-child { transform: translateX(2px); color: var(--nh-notice-accent); }

/* 快捷入口 */
.nh-shortcuts { padding: 14px 12px 10px; }
.nh-shortcut-grid { display: flex; gap: 4px; flex-wrap: wrap; }
.nh-shortcut {
  flex: 1 1 0; min-width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border-radius: 8px; transition: background .2s; font-size: 12px; color: var(--nh-text-2);
}
.nh-shortcut:hover { background: var(--nh-bg); color: var(--nh-primary); }
.nh-shortcut-icon {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--nh-primary-soft); color: var(--nh-primary); font-size: 19px;
}

/* 热门话题 */
.nh-topic-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nh-topic {
  padding: 5px 12px; border-radius: 14px; background: var(--nh-bg);
  font-size: 12px; color: var(--nh-primary); transition: all .2s;
}
.nh-topic:hover { background: var(--nh-primary-soft); }

/* 活动 */
.nh-activity-list { display: flex; gap: 12px; overflow-x: auto; }
.nh-activity-slide {
  flex: 0 0 220px; border-radius: 8px; overflow: hidden; position: relative;
  border: 1px solid var(--nh-line); display: block;
}
.nh-activity-slide img { width: 100%; height: 96px; object-fit: cover; display: block; }
.nh-activity-info { padding: 8px 10px; }
.nh-activity-info h4 { margin: 0 0 2px; font-size: 13px; }
.nh-activity-info p { margin: 0; font-size: 12px; color: var(--nh-muted); }
.nh-activity-tag { font-size: 10px; color: #fff; background: #ff4d4f; padding: 1px 6px; border-radius: 3px; }

/* 推广位 */
.nh-promo { display: flex; align-items: center; gap: 12px; transition: box-shadow .2s; }
.nh-promo:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.nh-promo-img { width: 72px; height: 54px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.nh-promo-body { flex: 1; min-width: 0; }
.nh-promo-label { font-size: 10px; color: var(--nh-muted); border: 1px solid var(--nh-line-2); padding: 0 4px; border-radius: 3px; }
.nh-promo-body h4 { margin: 4px 0 2px; font-size: 13px; }
.nh-promo-body p { margin: 0; font-size: 12px; color: var(--nh-muted); }

/* 编辑指定 */
.nh-pick-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.nh-pick-card { flex: 0 0 168px; border-radius: 8px; overflow: hidden; border: 1px solid var(--nh-line); display: block; transition: box-shadow .2s; }
.nh-pick-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.nh-pick-cover { height: 96px; background: var(--nh-bg); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 22px; }
.nh-pick-cover img { width: 100%; height: 100%; object-fit: cover; }
.nh-pick-title {
  padding: 8px 10px 4px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 42px;
}
.nh-pick-meta { padding: 0 10px 8px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--nh-muted); }

/* ---------------- 筛选栏 ---------------- */
.nh-filters {
  display: flex; gap: 8px; padding: 12px 20px;
  border-bottom: 1px solid var(--nh-line);
  flex-wrap: wrap; align-items: center;
}
.nh-filter {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 15px;
  background: var(--nh-bg);
  font-size: 12px; color: var(--nh-text-2); line-height: 1;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s;
  user-select: none; white-space: nowrap;
}
.nh-filter > .remix-icon:first-child { font-size: 14px; color: var(--nh-muted); transition: color .18s; }
.nh-filter:hover { background: var(--nh-primary-soft); color: var(--nh-primary); }
.nh-filter:hover > .remix-icon:first-child { color: var(--nh-primary); }
/* 已选了值 → 实心胶囊，一眼能看出筛选生效 */
.nh-filter.is-set {
  background: var(--nh-primary-soft);
  border-color: var(--nh-primary);
  color: var(--nh-primary); font-weight: 500;
}
.nh-filter.is-set > .remix-icon:first-child { color: var(--nh-primary); }
.nh-filter.is-open {
  background: #fff; border-color: var(--nh-primary); color: var(--nh-primary);
  box-shadow: 0 0 0 3px var(--nh-primary-soft);
}
.nh-filter-arrow {
  font-size: 14px; color: var(--nh-muted); margin-left: -1px;
  transition: transform .2s, color .2s;
}
.nh-filter.is-open .nh-filter-arrow { transform: rotate(180deg); color: var(--nh-primary); }
.nh-filter-reset {
  display: inline-flex; align-items: center; gap: 3px;
  height: 30px; padding: 0 10px; margin-left: 2px;
  font-size: 12px; color: var(--nh-muted); cursor: pointer; border-radius: 15px;
  transition: background .18s, color .18s;
}
.nh-filter-reset:hover { background: #fff1f0; color: #ff4d4f; }

/* ---------------- 下拉 / 浮层 ---------------- */
.nh-dd-layer { position: fixed; inset: 0; z-index: 10010; pointer-events: none; }
.nh-dd-layer > * { pointer-events: auto; }
.nh-dd-panel {
  position: fixed; min-width: 188px; max-height: 400px; overflow-y: auto;
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .12);
  padding: 6px; z-index: 10011;
  animation: nh-dd-in .14s ease-out;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .15) transparent;
}
@keyframes nh-dd-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nh-dd-panel::-webkit-scrollbar { width: 4px; }
.nh-dd-panel::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .14); border-radius: 4px; }
.nh-dd-search { padding: 4px 4px 8px; position: sticky; top: -6px; background: #fff; z-index: 1; }
.nh-dd-search input {
  width: 100%; border: none; background: var(--nh-bg); border-radius: 8px;
  padding: 8px 11px; font-size: 12px; outline: none; transition: box-shadow .18s;
}
.nh-dd-search input:focus { box-shadow: 0 0 0 2px var(--nh-primary-soft); }
.nh-dd-body { display: flex; flex-direction: column; gap: 1px; }
.nh-dd-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 7px;
  font-size: 13px; color: var(--nh-text-2); cursor: pointer;
  transition: background .14s, color .14s;
}
.nh-dd-item:hover { background: var(--nh-bg); color: var(--nh-text); }
.nh-dd-item.is-active { color: var(--nh-primary); font-weight: 500; }
.nh-dd-item.is-active:hover { background: var(--nh-primary-soft); }
.nh-dd-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-dd-item .nh-dd-check { flex-shrink: 0; font-size: 14px; }
.nh-dropdown {
  position: fixed; background: #fff; border: 1px solid var(--nh-line-2); border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .1); padding: 6px 0; min-width: 150px; z-index: 10012;
}
.nh-dropdown a {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  font-size: 13px; color: var(--nh-text); transition: background .15s;
}
.nh-dropdown a:hover { background: #f5f8ff; color: var(--nh-primary); }
.nh-dd-divider { height: 1px; background: var(--nh-line); margin: 4px 0; }
.nh-hot-panel { width: 320px; max-height: 420px; overflow-y: auto; padding: 8px 0; }
.nh-hot-panel-head { padding: 4px 14px 8px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.nh-hot-panel-head i { color: #ff4d4f; }

/* ---------------- 列表 ---------------- */
.nh-post-header {
  display: flex; align-items: center; padding: 12px 20px; font-size: 12px;
  color: var(--nh-muted); border-bottom: 1px solid var(--nh-line);
}
.nh-col-content { flex: 1; min-width: 0; padding-right: 20px; }
.nh-col-reply { width: 140px; text-align: center; }
.nh-col-stat { width: 70px; text-align: center; }
.nh-col-view { width: 80px; text-align: center; }
.nh-col-time { width: 90px; text-align: right; }

.nh-post-list { display: flex; flex-direction: column; }
.nh-post-item {
  display: flex; align-items: center; padding: 18px 20px;
  border-bottom: 1px solid #f5f5f5; transition: background .15s; cursor: pointer;
}
.nh-post-item:hover { background: #fafafa; }
.nh-post-main { display: flex; gap: 12px; flex: 1; min-width: 0; }
.nh-post-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #f0f0f0; flex-shrink: 0;
  overflow: hidden; position: relative; display: block;
}
.nh-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nh-post-avatar .ls-avatar-verify { position: absolute; right: -2px; bottom: -2px; }
.nh-post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.nh-post-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nh-post-title {
  font-size: 14px; font-weight: 500; color: var(--nh-text); line-height: 1.5; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .2s;
}
.nh-post-item:hover .nh-post-title { color: var(--nh-primary); }
.nh-flag { font-size: 10px; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; }
.nh-flag-top { background: #fff1f0; color: #ff4d4f; }
.nh-flag-rec { background: #fff7e6; color: #d97706; }
.nh-post-desc {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--nh-muted); line-height: 1.6;
}
.nh-pd-author { color: var(--nh-text-2); }
.nh-pd-div { color: #e0e0e0; }
.nh-pd-bbs, .nh-pd-tag { color: var(--nh-primary); }
.nh-pd-lock { display: inline-flex; align-items: center; gap: 2px; }
/* 发布时间：自己一行，小字 + 时钟图标；不放描述行里 */
.nh-post-time-row {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--nh-muted); line-height: 1.4;
}
.nh-post-time-row > .remix-icon { font-size: 13px; color: var(--nh-muted); flex-shrink: 0; }
.nh-pt-mark {
  margin-left: 2px; padding: 0 5px; border-radius: 3px;
  background: var(--nh-bg); color: var(--nh-text-2); font-size: 10px; line-height: 16px;
}
.nh-thumb {
  width: 90px; height: 62px; border-radius: 6px; background: var(--nh-bg);
  flex-shrink: 0; overflow: hidden; position: relative; margin-left: 12px;
}
.nh-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nh-thumb-count {
  position: absolute; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 10px; padding: 1px 5px; border-top-left-radius: 4px;
}
.nh-post-meta { display: flex; align-items: center; flex-shrink: 0; }
.nh-reply-avatars { width: 140px; display: flex; align-items: center; justify-content: center; }
.nh-mini-avatar {
  width: 26px; height: 26px; border-radius: 50%; margin-left: -8px; border: 2px solid #fff;
  overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); display: block; flex-shrink: 0;
}
.nh-mini-avatar:first-child { margin-left: 0; }
.nh-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nh-post-item .nh-col-stat, .nh-post-item .nh-col-view, .nh-post-item .nh-col-time {
  font-size: 13px; color: var(--nh-text-2); font-variant-numeric: tabular-nums;
}
.nh-post-item .nh-col-time { color: var(--nh-muted); font-size: 12px; }

/* 网格视图 */
.nh-post-list.is-grid { display: grid; gap: 16px; padding: 16px; }
.nh-post-list.is-grid .nh-post-item {
  display: grid; grid-template-rows: 1fr auto auto; gap: 10px; padding: 12px;
  border: 1px solid var(--nh-line); border-radius: 8px; background: #fff;
  aspect-ratio: 1 / 1; overflow: hidden; align-items: center; flex-direction: column;
}
.nh-post-list.is-grid .nh-post-main { display: contents; }
.nh-post-list.is-grid .nh-post-thumb,
.nh-post-list.is-grid .nh-thumb { grid-row: 1; width: 100%; height: 100%; margin-left: 0; min-height: 0; }
.nh-post-list.is-grid .nh-post-item:not(.has-cover)::before {
  content: ''; grid-row: 1; background: linear-gradient(135deg, #f5f7fa, #eef1f5);
  border-radius: 6px; min-height: 0;
}
.nh-post-list.is-grid .nh-post-body { grid-row: 2; display: block; min-width: 0; }
.nh-post-list.is-grid .nh-post-title { -webkit-line-clamp: 2; }
.nh-post-list.is-grid .nh-post-avatar { display: none; }
.nh-post-list.is-grid .nh-post-desc,
.nh-post-list.is-grid .nh-post-time-row { display: none; }
.nh-post-list.is-grid .nh-post-meta {
  grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.nh-post-list.is-grid .nh-reply-avatars { display: none; }
.nh-post-list.is-grid .nh-post-meta .nh-col-stat,
.nh-post-list.is-grid .nh-post-meta .nh-col-view { width: auto; font-size: 12px; color: var(--nh-muted); }
.nh-post-list.is-grid .nh-post-meta .nh-col-time { width: auto; }

/* ---------------- 广告 ---------------- */
.nh-ad { flex-direction: column; align-items: stretch; }
.nh-ad-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--nh-muted); margin-bottom: 8px; }
.nh-ad-body { min-height: 80px; }
.nh-ad-link { display: block; }
.nh-ad-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nh-ad-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--nh-primary-soft);
  color: var(--nh-primary); display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.nh-ad-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nh-ad-tag { font-size: 10px; color: var(--nh-primary); border: 1px solid var(--nh-primary-soft); padding: 0 5px; border-radius: 3px; }
.nh-ad-text { font-size: 13px; color: var(--nh-text); margin-bottom: 8px; }
.nh-ad-images { display: flex; gap: 6px; }
.nh-ad-img-wrap { flex: 1 1 0; border-radius: 6px; overflow: hidden; background: var(--nh-bg); }
.nh-ad-img { width: 100%; height: 110px; object-fit: cover; display: block; }
.nh-ad-images.n-1 .nh-ad-img { height: 170px; }
.nh-ad-action {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px; color: var(--nh-primary);
}

/* ---------------- 状态 ---------------- */
.nh-list-state { padding: 0 20px; }
.nh-loading, .nh-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 40px 20px; color: var(--nh-muted); font-size: 13px;
}
.nh-empty i { font-size: 26px; }
.nh-load-more { padding: 16px 20px 22px; display: flex; justify-content: center; }
.nh-load-more span {
  display: inline-flex; align-items: center; padding: 8px 26px; border: 1px solid var(--nh-line-2);
  border-radius: 18px; font-size: 13px; color: var(--nh-text-2); cursor: pointer; transition: all .2s;
}
.nh-load-more span:hover { border-color: var(--nh-primary); color: var(--nh-primary); }
.nh-adbar {
  display: flex; align-items: center; gap: 8px; padding: 16px 20px;
  border-top: 1px solid var(--nh-line); font-size: 12px; color: var(--nh-muted);
}
.nh-adbar-tag { background: var(--nh-bg); color: var(--nh-text-2); padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.nh-adbar a:hover { color: var(--nh-primary); }
.nh-notify {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #f0f7ff; color: var(--nh-primary); padding: 11px 20px;
  font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--nh-line);
}
.nh-footer { padding: 20px; text-align: center; font-size: 12px; color: var(--nh-muted); border-top: 1px solid var(--nh-line); }

/* ---------------- 右侧栏 ---------------- */
/* 右栏挂件可能很长（内容列表挂件之类）。sticky 会让底部内容永远看不到，
   所以给它一个视口内的高度上限 + 内部滚动（滚动条默认隐形，hover 才显形）。 */
.nh-rightbar {
  width: 300px; flex-shrink: 0; position: sticky; top: 76px;
  display: flex; flex-direction: column; gap: 16px;
  max-height: calc(100vh - 96px);
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.nh-rightbar::-webkit-scrollbar { width: 3px; }
.nh-rightbar::-webkit-scrollbar-track { background: transparent; }
.nh-rightbar::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.nh-rightbar:hover { scrollbar-color: rgba(0, 0, 0, .2) transparent; }
.nh-rightbar:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .2); }
/* 挂件容器：系统挂件自带 .ls-sidebar-wrap 外框，这里把间距接管过来 */
.nh-rightbar .ls-sidebar-wrap { margin-bottom: 0; }
.nh-rightbar .ls-sidebar-wrap:last-child { margin-bottom: 0; }
.nh-rightbar .widget-skeleton { padding: 16px; }
.nh-rightbar .nh-right-empty {
  padding: 22px 14px; text-align: center; font-size: 12px; color: var(--nh-muted);
  border: 1px dashed var(--nh-line-2); border-radius: 8px;
}
.nh-rightbar .nh-card { margin: 0; }
.nh-rightbar .nh-side-empty { padding: 16px 0; text-align: center; display: block; }
.nh-hot-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid #f7f7f7; font-size: 13px;
}
.nh-hot-item:last-child { border-bottom: none; }
.nh-hot-item:hover .nh-hot-title { color: var(--nh-primary); }
.nh-hot-rank {
  width: 18px; height: 18px; border-radius: 4px; background: var(--nh-bg); color: var(--nh-muted);
  font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nh-hot-rank.r1 { background: #ff4d4f; color: #fff; }
.nh-hot-rank.r2 { background: #ff7a45; color: #fff; }
.nh-hot-rank.r3 { background: #ffa940; color: #fff; }
.nh-hot-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-hot-count { font-size: 11px; color: var(--nh-muted); flex-shrink: 0; }
.nh-reco-card { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f7f7f7; }
.nh-reco-card:last-child { border-bottom: none; }
.nh-reco-cover { width: 64px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.nh-reco-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.nh-reco-title { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nh-reco-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--nh-muted); }
.nh-reco-card:hover .nh-reco-title { color: var(--nh-primary); }
.nh-featured-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid #f7f7f7; font-size: 13px;
}
.nh-featured-item:last-child { border-bottom: none; }
.nh-featured-item:hover .nh-fi-title { color: var(--nh-primary); }
.nh-fi-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-fi-meta { font-size: 11px; color: var(--nh-muted); flex-shrink: 0; }
.nh-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.nh-gallery-item { border-radius: 6px; overflow: hidden; position: relative; display: block; }
.nh-gallery-item img { width: 100%; height: 74px; object-fit: cover; display: block; transition: transform .3s; }
.nh-gallery-item:hover img { transform: scale(1.06); }
.nh-gallery-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px;
  font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nh-online-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nh-online-user { position: relative; width: 36px; height: 36px; border-radius: 50%; }
.nh-online-user img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.nh-online-dot {
  position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .nh-rightbar { width: 260px; }
}
/* 小屏：1180px 以下整个隐藏右侧栏，主区自然占满 */
@media (max-width: 1180px) {
  .nh-rightbar { display: none; }
}
@media (max-width: 1100px) {
  .nh-sidebar { width: 200px !important; }
  .nh-col-reply { width: 100px; }
}
@media (max-width: 768px) {
  .nh-sidebar { display: none !important; }
  .nh-post-header { display: none; }
  .nh-post-meta { display: none; }
  .nh-thumb { display: none; }
  .nh-container { padding: 12px; }
  .nh-post-list.is-grid { grid-template-columns: 1fr !important; }
}

/* 暗色主题跟随（站点切到暗色时） */
html[data-theme="dark"] .nhop,
body.dark-theme .nhop {
  --nh-bg: #16191d;
  --nh-card: #1e2227;
  --nh-line: #2a2f36;
  --nh-line-2: #343a42;
  --nh-text: #e6e8ea;
  --nh-text-2: #a5adb8;
  --nh-muted: #7c858f;
}
html[data-theme="dark"] .nh-post-item:hover,
body.dark-theme .nh-post-item:hover { background: #23272d; }
html[data-theme="dark"] .nh-side-list li:hover,
body.dark-theme .nh-side-list li:hover { background: #23272d; }
html[data-theme="dark"] .nh-notice-bar,
body.dark-theme .nh-notice-bar {
  background: linear-gradient(90deg, var(--nh-notice-soft) 0%, rgba(255,255,255,0) 62%), #1a1f26;
}
html[data-theme="dark"] .nh-vt-icon.is-active,
body.dark-theme .nh-vt-icon.is-active { background: #2a2f36; }

/* ---------------- 提示条（宿主没有 toast 时兜底） ---------------- */
.nh-toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translate(-50%, 10px);
  z-index: 10060;
  max-width: 72vw; padding: 10px 18px; border-radius: 20px;
  background: rgba(0, 0, 0, .82); color: #fff;
  font-size: 13px; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.nh-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.nh-toast-success { background: rgba(34, 160, 107, .94); }
.nh-toast-error { background: rgba(220, 38, 38, .94); }
.nh-toast-info { background: rgba(0, 0, 0, .82); }

html[data-theme="dark"] .nh-signin-btn.is-done,
body.dark-theme .nh-signin-btn.is-done { background: #2a2f36; }
