/* ==================================================================
 * 维度狐网址导航 · 独立频道样式  v1.2.0  2026-11-08
 * 只作用于 /daohang/（或独立域名 hao.*）页面，类名统一 dh- 前缀，
 * 不引入任何第三方 CSS / 字体，避免与主站主题冲突或拖慢首屏。
 * ================================================================== */
:root {
  --dh-blue: #2563eb;
  --dh-blue-d: #1d4ed8;
  --dh-blue-l: #eff5ff;
  --dh-bg: #f4f7fc;
  --dh-card: #ffffff;
  --dh-top-bg: #ffffff;
  --dh-line: #e8edf5;
  --dh-txt: #1f2937;
  --dh-sub: #6b7280;
  --dh-mute: #9aa4b2;
  --dh-soft: #f7f9fd;
  --dh-radius: 12px;
  --dh-shadow: 0 2px 14px rgba(31, 61, 120, .055);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.dh-body {
  margin: 0; padding: 0; background: var(--dh-bg); color: var(--dh-txt);
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  transition: background-color .2s, color .2s;
}
a { color: var(--dh-txt); text-decoration: none; transition: color .16s; }
a:hover { color: var(--dh-blue); }
img { border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font-family: inherit; font-size: inherit; outline: none; }
.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #60a5fa; outline-offset: 2px;
}
/* 键盘用户的跳转链接：平时移出视口，聚焦时才出现 */
.dh-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--dh-blue); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 0;
}
.dh-skip:focus { left: 0; }

