/* ============================================================
   笔浪 · PMYX 前台设计系统
   方向：编辑部纸感（editorial / refined）
   暖纸底 × 墨色正文 × 深松绿主色 × 衬线展示标题
   ============================================================ */

:root {
  /* 色彩 */
  --paper:        #f7f4ee;   /* 纸底 */
  --paper-2:      #f1ece2;   /* 纸底加深（hover / 分区） */
  --card:         #fffdf8;   /* 卡面 */
  --ink:          #26231e;   /* 墨色正文 */
  --ink-2:        #57524a;   /* 次级文字 */
  --ink-3:        #8a8478;   /* 弱化文字 / 元信息 */
  --line:         #e4ddd0;   /* 分隔线 */
  --line-2:       #d3cab9;   /* 强分隔线 */
  --pine:         #1f5c50;   /* 主色 · 深松绿 */
  --pine-deep:    #164439;
  --pine-soft:    #e3ece8;   /* 主色浅底 */
  --ochre:        #c2571f;   /* 强调 · 赭石（置顶/点缀） */
  --ochre-soft:   #f8ebe0;

  /* 字体 */
  --serif: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "SimSun", serif;
  --sans:  "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --mono:  "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* 度量 */
  --w-content: 1200px;
  --w-prose: 720px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(38,35,30,.04), 0 10px 30px -18px rgba(38,35,30,.25);
  --shadow-pop: 0 4px 10px rgba(30,26,18,.08), 0 18px 50px -18px rgba(30,26,18,.35);
  --ease: cubic-bezier(.22,.9,.34,1);
}

[data-theme="dark"] {
  --paper:      #171512;
  --paper-2:    #201d18;
  --card:       #211e19;
  --ink:        #e9e4d8;
  --ink-2:      #b3ac9d;
  --ink-3:      #7d766a;
  --line:       #322e27;
  --line-2:     #423d33;
  --pine:       #5aa08f;
  --pine-deep:  #79bcaa;
  --pine-soft:  #1d2b27;
  --ochre:      #d97a44;
  --ochre-soft: #33241b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.6);
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  transition: background .3s var(--ease), color .3s var(--ease);
}
/* 纸感噪点 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::before { opacity: .07; }

/* 背景装饰：柔和色洗 + 手绘感不规则线条（打破整页纯色；线条为中性墨色低透明，
   明暗主题共用同一图案，暗色整体略提一档保证可见） */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .5;
  background-image:
    radial-gradient(1100px 520px at 88% -6%,
      color-mix(in srgb, var(--ochre) 6%, transparent), transparent 64%),
    radial-gradient(950px 500px at -10% 28%,
      color-mix(in srgb, var(--pine) 6%, transparent), transparent 62%),
    radial-gradient(760px 460px at 72% 108%,
      color-mix(in srgb, var(--pine) 5%, transparent), transparent 64%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='380' height='380'%3E%3Cg fill='none' stroke='%236f675b' stroke-opacity='.24' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M20 300 C 90 210 180 200 250 120 S 340 60 372 38'/%3E%3Cpath d='M62 42 C 40 120 142 158 118 242'/%3E%3Cpath d='M300 342 C 342 282 258 244 302 182'/%3E%3Ccircle cx='332' cy='92' r='5'/%3E%3Cpath d='M76 330 h14 M83 323 v14'/%3E%3Ccircle cx='204' cy='64' r='2.2' fill='%236f675b' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}
[data-theme="dark"] body::after { opacity: .45; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--pine); color: #fff; }

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- 版式 ---------- */
.container { max-width: var(--w-content); margin: 0 auto; padding: 0 28px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.layout > .main { min-width: 0; }

/* ---------- 页眉 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; align-items: center; gap: 36px;
  height: 68px;
}
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand .mark {
  font-family: var(--serif); font-weight: 900; font-size: 24px;
  letter-spacing: .06em; color: var(--ink);
  position: relative; padding-left: 14px;
}
.brand .mark::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 6px;
  width: 5px; background: var(--pine); border-radius: 1px;
}
.brand .tagline {
  font-size: 12px; color: var(--ink-3); letter-spacing: .22em;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 6px 13px; font-size: 15px; color: var(--ink-2);
  border-radius: 999px;
  transition: color .2s, background .2s;
  position: relative;
}
.main-nav a:hover { color: var(--pine); background: var(--pine-soft); }
.main-nav a.active { color: var(--pine); font-weight: 600; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 0;
  height: 2px; background: var(--pine); border-radius: 1px;
}
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--pine-soft); color: var(--pine); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- 移动端抽屉导航 ---------- */
.nav-toggle { display: none; }          /* 桌面隐藏；≤768px 见响应式段 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 190;
  background: color-mix(in srgb, var(--ink) 32%, transparent);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s;
}
.drawer-mask.show { opacity: 1; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: min(78vw, 320px);
  background: var(--paper); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  padding: 14px 10px 24px 22px;
  transform: translateX(102%);
  transition: transform .28s var(--ease);
  overflow-y: auto;
}
.mobile-drawer.open { transform: none; }
.mobile-drawer .drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 12px 14px 0; border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.mobile-drawer .drawer-title {
  font-family: var(--serif); font-weight: 900; font-size: 17px; letter-spacing: .06em;
}
.mobile-drawer a {
  padding: 13px 6px; font-size: 16px; color: var(--ink-2);
  border-bottom: 1px dashed var(--line);
}
.mobile-drawer a.active { color: var(--pine); font-weight: 600; }
.mobile-drawer .drawer-login { color: var(--pine); font-weight: 600; }
body.nav-locked { overflow: hidden; }
html { scrollbar-gutter: stable; }  /* 锁滚动不跳宽（与后台弹框同因） */


/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; }
.site-footer .inner {
  display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center;
  padding: 34px 0; font-size: 13.5px; color: var(--ink-3);
}
.site-footer .sep { flex: 1; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--pine); }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: var(--ink-3); }
.footer-social a:hover { color: var(--pine); }
.footer-social svg { width: 16px; height: 16px; }

