/* ============ 设计令牌（复刻 xdwdh.com 配色体系） ============ */
:root {
  /* 品牌色 */
  --brand: #1e73be;
  --brand-strong: #175d99;
  --brand-soft: #eaf2fb;
  --brand-ring: rgba(30, 115, 190, .28);
  --accent: #f1404b;          /* 推荐角标红 */
  --accent-soft: #ffecee;

  /* 中性色（浅色主题） */
  --bg: #f9f9f9;
  --bg-soft: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --text: #14171b;
  --text-2: #5b6470;
  --text-3: #8a94a6;
  --border: #e9edf2;
  --border-strong: #d9e0e9;

  /* 尺寸与效果 */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 27, .04), 0 2px 8px rgba(20, 23, 27, .04);
  --shadow: 0 1px 2px rgba(20, 23, 27, .04), 0 8px 24px rgba(20, 23, 27, .06);
  --shadow-hover: 0 6px 14px rgba(30, 115, 190, .10), 0 18px 40px rgba(20, 23, 27, .10);

  --header-h: 64px;
  --container: 1440px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #12161c;
  --bg-soft: #171c24;
  --surface: #1b212a;
  --surface-2: #20272f;
  --text: #e8edf4;
  --text-2: #a4b0c0;
  --text-3: #74808f;
  --border: #2a323d;
  --border-strong: #37414e;
  --brand-soft: #16283a;
  --accent-soft: #3a1f23;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 16px rgba(0, 0, 0, .35);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ============ 基础 ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px); }

/* ============ 顶部导航栏 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(20,23,27,.03);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; height: 100%;
  padding: 0 clamp(14px, 3vw, 32px);
  display: flex; align-items: center; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #3b8fd4);
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--brand-ring);
}
.logo-text strong { display: block; font-size: 17px; color: var(--text); line-height: 1.25; }
.logo-text small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.icon-btn:hover { background: var(--bg-soft); border-color: var(--border-strong); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.hamburger { display: none; flex-direction: column; gap: 4px; padding: 10px; }
.hamburger span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ 布局：快捷区跨两列 + 侧栏 + 主区 ============ */
.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: var(--container);
  margin: 0 auto;
}

/* ---- 顶部快捷区（跨两列全宽） ---- */
.quicklinks {
  grid-column: 1 / -1;
  background: transparent;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  padding-top: 12px;
}
.ql-row { display: flex; align-items: center; gap: 16px; padding: 6px 0; min-width: 0; }
.ql-row-main { flex-wrap: wrap; }

.ql-mini { display: flex; gap: 6px; flex-shrink: 0; }
.ql-mini-link {
  font-size: 13px; color: var(--text-2); padding: 3px 10px;
  border-radius: 6px; transition: color .2s, background .2s;
}
.ql-mini-link:hover { color: var(--brand); background: var(--brand-soft); }

.ql-search { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 280px; flex-wrap: wrap; }
.ql-engines { display: flex; gap: 2px; flex-wrap: wrap; }
.ql-engine {
  font-size: 13px; padding: 5px 12px; border: none;
  background: transparent; color: var(--text-2);
  border-radius: 7px; transition: all .2s;
}
.ql-engine:hover { color: var(--brand); background: var(--brand-soft); }
.ql-engine.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

