/* =========================================================
   UEL-GitHub · 仿 GitHub 个人主页风格
   浅色 / 深色双主题，PC / 移动端适配
   ========================================================= */

:root {
  --gh-bg: #ffffff;
  --gh-subtle: #f6f8fa;
  --gh-border: #d1d9e0;
  --gh-border-soft: rgba(31, 35, 40, .08);
  --gh-fg: #1f2328;
  --gh-fg-muted: #59636e;
  --gh-accent: #0969da;
  --gh-accent-subtle: #ddf4ff;
  --gh-success: #1a7f37;
  --gh-danger: #cf222e;
  --gh-shadow: 0 3px 6px rgba(31, 35, 40, .06);
  --gh-heat-0: #ebedf0;
  --gh-heat-1: #9be9a8;
  --gh-heat-2: #40c463;
  --gh-heat-3: #30a14e;
  --gh-heat-4: #216e39;
  --gh-radius: 6px;
}

[data-theme="dark"] {
  --gh-bg: #0d1117;
  --gh-subtle: #151b23;
  --gh-border: #3d444d;
  --gh-border-soft: rgba(240, 246, 252, .08);
  --gh-fg: #e6edf3;
  --gh-fg-muted: #9198a1;
  --gh-accent: #4493f8;
  --gh-accent-subtle: #121d2f;
  --gh-success: #3fb950;
  --gh-danger: #f85149;
  --gh-shadow: 0 3px 8px rgba(1, 4, 9, .5);
  --gh-heat-0: #161b22;
  --gh-heat-1: #0e4429;
  --gh-heat-2: #006d32;
  --gh-heat-3: #26a641;
  --gh-heat-4: #39d353;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.gh {
  margin: 0;
  background: var(--gh-bg);
  color: var(--gh-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--gh-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- 顶部横栏 ---------- */
.gh-header {
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-bg);
}
.gh-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.gh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gh-fg);
  flex-shrink: 0;
}
.gh-brand:hover { text-decoration: none; }
.gh-brand-mark { display: inline-flex; width: 32px; height: 32px; }
.gh-brand-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-nav { flex-shrink: 0; margin-left: 4px; margin-right: 2px; }
.gh-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gh-nav li { list-style: none; }
.gh-nav li a {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--gh-radius);
  font-size: 14px;
  color: var(--gh-fg);
  font-weight: 500;
}
.gh-nav li a:hover { background: var(--gh-subtle); text-decoration: none; }
.gh-nav li a.on, .gh-nav li a.active { background: var(--gh-subtle); }

.gh-welcome {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gh-fg-muted);
  font-size: 12.5px;
  padding-left: 0;
  border-left: 0;
}
.gh-welcome span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gh-welcome-icon { flex-shrink: 0; opacity: .65; }

.gh-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gh-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-subtle);
  color: var(--gh-fg-muted);
  transition: border-color .15s ease, background .15s ease;
}
.gh-search:focus-within { border-color: var(--gh-accent); background: var(--gh-bg); }
.gh-search input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gh-fg);
  font-size: 13px;
  font-family: inherit;
}
.gh-search input::placeholder { color: var(--gh-fg-muted); }
.gh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--gh-radius);
  background: transparent;
  color: var(--gh-fg);
  cursor: pointer;
  transition: background .15s ease;
}
.gh-icon-btn:hover { background: var(--gh-subtle); }

/* 中英文切换按钮（与深浅色按钮同组） */
.gh-lang-btn {
  width: auto;
  min-width: 34px;
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: .02em;
}
.gh-lang-code { font-size: 12px; line-height: 1; }
.lang-en .gh-weekdays { width: 34px; }
.gh-icon-btn .gh-ico-moon { display: none; }
[data-theme="dark"] .gh-icon-btn .gh-ico-moon { display: inline; }
[data-theme="dark"] .gh-icon-btn .gh-ico-sun { display: none; }

/* ---------- 页面容器 ---------- */
.gh-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 28px;
}

.gh-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ---------- 左侧资料卡 ---------- */
.gh-side { min-width: 0; }

