/*
Theme Name: 春信 ChunXin
Theme URI: https://www.liuchun.cc
Author: LiuChun
Author URI: https://www.liuchun.cc
Description: 春信 —— 一个安静、克制、带点文艺气息的个人博客主题。暖纸底色、松绿主色、文楷标题，每个栏目有自己的专属色与版式。
Version: 7.5.24
License: GNU General Public License v2 or later
Text Domain: chunxin
*/

/* =========================================================
   春信 ChunXin — 设计系统 v2「春日信笺」
   暖纸底 · 松绿主色 · 文楷标题 · 栏目专属色
   ========================================================= */
:root {
  --primary: #33705c;
  --primary-hover: #3f8a70;
  --primary-soft: #e9f1ec;
  --primary-border: #cfe3d9;
  --accent: var(--primary);

  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --text: #2b2e33;
  --text-soft: #5f6672;
  --muted: #8b909a;
  --border: #e7e4dc;
  --border-2: #efece4;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(43, 46, 51, .04), 0 4px 16px rgba(43, 46, 51, .05);
  --shadow-lg: 0 8px 30px rgba(43, 46, 51, .12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "LXGW WenKai", "LXGW WenKai Lite", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1180px;
}

html.dark {
  --primary: #57a68c;
  --primary-hover: #6cbfa2;
  --primary-soft: #1e2f28;
  --primary-border: #2c4a3f;
  --accent: var(--primary);

  --bg: #17181b;
  --surface: #1f2126;
  --surface-2: #262930;
  --text: #e8e6e1;
  --text-soft: #a8adb6;
  --muted: #71767f;
  --border: #2d3037;
  --border-2: #25272d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 16px rgba(0, 0, 0, .22);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 信笺纹理：极淡的纸面质感 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(51, 112, 92, .05), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, rgba(217, 138, 126, .04), transparent 60%);
}
html.dark body::before { opacity: .5; }

::selection { background: rgba(51, 112, 92, .18); }
html.dark ::selection { background: rgba(87, 166, 140, .28); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 35%, transparent); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 55%, transparent); }