.ql-form { display: flex; align-items: center; flex: 1; min-width: 240px; max-width: 520px; }
.ql-form input {
  flex: 1; height: 40px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px 0 0 10px;
  background: var(--surface); color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ql-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.ql-go {
  height: 40px; padding: 0 18px; border: none;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
  border-radius: 0 10px 10px 0;
  display: flex; align-items: center; gap: 6px;
  transition: background .2s;
}
.ql-go:hover { background: var(--brand-strong); }
.ql-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ql-row-tags { flex-wrap: wrap; gap: 10px; padding-bottom: 10px; }
.ql-tag-label { font-size: 13px; color: var(--text-3); flex-shrink: 0; }
.ql-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ql-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border); transition: all .2s;
}
.ql-tag:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* ---- 左侧分类侧边栏 ---- */
.sidebar {
  position: static; align-self: start;
  padding: 22px clamp(14px, 3vw, 32px) 24px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.sidebar-search { position: relative; margin-bottom: 16px; }
.sidebar-search input {
  width: 100%; height: 38px; padding: 0 32px 0 36px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font-size: 13px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.sidebar-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.ss-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round;
}
.ss-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border: none; background: var(--bg-soft);
  border-radius: 50%; color: var(--text-3); font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 14px;
  transition: all .2s; border: 1px solid transparent;
}
.side-nav-item:hover { color: var(--brand); background: var(--brand-soft); }
.side-nav-item.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.side-nav-item .sn-icon { font-size: 16px; width: 20px; text-align: center; }
.side-nav-item .sn-count {
  margin-left: auto; font-size: 11px; color: var(--text-3);
  background: var(--bg-soft); border-radius: 10px; padding: 1px 7px;
}
.side-nav-item:hover .sn-count, .side-nav-item.is-active .sn-count { background: #fff; }

/* ---- 主内容区 ---- */
main { min-width: 0; padding: 0 clamp(14px, 3vw, 32px) 40px; }

.widget-strip { margin: 16px 0 8px; }

/* 统计条 */
.stat-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 0 4px; margin-bottom: 8px;
}
.stat-chip {
  font-size: 12px; color: var(--text-2); background: var(--bg-soft);
  border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px;
}
.stat-chip b { color: var(--brand); font-weight: 700; }

/* ---- 首页分类入口网格 ---- */
.cat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 8px;
}
.cat-entry {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.cat-entry:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
}
.cat-entry .ce-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.cat-entry .ce-body { min-width: 0; flex: 1; }
.cat-entry .ce-name { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.cat-entry .ce-count {
  font-size: 11px; font-weight: 400; color: var(--text-3);
  background: var(--bg-soft); border-radius: 10px; padding: 1px 8px; flex-shrink: 0;
}
.cat-entry .ce-desc {
  font-size: 12px; color: var(--text-2); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-entry .ce-go { flex-shrink: 0; color: var(--text-3); font-size: 13px; transition: color .2s, transform .2s; }
.cat-entry:hover .ce-go { color: var(--brand); transform: translateX(3px); }

/* ---- 分类区块 ---- */
.category-list { display: flex; flex-direction: column; gap: 28px; }
.category-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.section-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.section-title { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-icon { font-size: 20px; }
.section-title .sec-count {
  font-size: 12px; font-weight: 400; color: var(--text-3);
  background: var(--bg-soft); border-radius: 10px; padding: 2px 9px;
}
.section-desc { font-size: 13px; color: var(--text-3); margin: 0; }
.view-all {
  margin-left: auto; font-size: 13px; color: var(--brand);
  padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border);
  transition: all .2s; background: var(--surface);
}
.view-all:hover { background: var(--brand-soft); border-color: var(--brand); }

/* tabs */
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-btn {
  font-size: 13px; padding: 5px 13px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); transition: all .2s;
}
.tab-btn:hover { color: var(--brand); border-color: var(--brand); }
.tab-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.tab-btn .tab-n {
  font-size: 11px; opacity: .75; margin-left: 3px;
}

/* 卡片网格 */
.card-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}
.site-card {
  position: relative;
  display: flex; gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease), background-color .3s var(--ease);
  height: 100%;
  min-height: 96px;
}
.site-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow-hover);
  background: var(--surface-2);
}
.site-ico {
  position: relative;
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; overflow: hidden;
  border: 1px solid var(--border);
}
.site-ico img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:inherit}
.ico-fb{line-height:1;pointer-events:none;max-width:100%;overflow:hidden}
.site-body { min-width: 0; display: flex; flex-direction: column; }
.site-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }
.site-name .badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  background: var(--accent); color: #fff; border-radius: 4px; padding: 1px 5px;
  margin-left: 5px; vertical-align: 1px;
}
.site-desc {
  font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.site-cat {
  margin-top: auto; padding-top: 6px; font-size: 11px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-card.no-link { cursor: default; opacity: .75; }
.site-card.no-link:hover { transform: none; border-color: var(--border); box-shadow: var(--shadow-sm); }

/* 加载更多 */
.load-more-wrap { display: flex; justify-content: center; margin-top: 16px; }
.load-more {
  padding: 8px 28px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); transition: all .2s;
}
.load-more:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 搜索结果区 */
.search-result-section .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.btn-reset {
  margin-left: auto; padding: 6px 16px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: all .2s;
}
.btn-reset:hover { color: var(--brand); border-color: var(--brand); }
.result-count { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 6px; }
.empty-tip { color: var(--text-3); text-align: center; padding: 40px 0; font-size: 14px; }
.link-btn { background: none; border: none; color: var(--brand); font-size: 14px; padding: 0; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--text-3); padding: 14px 0 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--text-3); opacity: .6; }