/* ---------- 区块标题 ---------- */
.section-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 22px; }
.section-head h2 {
  margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 700;
  letter-spacing: .04em;
  padding-bottom: 6px;
  background: linear-gradient(var(--pine), var(--pine)) left bottom / 100% 3px no-repeat;
}
.section-head .count { font-size: 13px; color: var(--ink-3); font-family: var(--mono); }
.section-head .more { margin-left: auto; font-size: 13.5px; color: var(--ink-3); }
.section-head .more:hover { color: var(--pine); }

/* ---------- 置顶首文（编辑风 hero） ---------- */
.hero-post {
  position: relative;
  padding: 34px 34px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 40px;
}
.hero-post::after {   /* 角落装饰 · 松绿角线 */
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 130px; height: 130px;
  border: 1px solid var(--line-2);
  transform: rotate(45deg);
  background: linear-gradient(225deg, var(--pine-soft), transparent 55%);
}
.hero-post .pin {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; letter-spacing: .18em; color: var(--ochre);
  margin-bottom: 14px;
}
.hero-post .pin::before {
  content: ""; width: 7px; height: 7px; background: var(--ochre); border-radius: 1px;
  transform: rotate(45deg);
}
.hero-post h1, .hero-post .title {
  margin: 0 0 14px; max-width: 88%;
  font-family: var(--serif); font-weight: 900; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.4;
  letter-spacing: .01em;
}
.hero-post h1 a:hover, .hero-post .title a:hover { color: var(--pine); }
.hero-post .excerpt { margin: 0 0 18px; color: var(--ink-2); max-width: 92%; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-3); }
.meta-row .dot { color: var(--line-2); }
.meta-row a:hover { color: var(--pine); }

/* ---------- 文章列表（编辑风条目） ---------- */
.post-list { border-top: 1px solid var(--line-2); }
.post-item {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr);
  gap: 22px;
  padding: 28px 10px 26px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background .25s var(--ease);
}
.post-item:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.post-item .serial {
  font-family: var(--serif); font-size: 34px; font-weight: 600;
  color: var(--line-2); line-height: 1;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
  transition: color .25s;
}
.post-item:hover .serial { color: var(--pine); }
.post-item .p-title {
  margin: 0 0 8px; font-family: var(--serif); font-size: 20.5px; font-weight: 700;
  line-height: 1.45; letter-spacing: .01em;
}
.post-item .p-title a { transition: color .2s; }
.post-item .p-title a:hover { color: var(--pine); }
.post-item .p-excerpt {
  margin: 0 0 12px; color: var(--ink-2); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 分类/标签 chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center;
  font-size: 12.5px; padding: 2.5px 11px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  border: 1px solid transparent;
  transition: all .2s;
}
a.chip:hover, .chip.active {
  background: var(--pine-soft); color: var(--pine);
  border-color: color-mix(in srgb, var(--pine) 32%, transparent);
}