a { color: var(--primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5 { line-height: 1.35; color: var(--text); margin: 0 0 .5em; }
p { margin: 0 0 1em; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 44px 0; }

/* 栏目标题：印章点 + 文楷 */
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-head h2 { font-size: 1.35rem; margin: 0; font-family: var(--font-serif); font-weight: 700; letter-spacing: .02em; }
.section-head .bar { width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #ffffff)); }
.section-head .more { margin-left: auto; font-size: .85rem; color: var(--muted); }
.section-head .more:hover { color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px; font-size: .92rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
  font-family: inherit; line-height: 1.4;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary, .btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover, .btn.primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 38%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-border);
  transition: all .18s;
}
a.chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =========================================================
   顶部导航
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; gap: 18px; height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(145deg, #3c7f68, #2a5a4a);
  color: #f5f2ea; display: grid; place-items: center;
  font-size: 1.15rem; font-family: var(--font-serif); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 10px rgba(42, 90, 74, .28);
  position: relative;
}
.brand .site-title { display: flex; flex-direction: column; line-height: 1.12; font-size: 1.1rem; font-weight: 800; font-family: var(--font-serif); letter-spacing: .02em; }
.brand .site-title small { font-size: .58rem; letter-spacing: .24em; color: var(--muted); font-weight: 600; font-family: var(--font); }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  position: relative;
  padding: 7px 12px; border-radius: 9px; font-size: .9rem; color: var(--text-soft); font-weight: 500;
  white-space: nowrap; transition: color .18s, background .18s;
  display: inline-flex; align-items: center; gap: 7px;
}
.main-nav a .ndot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--muted)); opacity: .75; transition: transform .18s, opacity .18s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a:hover .ndot { transform: scale(1.35); opacity: 1; }
.main-nav a.current { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.main-nav a.current .ndot { transform: scale(1.35); opacity: 1; }
.main-nav li { list-style: none; display: inline-flex; align-items: center; }
.main-nav li.current-menu-item > a { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.main-nav li.current-menu-item > a .ndot { transform: scale(1.35); opacity: 1; }

.nav-right { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); display: grid; place-items: center; cursor: pointer;
  transition: all .2s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.icon-btn .icon-sun { display: none; }
html.dark .icon-btn .icon-sun { display: block; }
html.dark .icon-btn .icon-moon { display: none; }
.nav-toggle { display: none; }

.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--primary), #d98a7e); z-index: 200; transition: width .1s linear; border-radius: 0 3px 3px 0; }

/* 搜索弹层 */
.search-pop {
  position: absolute; top: 66px; right: 20px; width: 350px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px; display: none; z-index: 120;
  animation: popIn .18s ease;
}
.search-pop.open { display: block; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.search-pop form { display: flex; gap: 8px; }
.search-pop input[type="search"], .search-pop input[type="text"] {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: .92rem; transition: border-color .2s;
}
.search-pop input:focus { outline: none; border-color: var(--primary); }
.search-pop .search-submit {
  flex: none; width: 42px; border-radius: 10px; border: none; background: var(--primary); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.search-pop .search-submit svg { width: 16px; height: 16px; }
.search-pop .search-submit:hover { background: var(--primary-hover); }

/* =========================================================
   首页 Hero
   ========================================================= */
.hero { padding: 58px 0 44px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 44px; align-items: center; }
.hero .hello { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary-border); border-radius: 999px; padding: 5px 14px; margin-bottom: 18px; }
.hero .hello .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 55%, 100% { transform: rotate(0); } 60% { transform: rotate(16deg); } 70% { transform: rotate(-8deg); } 80% { transform: rotate(14deg); } 90% { transform: rotate(-4deg); } }
.hero h1 { font-size: 2.55rem; margin: 0 0 16px; line-height: 1.22; font-family: var(--font-serif); font-weight: 700; }
.hero h1 .accent { color: var(--primary); position: relative; }
.hero h1 .accent::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: 6px; height: 9px; background: color-mix(in srgb, var(--primary) 16%, transparent); border-radius: 4px; z-index: -1; }
.hero .lead { font-size: 1.06rem; color: var(--text-soft); max-width: 540px; margin: 0 0 22px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 28px; margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--border); }
.hero-stats .stat { display: flex; flex-direction: column; }
.hero-stats .num { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stats .lab { font-size: .78rem; color: var(--muted); margin-top: 3px; }

.profile-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 26px 26px; text-align: center; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.profile-card::before { content: ''; position: absolute; top: -70px; left: 50%; transform: translateX(-50%); width: 240px; height: 140px; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 14%, transparent), transparent); }
.profile-card .avatar {
  width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 15px; overflow: hidden;
  background: linear-gradient(145deg, #3c7f68, #2a5a4a); display: grid; place-items: center;
  color: #f5f2ea; font-size: 2.1rem; font-family: var(--font-serif);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border), var(--shadow);
  position: relative;
}
.profile-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h3 { margin: 0 0 4px; font-size: 1.22rem; font-family: var(--font-serif); }
.profile-card .role { color: var(--primary); font-size: .84rem; font-weight: 600; margin-bottom: 12px; letter-spacing: .04em; }
.profile-card .bio { font-size: .88rem; color: var(--text-soft); line-height: 1.7; }
.profile-card .card-phrase { margin: 10px 0 0; color: var(--primary); font-family: var(--font-serif); font-style: italic; font-size: .86rem; line-height: 1.6; }
.profile-card .socials { display: flex; justify-content: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.profile-card .socials a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-soft); transition: all .2s;
}
.profile-card .socials a svg { width: 16px; height: 16px; }
/* 平台专属品牌色：默认灰色，鼠标悬停显示彩色 */
.profile-card .socials a.social-github { --brand: #24292f; }
.profile-card .socials a.social-weibo  { --brand: #e6162d; }
.profile-card .socials a.social-email  { --brand: #ea4335; }
.profile-card .socials a.social-rss    { --brand: #f26522; }
.profile-card .socials a.social-qq     { --brand: #12b7f5; }
.profile-card .socials a.social-wechat { --brand: #07c160; }
.profile-card .socials a:hover {
  color: var(--brand, var(--primary));
  background: color-mix(in srgb, var(--brand, var(--primary)) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand, var(--primary)) 45%, transparent);
  transform: translateY(-2px);
}

/* =========================================================
   编辑精选
   ========================================================= */
.feature-row { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; }
.feature-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 380px;
  display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-lg);
}
.feature-main .f-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.feature-main:hover .f-bg-img { transform: scale(1.04); }
/* 同时兼容新版 .f-overlay 与旧首页模板的 .f-bg 背景层。 */
.feature-main .f-overlay, .feature-main .f-bg { position: absolute; inset: 0; background: linear-gradient(185deg, rgba(15, 22, 20, .05) 30%, rgba(13, 20, 18, .85) 100%); }
.feature-main .f-inner { position: relative; padding: 32px; z-index: 2; width: 100%; }
.feature-main h3 { color: #fff; font-size: 1.7rem; margin: 10px 0; font-family: var(--font-serif); }
.feature-main .lead { color: rgba(255, 255, 255, .88); max-width: 520px; font-size: .94rem; }
.feature-main .f-meta { color: rgba(255, 255, 255, .75); font-size: .82rem; margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.feature-main .chip { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.feature-main:hover h3 { text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 6px; text-decoration-thickness: 2px; }

.feature-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  display: flex; gap: 14px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; padding: 12px;
  color: inherit; flex: 1;
}
.side-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--sc, var(--primary)) 45%, var(--border)); }
.side-thumb { width: 104px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; flex: none; display: grid; place-items: center; background: var(--surface-2); background-size: cover; background-position: center; }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-thumb .side-emoji { font-size: 1.8rem; }
.side-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.side-body .chip { align-self: flex-start; background: var(--sc, var(--primary)); color: #fff; border-color: transparent; font-size: .68rem; padding: 3px 9px; }
.side-title { font-weight: 600; color: var(--text); line-height: 1.45; font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-card:hover .side-title { color: var(--primary); }
.side-meta { color: var(--muted); font-size: .76rem; }

/* =========================================================
   文章卡片网格
   ========================================================= */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--pc, var(--primary)) 42%, var(--border)); }
.post-thumb { position: relative; aspect-ratio: 3 / 2; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.post-thumb img.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-thumb img.thumb-img { transform: scale(1.06); }
.post-thumb .thumb-bg { position: absolute; inset: 0; }
.post-thumb .thumb-emoji { position: relative; z-index: 1; font-size: 2.6rem; }
.post-thumb .cat-badge {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  padding: 4px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  background: rgba(255, 255, 255, .92); color: var(--pc, var(--primary));
  backdrop-filter: blur(4px);
}
.post-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { margin: 0 0 10px; font-size: 1.06rem; line-height: 1.45; font-family: var(--font-serif); }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--primary); }
.post-excerpt { color: var(--text-soft); font-size: .89rem; line-height: 1.65; margin: 0 0 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { color: var(--muted); font-size: .77rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }
.post-meta .mi { display: inline-flex; align-items: center; gap: 4px; }
.post-meta svg { width: 13px; height: 13px; opacity: .75; }

/* =========================================================
   图文列表（资讯类栏目）
   ========================================================= */
.list-news { display: flex; flex-direction: column; gap: 18px; }
.news-item {
  display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s; padding: 16px;
}
.news-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--ac, var(--primary)) 40%, var(--border)); }
.news-thumb { width: 240px; aspect-ratio: 3 / 2; border-radius: var(--radius-sm); overflow: hidden; flex: none; position: relative; display: grid; place-items: center; background: var(--surface-2); }
.news-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-item:hover .news-thumb img { transform: scale(1.05); }
.news-thumb .thumb-emoji { position: relative; z-index: 1; font-size: 2.4rem; }
.news-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* 当前栏目内不重复显示频道；有二级栏目或跨频道聚合时才出现。 */
.channel-label { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 7px; color: var(--ac, var(--primary)); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.channel-label span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.news-body h3 { margin: 0 0 8px; font-size: 1.18rem; line-height: 1.45; font-family: var(--font-serif); }
.news-body h3 a { color: var(--text); }
.news-body h3 a:hover { color: var(--ac, var(--primary)); }
.news-body .excerpt { color: var(--text-soft); font-size: .91rem; line-height: 1.7; margin: 0 0 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-body .meta { color: var(--muted); font-size: .78rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.news-body .meta .mi { display: inline-flex; align-items: center; gap: 4px; }
.news-body .meta svg { width: 13px; height: 13px; opacity: .75; }
.news-body .meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }

/* =========================================================
   纯文字列表（随笔栏目）
   ========================================================= */
.list-text { display: flex; flex-direction: column; }
.text-year {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; color: var(--text);
  padding: 22px 0 8px; display: flex; align-items: center; gap: 10px;
}
.text-year:first-child { padding-top: 0; }
.text-year::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.text-item {
  display: flex; align-items: baseline; gap: 16px; padding: 17px 6px;
  border-bottom: 1px solid var(--border-2); transition: padding .22s ease, background .22s;
  border-radius: 6px;
}
.text-item:hover { padding-left: 14px; background: color-mix(in srgb, var(--primary) 4%, transparent); }
.text-item .date { color: var(--muted); font-size: .8rem; flex: none; width: 58px; font-variant-numeric: tabular-nums; font-family: var(--font-serif); }
.text-item .ti-main { flex: 1; min-width: 0; }
.text-item h3 { margin: 0 0 3px; font-size: 1.06rem; font-weight: 600; font-family: var(--font-serif); }
.text-item h3 a { color: var(--text); }
.text-item h3 a:hover { color: var(--primary); }
.text-item .excerpt { color: var(--text-soft); font-size: .87rem; margin: 0; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.text-item .meta { color: var(--muted); font-size: .75rem; flex: none; display: flex; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }

/* =========================================================
   作品集（图片网格）
   ========================================================= */
.works-hero { padding: 46px 0 36px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.works-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--wc, var(--primary)) 12%, transparent), transparent); }
.works-hero-inner { display: flex; align-items: center; gap: 28px; max-width: 920px; margin: 0 auto; position: relative; }
.works-hero-icon { width: 78px; height: 78px; border-radius: 20px; flex: none; display: grid; place-items: center; font-size: 2.1rem; color: #fff; box-shadow: var(--shadow-lg); background: linear-gradient(145deg, var(--wc, var(--primary)), color-mix(in srgb, var(--wc, var(--primary)) 60%, #1c2b26)); }
.works-hero-icon svg { width: 34px; height: 34px; }
.works-hero-text { flex: 1; min-width: 0; }
.works-hero-text h1 { margin: 0 0 6px; font-size: 1.95rem; font-family: var(--font-serif); }
.works-hero-desc { margin: 0 0 6px; color: var(--text-soft); }
.works-hero-count { margin: 0; font-size: .84rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }

.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .22s, box-shadow .22s, border-color .22s; }
.work-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--wc, var(--primary)) 42%, var(--border)); }
.work-card.large { grid-column: span 2; }
.work-card.large .work-thumb img.work-img { height: 100%; }
.work-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.work-card.large .work-thumb { aspect-ratio: auto; min-height: 300px; }
.work-thumb img.work-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.work-card:hover .work-thumb img.work-img { transform: scale(1.05); }
.work-thumb-bg { position: absolute; inset: 0; }
.work-thumb-emoji { position: relative; z-index: 1; font-size: 3rem; }
.work-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(16, 24, 22, .62) 100%); opacity: 0; transition: opacity .25s; }
.work-card:hover .work-overlay { opacity: 1; }
.work-read { position: absolute; right: 16px; bottom: 14px; z-index: 2; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .06em; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; display: inline-flex; align-items: center; gap: 6px; }
.work-read svg { width: 14px; height: 14px; }
.work-card:hover .work-read { opacity: 1; transform: translateY(0); }
.work-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.work-body h2 { margin: 0 0 10px; font-size: 1.1rem; line-height: 1.4; font-family: var(--font-serif); }
.work-body h2 a { color: var(--text); }
.work-body h2 a:hover { color: var(--wc, var(--primary)); }
.work-excerpt { margin: 0 0 14px; font-size: .89rem; color: var(--text-soft); line-height: 1.65; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-meta { color: var(--muted); font-size: .77rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.work-meta .mi { display: inline-flex; align-items: center; gap: 4px; }
.work-meta svg { width: 13px; height: 13px; opacity: .75; }
.work-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }

/* =========================================================
   每日心情（朋友圈 / 微博流）
   ========================================================= */
.mood-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.mood-stream { position: relative; }
.mood-wrap { min-width: 0; }
.mood-day { display: flex; align-items: center; gap: 12px; margin: 30px 0 15px; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.mood-day::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mc, var(--primary)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc, var(--primary)) 12%, transparent); }
.mood-day::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.mood-stream { display: flex; flex-direction: column; gap: 14px; }
.mood-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 13px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 24px rgba(40, 48, 43, .045); transition: transform .2s, border-color .2s, box-shadow .2s; }
.mood-card:hover { border-color: color-mix(in srgb, var(--mc, var(--primary)) 35%, var(--border)); box-shadow: 0 14px 30px rgba(40, 48, 43, .075); transform: translateY(-1px); }
.mood-identity { display: contents; }
.mood-avatar { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: linear-gradient(145deg, var(--mc, var(--primary)), color-mix(in srgb, var(--mc, var(--primary)) 60%, #1c2b26)); display: grid; place-items: center; color: #fff; font-family: var(--font-serif); font-size: 1.15rem; }
.mood-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mood-identity > div { align-self: center; min-width: 0; }
.mood-name, .mood-time { display: block; }
.mood-name { color: var(--mc, var(--primary)); font-size: .94rem; font-weight: 800; letter-spacing: .01em; }
.mood-time { margin-top: 2px; color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; }
.mood-body { grid-column: 2; min-width: 0; margin-top: -2px; }
.mood-text { margin: 0 0 13px; color: var(--text); font-size: 1rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.mood-images { display: grid; width: 100%; max-width: 600px; gap: 5px; margin: 0 0 13px; }
.mood-images.g1 { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
.mood-images.g2, .mood-images.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; }
.mood-images.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mood-images.g5, .mood-images.g6, .mood-images.g7, .mood-images.g8 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 600px; }
.mood-image { display: block; overflow: hidden; border-radius: 7px; background: var(--surface-2); }
.mood-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; transition: transform .25s ease, opacity .25s; }
.mood-images.g1 .mood-image img { aspect-ratio: 4 / 3; }
.mood-image:hover img { opacity: .93; transform: scale(1.035); }
.mood-topics { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -1px 0 13px; }
.mood-topics a { color: var(--mc, var(--primary)); font-size: .82rem; font-weight: 700; }
.mood-topics a:hover { text-decoration: underline; }
.mood-actions { display: flex; align-items: center; gap: 17px; min-height: 24px; padding-top: 10px; border-top: 1px solid var(--border-2); color: var(--muted); font-size: .78rem; }
.mood-actions > span, .mood-actions > a > span { display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.mood-actions svg { width: 14px; height: 14px; }
.mood-actions a { color: inherit; }
.mood-actions a:hover { color: var(--mc, var(--primary)); }
.mood-text-link { color: inherit; text-decoration: none; }
.mood-text-link:hover { color: var(--mc, var(--primary)); }
.mood-sidebar { position: sticky; top: 88px; }
.mood-side-intro, .mood-side-block { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.mood-side-block { margin-top: 14px; }
.mood-side-kicker { display: block; margin-bottom: 8px; color: var(--mc, var(--primary)); font-size: .63rem; font-weight: 800; letter-spacing: .14em; }
.mood-side-intro h2 { margin: 0; font-family: var(--font-serif); font-size: 1.18rem; }
.mood-side-intro p { margin: 8px 0 14px; color: var(--text-soft); font-size: .82rem; line-height: 1.7; }
.mood-side-count { display: flex; align-items: baseline; gap: 7px; padding-top: 12px; border-top: 1px dashed var(--border); }
.mood-side-count b { color: var(--mc, var(--primary)); font-family: var(--font-serif); font-size: 1.6rem; line-height: 1; }
.mood-side-count span { color: var(--muted); font-size: .76rem; }
.mood-side-block h3 { margin: 0 0 9px; color: var(--text); font-family: var(--font-serif); font-size: .94rem; }
.mood-recent-list { list-style: none; padding: 0; margin: 0; }
.mood-recent-list li + li { border-top: 1px solid var(--border-2); }
.mood-recent-list a { display: block; padding: 9px 0; }
.mood-recent-list span { display: block; margin-bottom: 2px; color: var(--mc, var(--primary)); font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mood-recent-list strong { display: -webkit-box; overflow: hidden; color: var(--text-soft); font-size: .78rem; font-weight: 600; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mood-recent-list a:hover strong { color: var(--mc, var(--primary)); }
.mood-side-link { display: inline-flex; align-items: center; gap: 5px; margin: 14px 0 0 4px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.mood-side-link:hover { color: var(--mc, var(--primary)); }
.mood-side-link svg { width: 14px; height: 14px; }

/* =========================================================
   导航 / 书签页
   ========================================================= */
.links-wrap { display: flex; flex-direction: column; gap: 34px; }
.links-group h2 { font-size: 1.2rem; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); }
.links-group h2 .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.links-group h2 .ic svg { width: 15px; height: 15px; }
.links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.link-card {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--lc, var(--primary)) 45%, var(--border)); }
.link-tile { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 1.05rem; font-weight: 700; font-family: var(--font-serif); color: #fff; background: linear-gradient(145deg, var(--lc, var(--primary)), color-mix(in srgb, var(--lc, var(--primary)) 55%, #20211f)); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.link-main { min-width: 0; }
.link-main .lt { font-weight: 600; color: var(--text); font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-main .ld { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-card[href] { color: inherit; }
.link-go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) translateX(4px); opacity: 0; color: var(--lc, var(--primary)); transition: opacity .2s, transform .2s; }
.link-go svg { width: 14px; height: 14px; }
.link-card:hover .link-go { opacity: 1; transform: translateY(-50%) translateX(0); }

/* =========================================================
   归档 / 栏目页头
   ========================================================= */
.archive-hero { padding: 46px 0 36px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.archive-hero::after { content: ''; position: absolute; right: -90px; top: -90px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--ac, var(--primary)) 13%, transparent), transparent); }
.archive-hero-inner { display: flex; align-items: center; gap: 24px; position: relative; }
.archive-icon { width: 78px; height: 78px; border-radius: 20px; flex: none; display: grid; place-items: center; font-size: 2.1rem; color: #fff; box-shadow: var(--shadow-lg); background: linear-gradient(145deg, var(--ac, var(--primary)), color-mix(in srgb, var(--ac, var(--primary)) 60%, #1c2b26)); }
.archive-icon svg { width: 34px; height: 34px; }
.archive-hero h1 { margin: 0 0 6px; font-size: 1.95rem; font-family: var(--font-serif); }
.archive-hero .lead { margin: 0 0 6px; color: var(--text-soft); max-width: 640px; }
.archive-hero .count { color: var(--muted); font-size: .84rem; margin: 0; display: inline-flex; align-items: center; gap: 8px; }

/* =========================================================
   两栏布局 + 侧边栏
   ========================================================= */
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 42px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.side-intro { padding: 2px 2px 20px; border-bottom: 1px solid var(--border); }
.side-intro-top { display: flex; align-items: center; gap: 12px; }
.side-intro .avatar { width: 54px; height: 54px; border-radius: 16px; overflow: hidden; flex: none; background: var(--primary); box-shadow: var(--shadow); }
.side-intro .avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-intro-top span, .side-title span { display: block; color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .14em; }
.side-intro h3 { margin: 2px 0 0; font-family: var(--font-serif); font-size: 1.05rem; }
.side-intro p { margin: 14px 0 10px; color: var(--text-soft); font-size: .85rem; line-height: 1.75; }
.side-text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: .8rem; font-weight: 700; }
.side-text-link svg { width: 13px; height: 13px; }
.side-block { min-width: 0; }
.side-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.side-title i { flex: 1; height: 1px; background: var(--border); }
.category-list { display: flex; flex-direction: column; }
.category-list a { display: flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--text-soft); border-bottom: 1px solid var(--border-2); font-size: .86rem; transition: color .18s, padding .18s; }
.category-list a:first-child { padding-top: 1px; }
.category-list a:hover { color: var(--text); padding-left: 4px; }
.category-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 13%, transparent); }
.category-name { flex: 1; }
.category-list b { color: var(--muted); font-size: .7rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.sidebar .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar .tag-cloud a { color: var(--text-soft); background: transparent; border: 1px solid var(--border); border-radius: 7px; padding: 4px 8px; font-size: .74rem; line-height: 1.2; transition: all .18s; }
.sidebar .tag-cloud a:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 46%, var(--border)); background: var(--primary-soft); }
.side-recent ol { list-style: none; padding: 0; margin: 0; counter-reset: recent; }
.side-recent li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.side-recent em { color: color-mix(in srgb, var(--primary) 45%, var(--muted)); font-family: var(--font-serif); font-size: .78rem; font-style: normal; padding-top: 2px; }
.side-recent a { min-width: 0; }
.side-recent strong { display: block; color: var(--text); font-family: var(--font-serif); font-size: .86rem; font-weight: 600; line-height: 1.45; transition: color .18s; }
.side-recent a:hover strong { color: var(--primary); }
.side-recent span { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; }
.custom-side-widgets .widget { margin: 0 0 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.custom-side-widgets .widget h4 { margin: 0 0 10px; font-family: var(--font-serif); }
.custom-side-widgets ul { list-style: none; padding: 0; }
.custom-side-widgets li { padding: 6px 0; border-bottom: 1px solid var(--border-2); }
.custom-side-widgets a { color: var(--text-soft); }

/* =========================================================
   分页
   ========================================================= */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 36px 0; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: .88rem; transition: all .2s; }