.gh-avatar-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
}
.gh-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  background: #24292f;
}
.gh-avatar svg { display: block; width: 100%; height: 100%; }
.gh-avatar { background: transparent; }
[data-theme="dark"] .gh-cat-bg { fill: #e6edf3; }
[data-theme="dark"] .gh-cat-fg { fill: #24292f; }
[data-theme="dark"] .gh-cat-eye { fill: #e6edf3; }
.gh-avatar-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gh-accent);
  color: #fff;
  border: 2px solid var(--gh-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.gh-avatar-badge:hover { text-decoration: none; opacity: .9; }

.gh-name {
  margin: 18px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--gh-fg);
}
.gh-handle {
  margin-top: 2px;
  font-size: 19px;
  font-weight: 300;
  color: var(--gh-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-bio {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gh-fg);
}

.gh-cta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-subtle);
  color: var(--gh-fg);
  font-size: 14px;
  font-weight: 500;
  transition: border-color .15s ease, background .15s ease;
}
.gh-cta:hover { text-decoration: none; border-color: var(--gh-accent); background: var(--gh-bg); }

.gh-meta {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gh-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gh-fg);
  min-width: 0;
}
.gh-meta li svg { color: var(--gh-fg-muted); flex-shrink: 0; }
.gh-meta li a, .gh-meta li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-meta li a { color: var(--gh-fg); }
.gh-meta li a:hover { color: var(--gh-accent); }

.gh-stats {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gh-fg-muted);
}
.gh-stats b { color: var(--gh-fg); font-weight: 600; }
.gh-stats-dot { opacity: .6; }

.gh-divider {
  height: 1px;
  margin: 24px 0;
  background: var(--gh-border-soft);
}

.gh-side-block { margin-bottom: 4px; }
.gh-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gh-fg);
}
.gh-side-title svg { color: var(--gh-fg-muted); }

.gh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  border: 1px solid transparent;
}
.gh-chip:hover { text-decoration: none; border-color: var(--gh-accent); }
.gh-chip-num { color: var(--gh-fg-muted); font-size: 11px; font-weight: 400; }
[data-theme="dark"] .gh-chip { background: rgba(68, 147, 248, .12); }

.gh-hot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gh-hot li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
}
.gh-hot-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gh-fg);
}
.gh-hot-title:hover { color: var(--gh-accent); }
.gh-hot-num {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--gh-fg-muted);
}

.gh-cats { margin: 0; padding: 0; list-style: none; }
.gh-cats li { list-style: none; }
.gh-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: var(--gh-radius);
  color: var(--gh-fg);
  font-size: 13px;
}
.gh-cats a:hover { background: var(--gh-subtle); text-decoration: none; }
.gh-cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-cat-num { color: var(--gh-fg-muted); font-size: 12px; }

.gh-empty { color: var(--gh-fg-muted); font-size: 13px; margin: 0; }

/* ---------- 右侧内容 ---------- */
.gh-main { min-width: 0; }

.gh-section { margin-bottom: 40px; }
.gh-section:last-child { margin-bottom: 0; }

.gh-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.gh-h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--gh-fg);
  letter-spacing: -.005em;
}
.gh-h2 strong { color: var(--gh-fg); font-weight: 600; }
.gh-link { font-size: 13px; color: var(--gh-accent); white-space: nowrap; }
.gh-link:hover { text-decoration: underline; }

.gh-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.gh-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gh-card:hover { border-color: var(--gh-accent); box-shadow: var(--gh-shadow); }
.gh-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.gh-card-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-accent);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.gh-card-title:hover { text-decoration: underline; }
.gh-pill {
  flex-shrink: 0;
  padding: 1px 8px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
  line-height: 18px;
  white-space: nowrap;
}
.gh-card-desc {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gh-fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.gh-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gh-fg-muted);
  line-height: 18px;
  flex-wrap: wrap;
}
.gh-lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gh-success);
}
.gh-foot-sep { opacity: .55; }

