/* ============================================================
   Handsome for Gridea v2 · 主样式入口
   分层：vars(令牌) → base(基础/组件) → motion(动效) → 模块 → 响应式
   ============================================================ */
/* ============================================================
   Handsome for Gridea v2 · 设计变量（Design Tokens）
   原则：简洁、克制、优雅 —— 单一强调色 + 中性灰阶 + 统一圆角阴影
   所有组件只允许引用令牌，不得硬编码颜色/尺寸
   ============================================================ */
:root {
  --hs-bg: #f7f7f9;
  --hs-surface: #ffffff;
  --hs-surface-2: #f2f2f6;
  --hs-ink: #23262d;
  --hs-ink-2: #4c515b;
  --hs-ink-3: #8a8f99;
  --hs-line: #e9e9ee;
  --hs-accent: #5457d6;
  --hs-accent-weak: rgba(84, 87, 214, 0.09);
  --hs-code-bg: #f6f6f8;
  --hs-shadow: 0 1px 2px rgba(23, 26, 33, 0.04);
  --hs-shadow-md: 0 1px 2px rgba(23, 26, 33, 0.05), 0 10px 30px -18px rgba(23, 26, 33, 0.18);
}
html.hs-dark {
  --hs-bg: #131418;
  --hs-surface: #1b1d23;
  --hs-surface-2: #22252d;
  --hs-ink: #eceef2;
  --hs-ink-2: #b4b8c2;
  --hs-ink-3: #767b87;
  --hs-line: #2a2d36;
  --hs-accent: #8f92f2;
  --hs-accent-weak: rgba(143, 146, 242, 0.13);
  --hs-code-bg: #20232b;
  --hs-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --hs-shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -18px rgba(0, 0, 0, .55);
}
.hs-aside--dark {
  background: linear-gradient(175deg, #1b2230 0%, #12161f 100%);
}
.hs-aside--grass {
  background: linear-gradient(175deg, #1f9d55 0%, #14713c 100%);
}
.hs-aside--purple {
  background: linear-gradient(175deg, #5a4fb2 0%, #3f377e 100%);
}
.hs-aside--white {
  background: var(--hs-surface);
  border-right: 1px solid var(--hs-line);
}
/* ============================================================
   基础层：重置 / 排版 / 公共组件（按钮·徽标·标签·卡片·空状态）
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--hs-ink-2);
  background: var(--hs-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
a {
  color: var(--hs-accent);
  text-decoration: none;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--hs-ink);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
::selection {
  background: var(--hs-accent-weak);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--hs-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 内联 SVG 图标 */
.hs-i {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* ---------- 卡片 ---------- */
.hs-card {
  background: var(--hs-surface);
  border-radius: 12px;
  border: 1px solid var(--hs-line);
  box-shadow: var(--hs-shadow);
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* ---------- 按钮 ---------- */
.hs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hs-ink-2);
  background: var(--hs-surface);
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-btn:hover {
  color: var(--hs-accent);
  border-color: var(--hs-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgba(84, 87, 214, 0.45);
}
.hs-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}
.hs-btn .hs-i {
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-btn--primary {
  color: #fff;
  background: var(--hs-accent);
  border-color: var(--hs-accent);
}
.hs-btn--primary:hover {
  color: #fff;
  background: #4346c2;
  border-color: #4346c2;
}
/* ---------- 徽标 ---------- */
.hs-badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 999px;
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
  vertical-align: 3px;
}
/* ---------- 标签胶囊 ---------- */
.hs-aside-tag {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--hs-accent-weak);
  color: var(--hs-accent);
  white-space: nowrap;
  transition: background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-aside-tag sup {
  font-size: 10px;
  margin-left: 3px;
  opacity: 0.65;
}
.hs-aside-tag:hover {
  background: var(--hs-accent);
  color: #fff;
  transform: translateY(-1px);
}
/* 标签云页大号胶囊 */
.hs-tag-cloud .hs-tag-chip {
  display: inline-block;
  margin: 0 10px 12px 0;
  padding: 7px 18px;
  font-size: 14px;
  border-radius: 999px;
  background: var(--hs-accent-weak);
  color: var(--hs-accent);
  transition: background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-tag-cloud .hs-tag-chip sup {
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.65;
}
.hs-tag-cloud .hs-tag-chip:hover {
  background: var(--hs-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -10px rgba(84, 87, 214, 0.6);
}
/* ---------- 空状态 ---------- */
.hs-empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--hs-ink-3);
}
.hs-empty .hs-i {
  font-size: 38px;
  display: block;
  margin: 0 auto 14px;
}
.hs-empty p {
  margin: 0;
  font-size: 14px;
}
.hs-widget-empty {
  color: var(--hs-ink-3);
  font-size: 13px;
}
/* ============================================================
   页面骨架
   ============================================================ */
body {
  padding-top: 56px;
}
.hs-mobbar {
  display: flex;
}
.hs-main {
  margin-left: 248px;
  min-height: 100vh;
}
.hs-layout {
  padding: clamp(18px, 2vw, 32px) clamp(14px, 1.8vw, 32px);
}
.hs-layout--single .hs-col-main {
  max-width: 800px;
  margin: 0 auto;
}
.hs-layout--with-side {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 24px;
  align-items: start;
}
.hs-col-main {
  min-width: 0;
}
.hs-col-main > .hs-card {
  margin-bottom: 24px;
}
.hs-side {
  position: sticky;
  top: 24px;
  min-width: 0;
}
.hs-side .hs-widget {
  margin-bottom: 24px;
}
/* ============================================================
   动效系统（Motion）
   原则：快而克制 —— 入场 400–500ms、微交互 150–250ms，
   统一缓动令牌；全部尊重 prefers-reduced-motion
   ============================================================ */
/* ---------- 关键帧 ---------- */
@keyframes hs-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes hs-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/* ---------- 页面切换（跨文档视图过渡：渐进增强，仅现代 Chromium 生效） ---------- */
@view-transition {
  navigation: auto;
}
/* ---------- 页面进入：主区域一次性上浮淡入 ---------- */
.hs-page .hs-main {
  animation: hs-rise 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hs-page .hs-aside {
  animation: hs-fade 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
/* ---------- 列表卡片入场：首屏交错浮现（延迟封顶 0.3s，不拖沓） ---------- */
.hs-post-list .hs-post-item,
.hs-friends .hs-friend {
  animation: hs-rise 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hs-post-list .hs-post-item:nth-child(1) {
  animation-delay: 0.04s;
}
.hs-post-list .hs-post-item:nth-child(2) {
  animation-delay: 0.1s;
}
.hs-post-list .hs-post-item:nth-child(3) {
  animation-delay: 0.16s;
}
.hs-post-list .hs-post-item:nth-child(4) {
  animation-delay: 0.22s;
}
.hs-post-list .hs-post-item:nth-child(5) {
  animation-delay: 0.28s;
}
.hs-post-list .hs-post-item:nth-child(n+6) {
  animation-delay: 0.32s;
}
.hs-friends .hs-friend:nth-child(1) {
  animation-delay: 0.05s;
}
.hs-friends .hs-friend:nth-child(2) {
  animation-delay: 0.11s;
}
.hs-friends .hs-friend:nth-child(3) {
  animation-delay: 0.17s;
}
.hs-friends .hs-friend:nth-child(n+4) {
  animation-delay: 0.23s;
}
/* ---------- 滚动显现（JS 增强：下方内容进入视口时浮现） ----------
   .hs-reveal 由 scripts.ejs 中的 IntersectionObserver 添加，
   无 JS / 减少动态偏好时不降级内容可见性 */
.hs-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-reveal.hs-in {
  opacity: 1;
  transform: none;
}
/* ---------- 阅读进度条（文章页顶部，2px 强调色） ---------- */
.hs-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 2px;
  background: var(--hs-accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
/* ---------- 减少动态：全局退化为瞬时状态切换 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hs-reveal {
    opacity: 1;
    transform: none;
  }
}
/* ============================================================
   左侧边栏 / 移动端顶栏
   ============================================================ */
.hs-aside {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 999;
  width: 248px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: rgba(255, 255, 255, 0.72);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.hs-aside::-webkit-scrollbar {
  width: 4px;
}
.hs-aside::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
}
.hs-aside-user {
  padding: 36px 24px 22px;
  text-align: center;
}
.hs-aside-avatar {
  display: inline-block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s cubic-bezier(0.34, 1.35, 0.44, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-aside-avatar:hover {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.5);
}
.hs-aside-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hs-aside-name {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 650;
  color: #fff;
  letter-spacing: 0.02em;
}
.hs-aside-desc {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ---------- 导航 ---------- */
.hs-nav {
  padding: 6px 0;
}
.hs-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hs-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1px 12px;
  padding: 9px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-nav-link .hs-i {
  font-size: 17px;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-nav-link span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.hs-nav-link:hover .hs-i {
  transform: translateX(2px);
}
.hs-nav-link:active {
  background: rgba(255, 255, 255, 0.12);
}
/* 当前页高亮（由 scripts.ejs 依据路径匹配添加） */
.hs-nav-link.hs-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.hs-nav-link.hs-active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: currentColor;
}
/* ---------- 侧栏标签 ---------- */
.hs-aside-tags {
  padding: 14px 24px 6px;
}
.hs-aside-tags .hs-aside-tag {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}
.hs-aside-tags .hs-aside-tag sup {
  opacity: 0.55;
}
.hs-aside-tags .hs-aside-tag:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #23262d;
}
/* ---------- 侧栏底部：社交 + 夜间切换 ---------- */
.hs-aside-foot {
  margin-top: auto;
  padding: 16px 24px 20px;
}
.hs-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.hs-social a,
.hs-social button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.62);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-social a:hover,
.hs-social button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.hs-social a:active,
.hs-social button:active {
  transform: none;
}
/* 夜间模式按钮：日月图标旋转淡切 */
.hs-dark-toggle {
  position: relative;
}
.hs-dark-toggle .hs-icon-moon,
.hs-dark-toggle .hs-icon-sun {
  display: inline-flex;
  transition: opacity 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-dark-toggle .hs-icon-sun {
  position: absolute;
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
html.hs-dark .hs-dark-toggle .hs-icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
html.hs-dark .hs-dark-toggle .hs-icon-sun {
  opacity: 1;
  transform: none;
}
/* ---------- 白色侧边栏配色 ---------- */
.hs-aside--white {
  color: var(--hs-ink-2);
}
.hs-aside--white .hs-aside-name {
  color: var(--hs-ink);
}
.hs-aside--white .hs-aside-desc {
  color: var(--hs-ink-3);
}
.hs-aside--white .hs-aside-avatar {
  border-color: var(--hs-line);
  box-shadow: var(--hs-shadow-md);
}
.hs-aside--white .hs-nav-link {
  color: var(--hs-ink-2);
}
.hs-aside--white .hs-nav-link:hover {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
}
.hs-aside--white .hs-nav-link.hs-active {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
}
.hs-aside--white .hs-aside-tags .hs-aside-tag {
  background: var(--hs-accent-weak);
  color: var(--hs-accent);
}
.hs-aside--white .hs-aside-tags .hs-aside-tag:hover {
  background: var(--hs-accent);
  color: #fff;
}
.hs-aside--white .hs-social a,
.hs-aside--white .hs-social button {
  color: var(--hs-ink-3);
}
.hs-aside--white .hs-social a:hover,
.hs-aside--white .hs-social button:hover {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
}
/* ---------- 移动端顶栏 ---------- */
.hs-mobbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--hs-surface);
  border-bottom: 1px solid var(--hs-line);
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-mobbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--hs-ink-2);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-mobbar-btn:hover {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
}
.hs-mobbar-btn:active {
  transform: scale(0.94);
}
.hs-mobbar-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--hs-ink);
  letter-spacing: 0.01em;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ---------- 抽屉遮罩 ---------- */
.hs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(15, 17, 22, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-backdrop.hs-show {
  opacity: 1;
  pointer-events: auto;
}
/* ============================================================
   首页头部 / 公告 / 文章列表 / 分页
   ============================================================ */
.hs-index-head {
  padding: 30px 26px 26px;
}
.hs-index-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.1vw, 32px);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.hs-index-words {
  margin: 0;
  font-size: 13px;
  color: var(--hs-ink-3);
  letter-spacing: 0.05em;
  transition: color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* ---------- 公告 ---------- */
.hs-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 20px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-line);
  border-left: 3px solid var(--hs-accent);
}
.hs-notice .hs-notice-icon {
  color: var(--hs-accent);
  font-size: 18px;
  line-height: 1.5;
}
.hs-notice .hs-notice-body {
  min-width: 0;
  font-size: 14px;
}
.hs-notice .hs-notice-body p {
  margin: 0 0 0.4em;
}
.hs-notice .hs-notice-body p:last-child {
  margin-bottom: 0;
}
.hs-notice .hs-notice-body a {
  border-bottom: 1px solid currentColor;
}
/* ---------- 文章列表 ---------- */
.hs-post-list {
  margin-bottom: 24px;
}
.hs-post-item {
  margin-bottom: 24px;
  overflow: hidden;
}
.hs-post-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--hs-shadow-md);
  border-color: #dcdce6;
}
.hs-post-item:active {
  transform: translateY(0);
}
html.hs-dark .hs-post-item:hover {
  border-color: #383c48;
}
.hs-post-item--thumb .hs-post-thumb {
  display: block;
  height: clamp(186px, 16vw, 260px);
  background: var(--hs-surface-2) center center / cover no-repeat;
}
.hs-post-item-body {
  padding: 20px 22px 16px;
}
.hs-post-item-title {
  margin: 0 0 8px;
  font-size: clamp(16.5px, 1.15vw, 18px);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.hs-post-item-title a {
  color: var(--hs-ink);
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-post-item-title a:hover {
  color: var(--hs-accent);
}
.hs-post-item-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  color: var(--hs-ink-2);
  line-height: 1.8;
}
.hs-post-item-excerpt p {
  margin: 0;
}
.hs-post-item-excerpt img {
  display: none;
}
.hs-post-item-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 14px -22px -16px;
  padding: 8px 22px;
  background: var(--hs-surface-2);
  border-top: 1px solid var(--hs-line);
  font-size: 12px;
  color: var(--hs-ink-3);
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 16px;
  white-space: nowrap;
}
.hs-foot-item .hs-i {
  font-size: 13px;
}
.hs-foot-item a {
  color: var(--hs-ink-3);
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-foot-item a:hover {
  color: var(--hs-accent);
}
.hs-foot-tags {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ---------- 分页 ---------- */
.hs-pagination {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 4px 0 24px;
}
.hs-pagination .hs-btn .hs-i {
  vertical-align: -0.15em;
}
.hs-pagination .hs-btn:hover .hs-i-chevron-left {
  transform: translateX(-2px);
}
.hs-pagination .hs-btn:hover .hs-i-chevron-right {
  transform: translateX(2px);
}
/* ============================================================
   右侧栏小组件（最新文章 / 标签云 / 站点信息 / 目录）
   ============================================================ */
.hs-widget {
  overflow: hidden;
}
.hs-widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 15px 18px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hs-ink);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--hs-line);
  transition: border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-widget-title .hs-i {
  font-size: 15px;
  color: var(--hs-accent);
}
/* 最新文章 */
.hs-widget-posts {
  list-style: none;
  margin: 0;
  padding: 6px 18px 10px;
}
.hs-widget-posts li {
  display: flex;
  flex-direction: column;
  padding: 9px 0;
}
.hs-widget-posts li + li {
  border-top: 1px dashed var(--hs-line);
  transition: border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-widget-posts a {
  font-size: 14px;
  color: var(--hs-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-widget-posts a:hover {
  color: var(--hs-accent);
  transform: translateX(2px);
}
.hs-widget-posts .hs-widget-post-date {
  font-size: 12px;
  color: var(--hs-ink-3);
  font-variant-numeric: tabular-nums;
}
.hs-widget-tags {
  padding: 12px 18px 8px;
}
/* 站点信息 */
.hs-widget-info {
  list-style: none;
  margin: 0;
  padding: 8px 18px 14px;
}
.hs-widget-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}
.hs-widget-info b {
  font-weight: 500;
  color: var(--hs-ink);
  font-variant-numeric: tabular-nums;
}
.hs-widget-info b a {
  color: var(--hs-accent);
}
/* ---------- 目录（文章页） ---------- */
.hs-widget--toc .hs-toc {
  max-height: 52vh;
  overflow-y: auto;
  padding: 10px 12px 14px;
  font-size: 13px;
  scrollbar-width: thin;
  scrollbar-color: var(--hs-line) transparent;
  /* scrollspy 当前小节高亮（scripts.ejs 添加 .hs-active） */
}
.hs-widget--toc .hs-toc ul,
.hs-widget--toc .hs-toc ol {
  list-style: none;
  margin: 0;
  padding-left: 10px;
}
.hs-widget--toc .hs-toc > ul,
.hs-widget--toc .hs-toc > ol {
  padding-left: 0;
}
.hs-widget--toc .hs-toc li {
  margin: 1px 0;
}
.hs-widget--toc .hs-toc a {
  display: block;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--hs-ink-3);
  line-height: 1.55;
  border-left: 2px solid transparent;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-widget--toc .hs-toc a:hover {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
}
.hs-widget--toc .hs-toc a.hs-active {
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
  border-left-color: var(--hs-accent);
}
/* ============================================================
   文章详情页（头部 / 正文排版 / 代码块 / 上下篇 / 评论）
   ============================================================ */
.hs-post-head {
  padding: 28px 28px 20px;
}
.hs-post-title {
  margin: 0 0 14px;
  font-size: clamp(21px, 1.9vw, 30px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.02em;
}
.hs-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--hs-ink-3);
}
.hs-meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hs-meta .hs-i {
  font-size: 14px;
}
.hs-meta a {
  color: var(--hs-ink-3);
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-meta a:hover {
  color: var(--hs-accent);
}
.hs-post-feature {
  height: clamp(200px, 20vw, 320px);
  background: var(--hs-surface-2) center center / cover no-repeat;
  border-radius: 12px;
}
/* ============================================================
   正文排版（Markdown 渲染结果）
   ============================================================ */
.hs-post-content {
  padding: 26px 30px 30px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--hs-ink-2);
  word-wrap: break-word;
  /* 正文链接：滑动下划线动效 */
  /* 行内代码 */
  /* 代码块 */
}
.hs-post-content > *:first-child {
  margin-top: 0;
}
.hs-post-content > *:last-child {
  margin-bottom: 0;
}
.hs-post-content p {
  margin: 0 0 1.15em;
}
.hs-post-content h1,
.hs-post-content h2,
.hs-post-content h3,
.hs-post-content h4,
.hs-post-content h5,
.hs-post-content h6 {
  margin: 1.6em 0 0.8em;
  font-weight: 650;
  letter-spacing: -0.01em;
  scroll-margin-top: 76px;
}
.hs-post-content h1 {
  font-size: 22px;
}
.hs-post-content h2 {
  font-size: 20px;
}
.hs-post-content h3 {
  font-size: 17.5px;
}
.hs-post-content h4 {
  font-size: 16px;
}
.hs-post-content a {
  color: var(--hs-accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), background-size 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-post-content a:hover {
  color: var(--hs-accent);
  background-size: 100% 1px;
}
.hs-post-content img {
  height: auto;
  border-radius: 8px;
}
.hs-post-content figure {
  margin: 1.4em 0;
  text-align: center;
}
.hs-post-content figure img {
  max-width: 100%;
}
.hs-post-content blockquote {
  margin: 1.4em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--hs-accent);
  border-radius: 0 8px 8px 0;
  background: var(--hs-surface-2);
  color: var(--hs-ink-2);
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-post-content blockquote p:last-child {
  margin-bottom: 0;
}
.hs-post-content code {
  padding: 2px 7px;
  font-size: 0.86em;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, Menlo, monospace;
  color: var(--hs-accent);
  background: var(--hs-accent-weak);
  border-radius: 6px;
}
.hs-post-content pre {
  margin: 1.4em 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  background: var(--hs-code-bg);
  border: 1px solid var(--hs-line);
  border-radius: 10px;
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-post-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.hs-post-content table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 13.5px;
}
.hs-post-content table th,
.hs-post-content table td {
  padding: 9px 13px;
  border: 1px solid var(--hs-line);
  text-align: left;
  transition: border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-post-content table th {
  background: var(--hs-surface-2);
  color: var(--hs-ink);
  font-weight: 600;
}
.hs-post-content ul,
.hs-post-content ol {
  margin: 0 0 1.15em;
  padding-left: 1.7em;
}
.hs-post-content ul li,
.hs-post-content ol li {
  margin: 0.35em 0;
}
.hs-post-content ul li::marker,
.hs-post-content ol li::marker {
  color: var(--hs-ink-3);
}
.hs-post-content hr {
  margin: 2em 0;
  border: none;
  border-top: 1px dashed var(--hs-line);
}
.hs-post-content input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: -2px;
  accent-color: var(--hs-accent);
}
.hs-post-content .footnotes {
  font-size: 13px;
  color: var(--hs-ink-3);
}
.hs-post-content .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
}
/* 夜间模式：正文图片轻微减光，代码块用反色技巧适配 hljs 亮色主题 */
html.hs-dark .hs-post-content img {
  opacity: 0.88;
}
html.hs-dark .hs-post-content pre {
  filter: invert(0.9) hue-rotate(180deg);
}
html.hs-dark .hs-post-content pre code {
  background: transparent;
}
/* ============================================================
   上一篇 / 下一篇
   ============================================================ */
.hs-post-pn {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
.hs-pn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 22px;
}
.hs-pn .hs-pn-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--hs-ink-3);
}
.hs-pn .hs-pn-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--hs-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-pn:hover {
  transform: translateY(-2px);
  box-shadow: var(--hs-shadow-md);
}
.hs-pn:hover .hs-pn-title {
  color: var(--hs-accent);
}
.hs-pn--prev:hover .hs-pn-label .hs-i {
  transform: translateX(-2px);
}
.hs-pn--next:hover .hs-pn-label .hs-i {
  transform: translateX(2px);
}
.hs-pn .hs-pn-label .hs-i {
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-pn--next {
  text-align: right;
}
.hs-pn--next .hs-pn-label {
  justify-content: flex-end;
}
.hs-pn-spacer {
  flex: 1;
}
/* ---------- 评论区 ---------- */
.hs-comments {
  padding: 18px 26px 26px;
}
.hs-comments #gitalk-container,
.hs-comments #disqus_thread {
  min-height: 120px;
}
/* ============================================================
   归档 / 标签页 / 404 / 关于 / 友链
   ============================================================ */
.hs-page-head {
  padding: 26px 26px 22px;
}
.hs-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.hs-page-title .hs-i {
  font-size: 21px;
  color: var(--hs-accent);
}
.hs-page-sub {
  margin: 0;
  font-size: 13px;
  color: var(--hs-ink-3);
  font-variant-numeric: tabular-nums;
}
/* ---------- 归档时间轴 ---------- */
.hs-archives {
  padding: 22px 30px 30px;
}
.hs-arch-group .hs-arch-year {
  display: flex;
  align-items: baseline;
  margin: 28px 0 14px;
  font-size: 19px;
  font-weight: 650;
}
.hs-arch-group .hs-arch-year:first-child {
  margin-top: 4px;
}
.hs-arch-group .hs-arch-year em {
  margin-left: 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  color: var(--hs-ink-3);
}
.hs-arch-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 6px;
  border-left: 2px solid var(--hs-line);
}
.hs-arch-list li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0 7px 20px;
}
.hs-arch-list .hs-arch-dot {
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hs-line);
  box-shadow: 0 0 0 3px var(--hs-surface);
  transition: background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-arch-list li:hover .hs-arch-dot {
  background: var(--hs-accent);
  transform: translateY(-50%) scale(1.25);
}
.hs-arch-list .hs-arch-date {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--hs-ink-3);
  font-variant-numeric: tabular-nums;
}
.hs-arch-list a {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--hs-ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-arch-list a:hover {
  color: var(--hs-accent);
  transform: translateX(2px);
}
/* ---------- 标签云页 ---------- */
.hs-tag-cloud-page {
  padding: 22px 24px 14px;
}
/* ---------- 404 ---------- */
.hs-404 {
  padding: 64px 20px;
  text-align: center;
}
.hs-404-code {
  font-size: clamp(64px, 7vw, 104px);
  font-weight: 200;
  line-height: 1;
  color: var(--hs-ink);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.hs-404-code span {
  color: var(--hs-accent);
}
.hs-404-text {
  margin: 18px 0 26px;
  font-size: 15px;
  color: var(--hs-ink-3);
}
.hs-404-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}
/* ---------- 友情链接 ---------- */
.hs-friends {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.hs-friend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
}
.hs-friend .hs-friend-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex-shrink: 0;
  font-size: 19px;
  font-weight: 650;
  color: #fff;
  background: var(--hs-accent);
  transition: transform 0.25s cubic-bezier(0.34, 1.35, 0.44, 1);
}
.hs-friend .hs-friend-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hs-friend .hs-friend-name {
  font-size: 15px;
  color: var(--hs-ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-friend .hs-friend-desc {
  font-size: 12px;
  color: var(--hs-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-friend:hover {
  transform: translateY(-2px);
  box-shadow: var(--hs-shadow-md);
}
.hs-friend:hover .hs-friend-name {
  color: var(--hs-accent);
}
.hs-friend:hover .hs-friend-avatar {
  transform: rotate(-6deg) scale(1.05);
}
.hs-friend:nth-child(4n + 2) .hs-friend-avatar {
  background: #0ea5b7;
}
.hs-friend:nth-child(4n + 3) .hs-friend-avatar {
  background: #2f9e63;
}
.hs-friend:nth-child(4n) .hs-friend-avatar {
  background: #d9564f;
}
.hs-about-content {
  min-height: 160px;
}
/* ============================================================
   页脚 / 回到顶部
   ============================================================ */
.hs-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 24px;
}
.hs-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 15px 24px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-line);
  border-radius: 12px;
  box-shadow: var(--hs-shadow);
  font-size: 13px;
  color: var(--hs-ink-3);
  transition: background-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-footer-inner a {
  color: var(--hs-ink-3);
  transition: color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-footer-inner a:hover {
  color: var(--hs-accent);
}
.hs-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hs-footer-dot {
  opacity: 0.5;
}
/* ---------- 回到顶部 ---------- */
.hs-backtop {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hs-line);
  background: var(--hs-surface);
  color: var(--hs-ink-2);
  font-size: 19px;
  cursor: pointer;
  box-shadow: var(--hs-shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.25s cubic-bezier(0.34, 1.35, 0.44, 1), background-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.15s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.hs-backtop.hs-show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.hs-backtop:hover {
  background: var(--hs-accent);
  border-color: var(--hs-accent);
  color: #fff;
  transform: translateY(-3px);
}
.hs-backtop:active {
  transform: scale(0.94);
}
/* ============================================================
   响应式
   断点：≥1920 大屏 / ≥2560 2K 及以上 / 1200 中屏 /
        1024 平板（侧栏转抽屉）/ 576 手机 / 400 超窄屏
   另含：触屏 hover 抑制、安全区适配
   ============================================================ */
/* ================= 大屏（笔记本外接 / 2K 起步） ≥1920 ================= */
@media (min-width: 1920px) {
  /* 外壳整体居中：侧栏 + 间距 + 内容 作为一个组合居中，随屏幕变宽向中靠拢
     外壳 = 侧栏 264 + 间距 28 + 内容 1520 = 1812，半宽 906 */
  .hs-aside {
    width: 264px;
    left: calc(50vw - 906px);
  }
  .hs-main {
    margin-left: calc(50vw - 906px + 264px + 28px);
    margin-right: calc(50vw - 906px);
  }
  .hs-layout--with-side {
    max-width: 1520px;
    grid-template-columns: minmax(0, 1fr) 324px;
    gap: 28px;
  }
  .hs-layout--single .hs-col-main {
    max-width: 880px;
  }
  .hs-footer {
    max-width: 1520px;
  }
  .hs-index-head {
    padding: 32px 30px 28px;
  }
  .hs-post-content {
    padding: 28px 32px 32px;
  }
  .hs-archives {
    padding: 24px 32px 32px;
  }
  .hs-side {
    top: 28px;
  }
}
/* ================= 2K 及以上 ≥2560 ================= */
@media (min-width: 2560px) {
  /* 外壳 = 侧栏 280 + 间距 32 + 内容 1840 = 2152，半宽 1076 */
  body {
    font-size: 16px;
  }
  .hs-aside {
    width: 280px;
    left: calc(50vw - 1076px);
  }
  .hs-main {
    margin-left: calc(50vw - 1076px + 280px + 32px);
    margin-right: calc(50vw - 1076px);
  }
  .hs-aside-name {
    font-size: 18px;
  }
  .hs-nav-link {
    font-size: 15px;
  }
  .hs-layout--with-side {
    max-width: 1840px;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 32px;
  }
  .hs-layout--single .hs-col-main {
    max-width: 1000px;
  }
  .hs-layout {
    padding: 40px 44px;
  }
  .hs-footer {
    max-width: 1840px;
  }
  .hs-post-item--thumb .hs-post-thumb {
    height: 300px;
  }
  .hs-post-feature {
    height: 360px;
  }
  .hs-footer-inner {
    padding: 17px 28px;
    font-size: 14px;
  }
  .hs-index-title {
    font-size: 36px;
  }
  .hs-index-words {
    font-size: 14px;
  }
  .hs-post-item-body {
    padding: 22px 26px 18px;
  }
  .hs-post-item-excerpt {
    font-size: 15px;
  }
  .hs-post-item-foot {
    font-size: 13px;
    margin: 14px -26px -18px;
    padding: 9px 26px;
  }
  .hs-post-head {
    padding: 32px 32px 22px;
  }
  .hs-post-content {
    padding: 32px 38px 38px;
    font-size: 16px;
    line-height: 1.95;
  }
  .hs-meta {
    font-size: 14px;
  }
  .hs-pn {
    padding: 18px 24px;
  }
  .hs-pn .hs-pn-title {
    font-size: 15px;
  }
  .hs-archives {
    padding: 26px 38px 38px;
  }
  .hs-arch-list a {
    font-size: 15px;
  }
  .hs-tag-cloud-page,
  .hs-page-head {
    padding: 30px 32px 24px;
  }
  .hs-page-title {
    font-size: 27px;
  }
  .hs-widget-posts a {
    font-size: 15px;
  }
  .hs-friends {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  .hs-btn {
    padding: 10px 22px;
    font-size: 15px;
  }
  .hs-backtop {
    right: 40px;
    bottom: 40px;
  }
}
/* ================= 4K 及以上 ≥3200 ================= */
@media (min-width: 3200px) {
  /* 外壳 = 侧栏 300 + 间距 44 + 内容 2160 = 2504，半宽 1252 */
  body {
    font-size: 17px;
  }
  .hs-aside {
    width: 300px;
    left: calc(50vw - 1252px);
  }
  .hs-main {
    margin-left: calc(50vw - 1252px + 300px + 44px);
    margin-right: calc(50vw - 1252px);
  }
  .hs-aside-user {
    padding: 44px 28px 26px;
  }
  .hs-aside-avatar {
    width: 88px;
    height: 88px;
  }
  .hs-aside-name {
    font-size: 19px;
  }
  .hs-aside-desc {
    font-size: 13px;
  }
  .hs-nav-link {
    font-size: 16px;
    padding: 11px 16px;
  }
  .hs-aside-tag {
    font-size: 13px;
    padding: 4px 14px;
  }
  .hs-social a,
  .hs-social button {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .hs-layout--with-side {
    max-width: 2160px;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 44px;
  }
  .hs-layout--single .hs-col-main {
    max-width: 1080px;
  }
  .hs-layout {
    padding: 52px 60px;
  }
  .hs-footer {
    max-width: 2160px;
  }
  .hs-footer-inner {
    padding: 20px 32px;
    font-size: 15px;
  }
  .hs-index-head {
    padding: 40px 38px 34px;
  }
  .hs-index-title {
    font-size: 42px;
  }
  .hs-index-words {
    font-size: 15px;
  }
  .hs-notice {
    padding: 18px 24px;
    font-size: 15px;
  }
  .hs-post-item-body {
    padding: 26px 30px 20px;
  }
  .hs-post-item-title {
    font-size: 20px;
  }
  .hs-post-item-excerpt {
    font-size: 16px;
  }
  .hs-post-item-foot {
    font-size: 14px;
    margin: 15px -30px -20px;
    padding: 10px 30px;
  }
  .hs-post-item--thumb .hs-post-thumb {
    height: 360px;
  }
  .hs-post-head {
    padding: 38px 38px 26px;
  }
  .hs-post-title {
    font-size: 34px;
  }
  .hs-meta {
    font-size: 15px;
  }
  .hs-post-feature {
    height: 440px;
  }
  .hs-post-content {
    padding: 38px 46px 44px;
    font-size: 17px;
    line-height: 2;
  }
  .hs-pn {
    padding: 22px 28px;
  }
  .hs-pn .hs-pn-title {
    font-size: 16px;
  }
  .hs-archives {
    padding: 30px 44px 44px;
  }
  .hs-arch-year {
    font-size: 22px;
  }
  .hs-arch-list a {
    font-size: 16px;
  }
  .hs-page-head {
    padding: 34px 36px 28px;
  }
  .hs-page-title {
    font-size: 30px;
  }
  .hs-tag-cloud-page {
    padding: 26px 30px 18px;
  }
  .hs-tag-cloud .hs-tag-chip {
    font-size: 15px;
  }
  .hs-widget-title {
    font-size: 15px;
  }
  .hs-widget-posts a {
    font-size: 16px;
  }
  .hs-widget-info li {
    font-size: 14px;
  }
  .hs-friends {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
  }
  .hs-friend {
    padding: 22px 24px;
  }
  .hs-btn {
    padding: 12px 26px;
    font-size: 16px;
  }
  .hs-backtop {
    width: 50px;
    height: 50px;
    right: 48px;
    bottom: 48px;
    font-size: 22px;
  }
}
/* ================= 桌面端：隐藏移动顶栏、还原顶部占位 ================= */
@media (min-width: 1025px) {
  body {
    padding-top: 0;
  }
  .hs-mobbar {
    display: none;
  }
  .hs-backdrop {
    display: none;
  }
}
/* ================= 中屏：收窄右栏 ================= */
@media (max-width: 1200px) {
  .hs-layout--with-side {
    grid-template-columns: minmax(0, 1fr) 276px;
    max-width: 980px;
  }
}
/* ================= 平板及以下：侧栏转抽屉、右栏下移 ================= */
@media (max-width: 1024px) {
  .hs-main {
    margin-left: 0;
  }
  .hs-layout--with-side {
    display: block;
    max-width: 820px;
    margin: 0 auto;
  }
  .hs-side {
    position: static;
  }
  .hs-aside {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.35, 0.44, 1);
    box-shadow: none;
    will-change: transform;
  }
  .hs-aside.hs-open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
  }
}
/* ================= 手机 ================= */
@media (max-width: 576px) {
  .hs-col-main > .hs-card,
  .hs-post-item,
  .hs-side .hs-widget {
    margin-bottom: 16px;
  }
  .hs-index-head {
    padding: 20px 18px 16px;
  }
  .hs-post-item-body {
    padding: 16px 16px 12px;
  }
  .hs-post-item-foot {
    margin: 10px -16px -12px;
    padding: 7px 16px;
  }
  .hs-foot-item {
    margin-right: 12px;
  }
  .hs-post-head {
    padding: 20px 18px 14px;
  }
  .hs-comments {
    padding: 14px 16px 20px;
  }
  /* 正文表格在窄屏横向滚动，避免撑破布局 */
  .hs-post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hs-post-content pre {
    font-size: 12px;
  }
  .hs-archives {
    padding: 16px 18px 22px;
  }
  .hs-arch-list a {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .hs-footer {
    padding: 0 14px calc(14px + env(safe-area-inset-bottom));
  }
  .hs-footer-inner {
    justify-content: center;
    text-align: center;
  }
  .hs-backtop {
    right: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .hs-mobbar {
    height: calc(56px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  body {
    padding-top: calc(56px + env(safe-area-inset-top));
  }
}
/* ================= 超窄屏 ≤400 ================= */
@media (max-width: 400px) {
  .hs-index-title {
    letter-spacing: 0;
  }
  .hs-foot-item {
    margin-right: 10px;
  }
  .hs-404-actions {
    flex-direction: column;
    align-items: center;
  }
  .hs-404-actions .hs-btn {
    width: 72%;
    justify-content: center;
  }
}
/* ================= 触屏设备：抑制悬停浮起（避免「粘住」效果） ================= */
@media (hover: none) {
  .hs-post-item:hover,
  .hs-pn:hover,
  .hs-friend:hover {
    transform: none;
    box-shadow: var(--hs-shadow);
  }
  .hs-card.hs-post-item:hover {
    border-color: var(--hs-line);
  }
  html.hs-dark .hs-card.hs-post-item:hover {
    border-color: #2c303a;
  }
  .hs-btn:hover {
    transform: none;
  }
  .hs-aside-avatar:hover {
    transform: none;
  }
}