/* ---------- 顶栏 ---------- */
.dh-topbar { background: var(--dh-top-bg); border-bottom: 1px solid var(--dh-line); font-size: 13px; }
.dh-topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 6px 14px; flex-wrap: wrap; }
.dh-top-left { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--dh-sub); flex-wrap: wrap; }
.dh-top-left b { color: var(--dh-txt); font-weight: 600; }
.dh-top-date { color: var(--dh-sub); }
.dh-top-dot { color: #cbd5e5; }
.dh-top-right { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.dh-auth-links { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.dh-auth-links a { padding: 3px 9px; border-radius: 5px; color: var(--dh-sub); white-space: nowrap; }
.dh-auth-links a:hover { background: var(--dh-blue-l); color: var(--dh-blue); }
.dh-top-right .dh-hi { color: #e05a47; font-weight: 600; }
.dh-sep { color: #d8dee9; }
/* 夜间模式开关 */
.dh-theme-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--dh-line); background: var(--dh-soft); color: var(--dh-sub);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; line-height: 1.6;
}
.dh-theme-btn:hover { color: var(--dh-blue); border-color: #bfd3ff; }
.dh-theme-ico { width: 12px; height: 12px; border-radius: 50%; background: currentColor; display: inline-block; position: relative; flex: 0 0 auto; }
.dh-theme-ico::after { content: ""; position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--dh-soft); }

/* ---------- 顶部公告条 ---------- */
.dh-notice { background: linear-gradient(90deg, #fff8e8, #fffdf6); border-bottom: 1px solid #f3e3bd; color: #8a5a10; font-size: 13px; }
.dh-notice .wrap { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 34px; padding: 5px 0; text-align: center; flex-wrap: wrap; }
.dh-notice b { background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 5px; letter-spacing: 1px; flex: 0 0 auto; }
.dh-notice a { color: #b45309; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 头部 / 搜索（PC 整体居中，移动端两行居中） ---------- */
.dh-head { padding: 20px 0 18px; }
.dh-head-in { display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap; }
.dh-logo { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
/* logo.svg 是 500x240 的内嵌位图（四周约 8% 留白）。放到 56px 高时，
   实际图形约 48px，正好与 44px 高的搜索框视觉等量，不会显得头轻脚重。 */
.dh-logo img { display: block; height: 56px; width: auto; max-width: 220px; object-fit: contain; }
.dh-searchbox { flex: 0 1 660px; min-width: 0; width: 100%; max-width: 660px; }

/* 引擎行：6 个搜索按钮 + 分隔 + 三个兄弟站外链 */
.dh-engines-wrap { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dh-engines { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.dh-eng-btn, .dh-eng-link, .dh-eng-more {
  border: 0; background: transparent; color: var(--dh-sub); cursor: pointer;
  padding: 4px 11px; border-radius: 6px; font-size: 13px; line-height: 1.5; white-space: nowrap;
}
.dh-eng-btn.on { background: var(--dh-blue); color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(37, 99, 235, .2); }
.dh-eng-btn:not(.on):hover, .dh-eng-link:hover { background: var(--dh-blue-l); color: var(--dh-blue); }
.dh-eng-link { color: #4b6da8; font-weight: 600; }
.dh-eng-link::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #a8c2f0; margin-right: 6px; vertical-align: 2px; }
.dh-eng-link:hover::before { background: var(--dh-blue); }
.dh-eng-sep { width: 1px; height: 14px; background: #dce4f0; margin: 0 7px; flex: 0 0 auto; }
.dh-eng-more { display: none; align-items: center; gap: 5px; background: var(--dh-blue-l); color: #3b5b9e; font-size: 12px; padding: 4px 9px; flex: 0 0 auto; }
.dh-eng-more i, .dh-quick-toggle i {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; display: inline-block; transition: transform .18s;
}
.is-open .dh-eng-more i, .dh-quick.is-open .dh-quick-toggle i { transform: rotate(180deg); }

/* hao123 风格搜索框：白底蓝边、渐变按钮、聚焦发光 */
.dh-search-form {
  display: flex; height: 44px; background: var(--dh-card); border: 2px solid var(--dh-blue);
  border-radius: 10px;
  /* 下拉面板要溢出到输入框下方，这里不能裁切；圆角由内部子元素各自补齐 */
  overflow: visible;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .10);
  transition: border-color .2s, box-shadow .2s;
}
.dh-search-form:focus-within { border-color: var(--dh-blue-d); box-shadow: 0 6px 22px rgba(37, 99, 235, .20); }
.dh-search-form input { flex: 1; border: 0; padding: 0 14px; min-width: 0; font-size: 14px; color: var(--dh-txt); background: transparent; }
.dh-search-form input::placeholder { color: #a8b0be; }
.dh-search-form > button {
  border: 0; background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff;
  padding: 0 24px; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap; display: flex; align-items: center; justify-content: center;
  border-radius: 0 8px 8px 0;
  transition: filter .18s;
}
.dh-search-form > button:hover { filter: brightness(1.08); }
.dh-search-ico { display: inline-block; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; position: relative; margin-right: 8px; vertical-align: -1px; }
.dh-search-ico::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 7px; height: 2px; background: #fff; transform: rotate(45deg); border-radius: 2px; }

/* 站内搜索范围：自绘下拉
   原生 <select> 展开后的选项面板由操作系统绘制，背景、圆角、悬停态都改不了，
   在 Windows 上就是一块灰白列表。这里改为「按钮 + 自绘面板」，
   原生 select 只在 JS 失效时作为兜底，脚本接管后（.has-js）视觉隐藏。 */
.dh-type { display: none; position: relative; flex: 0 0 auto; }
.dh-search-form.is-site .dh-type { display: block; }

/* 降级态：没跑 JS 时直接显示原生 select，外观与按钮保持一致 */
.dh-type-native {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  height: 100%; border: 0; border-right: 1px solid #dbe6fb;
  background-color: #f1f6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%232563eb' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 9px 6px;
  color: #2563eb; font-size: 13px; font-weight: 600; letter-spacing: .5px;
  padding: 0 27px 0 14px; cursor: pointer; outline: none;
  border-radius: 8px 0 0 8px;
}
.dh-type-native option { color: #1f2937; background: #fff; font-weight: 400; letter-spacing: 0; }
.dh-type.has-js .dh-type-native { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

.dh-type-btn {
  display: none; align-items: center; gap: 6px; height: 100%;
  border: 0; border-right: 1px solid #dbe6fb;
  background: #f1f6ff; color: #2563eb;
  font-size: 13px; font-weight: 600; letter-spacing: .5px;
  padding: 0 12px 0 14px; cursor: pointer; outline: none;
  border-radius: 8px 0 0 8px;
  transition: background-color .18s, color .18s;
}
.dh-type.has-js .dh-type-btn { display: flex; }
.dh-type-btn:hover, .dh-type.is-open .dh-type-btn { background: #e4efff; }
.dh-type-btn:focus-visible { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .22); }
.dh-type-caret {
  width: 0; height: 0; flex: 0 0 auto;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; transition: transform .2s;
}
.dh-type.is-open .dh-type-caret { transform: rotate(180deg); }

.dh-type-menu {
  position: absolute; left: 0; top: calc(100% + 9px);
  min-width: 136px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid #e3ebf9; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(23, 43, 77, .16), 0 2px 6px rgba(23, 43, 77, .06);
  z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-7px) scale(.97);
  transform-origin: top left;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.dh-type.is-open .dh-type-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.dh-type-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 7px; cursor: pointer;
  color: #4b5b73; font-size: 13px; line-height: 1.2; white-space: nowrap;
  transition: background-color .14s, color .14s;
}
.dh-type-opt:hover, .dh-type-opt.is-active { background: #eef4ff; color: #1d4ed8; }
.dh-type-opt.is-on { background: #e8f1ff; color: #1d4ed8; font-weight: 600; }
.dh-type-tick { width: 12px; height: 12px; flex: 0 0 12px; opacity: 0; }
.dh-type-opt.is-on .dh-type-tick {
  opacity: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.6 2.6L10 3.4' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}
/* 热门搜索：PC 固定一行，每词等宽、过长省略，多出来的用「…」收起 */
.dh-hot-line { margin-top: 8px; color: var(--dh-mute); font-size: 12px; display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; overflow: hidden; }
.dh-hot-line > span { color: var(--dh-sub); flex: 0 0 auto; }
.dh-hot-line a.dh-hot-word, .dh-hot-line a.dh-hot-ellipsis {
  flex: 0 1 88px; width: 88px; min-width: 54px; max-width: 88px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
  color: #5b6b86; background: #eaf0fb; border-radius: 999px; padding: 1px 8px; font-size: 12px;
}
.dh-hot-line a:hover { background: var(--dh-blue); color: #fff; }
.dh-hot-line a.dh-hot-extra { display: none; }
.dh-hot-line a.dh-hot-ellipsis { flex: 0 0 26px; width: 26px; min-width: 26px; max-width: 26px; padding: 1px 0; font-weight: 700; letter-spacing: 1px; }
/* 服务端判定「没有更多热词」时先隐藏，由前端按宽度收起逻辑再决定是否打开 */
.dh-hot-line a.dh-hot-ellipsis-auto { display: none; }
.dh-hot-line a.dh-hot-ellipsis.is-on { display: inline-block; }

/* ---------- 栏目快捷导航 / 权威站点（同一套视觉） ---------- */
.dh-quick, .dh-authority {
  background: var(--dh-card); border: 1px solid var(--dh-line); border-radius: 10px;
  padding: 8px 10px; box-shadow: var(--dh-shadow);
}
.dh-quick { margin-top: 2px; }
.dh-quick-toggle {
  display: none; width: 100%; align-items: center; justify-content: center; gap: 8px;
  border: 0; background: transparent; color: var(--dh-blue); font-weight: 600;
  font-size: 12px; padding: 6px 0 2px; cursor: pointer;
}
/* 栏目少到一屏放得下时，脚本给 .dh-quick 加 .is-all，收掉「更多栏目」按钮 */
.dh-quick.is-all .dh-quick-toggle { display: none !important; }
.dh-quick-links { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.dh-quick-links a { flex: 0 0 auto; padding: 6px 13px; border-radius: 7px; font-size: 13px; color: #4b5563; white-space: nowrap; }
.dh-quick-links a:hover { background: var(--dh-blue-l); color: var(--dh-blue); }

.dh-authority { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.dh-authority-label {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  padding: 5px 13px; border-radius: 7px; letter-spacing: .5px;
}
.dh-authority-links { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; min-width: 0; }
.dh-authority-links a {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: 7px; font-size: 13px; color: #4b5563; white-space: nowrap;
}
.dh-authority-links a:hover { background: var(--dh-blue-l); color: var(--dh-blue); }
.dh-authority-links img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.dh-authority-links a::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #b9cbf0; flex: 0 0 auto; }
.dh-authority-links a:hover::before { background: var(--dh-blue); }
.dh-authority-links a.has-ico::before { display: none; }

/* ---------- 主体两栏 ---------- */
.dh-main { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 18px; padding: 18px 0 30px; align-items: start; }
.dh-col-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.dh-col-side { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.dh-card { background: var(--dh-card); border: 1px solid var(--dh-line); border-radius: var(--dh-radius); box-shadow: var(--dh-shadow); overflow: hidden; }
.dh-card-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--dh-line); gap: 10px; }
.dh-card-hd h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.dh-card-hd h2::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--dh-blue); }
.dh-card-hd h2 small { font-size: 12px; font-weight: 400; color: var(--dh-mute); }
.dh-card-hd .more { font-size: 12px; color: var(--dh-mute); white-space: nowrap; }
.dh-card-hd .more:hover { color: var(--dh-blue); }
.dh-card-bd { padding: 16px 18px; }
.dh-sub-title { margin: 0 0 6px; font-size: 14px; color: var(--dh-blue); }

/* 名站导航：图标网格 */
.dh-sites-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.dh-site-ico { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 10px; text-align: center; }
.dh-site-ico:hover { background: var(--dh-blue-l); }
.dh-site-ico i {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-style: normal; font-size: 17px; font-weight: 700; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: 0 3px 9px rgba(37, 99, 235, .16);
}
.dh-site-ico i img { width: 100%; height: 100%; object-fit: cover; }
.dh-site-ico span { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-site-ico em { font-size: 11px; color: var(--dh-mute); font-style: normal; margin-top: -5px; }

/* 常用网址：文字网格 */
.dh-links-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 10px; }
.dh-links-grid a { padding: 8px 10px; border-radius: 7px; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dh-links-grid a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #c7d6f5; flex: 0 0 auto; }
.dh-links-grid a:hover { background: var(--dh-blue-l); }
.dh-links-grid a span { overflow: hidden; text-overflow: ellipsis; }
.dh-links-grid a small { color: var(--dh-mute); font-size: 11px; margin-left: auto; }

/* 分类网址 */
.dh-cate-list { display: flex; flex-direction: column; gap: 12px; }
.dh-cate-row { display: flex; gap: 12px; align-items: flex-start; }
.dh-cate-name { flex: 0 0 92px; padding: 7px 10px; background: var(--dh-blue-l); color: var(--dh-blue-d); border-radius: 7px; font-weight: 600; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-cate-sites { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; }
.dh-cate-sites a { padding: 6px 8px; border-radius: 6px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-cate-sites a:hover { background: var(--dh-blue-l); }

/* 通用文字列表 */
.dh-list { display: flex; flex-direction: column; }
.dh-list li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px dashed var(--dh-line); }
.dh-list li:last-child { border-bottom: 0; }
.dh-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-list li .dh-rank { flex: 0 0 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 5px; background: var(--dh-soft); color: var(--dh-sub); font-size: 11px; font-weight: 700; }
.dh-list li:nth-child(1) .dh-rank { background: #fee2e2; color: #dc2626; }
.dh-list li:nth-child(2) .dh-rank { background: #ffedd5; color: #ea580c; }
.dh-list li:nth-child(3) .dh-rank { background: #fef3c7; color: #d97706; }
.dh-list li .dh-meta { color: var(--dh-mute); font-size: 12px; flex: 0 0 auto; }
.dh-list-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }

/* 百科卡片 */
.dh-baike-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dh-baike-item { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--dh-line); border-radius: 9px; background: var(--dh-soft); }
.dh-baike-item:hover { border-color: #bfd3ff; background: var(--dh-card); }
.dh-baike-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef2f9; flex: 0 0 auto; }
.dh-baike-item .ph { width: 48px; height: 48px; border-radius: 8px; background: linear-gradient(135deg, #93c5fd, #3b82f6); color: #fff; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.dh-baike-item strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-baike-item p { margin: 3px 0 0; color: var(--dh-mute); font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 侧栏 ---------- */
.dh-side-hd { padding: 12px 16px; border-bottom: 1px solid var(--dh-line); font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.dh-side-hd span { font-weight: 400; color: var(--dh-mute); font-size: 12px; }
.dh-weather { padding: 16px; }
.dh-weather-top { display: flex; align-items: center; justify-content: space-between; }
.dh-weather-city { font-size: 13px; color: var(--dh-sub); }
.dh-weather-temp { font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--dh-blue-d); }
.dh-weather-temp small { font-size: 14px; font-weight: 400; color: var(--dh-sub); }
.dh-weather-info { display: flex; justify-content: space-between; color: var(--dh-sub); font-size: 12px; margin-top: 6px; }
.dh-weather-fc { display: flex; gap: 6px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--dh-line); }
.dh-weather-fc div { flex: 1; text-align: center; font-size: 12px; color: var(--dh-sub); }
.dh-weather-fc b { display: block; color: var(--dh-txt); font-weight: 600; font-size: 13px; }
.dh-weather-off { color: var(--dh-mute); font-size: 12px; text-align: center; padding: 10px 0; }

/* 专题聚合：6 色标签卡 + 换一批 */
.dh-topic-acts { display: inline-flex; align-items: center; gap: 6px; }
.dh-topic-refresh {
  border: 1px solid var(--dh-line); background: var(--dh-soft); color: var(--dh-sub);
  border-radius: 999px; font-size: 11px; padding: 2px 9px; cursor: pointer;
}
.dh-topic-refresh:hover { background: var(--dh-blue-l); color: var(--dh-blue); border-color: #bfd3ff; }
.dh-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 14px 6px; }
.dh-topic {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 9px; border-radius: 9px; border: 1px solid var(--dh-line);
  background: var(--dh-soft); color: var(--dh-txt);
  transition: transform .16s, box-shadow .16s, background-color .16s;
}
.dh-topic i {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--dh-blue); flex: 0 0 auto;
}
.dh-topic span { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-topic-hide { display: none !important; }
/* 六种色系：用半透明底色 + 实心图标，浅色/深色主题都能保持对比度 */
.dh-topic-t1 { --t-rgb: 37 99 235; }
.dh-topic-t2 { --t-rgb: 124 58 237; }
.dh-topic-t3 { --t-rgb: 13 148 136; }
.dh-topic-t4 { --t-rgb: 217 119 6; }
.dh-topic-t5 { --t-rgb: 225 29 72; }
.dh-topic-t6 { --t-rgb: 79 70 229; }
.dh-topic { background: var(--dh-soft); }
.dh-topic { background: rgb(var(--t-rgb) / .09); border-color: rgb(var(--t-rgb) / .22); }
.dh-topic i { background: rgb(var(--t-rgb)); }
.dh-topic:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(var(--t-rgb) / .22); background: rgb(var(--t-rgb) / .16); }
.dh-side-more { padding: 4px 14px 14px; text-align: right; }
.dh-side-more a { font-size: 12px; color: var(--dh-mute); }
.dh-side-more a:hover { color: var(--dh-blue); }
.dh-mail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px; }
.dh-mail-grid a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--dh-line); border-radius: 8px; font-size: 13px; overflow: hidden; white-space: nowrap; }
.dh-mail-grid a:hover { border-color: #bfd3ff; background: var(--dh-blue-l); }
.dh-mail-grid i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 11px; font-style: normal; flex: 0 0 auto; }
.dh-tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px; }
.dh-tool-grid a { padding: 9px 8px; text-align: center; background: var(--dh-soft); border-radius: 8px; font-size: 13px; }
.dh-tool-grid a:hover { background: var(--dh-blue-l); color: var(--dh-blue); }
.dh-side-list { padding: 8px 16px 14px; }
.dh-side-list a { display: block; padding: 7px 0; border-bottom: 1px dashed var(--dh-line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dh-side-list a:last-child { border-bottom: 0; }

/* ---------- 页脚 ---------- */
.dh-footer { background: var(--dh-top-bg); border-top: 1px solid var(--dh-line); padding: 24px 0 30px; color: var(--dh-mute); font-size: 12px; text-align: center; }
.dh-footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.dh-footer-links a { color: var(--dh-sub); }
.dh-footer p { margin: 5px 0; }
.dh-footer a { color: var(--dh-mute); }

/* ---------- 回到顶部 ---------- */
.dh-totop {
  position: fixed; right: 22px; bottom: 26px; width: 40px; height: 40px; border-radius: 10px;
  background: var(--dh-card); border: 1px solid var(--dh-line); box-shadow: 0 4px 16px rgba(31, 61, 120, .12);
  color: var(--dh-sub); display: none; place-items: center; cursor: pointer; font-size: 18px; z-index: 20;
}
.dh-totop.show { display: grid; }
.dh-totop:hover { color: var(--dh-blue); border-color: #bfd3ff; }

/* ---------- 深色 / 护眼模式 ---------- */
html[data-dh-theme="dark"] {
  --dh-blue: #5b8cff;
  --dh-blue-d: #7aa2ff;
  --dh-blue-l: #1d2a44;
  --dh-bg: #111722;
  --dh-card: #1a2230;
  --dh-top-bg: #161e2b;
  --dh-line: #2a3548;
  --dh-txt: #e4eaf4;
  --dh-sub: #9dabc0;
  --dh-mute: #78879d;
  --dh-soft: #202b3c;
  --dh-shadow: 0 2px 14px rgba(0, 0, 0, .22);
}
html[data-dh-theme="dark"] body.dh-body { background: var(--dh-bg); }
html[data-dh-theme="dark"] .dh-search-form { box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
html[data-dh-theme="dark"] .dh-search-form input::placeholder { color: #6d7c92; }
html[data-dh-theme="dark"] .dh-type-native {
  background-color: #1c2941; border-right-color: #2b3b56; color: #9dc0ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239dc0ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-dh-theme="dark"] .dh-type-native option { background: #1c2941; color: #dce7f7; }
html[data-dh-theme="dark"] .dh-type-btn {
  background: #1c2941; border-right-color: #2b3b56; color: #9dc0ff;
}
html[data-dh-theme="dark"] .dh-type-btn:hover,
html[data-dh-theme="dark"] .dh-type.is-open .dh-type-btn { background: #243657; }
html[data-dh-theme="dark"] .dh-type-btn:focus-visible { box-shadow: inset 0 0 0 2px rgba(157, 192, 255, .28); }
html[data-dh-theme="dark"] .dh-type-menu {
  background: #182233; border-color: #2b3b56;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
}
html[data-dh-theme="dark"] .dh-type-opt { color: #b9c9e6; }
html[data-dh-theme="dark"] .dh-type-opt:hover,
html[data-dh-theme="dark"] .dh-type-opt.is-active { background: #22304a; color: #cfe0ff; }
html[data-dh-theme="dark"] .dh-type-opt.is-on { background: #1e2d47; color: #9dc0ff; }
html[data-dh-theme="dark"] .dh-type-opt.is-on .dh-type-tick { filter: brightness(1.3); }
/* logo 是蓝色图形 + 透明底，深色背景下给一层浅色底衬保证可读性 */
html[data-dh-theme="dark"] .dh-logo img { background: #f7faff; border-radius: 10px; padding: 3px 8px; }
html[data-dh-theme="dark"] .dh-hot-line a.dh-hot-word,
html[data-dh-theme="dark"] .dh-hot-line a.dh-hot-ellipsis { background: #25324a; color: #b9c9e6; }
html[data-dh-theme="dark"] .dh-hot-line a:hover { background: var(--dh-blue); color: #0f1724; }
html[data-dh-theme="dark"] .dh-quick-links a,
html[data-dh-theme="dark"] .dh-authority-links a { color: #b7c4d8; }
html[data-dh-theme="dark"] .dh-cate-name { background: #22304a; color: #a9c4ff; }
html[data-dh-theme="dark"] .dh-site-ico:hover,
html[data-dh-theme="dark"] .dh-links-grid a:hover,
html[data-dh-theme="dark"] .dh-cate-sites a:hover,
html[data-dh-theme="dark"] .dh-tool-grid a:hover,
html[data-dh-theme="dark"] .dh-mail-grid a:hover,
html[data-dh-theme="dark"] .dh-auth-links a:hover { background: #22304a; }
html[data-dh-theme="dark"] .dh-eng-sep { background: #3a4860; }
html[data-dh-theme="dark"] .dh-notice { background: linear-gradient(90deg, #33280f, #2a2416); border-bottom-color: #4a3a18; color: #e7c98a; }
html[data-dh-theme="dark"] .dh-notice a { color: #f0c674; }
html[data-dh-theme="dark"] .dh-baike-item .ph { background: linear-gradient(135deg, #3b6fc4, #2b57a8); }
html[data-dh-theme="dark"] .dh-list li:nth-child(1) .dh-rank { background: #4a2027; color: #ff9b9b; }
html[data-dh-theme="dark"] .dh-list li:nth-child(2) .dh-rank { background: #4a3020; color: #ffbe8c; }
html[data-dh-theme="dark"] .dh-list li:nth-child(3) .dh-rank { background: #463b18; color: #f5d876; }

/* ---------- 响应式（PC / 移动无缝切换） ---------- */
@media (max-width: 1080px) {
  .dh-sites-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dh-baike-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-cate-sites { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* 顶栏整体居中（含「登录 注册 找回密码 | 返回主站 提交网站」），日期保留显示 */
  .dh-topbar .wrap { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 0; text-align: center; }
  .dh-top-right, .dh-auth-links { justify-content: center; }
  /* LOGO 独占一行居中，搜索框在下方 */
  .dh-head { padding: 16px 0 14px; }
  .dh-head-in { flex-direction: column; align-items: center; gap: 14px; }
  .dh-logo img { height: 48px; max-width: 200px; }
  .dh-searchbox { flex: 1 1 auto; max-width: none; }
  /* 热门搜索：移动端同样固定一行，放不下的词由脚本收起，末尾保留「…」 */
  .dh-hot-line { overflow: hidden; }
  /* 引擎行超长时折叠，点击「更多」展开为换行网格，不横向滑动 */
  .dh-engines-wrap.js-fold .dh-eng-more { display: inline-flex; }
  .dh-engines.js-fold:not(.is-open) .dh-eng-extra { display: none; }
  .dh-engines.js-fold.is-open { flex-wrap: wrap; row-gap: 4px; }
  /* 栏目快捷导航：第一行常显，其余折叠，点击展开后换行成网格 */
  .dh-quick.js-fold .dh-quick-toggle { display: inline-flex; }
  .dh-quick.js-fold .dh-quick-links {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  }
  .dh-quick.js-fold .dh-quick-links a { text-align: center; padding: 7px 3px; font-size: 12px; }
  .dh-quick.js-fold .dh-quick-links a:nth-child(n+5) { display: none; }
  .dh-quick.js-fold.is-open .dh-quick-links {
    margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--dh-line);
  }
  .dh-quick.js-fold.is-open .dh-quick-links a:nth-child(n+5) { display: block; }
  /* 权威站点不折叠，只换行 */
  .dh-authority { align-items: flex-start; }
  .dh-main { grid-template-columns: minmax(0, 1fr); }
  .dh-col-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .dh-topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 20px, 1200px); }
  .dh-top-left { font-size: 12px; gap: 6px; }
  .dh-auth-links a { padding: 3px 7px; font-size: 12px; }
  .dh-logo img { height: 44px; max-width: 190px; }
  .dh-search-form { height: 40px; border-radius: 9px; }
  .dh-search-form input { padding: 0 10px; font-size: 13px; }
  .dh-type-btn, .dh-type-native { padding: 0 9px 0 10px; font-size: 12px; letter-spacing: 0; gap: 5px; }
  .dh-type-btn { border-radius: 7px 0 0 7px; }
  .dh-type-native { background-position: right 7px center; background-size: 8px 5px; border-radius: 7px 0 0 7px; }
  .dh-type-menu { min-width: 120px; padding: 5px; top: calc(100% + 7px); border-radius: 10px; }
  .dh-type-opt { padding: 8px 10px; font-size: 12.5px; }
  .dh-search-form > button { padding: 0 15px; font-size: 13px; border-radius: 0 7px 7px 0; }
  .dh-eng-btn, .dh-eng-link { padding: 4px 8px; font-size: 12px; }
  .dh-hot-line a.dh-hot-word { flex: 0 1 64px; width: 64px; max-width: 64px; }
  .dh-quick.js-fold .dh-quick-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dh-quick.js-fold .dh-quick-links a:nth-child(n+4) { display: none; }
  .dh-quick.js-fold.is-open .dh-quick-links a:nth-child(n+4) { display: block; }
  .dh-authority { flex-direction: column; align-items: flex-start; gap: 7px; }
  .dh-authority-links a { padding: 5px 8px; font-size: 12px; }
  .dh-sites-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dh-links-grid, .dh-cate-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-list-2col, .dh-baike-grid { grid-template-columns: minmax(0, 1fr); }
  .dh-col-side { grid-template-columns: minmax(0, 1fr); }
  .dh-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-cate-name { flex-basis: 78px; }
  .dh-card-bd { padding: 12px; }
  .dh-card-hd { padding: 12px; }
  .dh-totop { right: 12px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* 栏目少到一屏放得下时（脚本加 .is-all）不再用等分网格，改为居中的自然排列，
   两三个栏目不会挤在左侧。放在媒体查询之后，靠顺序覆盖上面的 grid。 */
@media (max-width: 900px) {
  .dh-quick.js-fold.is-all .dh-quick-links {
    display: flex; flex-wrap: wrap; justify-content: center;
  }
}