.gh-card-wide { margin-bottom: 12px; }
.gh-list { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 贡献热力图 ---------- */
.gh-contrib-head { margin-bottom: 10px; }
.gh-seg {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-subtle);
  flex-shrink: 0;
}
.gh-seg-btn {
  border: 0;
  background: transparent;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gh-fg-muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 18px;
}
.gh-seg-btn.on { background: var(--gh-bg); color: var(--gh-accent); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
[data-theme="dark"] .gh-seg-btn.on { background: #1f2630; }

.gh-contrib {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.gh-heat-area { flex: 1 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; padding: 0 18px 4px 0; }

.gh-months {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
  margin-left: 30px;
  height: 16px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}
.gh-months span { grid-row: 1; white-space: nowrap; }

.gh-heat-row { display: flex; gap: 6px; align-items: flex-start; }
.gh-weekdays {
  width: 24px;
  display: grid;
  grid-template-rows: repeat(7, 11px);
  gap: 3px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
  line-height: 11px;
}
.gh-weekdays span:nth-child(1) { grid-row: 2; }
.gh-weekdays span:nth-child(2) { grid-row: 4; }
.gh-weekdays span:nth-child(3) { grid-row: 6; }

.gh-heat {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
}
.gh-heat i {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--gh-heat-0);
  display: block;
}
.gh-heat i[data-l="1"] { background: var(--gh-heat-1); }
.gh-heat i[data-l="2"] { background: var(--gh-heat-2); }
.gh-heat i[data-l="3"] { background: var(--gh-heat-3); }
.gh-heat i[data-l="4"] { background: var(--gh-heat-4); }
.gh-heat i:hover { outline: 1px solid var(--gh-accent); outline-offset: 0; }

.gh-heat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0 30px;
  font-size: 12px;
}
.gh-legend { display: inline-flex; align-items: center; gap: 3px; color: var(--gh-fg-muted); font-size: 11.5px; }
.gh-legend i { width: 11px; height: 11px; border-radius: 2px; display: block; background: var(--gh-heat-0); }
.gh-legend i[data-l="1"] { background: var(--gh-heat-1); }
.gh-legend i[data-l="2"] { background: var(--gh-heat-2); }
.gh-legend i[data-l="3"] { background: var(--gh-heat-3); }
.gh-legend i[data-l="4"] { background: var(--gh-heat-4); }

.gh-years {
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
  width: 72px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gh-years li { list-style: none; }
.gh-years button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 3px 8px;
  font-size: 12.5px;
  color: var(--gh-accent);
  cursor: pointer;
  border-radius: var(--gh-radius);
  font-family: inherit;
}
.gh-years button:hover { background: var(--gh-subtle); text-decoration: underline; }
.gh-years button.on { color: var(--gh-fg-muted); text-decoration: none; }

/* ---------- 站点动态 ---------- */
.gh-timeline { margin-top: 4px; }
.gh-month {
  margin: 18px 0 12px;
  padding-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-fg);
  border-bottom: 1px solid var(--gh-border-soft);
}
.gh-events { position: relative; margin: 0; padding: 0 0 0 0; list-style: none; }
.gh-events::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 10px;
  width: 1px;
  background: var(--gh-border-soft);
}
.gh-event {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 6px 0 14px;
  list-style: none;
}
.gh-event-dot {
  position: relative;
  z-index: 1;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gh-subtle);
  color: var(--gh-fg-muted);
  border: 1px solid var(--gh-border);
}
.gh-event-dot.post { color: var(--gh-accent); }
.gh-event-dot.comment { color: var(--gh-success); }
.gh-event-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.gh-event-text {
  font-size: 13.5px;
  color: var(--gh-fg);
  line-height: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gh-event-date { flex-shrink: 0; font-size: 12px; color: var(--gh-fg-muted); line-height: 21px; }

/* ---------- 列表页 ---------- */
.gh-list-head { margin-bottom: 20px; }
.gh-h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.gh-pagebar { display: flex; justify-content: center; margin: 28px 0 0; }
.gh-pager { display: flex; gap: 6px; flex-wrap: wrap; }
.gh-page {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  color: var(--gh-fg);
  font-size: 13px;
}
.gh-page:hover { border-color: var(--gh-accent); color: var(--gh-accent); text-decoration: none; }
.gh-page.now { background: var(--gh-subtle); font-weight: 600; border-color: var(--gh-border); }

/* ---------- 文章页 ---------- */
.gh-single-shell { max-width: 1280px; }
.gh-single-layout { display: block; }
.gh-article {
  padding: 32px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-bg);
}
.gh-article-head { padding-bottom: 20px; border-bottom: 1px solid var(--gh-border-soft); }
.gh-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--gh-fg-muted);
  margin-bottom: 10px;
}
.gh-article-title {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.015em;
}
.gh-article-by {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gh-fg-muted);
}
.gh-article-avatar { border-radius: 50%; border: 1px solid var(--gh-border); }

