/* ============================================================
   新版顶部导航栏 + 搜索弹窗（步骤42，电脑端）
   规范：_优化补丁/前端设计基线.md    参考稿：_优化补丁/导航栏设计稿.html
   所有选择器都在 .qh-header / .qh-so 下，不影响主题其他部分。
   兼容：不用 color-mix()、inset 简写；backdrop-filter 有 @supports 兜底；@container 只做渐进增强。
   ============================================================ */

.qh-header,
.qh-so {
  --qh-accent: var(--jinsom-color, #e66760);
  --qh-ease: cubic-bezier(.2, .8, .2, 1);
  --qh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --qh-solid: #1d1e20;
  --qh-glass: rgba(27, 28, 30, .72);
  --qh-text: rgba(255, 255, 255, .64);
  --qh-muted: rgba(255, 255, 255, .4);
  --qh-hover: rgba(255, 255, 255, .075);
  --qh-current: rgba(255, 255, 255, .1);
  --qh-pop: rgba(33, 34, 37, .8);
  --qh-pop-line: rgba(255, 255, 255, .09);
  --qh-pop-text: rgba(255, 255, 255, .76);
  --qh-pop-hover: rgba(255, 255, 255, .07);
  --qh-pop-shadow: 0 24px 48px -12px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .22);
  /* 线条图标（背景图，颜色写在 SVG 里） */
  --qh-i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --qh-i-go: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3.5L10.5 8 6 12.5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --qh-i-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 2.5h5v5M9.5 2.5L3 9' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------------- 导航栏外壳（保留 .jinsom-header 供主题和其他模块取高度） ---------------- */
.jinsom-header.qh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  width: 100%;
  height: 60px;
  min-width: var(--jinsom-width);
  margin: 0;
  background: transparent;
  color: var(--qh-text);
  font-family: var(--qh-font);
  font-size: 14px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}
.qh-header *, .qh-header *::before, .qh-header *::after { box-sizing: border-box; }
.qh-header ul, .qh-header li { margin: 0; padding: 0; list-style: none; }
.qh-header a { text-decoration: none; }
.qh-header button { margin: 0; font-family: inherit; line-height: normal; }

