/* =============================================================
   磁力源库 (yuanku.wannianli6.com)
   版面结构与色调对齐参考站：浅灰底 + 白色圆角卡片 + 蓝色主色
   三栏：左侧导航 / 中间内容 / 右侧「磁力链接相关的文章」
   ============================================================= */

:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #eff1f5;
  --line-2: #e6eaf1;
  --text: #1b2333;
  --text-2: #434e63;
  --text-3: #7d879b;
  --text-4: #9aa3b4;
  --blue: #2f6bed;
  --blue-dark: #1f56d0;
  --blue-soft: #eef3ff;
  --blue-soft-2: #f7faff;
  --orange: #ff6a2b;
  --red: #e5484d;
  --radius-lg: 14px;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .035), 0 6px 18px rgba(17, 24, 39, .03);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0 0 10px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================ 移动端顶栏 ============================ */
.mhead { display: none; }

/* ============================ 整体三栏 ============================ */
.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 272px;
  grid-template-areas: "side main rail";
  gap: 16px;
  align-items: start;
}

/* ============================ 左侧导航栏 ============================ */
.side {
  grid-area: side;
  min-width: 0;
  position: sticky;
  top: 16px;
  background: var(--card);
  border: 1px solid #f1f3f7;
  border-radius: var(--radius-lg);
  padding: 16px 10px 12px;
  box-shadow: none;
  max-height: calc(100vh - 32px);
  overflow: auto;
  scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }

.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 14px;
}
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8def, #2f6bed 60%, #1f56d0);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(47, 107, 237, .26);
}
.brand-text { font-size: 16px; font-weight: 800; letter-spacing: .2px; color: var(--text); }