.gh-prose {
  padding-top: 24px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--gh-fg);
  word-wrap: break-word;
}
.gh-prose h2 { font-size: 22px; margin: 28px 0 12px; font-weight: 600; }
.gh-prose h3 { font-size: 18px; margin: 24px 0 10px; font-weight: 600; }
.gh-prose h4 { font-size: 16px; margin: 20px 0 8px; font-weight: 600; }
.gh-prose p { margin: 0 0 16px; }
.gh-prose a { color: var(--gh-accent); }
.gh-prose ul, .gh-prose ol { padding-left: 22px; margin: 0 0 16px; }
.gh-prose blockquote {
  margin: 0 0 16px;
  padding: 8px 16px;
  border-left: 3px solid var(--gh-accent);
  background: var(--gh-subtle);
  color: var(--gh-fg-muted);
  border-radius: 0 var(--gh-radius) var(--gh-radius) 0;
}
.gh-prose code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--gh-subtle);
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.gh-prose pre {
  padding: 14px 16px;
  border-radius: var(--gh-radius);
  border: 1px solid var(--gh-border);
  background: var(--gh-subtle);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}
.gh-prose pre code { background: transparent; padding: 0; }
.gh-prose img { border-radius: var(--gh-radius); border: 1px solid var(--gh-border-soft); }
.gh-prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.gh-prose table th, .gh-prose table td { border: 1px solid var(--gh-border); padding: 6px 10px; text-align: left; }
.gh-prose table th { background: var(--gh-subtle); font-weight: 600; }

.gh-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }

.gh-article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gh-border-soft);
}
.gh-article-prev, .gh-article-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  color: var(--gh-fg);
  min-width: 0;
}
.gh-article-prev span, .gh-article-next span { font-size: 12px; color: var(--gh-fg-muted); }
.gh-article-prev b, .gh-article-next b {
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gh-article-prev.empty, .gh-article-next.empty { color: var(--gh-fg-muted); font-size: 13px; justify-content: center; }
.gh-article-prev:hover, .gh-article-next:hover { text-decoration: none; border-color: var(--gh-accent); }

/* ---------- 评论（兼容系统默认模板结构） ---------- */
.gh-comments-wrap { margin-top: 24px; }
.gh-comments-wrap .msghead { margin: 0 0 12px; }
.gh-comments-wrap .msghead li { font-size: 16px; font-weight: 600; color: var(--gh-fg); }
.gh-comments-wrap .msg {
  list-style: none;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-bg);
}
.gh-comments-wrap .msg li { list-style: none; }
.gh-comments-wrap .msgname img.avatar { border-radius: 50%; vertical-align: middle; }
.gh-comments-wrap .commentname a { color: var(--gh-fg); font-weight: 600; font-size: 13px; }
.gh-comments-wrap small { color: var(--gh-fg-muted); font-size: 12px; }
.gh-comments-wrap .msgarticle { margin-top: 8px; font-size: 14px; line-height: 1.7; }
.gh-comments-wrap .revertcomment a { color: var(--gh-accent); }
.gh-comments-wrap #divCommentPost { margin-top: 20px; padding: 18px; border: 1px solid var(--gh-border); border-radius: var(--gh-radius); }
.gh-comments-wrap #divCommentPost p { margin: 0 0 10px; }
.gh-comments-wrap #divCommentPost .text {
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-subtle);
  color: var(--gh-fg);
  font-family: inherit;
  font-size: 14px;
  outline: 0;
}
.gh-comments-wrap #divCommentPost textarea.text { min-height: 96px; resize: vertical; }
.gh-comments-wrap #divCommentPost .button {
  padding: 6px 18px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-subtle);
  color: var(--gh-fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.gh-comments-wrap #divCommentPost .button:hover { background: var(--gh-bg); border-color: var(--gh-accent); }
.gh-comments-wrap label { font-size: 13px; color: var(--gh-fg-muted); }

/* 评论区块标题 */
.gh-comments { margin-top: 8px; }
.gh-comments-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gh-border-soft);
  font-size: 15px;
  font-weight: 600;
  color: var(--gh-fg);
}
.gh-comments-num { font-size: 12px; font-weight: 400; color: var(--gh-fg-muted); }
.gh-comments .posttop { margin: 0 0 10px; font-size: 13px; color: var(--gh-fg-muted); }
.gh-comments .postbottom { margin: 8px 0 0; font-size: 12px; color: var(--gh-fg-muted); }