/* 分类页内子分类快速锚点条 */
.subcat-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.subcat-chip {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border); transition: all .2s;
}
.subcat-chip:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* ---- 页脚 ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px clamp(14px,3vw,32px); flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-name { font-weight: 700; font-size: 15px; margin: 0; }
.footer-slogan { font-size: 12px; color: var(--text-3); margin: 2px 0 0; }
.footer-bottom { border-top: 1px solid var(--border); padding: 14px clamp(14px,3vw,32px); text-align: center; font-size: 12px; color: var(--text-3); }

/* 返回顶部 */
.back-to-top {
  position: fixed; right: 24px; bottom: 30px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; opacity: 0; visibility: hidden; transform: translateY(8px);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { color: var(--brand); border-color: var(--brand); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 移动端抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 190;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 200;
  background: var(--surface); transform: translateX(-100%); transition: transform .28s var(--ease);
  overflow-y: auto; padding: 16px;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-title { font-weight: 700; font-size: 16px; }
.drawer-nav .side-nav-item { padding: 10px 12px; }

/* ============ 响应式 ============ */
@media (max-width: 1400px) {
  .card-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (max-width: 1200px) {
  .layout { grid-template-columns: 210px minmax(0,1fr); }
  .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 992px) {
  .sidebar { display: none; }
  .layout { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .search-result-section .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .card-grid, .search-result-section .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cat-grid { grid-template-columns: 1fr; }
  .ql-engines { display: none; }
  .logo-text small { display: none; }
}

/* ============ Preview 内页（复刻 xdwdh preview） ============ */
.pv-topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.pv-topbar-inner { display: flex; align-items: center; height: 100%; }
.pv-brand { display: flex; align-items: center; gap: 10px; }
.pv-brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #3b8fd4);
  color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--brand-ring);
}
.pv-brand-text strong { display: block; font-size: 17px; color: var(--text); line-height: 1.25; }
.pv-brand-text small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }

.pv-main { padding-top: 8px; padding-bottom: 48px; }
.pv-breadcrumb { font-size: 13px; color: var(--text-3); padding: 14px 0 18px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pv-crumb { color: var(--text-2); }
.pv-crumb:hover { color: var(--brand); }
.pv-crumb-sep { color: var(--text-3); opacity: .6; }
.pv-crumb-cur { color: var(--brand); font-weight: 600; }

.pv-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 992px) { .pv-grid { grid-template-columns: 1fr; } .pv-side { display: none; } }

.pv-main-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.pv-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }

.pv-hero { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pv-hero-icon {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff; overflow: hidden;
  box-shadow: var(--shadow);
}
.pv-hero-icon img { width: 100%; height: 100%; object-fit: contain; }
.pv-hero-info { flex: 1; min-width: 240px; }
.pv-name { font-size: 24px; margin: 0 0 8px; color: var(--text); line-height: 1.3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-badge { font-size: 11px; font-weight: 600; background: var(--accent); color: #fff; border-radius: 5px; padding: 2px 7px; }
.pv-desc { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.7; }
.pv-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 26px; border-radius: 12px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700;
  transition: background .2s, transform .15s;
}
.pv-btn-primary:hover { background: var(--brand-strong); transform: translateY(-1px); }
.pv-btn-ghost {
  padding: 10px 18px; border-radius: 12px; font-size: 13px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  transition: all .2s;
}
.pv-btn-ghost:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

.pv-kwbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pv-tag {
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border);
}
a.pv-tag { transition: all .2s; }
a.pv-tag:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.pv-tag-url { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); font-weight: 600; word-break: break-all; }

.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-action-btn {
  padding: 7px 14px; border-radius: 10px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: all .2s;
}
.pv-action-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