.pagination a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =========================================================
   文章页
   ========================================================= */
/* 文章页与首页、栏目页共用同一内容容器宽度。 */
.single-main { width: 100%; max-width: none; margin: 0; }
/* 标题先行：只有真实特色图才在标题信息之后出现。 */
.entry-header { text-align: center; padding: 30px 0 6px; }
.single-cover { aspect-ratio: 1200 / 560; margin: 26px 0 30px; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--surface-2); box-shadow: var(--shadow); }
.single-cover img.cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 作品集保留更有展示感的封面比例。 */
.single-work .single-cover { aspect-ratio: 16 / 7.2; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: none; }
.single-article .entry-content { padding-top: 18px; }
.entry-header .cat-link { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; letter-spacing: .1em; color: var(--ac, var(--primary)); padding: 5px 15px; border-radius: 999px; background: color-mix(in srgb, var(--ac, var(--primary)) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ac, var(--primary)) 25%, transparent); }
.entry-header .cat-link::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ac, var(--primary)); }
.entry-header h1 { margin: .55em 0 .4em; font-size: 2.05rem; font-family: var(--font-serif); line-height: 1.35; }
.entry-meta { color: var(--muted); font-size: .82rem; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }
.entry-meta .mi { display: inline-flex; align-items: center; gap: 5px; }
.entry-meta svg { width: 14px; height: 14px; opacity: .7; }
.entry-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }

/* 文章目录 */
.toc-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 26px 0; box-shadow: var(--shadow); }
.toc-box .toc-title { font-size: .86rem; font-weight: 700; color: var(--text-soft); letter-spacing: .08em; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.toc-box .toc-title svg { width: 15px; height: 15px; color: var(--primary); }
.toc-box ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-box ol li { padding: 5px 0; font-size: .88rem; line-height: 1.55; }
.toc-box ol li.lvl-3 { padding-left: 22px; }
.toc-box ol li a { color: var(--text-soft); display: flex; gap: 8px; }
.toc-box ol li a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); color: var(--primary); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 3px; flex: none; }
.toc-box ol li a:hover { color: var(--primary); }

/* 正文排版 */
.entry-content { font-size: 1.03rem; line-height: 1.95; color: var(--text); }
.entry-content > * { margin-left: auto; margin-right: auto; }
.entry-content img { border-radius: var(--radius-sm); margin: 26px 0; box-shadow: var(--shadow); max-width: 100%; cursor: zoom-in; }
.entry-content blockquote {
  margin: 26px 0; padding: 18px 26px 18px 48px; position: relative;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft); font-style: normal; font-family: var(--font-serif); font-size: 1.02em;
}
.entry-content blockquote::before { content: '「'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 1.35rem; line-height: 1; color: color-mix(in srgb, var(--primary) 45%, transparent); font-family: var(--font-serif); }
.entry-content pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; overflow: auto; font-family: var(--font-mono); font-size: .86rem; line-height: 1.65; color: var(--text); position: relative; }
.entry-content code { font-family: var(--font-mono); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: .88em; color: color-mix(in srgb, var(--primary) 75%, var(--text)); }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content .code-copy { position: absolute; right: 10px; top: 8px; font-size: .72rem; font-family: var(--font); color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; cursor: pointer; opacity: 0; transition: all .2s; }
.entry-content pre:hover .code-copy { opacity: 1; }
.entry-content .code-copy:hover { color: var(--primary); border-color: var(--primary); }
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li { margin: 6px 0; }
.entry-content li::marker { color: var(--primary); }
.entry-content h2 { border-bottom: 1px dashed var(--border); padding-bottom: 10px; margin-top: 1.8em; font-family: var(--font-serif); scroll-margin-top: 90px; }
.entry-content h3 { margin-top: 1.5em; font-family: var(--font-serif); scroll-margin-top: 90px; }
.entry-content h2::before, .entry-content h3::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--primary) 70%, transparent); margin-right: 10px; vertical-align: middle; transform: rotate(45deg) translateY(-1px); }
.entry-content a { border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.entry-content a:hover { border-bottom-color: var(--primary); }
.entry-content hr { border: none; text-align: center; margin: 32px 0; }
.entry-content hr::after { content: '❦'; color: var(--muted); font-size: 1.1rem; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 22px 0; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 9px 13px; }
.entry-content th { background: var(--surface-2); font-family: var(--font-serif); }

.tags-row { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags-row .tags-label { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; }
.tags-row .tags-label svg { width: 14px; height: 14px; }
.tags-row a { padding: 5px 13px; border-radius: 999px; background: var(--surface); color: var(--text-soft); font-size: .8rem; border: 1px solid var(--border); transition: all .18s; }
.tags-row a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-1px); }