/* ---------- 404 ---------- */
.gh-404 { text-align: center; padding: 96px 24px; }
.gh-404 h1 { font-size: 56px; margin: 0 0 8px; font-weight: 600; }
.gh-404 p { color: var(--gh-fg-muted); margin: 0 0 20px; }
.gh-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-subtle);
  color: var(--gh-fg);
  font-size: 14px;
}
.gh-btn:hover { text-decoration: none; border-color: var(--gh-accent); }

/* ---------- 友情链接（数据取自后台「模块管理 → 友情链接」） ---------- */
.gh-friendlinks {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 0;
}
.gh-friendlinks-inner {
  border-top: 1px solid var(--gh-border-soft);
  padding-top: 14px;
}
.gh-friendlinks-title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--gh-fg-muted);
  text-transform: uppercase;
}
.gh-friendlinks-body { min-width: 0; }
.gh-friendlinks-body ul,
.gh-friendlinks-body ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gh-friendlinks-body li {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--gh-fg-muted);
  text-align: left;
}
.gh-friendlinks-body li a { color: var(--gh-fg-muted); }
.gh-friendlinks-body li a:hover { color: var(--gh-accent); }

/* ---------- 页脚 ---------- */
.gh-footer { border-top: 1px solid var(--gh-border); background: var(--gh-bg); }
.gh-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  color: var(--gh-fg-muted);
}
.gh-footer-inner a { color: var(--gh-fg-muted); }
.gh-footer-inner a:hover { color: var(--gh-accent); }
.gh-footer-sep { opacity: .5; }

/* 版权：纯黑、独立一行、居中、无链接 */
.gh-copyright { color: #000000; }
[data-theme="dark"] .gh-copyright { color: #e6edf3; }

/* 备案 / 版权说明：内容来自后台「网站设置 → 版权说明」，与背景同色，浅色深色都不显示 */
.gh-footer-icp,
.gh-footer-icp a,
.gh-footer-icp a:hover { color: var(--gh-bg); text-decoration: none; }
.gh-footer-icp { font-size: 12px; line-height: 1.7; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .gh-welcome { display: none; }
  .gh-search input { width: 120px; }
}

@media (max-width: 960px) {
  .gh-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .gh-side { display: flex; flex-direction: column; align-items: center; }
  .gh-avatar-wrap { max-width: 160px; }
  .gh-side-block, .gh-divider { width: 100%; }
  .gh-stats, .gh-meta, .gh-cta { width: 100%; }
  .gh-cards { grid-template-columns: minmax(0, 1fr); }
  .gh-years { padding-top: 0; }
  .gh-contrib { flex-direction: column; gap: 12px; }
  .gh-years { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .gh-years button { width: auto; padding: 3px 10px; }
}

@media (max-width: 720px) {
  .gh-friendlinks-body ul,
  .gh-friendlinks-body ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.gh { overflow-x: hidden; }
  .gh-main, .gh-side { max-width: 100%; }
  .gh-heat-area { width: 100%; }
  .gh-header-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .gh-brand-name { font-size: 14px; max-width: 150px; }
  .gh-search { display: none; }
  .gh-nav { order: 3; width: 100%; }
  .gh-nav ul { overflow-x: auto; padding-bottom: 2px; }
  .gh-shell { padding: 20px 16px 48px; }
  .gh-article { padding: 20px; }
  .gh-article-title { font-size: 24px; }
  .gh-article-nav { grid-template-columns: minmax(0, 1fr); }
  .gh-month { margin-top: 14px; }
}