/* 背景层单独放在子元素上：导航栏本身带 backdrop-filter 时，里面下拉菜单的模糊会失效 */
.qh-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--qh-solid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  transition: background-color .45s var(--qh-ease), box-shadow .45s var(--qh-ease);
}
.qh-bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, .08);
  opacity: 0;
  transition: opacity .45s var(--qh-ease);
}
.qh-header.qh-scrolled .qh-bg {
  background-color: var(--qh-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 32px -14px rgba(0, 0, 0, .5);
}
.qh-header.qh-scrolled .qh-bg::after { opacity: 1; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .qh-header.qh-scrolled .qh-bg { background-color: rgba(27, 28, 30, .96); }
  .qh-header .qh-pop, .qh-header .sub-menu { background: #232427; }
  .qh-so-panel { background: #26272a; }
}

.qh-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Logo ---------------- */
.qh-logo { flex: none; display: flex; align-items: center; height: 100%; margin-right: 18px; }
.qh-logo img { display: block; height: 34px; width: auto; transition: opacity .2s; }
.qh-logo:hover img { opacity: .88; }
.qh-logo-text { display: none; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.qh-logo.qh-no-img img { display: none; }
.qh-logo.qh-no-img .qh-logo-text { display: block; }
.qh-logo .qh-logo-dark { display: none; }
.theme-dark .qh-logo.qh-has-dark .qh-logo-light { display: none; }
.theme-dark .qh-logo.qh-has-dark .qh-logo-dark { display: block; }

/* ---------------- 一级菜单（wp_nav_menu 输出） ---------------- */
.qh-nav { flex: none; height: 100%; }
.qh-nav.is-overflow {   /* 窗口太窄放不下时（只会出现在页头不限最小宽度的页面）：菜单可横向滚动 */
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.qh-nav.is-overflow::-webkit-scrollbar { display: none; }
.qh-menu { display: flex; align-items: center; height: 100%; width: max-content; }
.qh-menu > li { position: relative; display: flex; align-items: center; height: 100%; }
.qh-menu > li > a {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  color: var(--qh-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  outline: none;
  transition: color .2s;
}
/* 背景画在伪元素上，左右各内缩 2px：菜单宽度不变，相邻两块背景之间留出 4px 空隙 */
.qh-menu > li > a::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 2px; right: 2px;
  z-index: -1;
  border-radius: 8px;
  pointer-events: none;
}
/* 悬停：直接出现，没有滑动 */
.qh-menu > li > a:hover,
.qh-menu > li.qh-open > a,
.qh-menu > li > a:focus-visible { color: #fff; }
.qh-menu > li > a:hover::before,
.qh-menu > li.qh-open > a::before,
.qh-menu > li > a:focus-visible::before { background: var(--qh-hover); }
.qh-menu > li > a:focus-visible::before { box-shadow: 0 0 0 2px rgba(var(--qh-accent-rgb), .6); }
/* 当前栏目：常驻背景，文字和图标都是纯白 */
.qh-menu > li.current-menu-item > a,
.qh-menu > li.current-menu-ancestor > a,
.qh-menu > li.current-menu-parent > a { color: #fff; }
.qh-menu > li.current-menu-item > a::before,
.qh-menu > li.current-menu-ancestor > a::before,
.qh-menu > li.current-menu-parent > a::before { background: var(--qh-current); }

/* 菜单标题里的 Font Awesome 图标：后台写法是 <i class="fa fa-home"> 首页</i>，文字也在 <i> 里，
   所以给 .fa 补上中文字体，并只让 ::before 的图标变淡 */
.qh-menu i.fa {
  font-family: FontAwesome, var(--qh-font);
  font-size: 14px;
  font-weight: inherit;
  line-height: inherit;
  font-style: normal;
}
.qh-menu > li > a i.fa::before {
  display: inline-block;
  width: 14px;
  margin-right: 2px;
  text-align: center;
  opacity: .72;
  transition: opacity .2s;
}
.qh-menu > li > a:hover i.fa::before,
.qh-menu > li.qh-open > a i.fa::before,
.qh-menu > li.current-menu-item > a i.fa::before,
.qh-menu > li.current-menu-ancestor > a i.fa::before,
.qh-menu > li.current-menu-parent > a i.fa::before { opacity: 1; }

/* 站外链接：↗ */
.qh-menu > li > a[href^="http"]:not([href*="7risha.com"])::after {
  content: "";
  width: 11px;
  height: 11px;
  margin-left: 5px;
  background: var(--qh-i-ext) center / contain no-repeat;
  opacity: .4;
}
/* 有子菜单：向下箭头，展开时旋转 */
.qh-menu > li.menu-item-has-children > a::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-left: 4px;
  background: var(--qh-i-chev) center / contain no-repeat;
  opacity: .45;
  transition: transform .28s var(--qh-ease), opacity .2s;
}
.qh-menu > li.menu-item-has-children.qh-open > a::after { transform: rotate(180deg); opacity: .9; }

/* ---------------- 浮层：子菜单、头像菜单、发布、语言 ---------------- */
.qh-header .sub-menu,
.qh-header .qh-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 2;
  min-width: 188px;
  padding: 6px;
  border-radius: 12px;
  background: var(--qh-pop);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--qh-pop-line);
  box-shadow: var(--qh-pop-shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(.985);
  transform-origin: top left;
  transition: opacity .16s ease, transform .22s var(--qh-ease), visibility 0s linear .22s;
}
/* 鼠标从按钮移到浮层途中的桥接区，防止断开 */
.qh-header .sub-menu::before,
.qh-header .qh-pop::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -10px;
  height: 10px;
}
.qh-header .qh-open > .sub-menu,
.qh-header .qh-open > .qh-pop {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .16s ease, transform .22s var(--qh-ease), visibility 0s;
}

/* 子菜单项：左侧圆点，悬停时右侧滑出箭头；站外链接常驻 ↗ */
.qh-header .sub-menu li { position: relative; }
.qh-header .sub-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--qh-pop-text);
  font-size: 14px;
  white-space: nowrap;
  outline: none;
  transition: background-color .15s, color .15s;
}
.qh-header .sub-menu a::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .3;
  transition: background-color .2s, opacity .2s;
}
.qh-header .sub-menu a::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: auto;
  background: var(--qh-i-go) center / contain no-repeat;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity .22s var(--qh-ease), transform .22s var(--qh-ease);
}
.qh-header .sub-menu a:hover,
.qh-header .sub-menu a:focus-visible,
.qh-header .sub-menu li:hover > a { background: var(--qh-pop-hover); color: #fff; }
.qh-header .sub-menu a:hover::before,
.qh-header .sub-menu li:hover > a::before { background: var(--qh-accent); opacity: 1; }
.qh-header .sub-menu a:hover::after,
.qh-header .sub-menu li:hover > a::after { opacity: .65; transform: none; }
.qh-header .sub-menu a[href^="http"]:not([href*="7risha.com"])::after {
  width: 11px;
  height: 11px;
  background-image: var(--qh-i-ext);
  opacity: .4;
  transform: none;
}
.qh-header .sub-menu li.current-menu-item > a { color: #fff; }
.qh-header .sub-menu li.current-menu-item > a::before { background: var(--qh-accent); opacity: 1; }
/* 第三级：向右展开 */
.qh-header .sub-menu .sub-menu { top: -7px; left: calc(100% + 6px); }
.qh-header .sub-menu .sub-menu::before { top: 0; bottom: 0; left: -10px; right: auto; width: 10px; height: auto; }
.qh-header .sub-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .22s var(--qh-ease), visibility 0s; }
.qh-header .sub-menu li.menu-item-has-children > a::after { background-image: var(--qh-i-go); opacity: .45; transform: none; }

/* ---------------- 右侧 ---------------- */
.qh-right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 100%;
  margin-left: 14px;
}