/* ---------- 侧栏 ---------- */
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 34px; }
.widget { border-top: 2px solid var(--ink); padding-top: 16px; }
.widget h3 {
  margin: 0 0 14px; font-size: 13px; letter-spacing: .3em;
  color: var(--ink-3); font-weight: 600;
}
/* 关于我名片 */
.about-card { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 26px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--pine) 0%, #337a67 55%, var(--ochre) 130%);
  flex: none;
}
.avatar.sm { width: 40px; height: 40px; font-size: 17px; }
.about-card .who { min-width: 0; }
.about-card .name { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.about-card .bio { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.widget .social-mini { display: flex; gap: 8px; margin-top: 14px; }
.widget .social-mini a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--paper-2); color: var(--ink-2);
}
.widget .social-mini a:hover { background: var(--pine-soft); color: var(--pine); }
.widget .social-mini svg { width: 15px; height: 15px; }
/* 分类/标签列表 */
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { font-size: 14.5px; color: var(--ink-2); flex: 1; }
.cat-list a:hover { color: var(--pine); }
.cat-list .n { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud .chip.hot { font-size: 13.5px; }
.tag-cloud .chip.cold { font-size: 12px; color: var(--ink-3); }
/* 最新文章 */
.recent-list { list-style: none; margin: 0; padding: 0; counter-reset: rec; }
.recent-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; }
.recent-list li:last-child { border-bottom: 0; }
.recent-list a { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.recent-list a:hover { color: var(--pine); }
.recent-list .idx { font-family: var(--mono); font-size: 12px; color: var(--line-2); padding-top: 3px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 8px; margin: 44px 0 0; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink-2); font-size: 14px;
  font-family: var(--mono);
  transition: all .2s;
}
.page-btn:hover:not(:disabled):not(.current) { border-color: var(--pine); color: var(--pine); }
.page-btn.current { background: var(--pine); border-color: var(--pine); color: #fff; font-weight: 600; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pagination .gap { color: var(--ink-3); }

/* ---------- 文章页 ---------- */
/* 标题区：纸面卡片，与正文列（720px）同轴左对齐 */
.post-head {
  max-width: 980px; margin: 22px auto 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 30px 34px 24px;
  position: relative; overflow: hidden;
}
/* 右上角线装饰：与首页置顶卡同一语言（旋转方块 + 松绿浅渐变） */
.post-head::before {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 118px; height: 118px;
  border: 1px solid var(--line-2);
  transform: rotate(45deg);
  background: linear-gradient(225deg, color-mix(in srgb, var(--pine-soft) 72%, transparent), transparent 60%);
  opacity: .65;
  pointer-events: none; z-index: 0;
}
/* 左下斜线纹理：低透明度不喧宾，暗色模式经 color-mix 自适应 */
.post-head::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 190px; height: 58px; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--pine) 9%, transparent) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, transparent 62%, var(--card) 97%);
  opacity: .35;
}
.post-head .crumb, .post-head h1, .post-head .meta-row { position: relative; z-index: 1; }  /* 内容压在装饰之上 */
.post-head .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; }
.post-head .crumb a:hover { color: var(--pine); }
.post-head h1 {
  margin: 0 0 16px; font-family: var(--serif); font-weight: 900;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.4; letter-spacing: .01em; text-align: left;
}
.post-head .meta-row { text-align: left; }
.post-cover {
  max-width: 980px; margin: 26px auto;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(1200px 380px at 18% 120%, color-mix(in srgb, var(--ochre) 22%, transparent), transparent 60%),
    radial-gradient(900px 320px at 88% -20%, color-mix(in srgb, var(--pine) 45%, transparent), transparent 55%),
    linear-gradient(120deg, #1d3a33, #26443b 45%, #6d4a2f);
  position: relative; overflow: hidden;
}
.post-cover::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb,#ffffff07 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb,#ffffff07 60%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
}
.post-cover .cover-label {
  position: absolute; left: 26px; bottom: 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .28em;
  color: rgba(255,255,255,.75);
}
.post-layout {
  max-width: 980px; margin: 26px auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(28px, 4vw, 54px);
  align-items: start;
}

/* TOC */
.toc { position: sticky; top: 96px; border-left: 2px solid var(--line-2); padding-left: 18px; padding-top: 52px; font-size: 13.5px; }  /* 目录标题与正文首个章节标题顶部平齐 */
.toc .toc-title { font-size: 12px; letter-spacing: .3em; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4.5px 0; color: var(--ink-3); line-height: 1.5; border-left: 2px solid transparent; margin-left: -20px; padding-left: 18px; }
.toc a.lvl-3 { padding-left: 34px; }
.toc a:hover, .toc a.current { color: var(--pine); border-left-color: var(--pine); }