.tags-cloud-page { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 10px 0 30px; }
.tags-cloud-page a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); transition: all .18s; }
.tags-cloud-page a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }
.tags-cloud-page .tags-empty { width: 100%; text-align: center; color: var(--muted); font-size: .92rem; padding: 24px 0; }

.author-box { margin: 32px 0; display: flex; gap: 18px; align-items: flex-start; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 6%, var(--surface)), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.author-box .avatar { width: 62px; height: 62px; border-radius: 50%; flex: none; background: linear-gradient(145deg, #3c7f68, #2a5a4a); color: #f5f2ea; display: grid; place-items: center; font-family: var(--font-serif); font-size: 1.35rem; overflow: hidden; position: relative; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--border); }
.author-box .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.author-box h4 { margin: 0 0 5px; font-size: 1rem; font-family: var(--font-serif); }
.author-box p { margin: 0; font-size: .86rem; color: var(--text-soft); line-height: 1.65; }
.author-profile { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.author-info { min-width: 0; }
.article-source { display: grid; flex: 1; gap: 4px; min-width: 0; padding-left: 14px; border-left: 1px dashed var(--border); color: var(--text-soft); font-size: .74rem; line-height: 1.5; }
.article-source span { display: grid; grid-template-columns: max-content 1fr; gap: 2px; min-width: 0; align-items: baseline; }
.article-source b { color: var(--text); font-weight: 700; }
.article-source a { min-width: 0; overflow: hidden; color: var(--text-soft); text-overflow: ellipsis; white-space: nowrap; }
.article-source a:hover { color: var(--primary); text-decoration: underline; }
.article-source .article-license a { font-weight: 400; }
.article-source .plain-link { min-width: 0; overflow: hidden; color: var(--text-soft); text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.article-source .article-license { display: grid; grid-template-columns: max-content 1fr; gap: 2px; align-items: baseline; min-width: 0; line-height: 1.7; }
.article-source .value { display: inline; min-width: 0; }
@media (max-width: 680px) { .author-box { flex-direction: column; gap: 14px; } .author-profile { width: 100%; } .article-source { width: 100%; padding: 10px 0 0; border-left: 0; border-top: 1px dashed var(--border); } .article-source span { display: grid; grid-template-columns: 5em 1fr; gap: 4px; align-items: baseline; } .article-source .article-license { display: block; } .article-source b { width: 5em; } .article-source a, .article-source .plain-link { display: inline; white-space: normal; overflow-wrap: anywhere; } }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.post-nav a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0; box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.post-nav a:hover { border-color: var(--primary); transform: translateY(-2px); }
.post-nav .post-nav-card { display: flex; align-items: stretch; gap: 12px; min-height: 88px; overflow: hidden; }
.post-nav .pn-thumb { width: 112px; flex: none; background: var(--surface-2); overflow: hidden; }
.post-nav .pn-thumb:empty::after { content: '春'; display: grid; width: 100%; height: 100%; place-items: center; color: var(--primary); font-family: var(--font-serif); font-size: 1.3rem; }
.post-nav .pn-thumb img { width: 100%; height: 100%; min-height: 88px; object-fit: cover; }
.post-nav .pn-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: center; padding: 12px 14px; }
.post-nav .pn-label { color: var(--muted); font-size: .76rem; letter-spacing: .06em; }
.post-nav .pn-title { display: block; overflow: hidden; color: var(--text); font-weight: 600; font-size: 1rem; line-height: 1.45; margin-top: 5px; font-family: var(--font-serif); text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-nav .next { text-align: right; }

.related { padding: 28px 0 8px; }
.related .post-grid { grid-template-columns: repeat(3, 1fr); }

/* =========================================================
   技术笔记：独立阅读型文章页
   ========================================================= */
.tech-single { padding: 46px 0 10px; }
/* 技术正文与通用文章页共用容器宽度，目录停靠在右侧。 */
.tech-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 42px; align-items: start; }
.tech-reading { width: 100%; min-width: 0; }
.tech-header { padding: 4px 0 28px; border-bottom: 1px solid var(--border); }
.tech-crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.tech-crumb { min-height: 30px; }
.tech-channel-badge { display: inline-flex !important; align-items: center; gap: 8px; padding: 4px 11px 4px 5px; border: 1px solid color-mix(in srgb, var(--tech) 28%, var(--border)); border-radius: 999px; background: color-mix(in srgb, var(--tech) 7%, var(--surface)); color: var(--tech) !important; font-size: .82rem; font-weight: 700 !important; }
.channel-mark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #fff; background: var(--tech); }
.channel-mark svg { width: 13px !important; height: 13px !important; }
.tech-crumb a + a { color: var(--text-soft); font-weight: 500; }
.tech-crumb svg { width: 15px; height: 15px; }
.crumb-sep { color: var(--border); }
.tech-header h1 { max-width: 720px; margin: 18px 0 16px; color: var(--text); font-family: var(--font-serif); font-size: clamp(2.15rem, 4vw, 2.9rem); line-height: 1.28; letter-spacing: -.02em; }
.tech-meta { display: flex; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
.tech-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tech-meta svg { width: 14px; height: 14px; color: var(--tech); opacity: .8; }
.tech-cover { margin: 24px 0 30px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.tech-cover img { display: block; width: 100%; max-height: 440px; object-fit: cover; }
.tech-content { padding-top: 2px; }
.tech-content.entry-content { font-size: 1.02rem; line-height: 1.92; }
.tech-content.entry-content h2 { margin-top: 2em; border-bottom: 1px solid var(--border); border-left: 3px solid var(--tech); padding: 0 0 10px 13px; }
.tech-content.entry-content h2::before, .tech-content.entry-content h3::before { display: none; }
.tech-content.entry-content h3 { color: color-mix(in srgb, var(--tech) 78%, var(--text)); }
.tech-content.entry-content a { color: var(--tech); border-bottom-color: color-mix(in srgb, var(--tech) 38%, transparent); }
.tech-content.entry-content pre { background: #1e293b; border: 0; border-radius: 10px; color: #e8edf5; padding: 20px; box-shadow: none; }
.tech-content.entry-content code { color: color-mix(in srgb, var(--tech) 80%, var(--text)); }
.tech-content.entry-content pre code { color: inherit; }
.tech-aside { position: sticky; top: 92px; }
.tech-toc { border-left: 1px solid var(--border); padding-left: 14px; }
.tech-toc-head { margin-bottom: 12px; }
.tech-toc-head span { color: var(--text); font-family: var(--font-serif); font-size: 1rem; font-weight: 700; }
.tech-toc-article { margin: 0 0 13px; padding: 11px 0 12px 10px; border-left: 2px solid color-mix(in srgb, var(--tech) 40%, transparent); }
.tech-toc-kicker { display: block; margin-bottom: 5px; color: var(--tech); font-size: .61rem; font-weight: 800; letter-spacing: .12em; }
.tech-toc-article strong { display: -webkit-box; overflow: hidden; color: var(--text-soft); font-family: var(--font-serif); font-size: .82rem; font-weight: 700; line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tech-toc-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.tech-toc-meta span:last-child { color: var(--tech); font-weight: 700; }
.tech-toc-progress { height: 3px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: var(--border-2); }
.tech-toc-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--tech); transition: width .15s linear; }
.tech-toc ol { display: flex; flex-direction: column; gap: 2px; list-style: none; padding: 0; margin: 0; }
.tech-toc li { min-width: 0; }
.tech-toc a { display: block; overflow: hidden; padding: 6px 0 6px 10px; border-left: 2px solid transparent; color: var(--muted); font-size: .82rem; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; transition: color .18s, border-color .18s; }
.tech-toc li.level-3 a { padding-left: 21px; font-size: .73rem; }
.tech-toc a:hover, .tech-toc a.is-active { border-left-color: var(--tech); color: var(--tech); }
.tech-toc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding: 10px 0 0 10px; border-top: 1px solid var(--border-2); color: var(--muted); font-size: .76rem; font-weight: 700; }
.tech-toc-top:hover { color: var(--tech); }
.tech-toc-top svg { width: 15px; height: 15px; }
.tech-toc.is-empty { display: none; }
@media (max-width: 1000px) { .tech-layout { grid-template-columns: minmax(0, 1fr); } .tech-aside { display: none; } }
@media (max-width: 680px) { .tech-single { padding-top: 28px; } .tech-header { padding-bottom: 21px; } .tech-header h1 { font-size: 1.78rem; } .tech-meta { gap: 8px 11px; } .tech-cover { margin: 20px 0 24px; } .tech-content.entry-content { font-size: 1rem; } .tech-content.entry-content pre { margin-left: -2px; margin-right: -2px; padding: 15px; } }

/* =========================================================
   评论
   ========================================================= */
/* 轻量互动区 */
.comments-area { margin-top: 34px; padding-top: 26px; border-top: 1px dashed var(--border); }
.comments-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.comments-area .section-kicker { display: block; margin-bottom: 3px; color: var(--primary); font-size: .69rem; font-weight: 700; letter-spacing: .16em; }
.comments-area h3 { margin: 0; font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.35; }
.comments-note, .comment-notes, .logged-in-as { color: var(--muted); font-size: .78rem; }
.comments-area ul { list-style: none; padding: 0; margin: 0; }
.comments-area .comment-list > li { padding: 15px 0; border-bottom: 1px solid var(--border-2); }
.comments-area ul.children { margin: 11px 0 0 52px; padding-left: 14px; border-left: 1px solid var(--border); }
.comments-area ul.children > li { padding: 11px 0 0; }
.comments-area .comment-body { display: flex; gap: 11px; }
.comments-area .comment-avatar { flex: none; }
.comments-area .comment-avatar img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.comments-area .comment-content { flex: 1; min-width: 0; }
.comments-area .comment-meta { display: flex; align-items: baseline; gap: 9px; line-height: 1.4; }
.comments-area .comment-author { font-size: .9rem; font-weight: 700; color: var(--text); }
.comments-area .comment-author a { color: inherit; }
.comments-area .comment-date { color: var(--muted); font-size: .72rem; }
.comments-area .comment-text { margin-top: 5px; color: var(--text-soft); font-size: .9rem; line-height: 1.7; }
.comments-area .comment-text p { margin: 0; }
.comments-area .reply { margin-top: 5px; font-size: .76rem; }
.comments-area .reply a { color: var(--muted); }
.comments-area .reply a:hover { color: var(--primary); }
.comment-pagination { margin: 18px 0 4px; }

/* 评论表单：默认克制，获得焦点时自然展开。 */
.comments-area #respond { margin-top: 28px; padding: 18px; background: color-mix(in srgb, var(--primary) 4%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 13%, var(--border)); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.comments-area #respond:focus-within { border-color: color-mix(in srgb, var(--primary) 48%, var(--border)); box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 9%, transparent); }
.comments-area .reply-title-wrap { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.comments-area .comment-reply-title { font-size: 1.05rem; }
.comments-area .cancel-reply { margin-left: auto; font-family: var(--font); font-size: .76rem; font-weight: 400; }
.comments-area .cancel-reply a { color: var(--muted); }
.comments-area .comment-notes, .comments-area .logged-in-as { margin: 0 0 12px; }
.comments-area .compact-comment-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comments-area .compact-comment-form > p { margin: 0; }
.comments-area .compact-comment-form .comment-form-comment, .comments-area .compact-comment-form .comment-form-cookies-consent, .comments-area .compact-comment-form .form-submit { grid-column: 1 / -1; }
/* 留言框保持轻盈，输入时由 JS 按内容自然增长。 */
.comments-area .comment-form textarea { display: block; width: 100%; min-height: 48px; height: 48px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-family: inherit; font-size: .92rem; line-height: 1.65; resize: none; overflow-y: hidden; transition: border-color .2s, box-shadow .2s; }
.comments-area .comment-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent); }
.comments-area .comment-form input[type="text"], .comments-area .comment-form input[type="email"], .comments-area .comment-form input[type="url"] { display: block; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-family: inherit; font-size: .84rem; transition: border-color .2s; }
.comments-area .comment-form input:focus { outline: none; border-color: var(--primary); }
.comments-area .comment-form label { display: block; margin: 0 0 4px; color: var(--text-soft); font-size: .74rem; }
.comments-area .comment-form .optional { color: var(--muted); font-weight: 400; }
.comments-area .comment-form-cookies-consent { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .74rem; }
.comments-area .comment-form-cookies-consent input { margin: 0; accent-color: var(--primary); }
.comments-area .comment-form-cookies-consent label { margin: 0; }
.comments-area .form-submit { display: flex; justify-content: flex-end; margin-top: 2px !important; }
.comments-area .form-submit .submit { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 9px 17px; background: var(--primary); color: #fff; cursor: pointer; font-family: inherit; font-size: .84rem; font-weight: 700; transition: transform .18s, background .18s; }
.comments-area .form-submit .submit:hover { background: var(--primary-hover); transform: translateY(-1px); }
.comments-area .form-submit .submit span { font-size: 1rem; line-height: .8; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 620px) {
  .comments-heading { align-items: start; }
  .comments-note { padding-top: 4px; }
  .comments-area #respond { padding: 15px; }
  .comments-area .compact-comment-form { grid-template-columns: 1fr; gap: 10px; }
  .comments-area ul.children { margin-left: 28px; padding-left: 11px; }
  .comments-area .comment-avatar img { width: 35px; height: 35px; }
  .comments-area .comment-meta { flex-wrap: wrap; gap: 3px 8px; }
}

/* =========================================================
   关于页
   ========================================================= */
.about-hero { padding: 52px 0 32px; text-align: center; }
.about-avatar { width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 18px; overflow: hidden; background: linear-gradient(145deg, #3c7f68, #2a5a4a); display: grid; place-items: center; color: #f5f2ea; font-family: var(--font-serif); font-size: 3rem; box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--border), var(--shadow-lg); }
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-hero h1 { font-size: 2rem; margin: 0 0 6px; font-family: var(--font-serif); }
.about-hero .about-role { color: var(--primary); font-weight: 600; margin-bottom: 12px; }
.about-hero .about-bio { max-width: 620px; margin: 0 auto; color: var(--text-soft); }
.about-section { max-width: 760px; margin: 0 auto; }
.about-section h2 { font-size: 1.35rem; margin: 36px 0 14px; display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); }
.about-section h2 .bar { width: 5px; height: 20px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 50%, #fff)); }
.about-quote { text-align: center; padding: 32px 0; }
.about-quote blockquote { display: inline-block; margin: 0 auto; padding: 22px 34px; position: relative; border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); font-family: var(--font-serif); font-size: 1.22rem; color: var(--text-soft); }
.about-quote blockquote::before { content: '「'; position: absolute; left: 14px; top: 8px; font-size: 1.5rem; color: color-mix(in srgb, var(--primary) 45%, transparent); }

/* =========================================================
   404 / 空
   ========================================================= */
.empty-state { text-align: center; padding: 80px 0; }
.empty-state .big { font-size: 3.4rem; font-family: var(--font-serif); color: var(--primary); }
.empty-state p { color: var(--text-soft); }

/* =========================================================
   图片灯箱
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(18, 20, 22, .88); display: none; place-items: center; padding: 30px 84px; cursor: zoom-out; backdrop-filter: blur(6px); }
.lightbox.open { display: grid; }
.lightbox .lb-stage { display: grid; place-items: center; gap: 10px; max-width: min(92vw, 1200px); max-height: 86vh; margin: 0; cursor: default; }
.lightbox img { display: block; max-width: min(92vw, 1200px); max-height: 80vh; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); object-fit: contain; transform-origin: center center; transition: transform .12s ease-out; will-change: transform; }
.lightbox .lb-caption { color: rgba(255,255,255,.75); font-size: .78rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next { position: absolute; color: #fff; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; background: rgba(255,255,255,.08); cursor: pointer; transition: background .18s, border-color .18s, transform .18s, opacity .18s; opacity: .55; }
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.7); transform: scale(1.06); opacity: 1; }
.lightbox .lb-close { top: 22px; right: 26px; }
.lightbox .lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 26px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-prev:hover, .lightbox .lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lightbox .lb-close svg { width: 16px; height: 16px; }
.lightbox .lb-prev svg, .lightbox .lb-next svg { width: 18px; height: 18px; }
.lightbox button:disabled { opacity: .3; cursor: default; }
.lightbox .lb-zoom { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); opacity: .55; transition: background .18s, opacity .18s; }
.lightbox .lb-zoom:hover { background: rgba(255,255,255,.18); opacity: 1; }
.lightbox .lb-zoom button { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.lightbox .lb-zoom button:hover { background: rgba(255,255,255,.18); }
.lightbox .lb-zoom button svg { width: 15px; height: 15px; }
.lightbox .lb-zoom-level { color: #fff; font-size: .76rem; font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }
.lightbox .lb-zoom-dash, .lightbox .lb-zoom-plus { position: absolute; background: #fff; }
.lightbox .lb-zoom-dash { width: 12px; height: 2px; border-radius: 2px; }
.lightbox .lb-zoom-plus { width: 12px; height: 2px; border-radius: 2px; }
.lightbox .lb-zoom-plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 12px; background: #fff; border-radius: 2px; transform: translate(-50%, -50%); }
.lightbox .lb-zoom-reset { font-size: .72rem; font-weight: 700; margin-left: 2px; }
.lightbox .lb-fullscreen { font-size: .7rem; font-weight: 700; color: #fff; min-width: 38px; }
/* 页面内全屏模式：兼容 iOS（iOS 不支持普通元素原生 Fullscreen API） */
.lightbox.fs-mode { background: #000; padding: 0; }
.lightbox.fs-mode .lb-stage {
  max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lightbox.fs-mode .lb-stage img {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  border-radius: 0; box-shadow: none; object-fit: cover;
}
.lightbox.fs-mode .lb-caption { display: none; }
/* 竖屏进入全屏：把舞台旋转 90° 后居中铺满整屏（兼容 iOS，不依赖系统横屏锁） */
@media (orientation: portrait) {
  .lightbox.fs-mode .lb-stage {
    width: 100vh; height: 100vw;
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
  }
}
body.lightbox-open { overflow: hidden; }

/* 返回顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 150;
  width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); display: grid; place-items: center;
  box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateY(8px); transition: all .25s;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { color: var(--primary); border-color: var(--primary); }
.back-top svg { width: 17px; height: 17px; }
.back-top-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* =========================================================
   页脚
   ========================================================= */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 52px; position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 180px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; padding: 44px 0 30px; }
.footer-grid h4 { font-size: .95rem; margin: 0 0 14px; font-family: var(--font-serif); letter-spacing: .04em; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .logo { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(145deg, #3c7f68, #2a5a4a); color: #f5f2ea; display: grid; place-items: center; font-family: var(--font-serif); font-size: 1.05rem; }
.footer-brand .t { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; color: var(--text); }
.footer-grid .footer-bio { margin: 0 0 12px; color: var(--text-soft); font-size: .87rem; line-height: 1.8; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { padding: 5px 0; }
.footer-grid ul li a { color: var(--text-soft); display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; transition: color .18s, transform .18s; }
.footer-grid ul li a:hover { color: var(--primary); transform: translateX(3px); }
.footer-grid ul li a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--border); transition: background .18s; }
.footer-grid ul li a:hover::before { background: var(--primary); }
.footer-social { display: flex; gap: 9px; margin-top: 16px; }
.footer-social a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-soft); transition: all .2s; }
.footer-social a svg { width: 15px; height: 15px; }
/* 平台专属品牌色：默认灰色，鼠标悬停显示彩色 */
.footer-social a.social-github { --brand: #24292f; }
.footer-social a.social-weibo  { --brand: #e6162d; }
.footer-social a.social-email  { --brand: #ea4335; }
.footer-social a.social-rss    { --brand: #f26522; }
.footer-social a.social-qq     { --brand: #12b7f5; }
.footer-social a.social-wechat { --brand: #07c160; }
.footer-social a:hover {
  color: var(--brand, var(--primary));
  background: color-mix(in srgb, var(--brand, var(--primary)) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand, var(--primary)) 45%, transparent);
  transform: translateY(-2px);
}
.footer-bottom { border-top: 1px solid var(--border); padding: 17px 0; text-align: center; color: var(--muted); font-size: .8rem; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* =========================================================
   动效偏好
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1.2fr 1fr; gap: 32px; }
  .hero h1 { font-size: 2.2rem; }
  .post-grid { gap: 18px; }
  .feature-main h3 { font-size: 1.5rem; }
}
@media (max-width: 980px) {
  .post-grid, .related .post-grid { grid-template-columns: repeat(2, 1fr); }
  .links-grid { grid-template-columns: repeat(3, 1fr); }
  .work-card.large { grid-column: span 2; }
}
@media (max-width: 900px) {
  .hero-grid, .feature-row, .layout-2col { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 1.95rem; }
  .profile-card { max-width: 380px; margin: 0 auto; }
  .feature-main { min-height: 280px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .work-card.large { grid-column: span 2; }
  .works-hero-inner { gap: 22px; }
  .works-hero-text h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .news-thumb { width: 200px; }
}
@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .main-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 14px; gap: 2px; box-shadow: var(--shadow-lg); overflow: visible; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 10px; border-radius: 9px; }
  .nav-toggle { display: grid; }
  .search-pop { right: 16px; }
  .hero { padding: 30px 0 26px; }
  .hero h1 { font-size: 1.68rem; }
  .hero-stats { gap: 20px; }
  .hero-stats .num { font-size: 1.25rem; }
  .feature-main { min-height: 220px; }
  .feature-main .f-inner { padding: 20px; }
  .feature-main h3 { font-size: 1.22rem; }
  .post-grid, .related .post-grid, .works-grid, .footer-grid { grid-template-columns: 1fr; }
  .work-card.large { grid-column: span 1; }
  .work-card.large .work-thumb { min-height: 0; aspect-ratio: 4 / 3; }
  .post-card { flex-direction: row; align-items: stretch; }
  .post-thumb { width: 38%; aspect-ratio: auto; min-height: 120px; }
  .post-body { flex: 1; padding: 14px; }
  .post-body h3 { font-size: 1rem; }
  .post-excerpt { display: none; }
  .news-item { flex-direction: column; padding: 0; }
  .news-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius) var(--radius) 0 0; }
  .news-body { padding: 14px 16px 16px; }
  .news-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
  .news-body .excerpt { -webkit-line-clamp: 1; margin-bottom: 10px; }
  .news-body .meta { gap: 8px; font-size: .72rem; }
  .text-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 4px; }
  .text-item .date { width: auto; font-size: .75rem; }
  .text-item .ti-main { width: 100%; }
  .text-item h3 { font-size: 1rem; margin-bottom: 5px; }
  .text-item .excerpt { -webkit-line-clamp: 1; font-size: .84rem; }
  .text-item .meta { width: 100%; justify-content: flex-start; font-size: .72rem; }
  .mood-layout { grid-template-columns: 1fr; max-width: 720px; }
  .mood-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .mood-side-block { margin-top: 0; }
  .mood-side-link { display: none; }
  .mood-card { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding: 16px; border-radius: 13px; }
  .mood-avatar { width: 42px; height: 42px; border-radius: 12px; }
  .mood-text { font-size: .96rem; line-height: 1.75; }
  .mood-images { width: min(100%, 390px); gap: 4px; margin: 0 0 12px; }
  .mood-images.g1 { max-width: 360px; }
  .mood-images.g2, .mood-images.g4 { max-width: 340px; }
  .mood-images.g5, .mood-images.g6, .mood-images.g7, .mood-images.g8 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .mood-card { margin-bottom: 14px; }
  .mood-wrap > .pagination { margin-top: 6px; }
  .mood-actions { gap: 14px; }
  .mood-actions .mood-detail { font-size: 0; }
  .lightbox { padding: 56px 52px 76px; }
  .lightbox .lb-close { top: 12px; right: 12px; }
  .lightbox .lb-prev { left: 10px; }
  .lightbox .lb-next { right: 10px; }
  .lightbox .lb-stage { width: 100%; height: 100%; max-width: 96vw; max-height: 80vh; }
  .lightbox img { max-width: 100%; max-height: 100%; }
  .lightbox .lb-zoom { bottom: 10px; gap: 2px; padding: 5px 8px; }
  .lightbox .lb-zoom button { width: 28px; height: 28px; }
  .lightbox .lb-zoom-level { min-width: 38px; font-size: .72rem; }
  .lightbox .lb-fullscreen { min-width: 34px; font-size: .65rem; }
  .mood-actions .mood-detail svg { width: 16px; height: 16px; }
  .links-grid { grid-template-columns: repeat(2, 1fr); }
  .link-go { display: none; }
  .single-cover { aspect-ratio: 1200 / 560; border-radius: var(--radius-sm); }
  .entry-header h1 { font-size: 1.6rem; }
  .entry-content { font-size: 1rem; }
  .toc-box { display: none; }
  .author-box { flex-direction: column; text-align: left; gap: 12px; padding: 16px; }
  .author-box .avatar { width: 56px; height: 56px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .pn-thumb { width: 96px; }
  .post-nav .pn-title { font-size: .95rem; }
  .post-nav .next { text-align: left; }
  .about-hero h1 { font-size: 1.65rem; }
  .about-quote blockquote { font-size: 1.05rem; padding: 16px 22px; }
  .works-hero { padding: 46px 0 36px; }
  .works-hero-inner { gap: 18px; }
  .works-hero-icon { width: 62px; height: 62px; border-radius: 16px; }
  .works-hero-icon svg { width: 27px; height: 27px; }
  .works-hero-text h1 { font-size: 1.5rem; }
  .archive-hero-inner { gap: 18px; }
  .archive-icon { width: 62px; height: 62px; border-radius: 16px; }
  .archive-icon svg { width: 27px; height: 27px; }
  .archive-hero h1 { font-size: 1.5rem; }
  .back-top { right: 16px; bottom: 20px; }

  /* 全站间距收紧：减少手机端过大留白 */
  .section { padding: 32px 0; }
  .hero { padding: 36px 0 28px; }
  .hero-grid { gap: 30px; }
  .hero .hello { margin-bottom: 12px; }
  .hero h1 { margin-bottom: 12px; }
  .hero .lead { margin-bottom: 16px; }
  .hero-tags { margin-bottom: 18px; }
  .hero-stats { gap: 20px; margin-top: 20px; padding-top: 16px; }
  .archive-hero { padding: 36px 0 28px; }
  .works-hero { padding: 36px 0 28px; }
  .about-hero { padding: 36px 0 24px; }
  .single-cover { margin: 18px 0 22px; }
  .entry-header { padding: 22px 0 4px; }
  .entry-content img { margin: 18px 0; }
  .entry-content blockquote { margin: 18px 0; }
  .entry-content h2 { margin-top: 1.5em; }
  .entry-content h3 { margin-top: 1.25em; }
  .tags-row { margin: 20px 0 0; }
  .author-box { margin: 22px 0; }
  .post-nav { margin: 20px 0; }
  .related { padding: 22px 0 6px; }
  .pagination { margin: 24px 0; }
  .site-footer { margin-top: 36px; }
  .footer-grid { padding: 32px 0 24px; gap: 22px; }
  .mood-day { margin: 22px 0 12px; }

  /* 栏目页侧栏手机端：单栏堆叠、卡片化、收住宿主信息密度 */
  .layout-2col { gap: 26px; }
  .sidebar { gap: 16px; margin-top: 4px; }
  .side-intro { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
  .side-intro p { margin: 12px 0 12px; }
  .side-block { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
  .side-title { margin-bottom: 10px; }
  .side-recent li { padding: 8px 0; }
  .category-list a { padding: 8px 10px; border-radius: 9px; }
  .category-list a:hover { background: var(--primary-soft); }
}
@media (max-width: 520px) {
  .mood-sidebar { grid-template-columns: 1fr; }
  .mood-images.g5, .mood-images.g6, .mood-images.g7, .mood-images.g8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 1.45rem; }
  .section { padding: 32px 0; }
  .section-head h2 { font-size: 1.2rem; }
  .btn { padding: 9px 15px; font-size: .88rem; }
  .feature-main .f-inner { padding: 16px; }
  .feature-main h3 { font-size: 1.12rem; }
  .side-thumb { width: 90px; }
  .post-card { flex-direction: column; }
  .post-thumb { width: 100%; aspect-ratio: 3 / 2; }
  .links-grid { grid-template-columns: 1fr; }
  .entry-header h1 { font-size: 1.28rem; }
}

/* ===== 文章页分享模块 ===== */
.share-box {
  margin: 12px 0;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.share-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  flex: none;
}
.share-bar {
  width: 3px;
  height: 13px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #ffffff));
}
.share-head h3 {
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--font-serif);
  letter-spacing: .02em;
  color: var(--text-soft);
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: .76rem;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s, border-color .18s;
}
.share-btn .icon { width: 15px; height: 15px; flex: none; }
.share-btn:hover { color: #fff; border-color: transparent; transform: translateY(-1px); }
.share-btn[data-share-to="wechat"]:hover { background: #07c160; }
.share-btn[data-share-to="weibo"]:hover  { background: #e6162d; }
.share-btn[data-share-to="qq"]:hover,
.share-btn[data-share-to="qzone"]:hover { background: #12b7f5; }
.share-btn[data-share-to="copy"]:hover,
.share-btn[data-share-to="image"]:hover { background: var(--primary); }
.share-btn[data-share-to="mail"]:hover { background: #d44638; }

/* 分享弹窗（二维码 / 分享图） */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 20, 24, .55);
  backdrop-filter: blur(2px);
}
.share-modal.open { display: flex; }
.share-modal-card {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  overflow: auto;
  padding: 26px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.share-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 24px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.share-modal-close:hover { background: var(--surface-2); color: var(--text); }
.share-modal-card h4 { margin: 0 0 14px; font-size: 1.05rem; color: var(--text); }
.share-qr-canvas { display: grid; place-items: center; margin: 4px 0 12px; }
.share-qr-canvas canvas { border-radius: 8px; }
.share-qr-tip { margin: 0; color: var(--muted); font-size: .82rem; }
.share-img-preview { color: var(--text-soft); font-size: .9rem; }
.share-img-preview img.share-img-result {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.share-img-actions { margin-top: 18px; }
.share-img-download {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s;
}
.share-img-download:hover { background: var(--primary-hover); }

@media (max-width: 520px) {
  .share-box { padding: 8px 10px; }
  .share-btn { padding: 4px 9px; font-size: .74rem; }
  .share-img-preview img.share-img-result { max-width: 100%; }
}