.pv-section-title { font-size: 16px; margin: 0 0 12px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pv-intro-title { font-size: 16px; margin: 0 0 10px; color: var(--text); }
.pv-intro-text { font-size: 14px; color: var(--text-2); line-height: 1.8; margin: 0; }
.pv-intro-features { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pv-intro-feature { font-size: 12px; color: var(--text-2); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; }
.pv-intro-feature .pv-f-icon { color: var(--brand); font-weight: 700; }

.pv-related-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 1200px) { .pv-related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .pv-related-grid { grid-template-columns: 1fr; } }

.pv-bottom-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-bottom-link { font-size: 13px; color: var(--text-2); padding: 7px 16px; border-radius: 10px; border: 1px solid var(--border); transition: all .2s; }
.pv-bottom-link:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* Preview 右侧栏 */
.pv-side { display: flex; flex-direction: column; gap: 20px; }
.pv-side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.pv-side-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--text); }
.pv-side-hot-list { display: flex; flex-direction: column; gap: 4px; }
.pv-hot-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--text-2); font-size: 13px; transition: all .2s;
}
.pv-hot-item:hover { color: var(--brand); background: var(--brand-soft); }
.pv-hot-num { width: 20px; height: 20px; border-radius: 6px; background: var(--bg-soft); color: var(--text-3); font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pv-hot-item:nth-child(-n+3) .pv-hot-num { background: var(--accent); color: #fff; }
.pv-hot-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pv-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 20px clamp(14px,3vw,32px); text-align: center; font-size: 12px; color: var(--text-3); }

/* 动画 */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ============ 996导航 · 主站特有样式（基于 AI 站体系） ============ */
/* 首页统计条 */
.stat-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 0 4px;margin-bottom:8px}
.stat-chip{font-size:12px;color:var(--text-2);background:var(--bg-soft);border:1px solid var(--border);border-radius:20px;padding:4px 12px}
.stat-chip b{color:var(--brand);font-weight:700}