/* 搜索入口：输入框样式，空间不够时缩成图标 */
.qh-search-wrap { flex: 0 1 236px; min-width: 36px; container-type: inline-size; }
.qh-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 6px 0 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: var(--qh-muted);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.qh-search-btn:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .7); }
.qh-search-btn:focus-visible { box-shadow: 0 0 0 3px rgba(var(--qh-accent-rgb), .35); border-color: rgba(var(--qh-accent-rgb), .6); }
.qh-search-btn svg { flex: none; width: 16px; height: 16px; transition: color .2s; }
.qh-search-btn:hover svg { color: #fff; }
.qh-search-text { flex: 1; min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.qh-search-btn kbd {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .5);
  font: 600 11px/1 ui-monospace, Consolas, monospace;
}
@container (max-width: 196px) {   /* 放不下完整文字时直接缩成图标，不显示被截断的文字 */
  .qh-search-text, .qh-search-btn kbd { display: none; }
  .qh-header .qh-search-btn { width: 36px; padding: 0; justify-content: center; margin-left: auto; color: var(--qh-text); }   /* 选择器要压过 .qh-header button 的 margin:0 */
}

/* 按钮 */
.qh-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .25s, transform .2s var(--qh-ease);
}
.qh-btn:active { transform: scale(.97); }
.qh-btn:focus-visible { box-shadow: 0 0 0 3px rgba(var(--qh-accent-rgb), .4); }
.qh-btn-ghost { color: rgba(255, 255, 255, .86); background: rgba(255, 255, 255, .02); border: 1px solid rgba(255, 255, 255, .16); }
.qh-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .26); }
.qh-btn-primary { color: #fff; border: 0; background: var(--qh-accent); }
.qh-btn-primary:hover { background-image: linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .08)); }   /* 加深一档 */
.qh-guest, .qh-member { flex: none; display: flex; align-items: center; gap: 8px; height: 100%; }

