/* ==========================================================================
   Nooj 主题 · 样式层（清新绿 + 白色圆角卡片）
   --------------------------------------------------------------------------
   设计 token：近白微绿底 / 纯白卡片 / 细边框 / 12-16px 圆角 / 薄荷渐变 /
   绿色强调（#2F9E78）/ 衬线大标题 / 无重阴影。
   仅作用于读者端；主题 CSS 在基础 style.css 之后加载，用于覆盖。
   ========================================================================== */

/* ---------- 变量：同时接管基础主题变量，保证复用组件同色系 ---------- */
:root,
html[data-theme="light"],
html[data-theme="dark"] {
  color-scheme: light;
  --nj-green: #2f9e78;
  --nj-green-deep: #23795c;
  --nj-green-ink: #1d5c47;
  --nj-green-soft: #e7f4ee;
  --nj-mint: #f1f8f4;
  --nj-mint-2: #e2f2e9;
  --nj-bg: #f7faf8;
  --nj-card: #ffffff;
  --nj-line: #e7ebe7;
  --nj-line-strong: #d8e6de;
  --nj-text: #111827;
  --nj-body: #374151;
  --nj-muted: #6b7280;
  --nj-faint: #9ca3af;
  --nj-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --nj-radius: 14px;
  --nj-radius-sm: 9px;
  --nj-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  --nj-shadow-hover: 0 10px 28px -18px rgba(17, 60, 45, 0.45);

  --anzhiyu-main: #2f9e78;
  --anzhiyu-main-op: #2f9e781f;
  --anzhiyu-main-deep: rgba(47, 158, 120, 0.1);
  --anzhiyu-white: #ffffff;
  --anzhiyu-gray: #9ca3af;
  --anzhiyu-gray-op: #9ca3af2b;
  --anzhiyu-fontcolor: #374151;
  --anzhiyu-secondtext: #6b7280;
  --anzhiyu-background: #f7faf8;
  --anzhiyu-secondbg: #f1f5f2;
  --anzhiyu-card-bg: #ffffff;
  --anzhiyu-card-border: #e7ebe7;
  --anzhiyu-shadow-main: 0 10px 24px -18px rgba(47, 158, 120, 0.5);
  --anzhiyu-shadow-border: 0 1px 2px rgba(17, 24, 39, 0.04);
  --style-border: 1px solid #e7ebe7;
  --style-border-always: 1px solid #e7ebe7;
  --style-border-hover: 1px solid #bfe3d3;
  --code-bg: #0f1a14;
  --code-color: #d7e6de;
}

/* ---------- 基础 ---------- */
html { scroll-behavior: smooth; }
body {
  background: var(--nj-bg);
  color: var(--nj-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
::selection { background: var(--nj-green-soft); color: var(--nj-green-ink); }
a { color: var(--nj-green-deep); }
img { border-radius: inherit; }
h1, h2, h3, h4 { color: var(--nj-text); }

.nj-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 页脚交给主题自定义 */
#siteFooter { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--nj-line);
  box-shadow: none;
}
.topbar-inner {
  max-width: 1120px;
  height: 66px;
  padding: 0 20px;
  gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--nj-text); }
.brand:hover { color: var(--nj-text); }
.brand-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, #38a983 0%, #23795c 100%);
  color: #fff; font-family: var(--nj-serif); font-size: 19px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.brand-avatar svg { display: none; }
/* 后台配置了品牌头像图时：去掉绿色渐变底，图片铺满圆角块 */
.brand-avatar:has(img) { background: none; box-shadow: none; }
.brand-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 9px; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; color: var(--nj-text); }