/* 国家网格（对齐 cat-entry 风格） */
.country-grid{display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:8px}
@media (max-width:1200px){.country-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.country-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.country-grid{grid-template-columns:repeat(1,minmax(0,1fr))}}
.country-card{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm);transition:transform .22s var(--ease),box-shadow .22s var(--ease),border-color .22s var(--ease);cursor:pointer}
.country-card:hover{transform:translateY(-2px);border-color:var(--brand);box-shadow:var(--shadow-hover)}
.country-card .cc-flag{font-size:26px;line-height:1;flex-shrink:0}
.country-card .cc-name{font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px}
.country-card .cc-meta{font-size:12px;color:var(--text-2);margin-top:2px}
.country-card .cc-badge{font-size:10px;color:#fff;background:var(--brand);border-radius:10px;padding:1px 7px}

/* 国家卡片在区块内：小网格 */
.country-grid.small{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
@media (max-width:1000px){.country-grid.small{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:760px){.country-grid.small{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 分类芯片（首页快捷区） */
.cat-chip-grid{display:flex;gap:8px;flex-wrap:wrap}
.cat-chip{font-size:13px;padding:6px 14px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);transition:all .2s}
.cat-chip:hover{color:var(--brand);border-color:var(--brand);background:var(--brand-soft)}

/* AI 导航入口 */
.ai-nav-link{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#0ea5e9;padding:6px 12px;border-radius:20px;border:1px solid #bfe0f7;background:#f0f9ff;transition:all .2s;white-space:nowrap}
.ai-nav-link:hover{border-color:#0ea5e9;background:#e0f2fe}

/* header 内搜索（复用 ql-form 风格） */
.header-search{display:flex;align-items:center;flex:1;min-width:240px;max-width:520px}
.header-search input{flex:1;height:40px;padding:0 14px;border:1px solid var(--border-strong);border-radius:10px 0 0 10px;background:var(--surface);color:var(--text);font-size:14px;outline:none;transition:border-color .2s,box-shadow .2s}
.header-search input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-ring)}
.header-search .hs-go{height:40px;padding:0 18px;border:none;background:var(--brand);color:#fff;font-size:14px;font-weight:600;border-radius:0 10px 10px 0;cursor:pointer;transition:background .2s}
.header-search .hs-go:hover{background:var(--brand-strong)}
.header-search .search-drop{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:300}
.search-drop{display:none;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);max-height:420px;overflow:auto}
.search-drop.show{display:block}
.sr-item{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--border);transition:background .15s}
.sr-item:hover{background:var(--brand-soft)}
.sr-item .sr-name{font-weight:600;font-size:14px}
.sr-item .sr-desc{color:var(--text-2);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sr-item .sr-tag{flex-shrink:0;font-size:11px;color:var(--brand);background:var(--brand-soft);padding:1px 8px;border-radius:10px}
.sr-head{padding:8px 14px;font-size:12px;color:var(--text-3);background:var(--bg-soft);border-bottom:1px solid var(--border);position:sticky;top:0}
.sr-empty{padding:24px;text-align:center;color:var(--text-3);font-size:13px}

/* 区块间距 */
.section{margin-bottom:26px}

/* 分类区块头部（细分子类 tab 区域） */
.tab-bar{margin-bottom:14px}
.tab-panel{display:none}
.tab-panel.is-active{display:block}

/* 侧栏标签 + AI 导流条 */
.side-nav-label{font-size:12px;color:var(--text-3);padding:6px 12px 8px;letter-spacing:.5px}
.ai-pick{margin:10px 0 20px;padding:10px 16px;border-radius:12px;background:#f0f9ff;border:1px solid #bfe0f7;color:#0369a1;font-size:13px}
.ai-pick a{color:#0ea5e9;font-weight:600;text-decoration:underline}

/* 首页分类区块：每分类 2 行 × 5 列卡片 */
.home-cat-sec{scroll-margin-top:calc(var(--header-h) + 16px)}
.home-cat-grid{display:grid;gap:12px;grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1300px){.home-cat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:1000px){.home-cat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){.home-cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* ===== 页脚（品牌 + 联系方式 + 版权） ===== */
.site-footer{border-top:1px solid var(--border);background:var(--surface);margin-top:32px}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0;flex-wrap:wrap}
.footer-brand{display:flex;align-items:center;gap:12px}
.footer-brand .logo-mark{width:44px;height:44px;border-radius:10px;background:linear-gradient(135deg,#1e73be,#145a96);color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;flex-shrink:0}
.footer-name{font-size:16px;font-weight:700;color:var(--text);margin:0;line-height:1.3}
.footer-slogan{font-size:12px;color:var(--text-3);margin:4px 0 0}
.footer-contact{text-align:right}
.footer-contact-title{font-size:13px;font-weight:600;color:var(--text-2);margin:0 0 6px}
.footer-contact-line{font-size:13px;color:var(--text-2);margin:0;line-height:1.6}
.footer-bottom{border-top:1px solid var(--border);padding:14px 0;text-align:center;font-size:12px;color:var(--text-3)}
.pv-footer .footer-inner{padding:20px 0}
@media (max-width:640px){.footer-inner{flex-direction:column;align-items:flex-start}.footer-contact{text-align:left}}

/* ===== 首页日历 + 天气小组件 ===== */
.widget-bar{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
.widget-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px 18px}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-title{font-weight:700;font-size:14px}
.cal-nav{width:28px;height:28px;border:1px solid var(--border);background:var(--bg-soft);border-radius:8px;cursor:pointer;font-size:15px;color:var(--text-2);line-height:1}
.cal-nav:hover{background:var(--brand-soft);color:var(--brand)}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center;font-size:12px}
.cal-wk{color:var(--text-3);padding:4px 0;font-weight:600}
.cal-day{padding:5px 0;border-radius:6px;color:var(--text-2);cursor:default}
.cal-day:hover{background:var(--brand-soft)}
.cal-day.is-today{background:var(--brand);color:#fff;font-weight:700}
.cal-empty{visibility:hidden}
.wx-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.wx-city{font-weight:700;font-size:15px}
.wx-temp{font-size:22px;font-weight:800;color:var(--brand)}
.wx-desc{font-size:13px;color:var(--text-2)}
.wx-meta{font-size:12px;color:var(--text-3);margin-bottom:10px}
.wx-switch{display:flex;gap:8px}
.wx-switch input{flex:1;height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);color:var(--text);font-size:13px;outline:none;min-width:0}
.wx-switch input:focus{border-color:var(--brand)}
.wx-switch button{height:32px;padding:0 14px;border:none;border-radius:8px;background:var(--brand);color:#fff;font-size:13px;cursor:pointer;white-space:nowrap}
.wx-loading,.wx-err{font-size:13px;color:var(--text-3)}
.wx-err a{color:var(--brand)}
@media (max-width:700px){.widget-bar{grid-template-columns:1fr}}

/* 洲分组 */
.continent-block{margin-bottom:26px}
.continent-head{display:flex;align-items:baseline;gap:10px;margin:6px 0 12px;padding-left:10px;border-left:4px solid var(--accent,#3b82f6)}
.continent-name{font-size:17px;font-weight:700;color:var(--text,#1f2937)}
.continent-meta{font-size:12px;color:var(--muted,#8a94a6)}

.cc-flag-img{width:40px;height:30px;object-fit:cover;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15);flex-shrink:0;vertical-align:middle;display:inline-block}

/* ===== 首页顶部搜索引擎切换栏 ===== */
.hero-search{background:linear-gradient(135deg,var(--brand,#1e73be),#145a96);padding:22px 16px 18px;margin-bottom:18px}
.hero-search-box{display:flex;gap:10px;max-width:760px;margin:0 auto;background:#fff;border-radius:12px;padding:8px;box-shadow:0 6px 24px rgba(0,0,0,.18)}
.engine-select-wrap{position:relative;flex-shrink:0}
#engineSelect{height:44px;border:none;background:#f4f6f8;border-radius:9px;padding:0 30px 0 14px;font-size:15px;font-weight:600;color:#1f2937;cursor:pointer;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;outline:none}
#engineSelect:focus{box-shadow:0 0 0 2px rgba(30,115,190,.35)}
#engineInput{flex:1;min-width:0;height:44px;border:none;outline:none;font-size:15px;padding:0 6px;color:#1f2937;background:transparent}
.engine-go{flex-shrink:0;height:44px;padding:0 28px;border:none;border-radius:9px;background:#1e73be;color:#fff;font-size:15px;font-weight:600;cursor:pointer;transition:opacity .2s}
.engine-go:hover{opacity:.88}
.engine-tips{text-align:center;color:rgba(255,255,255,.85);font-size:12px;margin-top:10px;letter-spacing:.3px}
@media (max-width:640px){
  .hero-search{padding:14px 10px 12px}
  .hero-search-box{flex-wrap:wrap;gap:8px;padding:6px}
  #engineSelect{height:40px;font-size:13px;padding:0 26px 0 10px;max-width:104px}
  #engineInput{height:40px;font-size:14px;flex:1 1 150px}
  .engine-go{height:40px;padding:0 16px;font-size:13px}
  .engine-tips{font-size:11px;line-height:1.6;padding:0 4px}
}
@media (max-width:380px){
  .hero-search-box{flex-wrap:wrap}
  #engineSelect{flex:1 1 100%;max-width:none;height:38px}
  #engineInput{flex:1 1 calc(100% - 78px)}
  .engine-go{width:70px;padding:0}
}

/* ===== 站内搜索面板（引擎栏“本站搜索”结果） ===== */
.site-search-panel{margin:14px auto 0;max-width:1080px;background:var(--surface,#fff);border:1px solid var(--border,#e6ebf2);border-radius:14px;padding:16px;box-shadow:0 8px 24px rgba(20,40,80,.08)}
.site-search-head{font-size:14px;color:var(--text-2,#5a6b82);margin-bottom:12px}
.site-search-head b{color:var(--brand,#1e73be)}
.site-search-grid{display:grid;gap:10px;grid-template-columns:repeat(5,minmax(0,1fr))}
@media (max-width:1300px){.site-search-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:1000px){.site-search-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:700px){.site-search-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
[data-theme="dark"] .site-search-panel{background:#1f2733;border-color:#2c3745;box-shadow:0 8px 24px rgba(0,0,0,.35)}
[data-theme="dark"] .site-search-head{color:#9aa8bd}

/* ===== 顶部广告位移到 logo 旁（header 内） ===== */
.header-ad{flex:1;display:flex;justify-content:center;align-items:center;min-width:0;padding:0 12px}
.header-ad .gg-top{max-width:100%;margin:0;min-height:44px;border-radius:8px}
.header-ad .gg-img-box{margin:0}
.header-ad .gg-img-box img{max-height:52px;width:auto;border-radius:8px}

.pv-topbar-inner .header-ad{justify-content:flex-end;padding:0 8px}
.pv-topbar-inner .header-ad .gg-top{margin:0}
@media (max-width:760px){
  .site-header .header-inner{flex-wrap:wrap;row-gap:8px}
  .header-ad{flex-basis:100%;order:10;padding:2px 0 6px}
  .header-ad .gg-top{min-height:40px}
  .pv-topbar-inner{flex-wrap:wrap;row-gap:6px}
  .pv-topbar-inner .header-ad{flex-basis:100%;order:10;padding:0 0 6px}
}