/* 图标按钮 */
.qh-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  cursor: pointer;
  outline: none;
  transition: background-color .2s, color .2s;
}
.qh-icon-btn:hover, .qh-open > .qh-icon-btn { background: var(--qh-hover); color: #fff; }
.qh-icon-btn:focus-visible { box-shadow: 0 0 0 2px rgba(var(--qh-accent-rgb), .6); }
.qh-icon-btn svg { width: 19px; height: 19px; }
.qh-badge {
  position: absolute;
  top: 2px;
  left: calc(50% + 2px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--qh-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--qh-solid);
}
.qh-sep { flex: none; width: 1px; height: 18px; margin: 0 2px; background: rgba(255, 255, 255, .12); }

/* 发布：点击后选择板块 */
.qh-pub, .qh-user, .qh-lang { position: relative; display: flex; align-items: center; height: 100%; }
.qh-btn-publish {
  height: 34px;
  padding: 0 13px 0 10px;
  color: #ff9b95;
  background: rgba(var(--qh-accent-rgb), .13);
  border: 1px solid rgba(var(--qh-accent-rgb), .32);
}
.qh-btn-publish svg { width: 16px; height: 16px; }
.qh-btn-publish:hover, .qh-pub.qh-open .qh-btn-publish { color: #fff; background: var(--qh-accent); border-color: var(--qh-accent); }
.qh-header .qh-pub-pop { left: auto; right: -8px; width: 296px; padding: 8px; transform-origin: top right; }
.qh-pub-title { margin: 4px 8px 8px; color: var(--qh-muted); font-size: 13px; }
.qh-pub-pop a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: background-color .15s;
}
.qh-pub-pop a:hover, .qh-pub-pop a:focus-visible { background: var(--qh-pop-hover); }
.qh-pub-ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--qh-c);
  background: var(--qh-cb);
  font-size: 16px;
}
.qh-pub-ico i { font-size: 16px; line-height: 1; }
.qh-pub-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qh-pub-name { color: #fff; font-size: 14px; }
.qh-pub-to { overflow: hidden; color: var(--qh-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.qh-pub-pop a:hover .qh-pub-to { color: rgba(255, 255, 255, .6); }

/* 头像 */
.qh-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 6px 0 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--qh-text);
  cursor: pointer;
  outline: none;
  transition: background-color .2s, color .2s;
}
.qh-user-btn:hover, .qh-user.qh-open .qh-user-btn { background: var(--qh-hover); color: #fff; }
.qh-user-btn:focus-visible { box-shadow: 0 0 0 2px rgba(var(--qh-accent-rgb), .6); }
.qh-user-btn .qh-chev { width: 12px; height: 12px; background: var(--qh-i-chev) center / contain no-repeat; opacity: .45; transition: transform .28s var(--qh-ease), opacity .2s; }
.qh-user.qh-open .qh-chev { transform: rotate(180deg); opacity: .9; }
.qh-avatar { position: relative; flex: none; display: block; width: 30px; height: 30px; border-radius: 50%; }
.qh-avatar img { display: block; width: 100%; height: 100%; margin: 0; border-radius: 50%; object-fit: cover; }
.qh-avatar .ls-txk-zzsy { display: block; width: 100%; height: 100%; margin: 0; }   /* 头衔卡挂件（LS_TXK）对齐头像 */
.qh-avatar .ls-txk-xz { top: 0; left: 0; }
.qh-avatar.qh-vip { box-shadow: 0 0 0 2px var(--qh-solid), 0 0 0 3.5px #eab54a; }
.qh-avatar.qh-vip::after {
  content: "V";
  position: absolute;
  right: -4px;
  bottom: -3px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe49e, #f1b23c);
  box-shadow: 0 0 0 2px var(--qh-solid);
  color: #5b3a00;
  font: 800 9px/1 var(--qh-font);
}
.qh-avatar.qh-lg { width: 42px; height: 42px; }
.qh-avatar.qh-lg::after { width: 16px; height: 16px; right: -3px; bottom: -2px; font-size: 10px; }
.qh-vip-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffe49e, #f4b740 60%, #e7a12a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  color: #5b3a00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.qh-header .qh-user-pop { left: auto; right: 0; width: 236px; transform-origin: top right; }
.qh-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-radius: 8px; outline: none; transition: background-color .15s; }
.qh-card:hover, .qh-card:focus-visible { background: var(--qh-pop-hover); }
.qh-card-meta { flex: 1; min-width: 0; }
.qh-card-name { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 15px; font-weight: 600; }
.qh-card-name b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.qh-card-sub { display: block; margin-top: 4px; color: var(--qh-muted); font-size: 12px; transition: color .2s; }
.qh-card:hover .qh-card-sub { color: var(--qh-accent); }
.qh-pop-sep { height: 1px; margin: 6px 8px; background: var(--qh-pop-line); }

/* 头像菜单列表：后台「头像下拉菜单」配置，li 的 class 是类型名 */
.qh-user-pop ul li { position: relative; }
.qh-user-pop ul li > a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 12px 9px 38px;
  border-radius: 8px;
  color: var(--qh-pop-text);
  font-size: 14px;
  white-space: nowrap;
  outline: none;
  transition: background-color .15s, color .15s;
}
.qh-user-pop ul li > a:hover, .qh-user-pop ul li > a:focus-visible, .qh-user-pop ul li:hover > a { background: var(--qh-pop-hover); color: #fff; }
.qh-user-pop ul li > a m { position: static; }
.qh-user-pop ul li > a::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: center / contain no-repeat;
  opacity: .6;
  transition: opacity .15s;
}
.qh-user-pop ul li > a:hover::before { opacity: 1; }
.qh-user-pop ul li > a[target="_blank"]::after { content: ""; width: 11px; height: 11px; margin-left: auto; padding-left: 14px; background: var(--qh-i-ext) right center / 11px 11px no-repeat; opacity: .4; }
.qh-user-pop li.mywallet > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='14' rx='3'/%3E%3Cpath d='M3 10h18M16 15h2M7 6V5a2 2 0 0 1 2-2h8'/%3E%3C/svg%3E"); }
.qh-user-pop li.key-recharge > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M10.8 12.2L19 4M16 7l3 3M14 9l2 2'/%3E%3C/svg%3E"); }
.qh-user-pop li.vip > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1b23c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l4 4 5-7 5 7 4-4-2 11H5z'/%3E%3C/svg%3E"); opacity: .95; }
.qh-user-pop li.order > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6'/%3E%3C/svg%3E"); }
.qh-user-pop li.shopping-cart > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a2 2 0 0 0 2 1.6h8.6a2 2 0 0 0 2-1.6L22 8H6'/%3E%3C/svg%3E"); }
.qh-user-pop li.content > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.qh-user-pop li.password > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E"); }
.qh-user-pop li.majia > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M18.5 14.5A6.5 6.5 0 0 1 21.5 20'/%3E%3C/svg%3E"); }
.qh-user-pop li.admin > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E"); }
.qh-user-pop li.language > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E"); }
.qh-user-pop li.loginout > a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); }
/* 「退出登录」单独放在最下面 */
.qh-user-pop li.loginout { margin-top: 6px; padding-top: 6px; }
.qh-user-pop li.loginout::before { content: ""; position: absolute; top: 0; left: 8px; right: 8px; height: 1px; background: var(--qh-pop-line); }
.qh-user-pop li.loginout > a:hover { background: rgba(var(--qh-accent-rgb), .14); color: #ff8b84; }
/* 语言切换（头像菜单里的二级） */
.qh-user-pop li.language > a i { display: none; }
.qh-user-pop li.language > a > ul {
  position: absolute;
  top: -6px;
  right: calc(100% + 6px);
  min-width: 110px;
  padding: 6px;
  border-radius: 12px;
  background: #26272a;
  border: 1px solid var(--qh-pop-line);
  box-shadow: var(--qh-pop-shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s, visibility 0s linear .16s;
}
.qh-user-pop li.language:hover > a > ul { opacity: 1; visibility: visible; transition: opacity .16s, visibility 0s; }
.qh-user-pop li.language ul li,
.qh-lang .qh-pop li { padding: 8px 12px; border-radius: 8px; color: var(--qh-pop-text); cursor: pointer; }
.qh-user-pop li.language ul li:hover,
.qh-lang .qh-pop li:hover { background: var(--qh-pop-hover); color: #fff; }
.qh-user-pop li.language ul li.on,
.qh-lang .qh-pop li.on { color: var(--qh-accent); }
.qh-header .qh-lang .qh-pop { left: auto; right: 0; min-width: 120px; transform-origin: top right; }

/* ---------------- 窄屏（电脑端，最小 1200） ---------------- */
@media (max-width: 1440px) {
  .qh-btn-publish span { display: none; }
  .qh-btn-publish { width: 36px; padding: 0; }
}
@media (max-width: 1366px) {
  .qh-inner { padding: 0 18px; }
  .qh-menu > li > a { padding: 0 10px; }
  .qh-menu > li > a i.fa::before { display: none; }
}

/* ============================================================
   搜索弹窗
   ============================================================ */
html.qh-so-lock, html.qh-so-lock body { overflow: hidden; }
.qh-so {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 92px 16px 40px;
  overflow-y: auto;
  background: rgba(8, 9, 10, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--qh-font);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility 0s linear .2s;
}
.qh-so.qh-show { opacity: 1; visibility: visible; transition: opacity .2s; }
.qh-so *, .qh-so *::before, .qh-so *::after { box-sizing: border-box; }
.qh-so button { margin: 0; font-family: inherit; line-height: normal; }
.qh-so-panel {
  width: 680px;
  max-width: 100%;
  border-radius: 16px;
  background: rgba(32, 33, 36, .94);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  color: rgba(255, 255, 255, .78);
  transform: translateY(-8px);
  transition: transform .25s var(--qh-ease);
}
.qh-so.qh-show .qh-so-panel { transform: none; }
.qh-so-head { padding: 12px; }

/* 输入行：帖子/用户 | 放大镜 | 输入框 | 高级搜索 | 搜索 */
.qh-so-field {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}
.qh-so-type { flex: none; display: flex; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, .28); }
.qh-so-type button {
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.qh-so-type button:hover { color: #fff; }
.qh-so-type button[aria-checked="true"] { background: rgba(255, 255, 255, .13); color: #fff; }
.qh-so-icon { flex: none; width: 18px; height: 18px; margin: 0 8px 0 12px; color: rgba(255, 255, 255, .45); }
.qh-so-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
}
.qh-so-input::placeholder { color: rgba(255, 255, 255, .33); }
.qh-so-input:focus, .qh-so-input:focus-visible { outline: none; box-shadow: none; }   /* 点击输入框时外框不描边、不变色 */
.qh-so-adv {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s, color .2s, opacity .2s;
}
.qh-so-adv svg { width: 16px; height: 16px; }
.qh-so-adv .qh-chev { width: 12px; height: 12px; background: var(--qh-i-chev) center / contain no-repeat; opacity: .6; transition: transform .25s var(--qh-ease); }
.qh-so-adv:hover, .qh-so-adv[aria-expanded="true"] { background: rgba(255, 255, 255, .07); color: #fff; }
.qh-so-adv[aria-expanded="true"] .qh-chev { transform: rotate(180deg); }
.qh-so-adv:disabled { opacity: .3; cursor: not-allowed; background: transparent; color: rgba(255, 255, 255, .62); }
.qh-so-adv-dot { position: absolute; top: 8px; left: 22px; display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--qh-accent); box-shadow: 0 0 0 2px #2a2b2e; }
.qh-so-adv.has-scope .qh-so-adv-dot { display: block; }
.qh-so .qh-so-submit {   /* 选择器要压过 .qh-so button 的 margin:0 */
  flex: none;
  height: 40px;
  margin-left: 4px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  background: var(--qh-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.qh-so-submit:hover { background-image: linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .08)); }
.qh-so-field.qh-shake { animation: qh-shake .32s; }
@keyframes qh-shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

/* 已选板块（高级搜索收起时显示） */
.qh-so-scope { display: none; align-items: center; gap: 8px; margin: 10px 4px 0; color: rgba(255, 255, 255, .5); font-size: 13px; }
.qh-so-scope.qh-show { display: flex; }
.qh-so-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 3px 0 10px;
  border: 1px solid rgba(var(--qh-accent-rgb), .32);
  border-radius: 7px;
  background: rgba(var(--qh-accent-rgb), .14);
  color: #ffa19b;
}
.qh-so-chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.qh-so-chip button:hover { background: rgba(var(--qh-accent-rgb), .25); color: #fff; }
.qh-so-chip svg, .qh-so-hist-x svg { width: 12px; height: 12px; }

/* 高级搜索面板 */
.qh-so-advpanel { display: none; margin-top: 12px; padding: 14px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 12px; background: rgba(0, 0, 0, .22); }
.qh-so-advpanel.qh-show { display: block; animation: qh-reveal .22s var(--qh-ease); }
@keyframes qh-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.qh-so-label { margin: 0 0 10px; color: rgba(255, 255, 255, .5); font-size: 13px; }
.qh-so-forums { display: flex; flex-wrap: wrap; gap: 8px; }
.qh-so-forum {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .76);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.qh-so-forum:hover { border-color: rgba(255, 255, 255, .24); color: #fff; }
.qh-so-forum[aria-checked="true"] { background: var(--qh-accent); border-color: var(--qh-accent); color: #fff; }

/* 历史 / 热搜 */
.qh-so-body { padding: 2px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.qh-so-sec { margin-top: 16px; }
.qh-so-sec[hidden] { display: none; }
.qh-so-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: rgba(255, 255, 255, .5); font-size: 13px; }
.qh-so-sec-head svg { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.qh-so-link { padding: 2px 6px; border: 0; border-radius: 5px; background: none; color: rgba(255, 255, 255, .42); font-size: 12px; cursor: pointer; }
.qh-so-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.qh-so-words { display: flex; flex-wrap: wrap; gap: 8px; }
.qh-so-word {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.qh-so-word:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.qh-so-word.is-hot { background: transparent; border: 1px solid rgba(255, 255, 255, .1); }
.qh-so-word.is-hot:hover { border-color: rgba(var(--qh-accent-rgb), .6); background: rgba(var(--qh-accent-rgb), .1); color: #fff; }
.qh-so-hist { display: inline-flex; align-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); transition: background-color .15s; }
.qh-so-hist:hover { background: rgba(255, 255, 255, .12); }
.qh-so-hist .qh-so-word { padding-right: 6px; background: transparent; }
.qh-so .qh-so-hist-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity .15s, background-color .15s;
}
.qh-so-hist-x svg { width: 11px; height: 11px; }
.qh-so-hist:hover .qh-so-hist-x, .qh-so-hist-x:focus-visible { opacity: .55; }
.qh-so-hist-x:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.qh-so-foot { margin: 18px 0 0; color: rgba(255, 255, 255, .32); font-size: 12px; }
.qh-so-foot kbd { padding: 2px 5px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 4px; color: rgba(255, 255, 255, .55); font: 600 11px/1 ui-monospace, Consolas, monospace; }
.qh-so button:focus-visible { outline: 2px solid rgba(var(--qh-accent-rgb), .8); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  .qh-header *, .qh-header *::before, .qh-header *::after,
  .qh-so, .qh-so *, .qh-so *::before, .qh-so *::after { transition-duration: .01ms !important; animation: none !important; }
}