.nav { display: flex; align-items: center; gap: 2px; flex: 1; margin-left: 6px; }
.nav a {
  font-size: 14px; color: var(--nj-muted); padding: 7px 13px; border-radius: 999px;
  transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.nav a:hover { color: var(--nj-green-deep); background: #f3f8f5; }
.nav a.active { color: var(--nj-green-deep); background: var(--nj-green-soft); font-weight: 600; }
.nav a[hidden] { display: none !important; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--nj-line); background: #fff; color: var(--nj-muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: 0.18s; padding: 0;
}
.topbar-btn:hover { color: var(--nj-green-deep); border-color: #bfe3d3; background: var(--nj-mint); }
.topbar-btn svg { width: 16px; height: 16px; }
#themeToggle { display: none !important; }
.menu-toggle { display: none !important; }

/* 顶栏天气胶囊：图标 + 温度，悬停展开详情浮层 */
.nj-top-weather {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--nj-line); background: #fff;
  font-size: 12px; color: var(--nj-muted); white-space: nowrap;
  cursor: default; transition: border-color 0.18s, background 0.18s;
}
.nj-top-weather:hover { border-color: #bfe3d3; background: var(--nj-mint); }
.nj-top-weather > svg { color: var(--nj-green); }
.nj-tw-temp { font-weight: 600; color: var(--nj-body); }
.nj-tw-loading .nj-tw-temp { color: var(--nj-faint); font-weight: 400; }

.nj-tw-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  display: block; width: 248px; padding: 14px 15px;
  background: #fff; border: 1px solid var(--nj-line); border-radius: 14px;
  box-shadow: 0 16px 34px -22px rgba(17, 60, 45, 0.45);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  white-space: normal; text-align: left; cursor: default;
}
.nj-top-weather:hover .nj-tw-pop,
.nj-top-weather:focus-within .nj-tw-pop,
.nj-top-weather.is-open .nj-tw-pop {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nj-tw-pop::before {
  content: ""; position: absolute; top: -5px; right: 22px;
  width: 9px; height: 9px; background: #fff;
  border-left: 1px solid var(--nj-line); border-top: 1px solid var(--nj-line);
  transform: rotate(45deg);
}
.nj-tw-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--nj-line);
}
.nj-tw-city { font-size: 12.5px; font-weight: 600; color: var(--nj-text); }
.nj-tw-date { font-size: 10.5px; color: var(--nj-faint); }
/* 主区：大图标 + 大温度 + 右侧边栏（天气词 + 体感标签） */
.nj-tw-main {
  display: flex; align-items: center; gap: 14px; margin-top: 12px;
}
.nj-tw-main > svg:first-child { color: var(--nj-green); flex: none; }
.nj-tw-big { font-family: var(--nj-serif); font-size: 34px; font-weight: 700; color: var(--nj-text); line-height: 1; letter-spacing: -1px; }
.nj-tw-side {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.nj-tw-side b {
  font-size: 14px; font-weight: 600; color: var(--nj-text);
}
.nj-tw-side em {
  font-style: normal; font-size: 11px;
  color: var(--nj-green-deep); background: var(--nj-green-soft);
  border-radius: 4px; padding: 2px 7px; align-self: flex-start;
}
/* 2 列指标网格 */
.nj-tw-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--nj-line);
}
.nj-tw-metric {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--nj-muted);
}
.nj-tw-metric svg { color: var(--nj-green); flex: none; }
.nj-tw-metric b { font-weight: 600; color: var(--nj-text); }
.nj-tw-air-good { color: var(--nj-green-deep) !important; }
.nj-tw-air-ok { color: #a16207 !important; }
.nj-tw-air-poor { color: #b45309 !important; }
/* 贴心提示行 */
.nj-tw-tip {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 10px;
  font-size: 11.5px; color: #3d5a4d;
  background: linear-gradient(135deg, var(--nj-green-soft) 0%, #f7fbfa 100%);
  border-radius: 8px; line-height: 1.5;
}
.nj-tw-tip svg { color: var(--nj-green); flex: none; }
/* 预警列表（带 level 徽章色） */
.nj-tw-alerts {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--nj-line);
}
.nj-tw-alert {
  display: flex; align-items: center; gap: 7px; font-size: 11px;
  line-height: 1.5;
}
.nj-tw-alert svg { flex: none; }
.nj-tw-alert b {
  flex: none; font-weight: 700; font-size: 10px;
  padding: 1px 6px; border-radius: 4px; line-height: 1.5;
}
.nj-tw-alert span:last-child { color: var(--nj-body); }
.nj-tw-level-blue { color: #1e40af; }
.nj-tw-level-blue svg, .nj-tw-level-blue b { color: #1e40af; }
.nj-tw-level-blue b { background: #dbeafe; }
.nj-tw-level-yellow { color: #a16207; }
.nj-tw-level-yellow svg, .nj-tw-level-yellow b { color: #a16207; }
.nj-tw-level-yellow b { background: #fef3c7; }
.nj-tw-level-orange { color: #c2410c; }
.nj-tw-level-orange svg, .nj-tw-level-orange b { color: #c2410c; }
.nj-tw-level-orange b { background: #fed7aa; }
.nj-tw-level-red { color: #b91c1c; }
.nj-tw-level-red svg, .nj-tw-level-red b { color: #b91c1c; }
.nj-tw-level-red b { background: #fee2e2; }
/* 更新时间（底部小字） */
.nj-tw-upd {
  display: flex; align-items: center; gap: 5px;
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--nj-line);
  font-size: 10.5px; color: var(--nj-faint);
}
.nj-tw-upd svg { color: var(--nj-faint); flex: none; }

.nj-top-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--nj-line); background: #fff; color: var(--nj-muted);
  display: inline-flex; align-items: center; justify-content: center; transition: 0.18s;
}
.nj-top-btn:hover { color: var(--nj-green-deep); border-color: #bfe3d3; background: var(--nj-mint); }
.nj-top-btn svg { width: 16px; height: 16px; }

/* 语言切换：与顶栏圆形按钮同款，去掉地球图标只留语言码 */
.lang-switch-btn svg { display: none !important; }
.lang-switch-btn { overflow: hidden; }
.lang-switch-btn .lang-switch-code {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--nj-green-deep);
}
.lang-menu {
  background: #fff; border: 1px solid var(--nj-line); border-radius: 12px;
  box-shadow: 0 16px 34px -22px rgba(17, 60, 45, 0.45); overflow: hidden;
}
.lang-menu-item { font-size: 13px; border-radius: 8px; color: var(--nj-body); }
.lang-menu-item:hover { background: var(--nj-mint); }
.lang-menu-item.is-active { color: var(--nj-green-deep); }

/* 移动菜单 */
.mobile-menu { background: #fff; border-bottom: 1px solid var(--nj-line); box-shadow: 0 18px 32px -24px rgba(17, 24, 39, 0.3); }
.m-nav { gap: 2px; }
.m-nav a {
  display: flex; align-items: center; padding: 11px 14px; border-radius: 10px;
  font-size: 14px; color: var(--nj-body); font-weight: 500;
}
.m-nav a.active { background: var(--nj-green-soft); color: var(--nj-green-deep); font-weight: 600; }
.m-nav a[hidden] { display: none !important; }

/* ---------- 页面骨架 ---------- */
.page-main { padding-bottom: 0; }
.nj-wrap {
  max-width: 1120px; margin: 0 auto; padding: 30px 20px 0;
}
.nj-narrow { max-width: 1120px; }
.nj-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px;
  align-items: start;
}
.nj-main { min-width: 0; }
.nj-aside { display: flex; flex-direction: column; gap: 18px; }

/* ---------- 首页统计 ---------- */
.nj-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, max-content));
  justify-content: start; gap: 0 52px; padding: 4px 0 26px;
}
.nj-stat { display: flex; align-items: baseline; gap: 9px; }
.nj-stat-num {
  font-family: var(--nj-serif); font-size: 25px; font-weight: 700;
  color: var(--nj-text); line-height: 1.1; letter-spacing: 0.5px;
}
.nj-stat-label { font-size: 12px; color: var(--nj-muted); }

/* ---------- Featured 大卡 ---------- */
.nj-featured {
  display: grid; grid-template-columns: 47% 53%;
  border: 1px solid var(--nj-line); border-radius: var(--nj-radius);
  background: #fff; overflow: hidden; min-height: 246px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.nj-featured:hover { border-color: #bfe3d3; box-shadow: var(--nj-shadow-hover); transform: translateY(-2px); }
.nj-featured-art {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #d9efe4 0%, #eff8f3 55%, #f8fbf9 100%);
  display: flex; align-items: center; justify-content: center;
}
.nj-featured-cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.nj-featured:hover .nj-featured-cover { transform: scale(1.05); }
.nj-featured-glow {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 158, 120, 0.18), transparent 68%);
  left: -60px; bottom: -120px;
  z-index: 1;
}
.nj-featured-badge {
  position: absolute; left: 18px; top: 18px; z-index: 2;
  display: inline-flex; align-items: center; height: 24px; padding: 0 12px;
  border-radius: 999px; background: var(--nj-green-deep); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px;
}
.nj-featured-ico { position: relative; display: block; color: var(--nj-green-deep); opacity: 0.82; }
.nj-featured-ico svg { width: 62px; height: 62px; stroke-width: 1.2; }
.nj-featured-body {
  padding: 26px 30px; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; min-width: 0; background: #fff;
}
.nj-featured-meta { font-size: 12px; color: var(--nj-faint); letter-spacing: 0.2px; }
.nj-featured-meta i { font-style: normal; margin: 0 7px; color: var(--nj-line-strong); }
.nj-featured-title {
  font-family: var(--nj-serif); font-size: 27px; line-height: 1.42; font-weight: 700;
  color: var(--nj-text); margin: 14px 0 22px; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nj-featured-more { font-size: 13.5px; font-weight: 600; color: var(--nj-green-deep); display: inline-flex; align-items: center; gap: 5px; }
.nj-featured-more i { font-style: normal; transition: transform 0.18s; }
.nj-featured:hover .nj-featured-more i { transform: translateX(3px); }

/* ---------- 小节标题 ---------- */
.nj-section { margin-top: 34px; }
.nj-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.nj-sec-left { display: flex; align-items: baseline; gap: 10px; }
.nj-sec-title {
  position: relative; font-size: 17px; font-weight: 700; color: var(--nj-text);
  padding-left: 12px; line-height: 1.4;
}
.nj-sec-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px; background: var(--nj-green);
}
.nj-sec-count { font-size: 12px; color: var(--nj-faint); }
.nj-sec-more { font-size: 12.5px; color: var(--nj-muted); }
.nj-sec-more:hover { color: var(--nj-green-deep); }

/* 筛选胶囊 */
.nj-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.nj-chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--nj-line); background: #fff;
  font-size: 12.5px; color: var(--nj-muted); transition: 0.16s;
}
.nj-chip:hover { border-color: #bfe3d3; color: var(--nj-green-deep); background: var(--nj-mint); }
.nj-chip.is-active { background: var(--nj-green-deep); border-color: var(--nj-green-deep); color: #fff; font-weight: 600; }
/* 首页分类切换用 button，重置浏览器默认样式 */
button.nj-chip { cursor: pointer; font-family: inherit; }

/* ---------- 文章卡片网格 ---------- */
.nj-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.nj-pcard {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--nj-line); border-radius: var(--nj-radius);
  overflow: hidden; transition: 0.2s; min-width: 0;
}
.nj-pcard:hover { border-color: #bfe3d3; box-shadow: var(--nj-shadow-hover); transform: translateY(-2px); }
.nj-pcard-media {
  position: relative; height: 142px; background: linear-gradient(150deg, #ddefe5 0%, #f2f9f5 100%);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.nj-pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nj-pcard-ico { color: var(--nj-green-deep); opacity: 0.72; display: flex; }
.nj-pcard-ico svg { width: 40px; height: 40px; stroke-width: 1.3; }
.nj-pcard-tag {
  position: absolute; left: 12px; top: 12px;
  display: inline-flex; align-items: center; height: 23px; padding: 0 10px;
  border-radius: 999px; background: var(--nj-green-soft);
  color: var(--nj-green-ink); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.3px;
}
.nj-pcard-tag.is-top { background: var(--nj-green-deep); color: #fff; }
.nj-pcard-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.nj-pcard-meta { font-size: 11.5px; color: var(--nj-faint); }
.nj-pcard-meta i { font-style: normal; margin: 0 6px; color: var(--nj-line-strong); }
.nj-pcard-title {
  font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--nj-text);
  margin: 8px 0 7px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.nj-pcard:hover .nj-pcard-title { color: var(--nj-green-ink); }
.nj-pcard-desc {
  margin: 0 0 12px; font-size: 13px; line-height: 1.7; color: var(--nj-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.nj-pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.nj-chip-soft {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 6px; background: var(--nj-mint); color: var(--nj-green-deep);
  font-size: 11px; white-space: nowrap;
}
.nj-pcard-more { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nj-muted); }
.nj-pcard-more svg { width: 13px; height: 13px; }
.nj-pcard:hover .nj-pcard-more { color: var(--nj-green-deep); }
.nj-more-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 20px; height: 42px; border: 1px solid var(--nj-line);
  border-radius: 10px; background: #fff; font-size: 13px; color: var(--nj-muted);
}
.nj-more-link:hover { border-color: #bfe3d3; color: var(--nj-green-deep); background: var(--nj-mint); }
.nj-more-link svg { width: 14px; height: 14px; }

/* ---------- 右侧栏 ---------- */
.nj-card {
  background: #fff; border: 1px solid var(--nj-line);
  border-radius: var(--nj-radius); padding: 18px 19px;
}
.nj-card-title { font-size: 14px; font-weight: 700; color: var(--nj-text); margin: 0 0 13px; }
.nj-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nj-card-head .nj-card-title { margin: 0; }
.nj-card-more { font-size: 11.5px; color: var(--nj-faint); }
.nj-card-note { margin: 12px 0 0; font-size: 11.5px; color: var(--nj-faint); line-height: 1.6; }

/* ---- 终端 git log 代码块（薄荷绿主题） ---- */
.nj-terminal-card {
  background: #f3f8f5;
  border: 1px solid #d4e7dd;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  font-family: "SF Mono", "JetBrains Mono", "Cascadia Code", "Fira Code", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #2d4a3f;
}
.nj-terminal-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #e6f1ea;
  border-bottom: 1px solid #d4e7dd;
}
.nj-terminal-dot {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  position: relative;
}
.nj-terminal-dot--r { background: #ff5f57; }
.nj-terminal-dot--y { background: #febc2e; }
.nj-terminal-dot--g { background: #28c840; }
.nj-terminal-dot--m { background: #a8c9bb; }
.nj-terminal-title {
  margin-left: 8px; font-size: 11px; color: #5a7a6c;
  letter-spacing: 0.2px;
}
.nj-terminal-body { padding: 12px 14px 14px; }
.nj-terminal-line { color: #2d4a3f; }
.nj-terminal-prompt { color: #38a983; font-weight: 600; margin-right: 6px; }
.nj-terminal-item {
  display: flex; align-items: center; gap: 8px;
  padding-left: 2px;
}
.nj-terminal-item .nj-terminal-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-left: 4px;
}
.nj-terminal-hash { color: #4b8d76; font-size: 11.5px; }
.nj-terminal-msg { color: #3c5c4f; }
.nj-terminal-cursor {
  display: inline-block; width: 8px; height: 14px; background: #38a983;
  vertical-align: text-bottom; margin-left: 2px;
  animation: nj-blink 1s step-end infinite;
}
@keyframes nj-blink { 50% { opacity: 0; } }

.nj-square-avatar {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, #38a983, #23795c);
  color: #fff; font-family: var(--nj-serif); font-size: 21px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nj-square-avatar--img {
  background: transparent; padding: 0;
  object-fit: cover; display: block;
}
.nj-about-mini-top { display: flex; align-items: center; gap: 12px; }
.nj-about-mini-name { display: block; font-size: 15px; font-weight: 700; color: var(--nj-text); }
.nj-about-mini-sub { display: block; font-size: 11.5px; color: var(--nj-faint); margin-top: 2px; }
.nj-about-mini-desc { margin: 13px 0 14px; font-size: 12.5px; line-height: 1.75; color: var(--nj-muted); }

.nj-pills { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: center; gap: 7px; overflow-x: auto; }
.nj-pills::-webkit-scrollbar { display: none; }
.nj-pills { scrollbar-width: none; }
.nj-pills a {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--nj-line); background: #fff;
  font-size: 12px; color: var(--nj-muted); transition: 0.16s;
}
.nj-pills a:hover { border-color: #bfe3d3; color: var(--nj-green-deep); background: var(--nj-mint); }
.nj-pills a svg { width: 13px; height: 13px; }
.nj-pills--lg a { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 12.5px; gap: 6px; }
.nj-pills--lg a svg { width: 14px; height: 14px; }

.nj-tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.nj-tag {
  display: inline-flex; align-items: center; height: 27px; padding: 0 11px;
  border-radius: 7px; background: var(--nj-mint); color: var(--nj-green-deep);
  font-size: 12px; transition: 0.16s;
}
.nj-tag:hover { background: var(--nj-green-soft); color: var(--nj-green-ink); }

.nj-recent { display: flex; flex-direction: column; }
.nj-recent-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--nj-line);
  font-size: 13px; color: var(--nj-body);
}
.nj-recent-item:first-child { border-top: 0; padding-top: 2px; }
.nj-recent-item:hover { color: var(--nj-green-deep); }
.nj-recent-date { font-size: 11px; color: var(--nj-faint); flex: none; letter-spacing: 0.2px; }
.nj-recent-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; line-height: 1.6;
}
.nj-recent-item:hover .nj-recent-title { color: var(--nj-green-deep); }

/* ---------- 首页动态时间线（单列） ---------- */
.nj-mo-grid {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding-left: 22px;
}
.nj-mo-grid::before {
  /* 时间线竖线 */
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, #bfe3d3 0%, #d8efe3 80%, transparent 100%);
}
.nj-mo {
  position: relative;
  display: flex; flex-direction: column; gap: 7px;
  padding: 13px 16px 14px; background: #fff;
  border: 1px solid var(--nj-line); border-radius: 12px; transition: 0.18s;
}
.nj-mo::before {
  /* 时间线圆点 */
  content: "";
  position: absolute; left: -20px; top: 16px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #38a983;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #bfe3d3;
  flex: none;
}
.nj-mo:hover { border-color: #bfe3d3; background: #fcfefd; }
.nj-mo:hover::before { background: #2d8f6e; box-shadow: 0 0 0 2px #38a983; }
.nj-mo-date { font-size: 11px; color: var(--nj-green); letter-spacing: 0.6px; }
.nj-mo-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nj-mo-loc {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--nj-faint); white-space: nowrap; min-width: 0;
}
.nj-mo-loc svg { color: var(--nj-green); flex: none; }
/* 含音乐瓦片：容器化，文字/图片各自为链接，音乐卡独立可交互 */
.nj-mo-has-music .nj-mo-link { display: flex; flex-direction: column; gap: 9px; color: inherit; min-width: 0; }
.nj-mo-has-music .nj-mo-link:hover { color: inherit; }
.nj-mo-has-music > .nj-mo-foot.nj-mo-link { align-self: flex-start; }
.nj-mo-has-music .music-block-card { margin: 0 auto; }
.nj-mo-has-music:hover { border-color: #bfe3d3; box-shadow: var(--nj-shadow-hover); transform: translateY(-2px); }

/* ---------- 侧栏：每日一言 / 最新评论 ---------- */
/* ---------- 侧栏：每日一言（装饰版） ---------- */
.nj-saying-card {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, #f3faf6 0%, #ffffff 55%, #ecf6f1 100%);
}
.nj-saying-card::before {
  /* 左上淡淡的薄荷光晕 */
  content: ""; position: absolute; top: -40px; left: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 158, 120, 0.10), transparent 70%);
  pointer-events: none;
}
.nj-saying-card .nj-card-title {
  display: flex; align-items: center; gap: 6px;
}
.nj-saying-card .nj-card-title svg { color: var(--nj-green); }
.nj-saying-quote-mark {
  position: absolute; top: 40px; right: 18px; z-index: 0;
  color: var(--nj-green); opacity: 0.18; line-height: 0; pointer-events: none;
}
.nj-saying-quote-mark svg { display: block; width: 52px; height: 52px; }
.nj-saying-inner { position: relative; z-index: 1; padding: 6px 4px 0; }
.nj-saying-text {
  font-family: inherit; font-size: 15px; line-height: 1.9;
  color: var(--nj-text); text-align: center; margin: 0;
  letter-spacing: 0.2px;
}
.nj-saying-foot {
  position: relative; z-index: 1;
  margin-top: 14px; padding-top: 12px;
  display: flex; align-items: center; gap: 10px;
}
.nj-saying-sep {
  flex: 1; height: 0; border-top: 1px dashed var(--nj-line-strong);
}
.nj-saying-meta {
  font-size: 10.5px; color: var(--nj-faint); letter-spacing: 0.3px; white-space: nowrap;
}
.nj-cm-list { display: flex; flex-direction: column; }
.nj-cm { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--nj-line); }
.nj-cm:last-child { border-bottom: none; padding-bottom: 0; }
.nj-cm:first-child { padding-top: 0; }
.nj-cm-avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--nj-mint); display: flex; align-items: center; justify-content: center;
}
.nj-cm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nj-cm-letter { font-size: 12px; font-weight: 700; color: var(--nj-green-deep); }
.nj-cm-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nj-cm-nick { font-size: 12px; color: var(--nj-muted); display: flex; align-items: center; gap: 5px; }
.nj-cm-owner {
  font-style: normal; font-size: 10px; line-height: 1.4;
  background: var(--nj-green-soft); color: var(--nj-green-deep);
  padding: 0 5px; border-radius: 4px;
}
.nj-cm-text {
  font-size: 13px; color: var(--nj-text); line-height: 1.5;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nj-cm:hover .nj-cm-text { color: var(--nj-green-deep); }
.nj-cm-target {
  font-size: 11px; color: var(--nj-faint); display: flex; align-items: center; gap: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 动态页锚点定位：目标卡片短暂高亮 */
.nj-flash { animation: njFlash 2.4s ease-out; }
@keyframes njFlash {
  0%, 40% { background: var(--nj-green-soft); border-color: #bfe3d3; }
  100% { background: transparent; }
}
.nj-mo-text { font-size: 13.5px; line-height: 1.7; color: var(--nj-body); }
.nj-mo-img { display: block; border-radius: 8px; overflow: hidden; margin-top: 2px; }
.nj-mo-img img { width: 100%; height: 128px; object-fit: cover; display: block; }
.nj-mo-foot { font-size: 11.5px; color: var(--nj-faint); margin-top: auto; }

/* ---------- 页头 ---------- */
.nj-page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; padding: 8px 0 26px; margin-bottom: 24px;
  border-bottom: 1px solid var(--nj-line); flex-wrap: wrap;
}
.nj-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 2px; color: var(--nj-green); }
.nj-page-head h1 {
  font-family: var(--nj-serif); font-size: 30px; font-weight: 700;
  color: var(--nj-text); margin: 7px 0 6px; line-height: 1.3;
}
.nj-page-head p { margin: 0; font-size: 13px; color: var(--nj-muted); }
.nj-page-head p b { color: var(--nj-green-deep); font-weight: 600; }
.nj-page-head-right { display: flex; align-items: center; gap: 10px; flex: none; }
.nj-chips--head { flex-wrap: nowrap; gap: 6px; }
.nj-chips--head .nj-chip { height: 30px; padding: 0 12px; font-size: 12px; }

/* ---------- 按钮 / 分页 / 空态 / 骨架 ---------- */
.btn, .nj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--nj-line); background: #fff; color: var(--nj-body);
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: 0.16s; font-family: inherit; line-height: 1;
}
.btn:hover, .nj-btn:hover { border-color: #bfe3d3; color: var(--nj-green-deep); background: var(--nj-mint); }
.btn.primary, .nj-btn-solid {
  background: var(--nj-green-deep); border-color: var(--nj-green-deep); color: #fff;
}
.btn.primary:hover, .nj-btn-solid:hover { background: var(--nj-green-ink); border-color: var(--nj-green-ink); color: #fff; }
.btn.danger { color: #b4543c; }
.btn.danger:hover { border-color: #e8c4b9; background: #fdf5f2; color: #9c3f2a; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 30px 0 8px; }
.pager .btn { height: 34px; }
.pager-info { font-size: 12px; color: var(--nj-faint); }

.nj-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 52px 20px; margin: 8px 0;
  border: 1px dashed var(--nj-line-strong); border-radius: var(--nj-radius);
  background: #fff; text-align: center;
}
.nj-empty-ico {
  width: 48px; height: 48px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center;
  background: var(--nj-mint); color: var(--nj-green); margin-bottom: 4px;
}
.nj-empty h3 { margin: 0; font-size: 15px; color: var(--nj-text); }
.nj-empty p { margin: 0 0 8px; font-size: 13px; color: var(--nj-muted); }

.nj-loading { padding-top: 34px; }
.nj-sk {
  border-radius: var(--nj-radius);
  background: linear-gradient(100deg, #eef4f0 20%, #f7fbf9 40%, #eef4f0 60%);
  background-size: 220% 100%; animation: nj-sk 1.4s ease infinite;
}
.nj-sk--stats { height: 44px; margin-bottom: 26px; }
.nj-sk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; }
.nj-sk--hero { height: 246px; }
.nj-sk--side { height: 190px; }
@keyframes nj-sk { 0% { background-position: 120% 0; } 100% { background-position: -80% 0; } }

.nj-end { display: block; text-align: center; font-size: 12px; color: var(--nj-faint); padding: 18px 0; }
.nj-loadmore { display: flex; justify-content: center; padding: 20px 0 4px; }
.nj-loadmore[hidden], .nj-end[hidden] { display: none !important; }
.nj-loadmore-err { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #b4543c; }

/* ---------- 搜索结果 ---------- */
.nj-results { display: flex; flex-direction: column; gap: 10px; }
.nj-result {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center; gap: 14px; padding: 15px 18px;
  background: #fff; border: 1px solid var(--nj-line); border-radius: 11px;
  transition: 0.16s;
}
.nj-result:hover { border-color: #bfe3d3; background: #fcfefd; }
.nj-result-kind {
  font-size: 11px; color: var(--nj-green-deep); background: var(--nj-mint);
  border-radius: 6px; padding: 3px 0; text-align: center;
}
.nj-result-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nj-result-title { font-size: 14.5px; font-weight: 600; color: var(--nj-text); }
.nj-result-desc { font-size: 12.5px; color: var(--nj-muted); }
.nj-result-date { font-size: 11.5px; color: var(--nj-faint); white-space: nowrap; }

/* ---------- 文章详情 ---------- */
.essay { background: transparent; }
.post-layout { align-items: start; max-width: 1120px; }
.article-card {
  max-width: 1120px; margin: 30px auto 0; padding: 42px 46px 34px;
  background: #fff; border: 1px solid var(--nj-line);
  border-radius: 16px; box-shadow: var(--nj-shadow);
}
/* 全站统一 1120 容器后，文章内部内容限宽 820 居中，保证阅读行宽舒适 */
.article-card > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.article-back { display: flex; }
.article-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--nj-faint); margin-bottom: 18px;
}
.article-back:hover { color: var(--nj-green-deep); }
.article-card h1 {
  font-family: var(--nj-serif); font-size: 31px; line-height: 1.45;
  font-weight: 700; color: var(--nj-text); margin: 0 auto 14px;
}
.article-card h1 .top-badge {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: 6px;
  margin-right: 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--nj-green-soft); color: var(--nj-green-deep);
  font-family: -apple-system, "PingFang SC", sans-serif; font-size: 11px; font-weight: 600;
}
.article-meta { font-size: 12.5px; color: var(--nj-faint); margin-bottom: 30px; }
.article-meta .nj-dot { font-style: normal; margin: 0 8px; color: var(--nj-line-strong); }
.article-body { font-size: 16px; line-height: 1.92; color: var(--nj-body); }
.article-body p { margin: 0 0 18px; }
.article-body h2 {
  font-size: 21px; font-weight: 700; color: var(--nj-text);
  margin: 38px 0 14px; padding-left: 13px; border-left: 3px solid var(--nj-green);
  line-height: 1.5;
}
.article-body h3 { font-size: 17.5px; font-weight: 700; color: var(--nj-text); margin: 28px 0 10px; }
.article-body a { color: var(--nj-green-deep); border-bottom: 1px solid rgba(47, 158, 120, 0.35); }
.article-body a:hover { border-bottom-color: var(--nj-green); }
.article-body strong { color: var(--nj-text); font-weight: 700; }
.article-body img { display: block; max-width: 100%; margin: 22px auto; border-radius: 12px; }
.article-body blockquote {
  margin: 22px 0; padding: 14px 20px;
  background: var(--nj-mint); border-left: 3px solid var(--nj-green);
  border-radius: 0 10px 10px 0; color: #33564a;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin: 6px 0; }
.article-body li::marker { color: var(--nj-green); }
.article-body hr { border: 0; border-top: 1px solid var(--nj-line); margin: 30px 0; }
.article-body code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em; background: var(--nj-green-soft); color: var(--nj-green-ink);
  padding: 2px 6px; border-radius: 5px;
}
.article-body pre {
  background: var(--code-bg); color: var(--code-color);
  padding: 18px 20px; border-radius: 11px; overflow: auto;
  font-size: 12.8px; line-height: 1.75; margin: 22px 0;
}
.article-body pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 13.5px; }
.article-body th, .article-body td { border: 1px solid var(--nj-line); padding: 9px 12px; text-align: left; }
.article-body th { background: var(--nj-mint); color: var(--nj-text); font-weight: 600; }

.reward-card {
  margin: 26px auto 4px; padding: 18px; border: 1px solid var(--nj-line);
  border-radius: 12px; background: var(--nj-mint); text-align: center;
}
.reward-head { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--nj-green-ink); margin-bottom: 12px; }
.reward-qr { width: 168px; height: 168px; border-radius: 10px; object-fit: cover; }
.article-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px auto 4px; }

/* 目录：参考设计不展示侧栏目录 */
[data-toc-sidebar], [data-toc-fab], [data-toc-mask], [data-toc-drawer] { display: none !important; }

/* 评论区 */
.article-comments { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--nj-line); }
.comment-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--nj-text); margin: 0 0 16px;
}
.comment-count-badge {
  font-size: 11px; font-weight: 500; color: var(--nj-green-deep);
  background: var(--nj-green-soft); border-radius: 999px; padding: 2px 8px;
}
.article-comments input[type="text"],
.article-comments input[type="email"],
.article-comments input:not([type]),
.article-comments textarea {
  width: 100%; border: 1px solid var(--nj-line); border-radius: 8px;
  background: #fbfdfc; padding: 10px 12px; font: inherit;
  font-size: 13.5px; color: var(--nj-text); outline: none; transition: 0.16s;
}
.article-comments input:focus, .article-comments textarea:focus {
  border-color: var(--nj-green); background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 158, 120, 0.1);
}
.comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.comment-user-row { grid-template-columns: 38px 1fr; align-items: center; }
.comment-form-row input { margin: 0; }
.qq-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--nj-green-soft); color: var(--nj-green-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.comment-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.comment-tool-btn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--nj-line);
  background: #fff; color: var(--nj-muted); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.comment-tool-btn:hover { color: var(--nj-green-deep); border-color: #bfe3d3; background: var(--nj-mint); }
.comment-img-url-input { max-width: 220px; height: 30px; }
.comment-form-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.comment-form-foot .btn { height: 36px; padding: 0 20px; }
.comment-notify-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--nj-muted); margin: 10px 0 0; }
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item, .comment-thread { border-top: 1px solid var(--nj-line); padding-top: 12px; }
.comment-item:first-child { border-top: 0; }

/* ---------- 动态页（紧凑排版，宽度不变） ---------- */
.nj-moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nj-moments .bber-item {
  background: #fff; border: 1px solid var(--nj-line); border-radius: 12px;
  box-shadow: var(--nj-shadow); padding: 10px 14px 6px; transition: 0.18s;
}
.nj-moments .bber-item:hover { border-color: #bfe3d3; }
.nj-moments .bber-item hr { display: none; }
/* 作者行：头像 28px，下方间距 4px（基础是 .5rem=8px） */
.nj-moments .bber-author-row { margin-bottom: 4px; }
.nj-moments .bber-author-avatar { width: 28px; height: 28px; border-radius: 8px; }
.nj-moments .bber-author-nickname { font-size: 13px; font-weight: 600; color: var(--nj-text); }
.nj-moments .bber-post-tag {
  font-size: 10px; color: var(--nj-green-deep); background: var(--nj-green-soft);
  border-radius: 5px; padding: 1px 6px;
}
/* 正文：行高 1.55（基础 1.7），去掉段落默认 margin */
.nj-moments .bber-content .datacont { font-size: 14px; line-height: 1.55; color: var(--nj-body); }
.nj-moments .bber-content .datacont p { margin: 0; }
/* 图片容器：基础是 margin:1rem 0，压到 2px；单张图 max-width 420→280，比例 16:9→4:3 */
.nj-moments .bber-container-img { margin: 2px 0; gap: 4px; }
.nj-moments .bber-container-img .bber-content-img { border-radius: 8px; }
.nj-moments .bber-img-single { max-width: 320px; margin: 4px auto 2px; }
.nj-moments .bber-img-single .bber-content-img { max-width: 320px; padding-bottom: 62%; }
.nj-moments .bber-img-double { max-width: 400px; margin: 4px auto 2px; gap: 4px; }
.nj-moments .bber-img-double .bber-content-img { max-width: 196px; padding-bottom: 72%; }
.nj-moments .bber-img-multi { margin: 4px 0 2px; gap: 4px; }
.nj-moments .music-block-card { margin-top: 4px; margin-bottom: 2px; }
/* 底部栏 */
.nj-moments .bber-bottom {
  margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--nj-line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.nj-moments .bber-info { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--nj-faint); }
.nj-moments .bber-info svg, .nj-moments .bber-actions svg { width: 14px; height: 14px; }
.nj-moments .bber-actions { gap: 12px; color: var(--nj-faint); }
.nj-moments .bber-like, .nj-moments .bber-reply { gap: 3px; font-size: 11px; }
.nj-moments .bber-like-count { font-size: 11px; }

/* ---------- 相册 ---------- */
.nj-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.nj-photo {
  position: relative; display: block; aspect-ratio: 1 / 1;
  border-radius: 12px; overflow: hidden; background: var(--nj-mint);
  border: 1px solid var(--nj-line);
}
.nj-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.nj-photo:hover img { transform: scale(1.04); }
.nj-photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px; font-size: 12px; color: #fff;
  background: linear-gradient(to top, rgba(10, 30, 22, 0.62), transparent);
  opacity: 0; transition: 0.2s;
}
.nj-photo:hover .nj-photo-cap { opacity: 1; }

/* ---------- 友链 ---------- */
.nj-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nj-link-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 17px 18px; background: #fff;
  border: 1px solid var(--nj-line); border-radius: 12px; transition: 0.18s;
}
.nj-link-card:hover { border-color: #bfe3d3; box-shadow: var(--nj-shadow-hover); transform: translateY(-2px); }
.nj-link-head { display: flex; align-items: center; gap: 11px; }
.nj-link-avatar { flex: none; }
.nj-link-avatar .links-avatar, .links-avatar {
  width: 44px; height: 44px; border-radius: 11px; overflow: hidden;
  background: var(--nj-green-soft); color: var(--nj-green-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.links-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.links-avatar-fb { width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 17px; }
.nj-link-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nj-link-name { font-size: 14.5px; font-weight: 700; color: var(--nj-text); }
.nj-link-domain { font-size: 11.5px; color: var(--nj-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nj-link-arrow { color: var(--nj-faint); flex: none; display: flex; }
.nj-link-arrow svg { width: 15px; height: 15px; }
.nj-link-card:hover .nj-link-arrow { color: var(--nj-green); transform: translateX(2px); }
.nj-link-desc {
  font-size: 12.5px; line-height: 1.7; color: var(--nj-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.links-card-update {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; border-radius: 7px; background: var(--nj-mint);
  font-size: 11.5px; color: var(--nj-muted);
}
.links-card-update.is-today { background: var(--nj-green-soft); color: var(--nj-green-ink); }
.links-card-update.is-stale, .links-card-update.is-unsubscribed { background: #f5f6f5; color: var(--nj-faint); }
.links-card-post { color: var(--nj-green-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 友链申请页 */
.links-apply-wrap { max-width: 860px; margin: 30px auto 0; padding: 0 20px; }
.links-apply-banner {
  background: linear-gradient(140deg, #e2f2e9, #f8fbf9);
  border: 1px solid var(--nj-line); border-radius: 14px; padding: 22px;
}
.links-apply-title { font-family: var(--nj-serif); font-size: 22px; font-weight: 700; color: var(--nj-text); }
.links-apply-desc { font-size: 13.5px; color: var(--nj-muted); margin-top: 6px; }
.links-apply-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; background: var(--nj-green-deep); color: #fff; font-size: 12.5px;
}
/* 友链申请：显式两列 grid —— 上排短内容（本站信息、友链规则），下排长内容（提交申请、申请状态） */
.links-apply-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "info rules" "form status";
  gap: 14px; margin-top: 18px; align-items: start;
}
.links-apply-grid > *:nth-child(1) { grid-area: info; }
.links-apply-grid > .las-card { grid-area: status; }
.links-apply-grid > *:nth-child(3) { grid-area: rules; }
.links-apply-grid > *:nth-child(4) { grid-area: form; }
.links-apply-grid > * { margin-bottom: 0; }
.links-apply-grid .las-list { gap: 12px; }
.las-apply-card {
  display: block; background: #fff; border: 1px solid var(--nj-line);
  border-radius: 12px; padding: 16px 18px; color: var(--nj-body);
}
.las-apply-card:hover { border-color: #bfe3d3; }
.las-apply-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 11.5px; color: var(--nj-faint); }

/* ---------- 关于 ---------- */
.nj-about { padding-top: 40px; }
.nj-about-head {
  display: grid; grid-template-columns: 150px minmax(0, 1fr);
  gap: 34px; align-items: center; padding-bottom: 36px;
}
.nj-about-avatar {
  width: 150px; height: 150px; border-radius: 50%; overflow: hidden;
  background: var(--nj-mint);
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.nj-about-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.nj-about-avatar-letter {
  font-family: var(--nj-serif); font-size: 60px; font-weight: 700; color: var(--nj-green-deep);
  line-height: 1; padding-bottom: 6px;
}
.nj-about-info h1 {
  font-family: var(--nj-serif); font-size: 44px; font-weight: 700;
  line-height: 1.15; color: var(--nj-text); margin: 0 0 10px;
}
.nj-about-tagline { margin: 0 0 12px; font-size: 14.5px; font-weight: 600; color: var(--nj-green-deep); }
.nj-about-intro { margin: 0 0 18px; font-size: 14px; line-height: 1.85; color: var(--nj-muted); max-width: 640px; }
.nj-layout--about { gap: 26px; }
.nj-layout--about .nj-main { display: flex; flex-direction: column; gap: 18px; }

.nj-about-text p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.85; color: var(--nj-muted); }
.nj-about-text p:last-child { margin-bottom: 0; }

.nj-tl { position: relative; padding-left: 18px; }
.nj-tl::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px;
  width: 1px; background: var(--nj-line-strong);
}
.nj-tl-item { position: relative; padding: 0 0 18px; }
.nj-tl-item:last-child { padding-bottom: 0; }
.nj-tl-dot {
  position: absolute; left: -18px; top: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--nj-green);
  box-shadow: 0 0 0 3px var(--nj-green-soft);
}
.nj-tl-year { font-size: 11px; font-weight: 600; color: var(--nj-green-deep); letter-spacing: 0.4px; }
.nj-tl-title { font-size: 13.5px; font-weight: 600; color: var(--nj-text); margin-top: 2px; }
.nj-tl-desc { font-size: 12.5px; line-height: 1.7; color: var(--nj-faint); margin-top: 3px; }

.nj-stat-list { display: flex; flex-direction: column; }
.nj-stat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--nj-line);
}
.nj-stat-row:first-child { border-top: 0; padding-top: 2px; }
.nj-stat-row-num {
  min-width: 54px; font-family: var(--nj-serif); font-size: 19px;
  font-weight: 700; color: var(--nj-green-deep); line-height: 1.2;
}
.nj-stat-row-main { display: flex; flex-direction: column; }
.nj-stat-row-label { font-size: 12.5px; font-weight: 600; color: var(--nj-text); }
.nj-stat-row-desc { font-size: 11.5px; color: var(--nj-faint); margin-top: 2px; }

.nj-contact-list { display: flex; flex-direction: column; }
.nj-contact-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-top: 1px solid var(--nj-line);
  font-size: 12.5px; color: var(--nj-muted);
}
.nj-contact-row:first-child { border-top: 0; padding-top: 2px; }
.nj-contact-row:hover { color: var(--nj-green-deep); }
.nj-contact-type {
  flex: none; font-size: 11px; color: var(--nj-green-deep);
  background: var(--nj-green-soft); border-radius: 5px; padding: 2px 7px;
}
.nj-contact-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 友圈 ---------- */
.nj-fr-list { display: flex; flex-direction: column; gap: 12px; }
.nj-fr {
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px; padding: 17px 19px;
  background: #fff; border: 1px solid var(--nj-line);
  border-radius: 12px; transition: 0.18s;
}
.nj-fr:hover { border-color: #bfe3d3; box-shadow: var(--nj-shadow-hover); transform: translateY(-1px); }
.nj-fr-avatar .links-avatar { width: 44px; height: 44px; border-radius: 11px; }
.nj-fr-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nj-fr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nj-fr-friend { font-size: 13px; font-weight: 600; color: var(--nj-green-deep); }
.nj-fr-date { font-size: 11px; color: var(--nj-faint); flex: none; }
.nj-fr-title { font-size: 15px; font-weight: 700; color: var(--nj-text); line-height: 1.55; }
.nj-fr:hover .nj-fr-title { color: var(--nj-green-ink); }
.nj-fr-excerpt { font-size: 12.5px; line-height: 1.7; color: var(--nj-muted); }
.nj-fr-more { font-size: 11.5px; color: var(--nj-faint); margin-top: 2px; }

/* ---------- 页脚 ---------- */
.nj-footer {
  margin-top: 40px; border-top: 1px solid var(--nj-line);
  background: #fbfdfc; padding: 16px 20px 18px;
}
.nj-footer-inner { max-width: 1120px; margin: 0 auto; text-align: center; }
.nj-footer-inner p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--nj-muted); }
.nj-footer-dim { color: var(--nj-faint); }
.nj-footer-inner .nj-footer-run { margin-top: 2px; }
.nj-footer-inner .nj-footer-icp { margin-top: 2px; font-size: 11px; }
.nj-footer-icp a { color: var(--nj-faint); text-decoration: none; }
.nj-footer-icp a:hover { color: var(--nj-green-deep); text-decoration: underline; }

/* ---------- 搜索弹层 / 悬浮按钮 ---------- */
.search-panel {
  background: #fff; border: 1px solid var(--nj-line);
  border-radius: 14px; box-shadow: 0 30px 60px -40px rgba(17, 24, 39, 0.4);
}
.search-box { border-bottom: 1px solid var(--nj-line); }
.search-box input { font-family: inherit; }
.search-results { color: var(--nj-body); }

.fab-publish {
  background: var(--nj-green-deep) !important; color: #fff !important;
  border-radius: 50% !important; box-shadow: 0 10px 24px -12px rgba(35, 121, 92, 0.7) !important;
}
.back-top {
  background: #fff !important; color: var(--nj-muted) !important;
  border: 1px solid var(--nj-line) !important; border-radius: 50% !important;
  box-shadow: var(--nj-shadow) !important;
}
.back-top:hover { color: var(--nj-green-deep) !important; border-color: #bfe3d3 !important; }

/* 音乐播放器：与白色卡片体系统一 */
.music-capsule { background: #fff; border: 1px solid var(--nj-line); box-shadow: var(--nj-shadow); }
.music-playlist { background: #fff; border: 1px solid var(--nj-line); border-radius: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1040px) {
  .nj-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; }
  .nj-featured-title { font-size: 24px; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex !important; }
  /* 手机端顶栏：收起 RSS，天气胶囊收起温度文字只留图标圆钮 */
  .nj-top-btn { display: none; }
  .nj-top-weather { width: 34px; padding: 0; justify-content: center; border-radius: 50%; }
  .nj-top-weather .nj-tw-temp { display: none; }
  .nj-tw-pop { right: -8px; width: 202px; }
  .nj-tw-pop::before { right: 16px; }
  .topbar.menu-open .mobile-menu {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px 16px 14px; background: #fff;
  }
  .topbar-inner { height: 62px; gap: 12px; }
  .nj-layout, .nj-layout--about { grid-template-columns: minmax(0, 1fr); }
  .nj-aside { order: 2; }
  .nj-stats { grid-template-columns: repeat(4, minmax(0, max-content)); gap: 6px 32px; }
  .nj-stat { flex-direction: column; gap: 2px; align-items: flex-start; }
  .nj-stat-num { font-size: 22px; }
  .nj-about-head { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; }
  .nj-about-avatar { width: 120px; height: 120px; border-radius: 50%; }
  .nj-about-avatar-letter { font-size: 52px; }
  .nj-about-info h1 { font-size: 36px; }
  .nj-sk-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nj-wrap { padding: 22px 16px 0; }
  .nj-stats { padding-bottom: 20px; }
  .nj-stat-num { font-size: 20px; }
  .nj-stat-label { font-size: 11px; }
  .nj-featured { grid-template-columns: 1fr; min-height: 0; }
  .nj-featured-art { height: 148px; }
  .nj-featured-badge { left: 14px; top: 14px; }
  .nj-featured-body { padding: 20px 20px 22px; }
  .nj-featured-title { font-size: 22px; margin: 10px 0 16px; }
  .nj-card-grid, .nj-link-grid, .links-apply-grid { grid-template-columns: 1fr; }
  .links-apply-grid { grid-template-areas: "info" "rules" "form" "status"; gap: 12px; }
  .nj-pcard-media { height: 156px; }
  .nj-page-head { padding-bottom: 18px; margin-bottom: 18px; }
  .nj-page-head h1 { font-size: 26px; }
  .nj-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nj-about { padding-top: 24px; }
  .nj-about-head { grid-template-columns: 1fr; text-align: left; gap: 18px; }
  .nj-about-avatar { width: 104px; height: 104px; border-radius: 50%; }
  .nj-about-info h1 { font-size: 32px; }
  .article-card { margin: 18px 12px 0; padding: 26px 20px 24px; border-radius: 13px; }
  .article-card h1 { font-size: 25px; }
  .article-body { font-size: 15.5px; line-height: 1.9; }
  .comment-form-row { grid-template-columns: 1fr; }
  .nj-result { grid-template-columns: 46px minmax(0, 1fr); }
  .nj-result-date { display: none; }
  .nj-footer { margin-top: 28px; padding: 12px 16px 14px; }
  .nj-moments .bber-item { padding: 9px 12px 5px; }
  .nj-moments .bber-img-single { max-width: 100%; }
  .nj-moments .bber-img-single .bber-content-img { max-width: 100%; padding-bottom: 56%; }
  .nj-fr { grid-template-columns: 38px minmax(0, 1fr); padding: 14px; }
  .nj-fr-avatar .links-avatar { width: 38px; height: 38px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15px; }
  .nj-stats { grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 32px; }
}