.snav { display: flex; flex-direction: column; gap: 1px; }
.snav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px; color: #5c6779;
  transition: background .16s, color .16s;
}
.snav-item:hover { background: #f6f8fb; color: var(--text); }
.snav-item.is-active {
  background: #f1f4f9;
  color: var(--text);
  font-weight: 600;
}

.si {
  width: 17px; height: 17px; flex: 0 0 17px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
.si-home { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232f6bed'><path d='M12 3.2 21 11h-3v9h-5.2v-6h-1.6v6H6v-9H3z'/></svg>"); }
.si-topic { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0a020'><path d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/></svg>"); }
.si-star { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f5b901'><path d='m12 2.6 2.9 6.1 6.6.9-4.8 4.6 1.2 6.6L12 17.6 6.1 20.8l1.2-6.6L2.5 9.6l6.6-.9z'/></svg>"); }
.si-dot { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a855f7'><circle cx='12' cy='12' r='5'/><circle cx='12' cy='12' r='10' fill='none' stroke='%23a855f7' stroke-width='2' opacity='.32'/></svg>"); }
.si-map { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322b8a6' stroke-width='2'><path d='M4 6h16M4 12h10M4 18h13' stroke-linecap='round'/></svg>"); }

.side-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 6px 4px;
}
.round-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line-2);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  transition: all .16s;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
}
.round-btn:hover { color: var(--blue); border-color: #cfe0ff; background: var(--blue-soft-2); }

/* ============================ 主内容 ============================ */
.main { grid-area: main; min-width: 0; }

/* ---------- 顶部 hero（大标题 + 大搜索框 + 右侧插画） ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid #f1f3f7;
  border-radius: var(--radius-lg);
  padding: 30px 0 24px 32px;
  min-height: 250px;
  margin-bottom: 14px;
}
.hero-main { position: relative; z-index: 1; flex: 0 1 54%; min-width: 0; }
.hero h1 {
  font-size: 34px; line-height: 1.24; font-weight: 800;
  letter-spacing: -.6px; color: #18202f;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero-sub {
  margin: 10px 0 20px;
  font-size: 13px; line-height: 1.7; color: #7c8698;
  max-width: 420px;
}
.hero-search {
  display: flex; align-items: center;
  max-width: 452px;
  background: #fff;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  padding: 3px 3px 3px 15px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .04);
  transition: border-color .16s, box-shadow .16s;
}
.hero-search:focus-within { border-color: #b9d1ff; box-shadow: 0 4px 14px rgba(47, 107, 237, .1); }
.hero-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 13.5px; font-family: inherit; color: var(--text); padding: 9px 0;
}
.hero-search input::placeholder { color: #a8b0be; }
.hero-search button {
  flex: 0 0 auto; width: 38px; height: 38px; border: 0; cursor: pointer;
  border-radius: 8px;
  background: transparent; color: #98a1b2;
  display: flex; align-items: center; justify-content: center;
  transition: color .16s, background .16s;
}
.hero-search button:hover { color: var(--blue); background: var(--blue-soft); }
.hero-hot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  margin-top: 14px; font-size: 12px; color: #a3abb9;
}
.hero-hot-label { color: #a3abb9; }
.hero-hot a { color: #5f6b80; }
.hero-hot a:hover { color: var(--blue); }
.hero-art {
  position: absolute; right: 0; top: 0; bottom: 0;
  z-index: 0;
  width: 56%;
  pointer-events: none;
}
.hero-art img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: right bottom;
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 22%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 22%);
}

/* ---------- 顶部专题卡（横滑：封面图 + 标题 + 数量） ---------- */
.topic-wrap {
  position: relative;
  margin-bottom: 14px;
}
.topic-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 5);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px 0;
  scrollbar-width: none;
}
.topic-row::-webkit-scrollbar { display: none; }
.topic-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 9px;
  min-width: 0;
}
.topic-cover {
  display: block; position: relative;
  aspect-ratio: 16 / 8.2;
  border-radius: var(--radius);
  background: #eef3ff;
  overflow: hidden;
}
.topic-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.topic-card:hover .topic-cover img { transform: scale(1.05); }
.topic-cover-txt {
  position: absolute; left: 14px; bottom: 10px;
  font-size: 19px; font-weight: 800; color: #fff; letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(10, 25, 60, .35);
}
.topic-body { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.topic-name {
  font-size: 13.5px; font-weight: 700; color: #1e2635;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topic-meta {
  display: flex; align-items: center; gap: 2px;
  font-size: 11.5px; color: #9aa3b4;
  white-space: nowrap; overflow: hidden;
}
.topic-meta i { font-style: normal; font-size: 13px; line-height: 1; }
.topic-card:hover .topic-name { color: var(--blue); }
.topic-card:hover .topic-meta { color: var(--blue); }

.tarrow {
  position: absolute; top: 41px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid #eaeef5; background: #fff; color: #8b95a7;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .09);
  transition: color .16s, border-color .16s, opacity .16s;
}
.topic-wrap.is-scrollable .tarrow { display: flex; }
.tarrow:hover { color: var(--blue); border-color: #d4e2ff; }
.tarrow:disabled { opacity: 0; pointer-events: none; }
.tarrow-prev { left: -13px; }
.tarrow-next { right: -13px; }

.tone-1 { background: linear-gradient(135deg, #4d8bff, #2f6bed); }
.tone-2 { background: linear-gradient(135deg, #ffb84d, #f59f00); }
.tone-3 { background: linear-gradient(135deg, #b47bff, #8b5cf6); }
.tone-4 { background: linear-gradient(135deg, #3fd0c9, #12b3a8); }

/* ---------- 磁力站面板 ---------- */
.panel-sites, .panel-index {
  background: var(--card);
  border: 1px solid #f1f3f7;
  border-radius: var(--radius-lg);
  padding: 14px 14px 12px;
}
.panel-index { margin-top: 14px; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 2px 2px 12px;
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; color: #1e2635;
}
.panel-mark {
  width: 17px; height: 17px; flex: 0 0 17px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffd25e, #f3a712);
  position: relative;
  box-shadow: 0 2px 6px rgba(243, 167, 18, .26);
}
.panel-mark::after {
  content: "";
  position: absolute; left: 4px; top: 4px;
  width: 9px; height: 9px; border-radius: 2px;
  background: #fff; opacity: .93;
}
.panel-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.pt {
  padding: 4px 9px; border-radius: 7px;
  font-size: 12.5px; color: #7d879b;
  transition: background .16s, color .16s;
}
.pt:hover { color: var(--blue); background: var(--blue-soft-2); }
.pt.is-active { background: transparent; color: var(--blue); font-weight: 600; }

.site-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.site-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  min-height: 74px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: #f8f9fb;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
  min-width: 0;
}
.site-card:hover {
  background: #fff; border-color: #e4edff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, .06);
  transform: translateY(-1px);
}
.site-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-name {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: #1f2937;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-hot {
  font-style: normal; font-size: 10px; line-height: 14px;
  padding: 0 3px; border-radius: 4px;
  background: #fff1e9; color: var(--orange); flex: 0 0 auto;
}
.site-desc {
  font-size: 11.5px; line-height: 1.5; color: #98a1b0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal;
}

.panel-foot {
  margin-top: 10px; padding: 11px 0 8px;
  border-top: 1px dashed var(--line);
  text-align: center;
}
.panel-more { font-size: 13px; color: var(--blue); }
.panel-more-sm { font-size: 12.5px; color: var(--text-3); }
.panel-more-sm:hover, .panel-more:hover { color: var(--blue-dark); }
.empty-tip { padding: 18px 4px 22px; color: var(--text-3); font-size: 13px; }

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.index-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f8fafc;
  transition: background .16s, color .16s;
}
.index-item:hover { background: var(--blue-soft); }
.index-name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.index-cnt { font-size: 11.5px; color: var(--text-4); }
.index-item:hover .index-name { color: var(--blue); }

/* ============================ 右侧栏 ============================ */
.rail {
  grid-area: rail;
  min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
  position: sticky;
  top: 18px;
  align-self: start;
}

/* 二级页面的轻量检索条（首页不出现，保持与参考图一致） */
.rail-search {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
}
.rail-search form {
  display: flex; align-items: center; gap: 6px;
  background: #f4f6fa; border-radius: 9px;
  padding: 3px 3px 3px 11px;
}
.rail-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 12.5px; font-family: inherit; color: var(--text); padding: 6px 0;
}
.rail-search input::placeholder { color: #a7b0c0; }
.rail-search button {
  flex: 0 0 auto; border: 0; cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px;
  background: #fff; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}

.rail-card {
  background: var(--card);
  border: 1px solid #f1f3f7;
  border-radius: var(--radius);
  padding: 14px 14px 4px;
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 8px;
}
.rail-head-title { font-size: 15px; font-weight: 800; color: #1e2635; }
.rail-head-more { font-size: 12px; color: var(--text-4); }
.rail-head-more:hover { color: var(--blue); }

.rail-list { display: flex; flex-direction: column; }
.rail-list li + li { border-top: 1px solid #f4f6f9; }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.rail-item-main { flex: 1 1 auto; min-width: 0; }
.rail-item-title {
  font-size: 12.5px; line-height: 1.5; color: #26303f;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rail-item:hover .rail-item-title { color: var(--blue); }
.rail-more {
  display: block; text-align: center;
  font-size: 12px; color: var(--text-3);
  padding: 9px 0 8px; border-top: 1px solid #f4f6f9;
}
.rail-more:hover { color: var(--blue); }

/* ============================ 二级页面通用 ============================ */
.crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-3);
  margin: 2px 2px 12px;
}
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--blue); }
.crumb-sep { color: #ccd3de; }
.crumb-cur { color: var(--text-2); }

.detail, .page-card, .list-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.page-card { padding: 16px; }

.detail h1 { font-size: 21px; line-height: 1.45; color: var(--text); margin-bottom: 10px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12.5px; color: var(--text-3);
  padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.detail-meta a { color: var(--blue); }
.art-cat {
  background: var(--blue-soft); color: var(--blue);
  padding: 1px 8px; border-radius: 6px; font-size: 12px;
}
.detail-body { font-size: 14.5px; line-height: 1.9; color: #33405a; }
.detail-body h2 { font-size: 18px; margin: 22px 0 10px; color: var(--text); }
.detail-body h3 { font-size: 15.5px; margin: 18px 0 8px; color: var(--text); }
.detail-body p { margin: 0 0 12px; }
.detail-body ul, .detail-body ol { margin: 0 0 14px; padding-left: 20px; list-style: revert; }
.detail-body li { margin-bottom: 6px; }
.detail-body a { color: var(--blue); }
.detail-body img { border-radius: 10px; margin: 10px 0; }
.detail-body code {
  background: #f4f6fa; border-radius: 5px; padding: 1px 6px;
  font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.detail-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.detail-body th, .detail-body td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; }
.detail-body th { background: #f8fafc; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue); color: #fff;
  padding: 9px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  transition: background .16s, transform .16s;
}
.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost {
  background: var(--blue-soft); color: var(--blue);
}
.btn-ghost:hover { background: #dfe9ff; color: var(--blue-dark); }
.btn + .btn { margin-left: 8px; }

/* 正文链接默认是蓝色，特异性高于 .btn，会把按钮内的白字盖成蓝字（蓝底蓝字＝看不见）。
   这里对正文/卡片内的按钮显式还原文字颜色，保证按钮在任何容器里都清晰可读。 */
.detail-body a.btn,
.page-card a.btn,
.list-card a.btn { color: #fff; }
.detail-body a.btn:hover,
.page-card a.btn:hover,
.list-card a.btn:hover { color: #fff; }
.detail-body a.btn-ghost,
.page-card a.btn-ghost,
.list-card a.btn-ghost { color: var(--blue); }
.detail-body a.btn-ghost:hover,
.page-card a.btn-ghost:hover,
.list-card a.btn-ghost:hover { color: var(--blue-dark); }

/* ---------- 磁力链接展示（全站唯一的 magnet 出口样式） ---------- */
.mag-box {
  margin: 14px 0 18px;
  background: #f7faff;
  border: 1px solid #dbe7ff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.mag-box-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.mag-box-title { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.mag-copy {
  border: 1px solid #cfe0ff; background: #fff; color: var(--blue);
  font-size: 12px; font-family: inherit; cursor: pointer;
  padding: 3px 10px; border-radius: 7px;
}
.mag-copy:hover { background: var(--blue-soft); }
.mag-link {
  display: flex; align-items: center; gap: 8px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--blue);
  background: #fff; border: 1px solid #e2ebff;
  border-radius: 9px; padding: 9px 11px;
  word-break: break-all;
}
.mag-link:hover { border-color: #b9d1ff; background: #fcfdff; }
.mag-link svg { flex: 0 0 14px; }
.mag-link span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mag-tip { font-size: 11.5px; color: var(--text-4); margin: 8px 0 0; }

/* ---------- 列表 / 文章条目 ---------- */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.a-item {
  display: block; padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.a-item:last-child { border-bottom: 0; }
.a-item-title { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.a-item:hover .a-item-title { color: var(--blue); }
.a-item-desc { display: block; font-size: 12.5px; color: var(--text-3); }
.a-item-meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-4); margin-top: 6px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  display: inline-block;
  background: #f4f6fa; color: var(--text-2);
  font-size: 12px; padding: 3px 10px; border-radius: 7px;
}
.tag:hover { background: var(--blue-soft); color: var(--blue); }

.section { margin-top: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--text); }
.section-more { font-size: 12.5px; color: var(--text-3); }
.section-more:hover { color: var(--blue); }

/* 站点卡片网格（分类页 / 详情页推荐） */
.lgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lcard {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  border: 1px solid transparent; position: relative;
  transition: background .16s, border-color .16s;
}
.lcard:hover { background: var(--blue-soft-2); border-color: #e4edff; }
.lcard-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lcard-name {
  font-size: 13.5px; font-weight: 600; color: #1f2937;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lcard-desc {
  font-size: 11.5px; color: var(--text-4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-badge {
  position: absolute; right: 8px; top: 8px;
  font-size: 10px; line-height: 14px; padding: 0 4px;
  border-radius: 4px; background: var(--blue-soft); color: var(--blue);
}

/* 分页 */
.pager {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px; margin: 20px 0 6px;
}
.pg-btn {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line-2); border-radius: 9px;
  font-size: 13px; color: var(--text-2);
}
.pg-btn:hover { border-color: #cfe0ff; color: var(--blue); }
.pg-btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.pg-btn.is-disabled { color: #c6ccd8; background: #fafbfc; }
.pg-gap { color: var(--text-4); padding: 0 2px; }
.pg-info { font-size: 12px; color: var(--text-4); margin-left: 6px; }

/* 搜索框（列表页顶部） */
.page-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line-2);
  border-radius: 12px; padding: 5px 5px 5px 14px;
  margin-bottom: 14px;
}
.page-search input {
  flex: 1; min-width: 0; border: 0; outline: none;
  font-size: 14px; font-family: inherit; color: var(--text); background: transparent;
}
.page-search button {
  border: 0; cursor: pointer;
  background: var(--blue); color: #fff;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  padding: 8px 18px; border-radius: 9px;
}

/* 详情页信息块 */
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin: 12px 0; }
.kv dt { color: var(--text-4); }
.kv dd { margin: 0; color: var(--text-2); }
.kv dd a { color: var(--blue); }

.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.empty a { color: var(--blue); }

/* ============================ 页脚 ============================ */
.footer {
  margin-top: 26px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: 1480px; margin: 0 auto;
  padding: 26px 24px 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 26px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.footer-about p { font-size: 12px; color: var(--text-3); line-height: 1.7; margin: 0 0 8px; }
.footer-note { color: var(--text-4) !important; }
.footer-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.footer-links li { font-size: 12.5px; line-height: 2; }
.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--blue); }
.footer-links span { color: #c2c9d4; margin-left: 2px; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-tags .tag { font-size: 11.5px; padding: 2px 8px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px; color: var(--text-4);
  padding: 13px 20px 15px;
}
.footer-bottom p { margin: 0; }

/* ============================ 响应式 ============================ */
@media (max-width: 1320px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr) 256px; gap: 14px; }
  .site-grid, .lgrid, .index-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding: 26px 0 22px 26px; }
  .hero-art { width: 54%; }
  .hero h1 { font-size: 30px; }
  .topic-row { grid-auto-columns: calc((100% - 3 * 12px) / 4); }
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 184px minmax(0, 1fr);
    grid-template-areas: "side main" "rail rail";
  }
  .rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .rail-search { flex: 1 1 240px; }
  .rail-card { flex: 2 1 420px; }
  .hero { padding: 22px 0 20px 22px; }
  .hero h1 { font-size: 27px; }
  .hero-main { flex: 0 1 58%; }
  .hero-art { width: 52%; }
  .topic-row { grid-auto-columns: calc((100% - 2 * 12px) / 3); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "main" "rail";
    padding: 12px 12px 4px;
    gap: 12px;
  }
  .mhead {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
  }
  .mhead-brand { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; flex: 0 0 auto; }
  .mhead-search {
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center; gap: 4px;
    background: #f4f6fa; border-radius: 9px; padding: 2px 2px 2px 10px;
  }
  .mhead-search input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    font-size: 13px; font-family: inherit; color: var(--text); padding: 5px 0;
  }
  .mhead-search button {
    border: 0; background: #fff; color: var(--blue);
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
  }

  .side {
    position: static; max-height: none; overflow: hidden;
    padding: 8px 8px 6px;
    border-radius: 14px;
  }
  .brand, .side-foot { display: none; }
  .snav { flex-direction: row; gap: 4px; width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .snav::-webkit-scrollbar { display: none; }
  .snav-item { flex: 0 0 auto; padding: 7px 11px; font-size: 13px; white-space: nowrap; }

  .hero { padding: 18px 16px 16px; border-radius: 14px; min-height: 0; }
  .hero-main { flex: 1 1 auto; }
  .hero h1 { font-size: 23px; letter-spacing: -.3px; }
  .hero-sub { margin: 7px 0 12px; font-size: 12.5px; }
  .hero-search { padding: 3px 3px 3px 12px; max-width: none; }
  .hero-search input { font-size: 13px; padding: 7px 0; }
  .hero-search button { width: 34px; height: 34px; }
  .hero-hot { gap: 4px 10px; font-size: 12px; margin-top: 11px; }
  .hero-art { display: none; }

  .panel-sites, .panel-index { padding: 12px 12px 10px; border-radius: 14px; }
  .panel-title { font-size: 15.5px; }
  .site-grid, .lgrid, .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-row { grid-auto-columns: calc((100% - 2 * 10px) / 2.4); gap: 10px; }
  .tarrow { display: none !important; }

  .rail { flex-direction: column; }
  .rail-card, .rail-search { width: 100%; }

  .detail, .page-card, .list-card { padding: 16px 14px; border-radius: 14px; }
  .detail h1 { font-size: 18px; }
  .detail-body { font-size: 14px; }

  .footer-inner { grid-template-columns: 1fr; gap: 16px; padding: 20px 14px 14px; }
}

@media (max-width: 420px) {
  .site-grid, .lgrid { grid-template-columns: minmax(0, 1fr); }
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