/* ---------- 正文排版 ---------- */
.prose { font-size: 16.5px; line-height: 1.95; color: var(--ink); }
.prose > p { margin: 0 0 1.35em; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--serif); font-weight: 700; letter-spacing: .02em;
  margin: 2.1em 0 .9em; line-height: 1.45;
  scroll-margin-top: 90px;
}
.prose h2 { font-size: 25px; padding-left: 14px; border-left: 4px solid var(--pine); }
.prose h3 { font-size: 20px; }
.prose h4 { font-size: 17px; color: var(--ink-2); }
.prose a {
  color: var(--pine); text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--pine) 40%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.prose a:hover { text-decoration-color: var(--pine); }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.35em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--pine); }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.6em 0; position: relative; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); margin: 1.6em auto; }
.prose .img-caption { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: -1.2em; }

/* 引用块：轻量化——字号/行高低于正文，背景为 6% 透明主色调（明暗主题自动适配） */
.prose blockquote {
  margin: 1.5em 0; padding: 9px 18px;
  border-left: 3px solid var(--pine);
  background: color-mix(in srgb, var(--pine) 6%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
  font-size: .93em;
  line-height: 1.72;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .5em; }

/* 提示框 */
.callout {
  display: flex; gap: 12px; margin: 1.8em 0;
  padding: 14px 18px;
  background: var(--ochre-soft);
  border: 1px solid color-mix(in srgb, var(--ochre) 30%, transparent);
  border-radius: var(--radius); font-size: 15px;
}
.callout .ico { color: var(--ochre); flex: none; padding-top: 2px; }
.callout svg { width: 17px; height: 17px; }
.callout p { margin: 0; }

/* 行内代码 */
.prose code, .inline-code {
  font-family: var(--mono); font-size: .86em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px; padding: .12em .42em;
  color: var(--pine-deep);
  word-break: break-all;
}
[data-theme="dark"] .prose code { color: var(--pine); }

/* 代码块 */
.prose pre, .codeblock {
  position: relative;
  margin: 1.8em 0; padding: 18px 20px 16px;
  background: #1e241f; color: #d6e2d9;
  border-radius: var(--radius-lg);
  border: 1px solid #2c352e;
  overflow-x: auto;
  font-size: 13.5px; line-height: 1.75;
}
.prose pre code, .codeblock code {
  background: none; border: 0; padding: 0; color: inherit;
  font-family: var(--mono); font-size: inherit; word-break: normal;
}
.codeblock .bar {
  display: flex; align-items: center; gap: 7px;
  margin: -18px -20px 14px; padding: 10px 16px;
  border-bottom: 1px solid #2c352e;
}
.codeblock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #39443c; }
.codeblock .bar i:nth-child(1) { background: #d1796b; }
.codeblock .bar i:nth-child(2) { background: #d5b56b; }
.codeblock .bar i:nth-child(3) { background: #7fb894; }
.codeblock .bar .lang {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  letter-spacing: .2em; color: #6d7d72;
}
/* 代码高亮（Pygments 风格 · 手工 token） */
.tok-k { color: #8fc9e8; }            /* keyword */
.tok-s { color: #b8d98f; }            /* string */
.tok-c { color: #63705f; font-style: italic; }  /* comment */
.tok-f { color: #e8c98f; }            /* function name */
.tok-n { color: #d6b8e0; }            /* number / decorator */
.tok-o { color: #93a8ab; }            /* operator */
.tok-self { color: #e0937e; font-style: italic; }

/* 表格 */
.prose table, .data-table {
  width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: 14.5px;
}
.prose th, .data-table th {
  font-family: var(--sans); font-weight: 600; text-align: left;
  padding: 10px 14px; background: var(--paper-2);
  border-bottom: 2px solid var(--line-2); white-space: nowrap;
}
.prose td, .data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top;
}
.prose tbody tr:hover, .data-table tbody tr:hover { background: color-mix(in srgb, var(--pine-soft) 45%, transparent); }

/* 脚注（markdown-it footnote 输出） */
.prose .footnotes-sep { margin: 2.6em 0 1.2em; }
.prose section.footnotes { font-size: 13.5px; color: var(--ink-2); }
.prose .footnotes-list { padding-left: 1.4em; margin: 0; }
.prose .footnote-item { margin: 0 0 .5em; line-height: 1.8; }
.prose .footnote-item p { margin: 0; }
.prose .footnote-ref > a, .prose .footnote-item a { color: var(--pine); text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.prose .footnote-backref { margin-left: 4px; }

/* 文末 · 标签与操作 */
.post-tail { max-width: 980px; margin: 46px 0 0; padding-top: 22px; border-top: 1px solid var(--line-2); }
.post-tail .chip-row { margin-bottom: 22px; }
.post-stats { display: flex; align-items: center; gap: 20px; font-size: 13.5px; color: var(--ink-3); }

/* 上一篇 / 下一篇 */
.prev-next {
  max-width: 980px; margin: 36px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pn-card {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  transition: border-color .2s, transform .2s var(--ease);
}
.pn-card:hover { border-color: var(--pine); transform: translateY(-2px); }
.pn-card .lab { font-size: 12px; letter-spacing: .24em; color: var(--ink-3); display: block; margin-bottom: 8px; }
.pn-card.next { text-align: right; }
.pn-card .t { font-family: var(--serif); font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.pn-card a:hover .t { color: var(--pine); }

/* ---------- 评论区 ---------- */
.comments { max-width: 980px; margin: 60px auto 0; }
.comment-list { list-style: none; margin: 26px 0 0; padding: 0; }
.comment { display: flex; gap: 14px; padding: 22px 0; border-bottom: 1px dashed var(--line); }
.comment .c-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #fff;
}
.comment .c-head { display: flex; align-items: baseline; gap: 10px; }
.comment .c-name { font-weight: 600; font-size: 14.5px; }
.comment .c-name.op { color: var(--pine); }
.comment .c-name.op::after {
  content: "作者"; font-size: 11px; font-weight: 500; color: var(--pine);
  border: 1px solid color-mix(in srgb, var(--pine) 45%, transparent);
  border-radius: 4px; padding: 0 6px; margin-left: 8px;
}
.comment .c-time { font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); }
.comment .c-body { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.comment .reply-to {
  font-size: 13px; color: var(--ink-3); margin-bottom: 4px;
}
.comment .reply-to b { color: var(--pine); font-weight: 600; }

/* 表单（评论） */
.form { margin-top: 30px; }
.form .note { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field label b { color: var(--ochre); }
.input, .textarea {
  width: 100%; padding: 10px 14px;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .textarea:focus {
  outline: none; border-color: var(--pine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 22px; font-size: 14.5px; font-weight: 600;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- 列表页 / 归档页 ---------- */
.page-banner { padding: 52px 0 26px; border-bottom: 2px solid var(--ink); margin-bottom: 6px; }
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; display: flex; gap: 8px; }
.breadcrumb a:hover { color: var(--pine); }
.page-banner h1 {
  margin: 0 0 10px; font-family: var(--serif); font-weight: 900; font-size: 32px;
}
.page-banner .desc { color: var(--ink-2); max-width: 640px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 4px; }

/* 归档 */
.archive-group { margin-top: 42px; }
.archive-group .year {
  font-family: var(--serif); font-size: 26px; font-weight: 900; color: var(--pine);
  display: flex; align-items: center; gap: 16px; margin-bottom: 6px;
}
.archive-group .year::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.archive-group .year .n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); font-weight: 400; }
.arc-item {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto;
  gap: 18px; align-items: baseline;
  padding: 13px 6px; border-bottom: 1px dashed var(--line);
}
.arc-item .d { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.arc-item .t { font-size: 15.5px; font-weight: 550; }
.arc-item .t:hover { color: var(--pine); }
.arc-item .cat { font-size: 12.5px; color: var(--ink-3); }

/* ---------- Projects 页 ---------- */
.projects-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; margin-top: 36px;
}
.project-card {
  position: relative; padding: 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
  overflow: hidden;
}
.project-card:hover {
  border-color: color-mix(in srgb, var(--pine) 50%, transparent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.project-card .p-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.p-logo {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 900; font-size: 20px; color: #fff;
}
.p-logo.g1 { background: linear-gradient(135deg, #1f5c50, #4c8a72); }
.p-logo.g2 { background: linear-gradient(135deg, #b0722d, #c2571f); }
.p-logo.g3 { background: linear-gradient(135deg, #3d5a80, #5c7fa3); }
.p-logo.g4 { background: linear-gradient(135deg, #6b675e, #98938a); }
.project-card .p-name { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.project-card .p-tagline { color: var(--ink-2); font-size: 14.5px; margin: 0 0 16px; }
.project-card .p-foot { display: flex; align-items: center; gap: 12px; }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  padding: 3px 11px; border-radius: 999px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.online { color: #2c7a4b; background: color-mix(in srgb, #2c7a4b 12%, transparent); }
.badge.building { color: var(--ochre); background: color-mix(in srgb, var(--ochre) 12%, transparent); }
.badge.archived { color: var(--ink-3); background: var(--paper-2); }
[data-theme="dark"] .badge.online { color: #7fbf9a; }

.link-arrow {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; color: var(--pine); font-weight: 600;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow svg { width: 14px; height: 14px; transition: transform .2s; }
.link-arrow:hover svg { transform: translate(2px,-2px); }

/* ---------- 个人介绍页 ---------- */
.profile-hero {
  display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 40px;
  padding: 46px; margin-top: 46px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.profile-hero::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--pine-soft), transparent 70%);
}
.profile-id { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.profile-id .avatar { width: 96px; height: 96px; font-size: 40px; }
.profile-id .pn { font-family: var(--serif); font-size: 26px; font-weight: 900; }
.profile-id .headline { color: var(--ink-2); font-size: 15px; margin: 0; }
.profile-id .loc { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.profile-id .loc svg { width: 14px; height: 14px; }
.profile-stats { display: flex; gap: 26px; margin-top: 8px; }
.profile-stats .st b { font-family: var(--serif); font-size: 22px; font-weight: 900; color: var(--pine); display: block; }
.profile-stats .st span { font-size: 12px; color: var(--ink-3); letter-spacing: .08em; }

/* 技能 */
.skill-wrap { margin-top: 52px; }
.skill-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-grid .chip { font-size: 14px; padding: 5px 16px; background: var(--card); border-color: var(--line-2); }

/* 时间线 */
/* 时间线双栏：左个人发展线 / 右公司发展线（窄屏堆叠） */
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; margin-top: 26px; }
.tl-col-title {
  font-family: var(--serif); font-size: 16.5px; font-weight: 700;
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px;
}
.tl-col-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tl-col-sub { font-family: var(--body-font, inherit); font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: .06em; }
.tl-empty { font-size: 13.5px; color: var(--ink-3); padding: 10px 0 0 30px; }
.timeline { position: relative; margin-top: 26px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding: 0 0 30px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--pine);
}
.tl-item.now::before { background: var(--pine); box-shadow: 0 0 0 5px var(--pine-soft); }
.tl-item .period { font-family: var(--mono); font-size: 12.5px; color: var(--ochre); letter-spacing: .05em; }
.tl-item .role { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 4px 0 2px; }
.tl-item .org { font-size: 13.5px; color: var(--ink-3); margin-bottom: 6px; }
.tl-item .desc { font-size: 14.5px; color: var(--ink-2); max-width: 640px; }

/* 社交链接：单卡片行式列表（不露 URL，整行快速跳转） */
.social-panel {
  margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden;
}
.sp-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: background .18s var(--ease);
}
.sp-row:last-child { border-bottom: none; }
a.sp-row:hover { background: var(--pine-soft); }
a.sp-row:hover .sp-ico, a.sp-row:hover .sp-go { color: var(--pine); }
.sp-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--ink-2); transition: color .18s var(--ease);
}
.sp-svg { width: 17px; height: 17px; }
.sp-svg.sp-stroke { width: 18px; height: 18px; }
.sp-name { font-weight: 600; font-size: 14.5px; }
.sp-go {
  margin-left: auto; font-size: 12.5px; color: var(--ink-3);
  letter-spacing: .04em; transition: color .18s var(--ease);
}

/* ---------- 搜索页 ---------- */
.search-hero { max-width: 640px; margin: 56px auto 10px; text-align: center; }
.search-hero h1 { font-family: var(--serif); font-weight: 900; font-size: 30px; margin: 0 0 22px; }
.search-box { display: flex; gap: 10px; }
.search-box .input { padding: 12px 18px; font-size: 15.5px; }
.search-meta { text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 18px 0 6px; font-family: var(--mono); }
mark {
  background: color-mix(in srgb, var(--ochre) 22%, transparent);
  color: var(--ochre); border-radius: 3px; padding: 0 2px;
}
.empty-state {
  text-align: center; padding: 70px 20px; color: var(--ink-3);
}
.empty-state .ico { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state h3 { font-family: var(--serif); color: var(--ink-2); margin: 0 0 8px; font-size: 18px; }
.empty-state p { margin: 0; font-size: 14px; }

/* ---------- 404 ---------- */
.nf-wrap { text-align: center; padding: 110px 20px 90px; }
.nf-code {
  font-family: var(--serif); font-weight: 900; font-size: clamp(72px, 18vw, 120px); line-height: 1;
  color: var(--pine); letter-spacing: .06em;
  position: relative; display: inline-block;
}
.nf-code::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 10px; height: 12px;
  background: var(--ochre-soft); z-index: -1; border-radius: 3px;
}
.nf-wrap h1 { font-family: var(--serif); font-size: 26px; margin: 22px 0 10px; }
.nf-wrap p { color: var(--ink-2); margin: 0 0 28px; }
.nf-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- 页面顶部 hero（通用页面头） ---------- */
.page-hero { padding: 60px 0 10px; }
.page-hero .kicker { font-size: 12.5px; letter-spacing: .34em; color: var(--ochre); margin-bottom: 12px; }
.page-hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; letter-spacing: .02em; }
.page-hero .sub { color: var(--ink-2); font-size: 16px; max-width: 680px; }

/* ---------- 首页 · 作品速览 ---------- */
.home-projects { margin-top: 46px; }
.hp-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.hp-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s var(--ease);
  position: relative;
}
.hp-card:hover { border-color: color-mix(in srgb, var(--pine) 50%, transparent); transform: translateY(-2px); }
.hp-card .hp-head { display: flex; align-items: center; gap: 11px; }
.hp-card .p-name { font-family: var(--serif); font-size: 16.5px; font-weight: 700; }
.hp-card .hp-line { font-size: 13px; color: var(--ink-2); line-height: 1.6; min-height: 2.6em; }
.hp-card .hp-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.hp-card .go { margin-left: auto; font-size: 12.5px; color: var(--pine); font-weight: 600; }
.hp-card .go:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 响应式规则统一收敛到文件末尾（1080 / 768 / 480 三档） */

/* ---------- 访客登录 / 注册 ---------- */
.auth-wrap { max-width: 420px; margin: 64px auto 40px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 34px 34px 30px; }
.auth-card h1 { font-family: var(--serif); font-size: 24px; font-weight: 900; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink-3); font-size: 13.5px; margin: 0 0 22px; }
.auth-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 22px; }
.auth-tabs a { padding: 9px 16px; font-size: 14.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.auth-tabs a.active { color: var(--pine); font-weight: 600; border-bottom-color: var(--pine); }
.auth-card .field { margin-bottom: 15px; }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.auth-alt a { color: var(--pine); font-weight: 600; }
.auth-privacy { font-size: 12px; color: var(--ink-3); margin: 14px 0 0; line-height: 1.6; }

/* ---------- 评论 · 已登录发表态 ---------- */
.comment-as { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.comment-as .who-name { font-weight: 600; font-size: 14.5px; }
.comment-as .who-sub { font-size: 12px; color: var(--ink-3); }
.comment-as .signout { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.comment-as .signout:hover { color: var(--ochre); }
.reg-mark {
  display: inline-flex; align-items: center; font-size: 11px; color: var(--pine);
  border: 1px solid color-mix(in srgb, var(--pine) 40%, transparent);
  border-radius: 4px; padding: 0 6px; margin-left: 6px;
}
.login-lead {
  display: flex; align-items: center; gap: 14px;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 18px 20px; margin-top: 26px; background: var(--paper-2);
}
.login-lead p { margin: 0; font-size: 14px; color: var(--ink-2); }
.login-lead .acts { margin-left: auto; display: flex; gap: 10px; flex: none; }

/* ---------- 动效 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.anim { animation: fadeUp .6s var(--ease) both; }
.post-item, .hero-post, .project-card, .widget, .arc-item, .tl-item, .comment { animation: fadeUp .55s var(--ease) both; }
.post-item:nth-child(1) { animation-delay: .04s; }
.post-item:nth-child(2) { animation-delay: .10s; }
.post-item:nth-child(3) { animation-delay: .16s; }
.post-item:nth-child(4) { animation-delay: .22s; }
.post-item:nth-child(5) { animation-delay: .28s; }
.post-item:nth-child(n+6) { animation-delay: .34s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ----------
   断点：≤1080 平板/窄桌面（双栏→单栏）· ≤768 手机横竖屏 · ≤480 小屏 */
.page-main { padding-top: 30px; }

@media (max-width: 1080px) {
  .post-head { padding: 24px 22px 20px; }
  .layout { grid-template-columns: 1fr; gap: 44px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 26px 44px; }
  .sidebar .widget { flex: 1 1 240px; border-top: 0; padding-top: 0; }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* 目录改为正文上方的横向滚动条（iPad/手机都能用） */
  .toc {
    position: static; order: -1; padding-top: 0;
    border-left: 0; padding-left: 0; margin: 0 0 26px;
    border-bottom: 1px dashed var(--line-2); padding-bottom: 12px;
  }
  .toc .toc-title { margin-bottom: 8px; }
  .toc ol {
    display: flex; gap: 8px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    padding-bottom: 4px;
  }
  .toc a, .toc a.lvl-3 {
    flex: none; border: 1px solid var(--line); border-radius: 999px;
    margin-left: 0; padding: 5px 13px; color: var(--ink-2); white-space: nowrap;
  }
  .toc a.current, .toc a:hover {
    color: var(--pine); border-color: var(--pine); border-left-color: var(--pine);
    background: var(--pine-soft);
  }
  /* 作品速览：平板 2 列（手机再降 1 列） */
  .hp-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* 表格：满宽与正文一致（PC 端不再收缩），窄窗口在 wrap 内左右滚动 */
.prose .table-wrap, .table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.prose .table-wrap table, .table-wrap table { display: table; width: 100%; }
.prose pre, .codeblock { max-width: 100%; }
article.prose { min-width: 0; }  /* grid 列内不被表格 min-content 撑开 */

@media (max-width: 768px) {
  .container { padding: 0 18px; }
  .page-main { padding-top: 26px; }
  .site-header .inner { gap: 10px; height: 60px; }
  .brand .tagline { display: none; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 19px; height: 19px; }

  /* 触控反馈：去系统高亮，用主动色 */
  * { -webkit-tap-highlight-color: transparent; }
  .icon-btn:active, .btn:active, .page-btn:active { background: var(--pine-soft); color: var(--pine); }

  /* iOS：输入字号 ≥16px 防 Safari 聚焦缩放 */
  .input, .textarea, select.input { font-size: 16px; }

  .hero-post { padding: 24px 20px 22px; margin-bottom: 28px; }
  .hero-post h1, .hero-post .title { font-size: 24px; max-width: 100%; }
  .hero-post .excerpt { max-width: 100%; }
  .section-head { flex-wrap: wrap; gap: 6px 14px; }
  .post-item { grid-template-columns: 1fr; gap: 8px; padding: 22px 2px; }
  .post-item .serial { display: none; }
  .post-head { margin-top: 30px; padding: 20px 18px 16px; }
  .post-head h1 { font-size: 26px; }
  .post-cover { aspect-ratio: 16 / 9; margin: 22px auto; }
  .post-cover .cover-label { left: 16px; bottom: 12px; }
  .prose { font-size: 16px; }
  .prose pre, .codeblock { font-size: 12.5px; padding: 14px 14px 12px; }
  .codeblock .bar { margin: -14px -14px 12px; padding: 9px 12px; }
  .post-stats { flex-wrap: wrap; gap: 8px 18px; }
  .prev-next { grid-template-columns: 1fr; gap: 10px; }
  .comments { margin-top: 40px; }
  .comment { gap: 10px; padding: 18px 0; }
  .comment .c-avatar { width: 34px; height: 34px; font-size: 14px; }
  .login-lead { flex-wrap: wrap; }
  .login-lead .acts { margin-left: 0; width: 100%; }
  .pagination { flex-wrap: wrap; justify-content: center; }

  .page-hero { padding: 38px 0 6px; }
  .page-hero h1 { font-size: 28px; }
  .page-banner h1 { font-size: 26px; }
  .search-hero { margin-top: 34px; }
  .search-hero h1 { font-size: 25px; }
  .search-box .input { padding: 12px 14px; }
  .auth-wrap { margin: 36px auto 28px; }
  .auth-card { padding: 24px 20px 22px; }
  .arc-item { grid-template-columns: 66px 1fr; }
  .arc-item .cat { display: none; }
  .profile-hero { grid-template-columns: 1fr; padding: 28px 22px; gap: 22px; }
  .tl-grid { grid-template-columns: 1fr; gap: 34px; }
  .sp-row { padding: 13px 16px; }
  .form-row { grid-template-columns: 1fr; }
  .nf-code { font-size: 72px; }
  .nf-code::after { height: 8px; }
  .hp-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .site-footer { margin-top: 64px; }
  .site-footer .inner { padding: 26px 0; gap: 10px 22px; }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .hero-post h1, .hero-post .title { font-size: 21px; }
  .post-head h1 { font-size: 23px; }
  .page-hero h1 { font-size: 25px; }
  .prev-next .pn-card { padding: 14px 16px; }
}

/* ---------- 作品卡片：有 icon（上传图） / 无 icon（纯文字）两种形式 ---------- */
.p-logo-img {
  width: 46px; height: 46px; border-radius: 11px; object-fit: cover;
  border: 1px solid var(--line); flex: none;
}
.project-card.text-only .p-head { align-items: baseline; gap: 12px; }
.project-card.text-only .p-name {
  font-family: var(--serif); font-size: 19px; font-weight: 900; letter-spacing: .02em;
}
.project-card.text-only .p-tagline { margin-top: 12px; }
.project-card.text-only {
  background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--paper-2) 55%, var(--card)));
}
