/* 亲戚 前台样式 — 手绘涂鸦风
   米白底 + 鲜亮黄 + 薄荷绿 / 虚线边框 + 微旋转 + 散落装饰
   ============================================================ */

:root {
    --bg: #fdf9f0;
    --bg-soft: #fff5d7;
    --surface: #ffffff;
    --paper: #ffffff;
    --line: #f0e4c8;
    --line-soft: #f7eed8;
    --line-strong: #e8d8a8;
    --ink: #3a2e25;
    --ink-soft: #6b574a;
    --muted: #a39584;
    --muted-light: #c8bfb0;
    --primary: #fbb43d;
    --primary-hover: #f59e0b;
    --primary-fade: #fff5d7;
    --secondary: #6cc4a1;
    --secondary-fade: #d6f0e2;
    --accent: #f87171;
    --accent-fade: #fee2e2;
    --pink: #f9a8d4;
    --pink-fade: #fce7f3;
    --shadow-sm: 2px 2px 0 var(--ink);
    --shadow: 3px 3px 0 var(--ink);
    --shadow-lg: 4px 4px 0 var(--secondary);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --serif: "Ma Shan Zheng", "ZCOOL KuaiLe", "Yuanti SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 全局散落装饰：纸张噪点感（用细微 dot pattern） */
body {
    background-image:
        radial-gradient(circle at 0 0, var(--primary) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--secondary-fade) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px;
    background-position: 0 0, 40px 40px;
    background-attachment: fixed;
    background-color: var(--bg);
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

::selection { background: var(--primary); color: var(--ink); }

/* ============ 夜间模式 ============ */
[data-theme="dark"] {
    --bg: #1f1a15;
    --bg-soft: #2a2218;
    --surface: #2e2519;
    --paper: #2a2218;
    --line: #44382a;
    --line-soft: #382e23;
    --line-strong: #5b4a38;
    --ink: #fdf9f0;
    --ink-soft: #d4c5b0;
    --muted: #8f8170;
    --muted-light: #6b5f51;
    --primary: #fcc658;
    --primary-hover: #fdd683;
    --primary-fade: #2a2316;
    --secondary: #7dd4ad;
    --secondary-fade: #1e2c24;
    --shadow-sm: 2px 2px 0 #0d0a07;
    --shadow: 3px 3px 0 #0d0a07;
}

/* ============ 顶部导航：圆头 + 装饰小铅笔 ============ */
.site-nav {
    background: var(--bg);
    border-bottom: 2px dashed var(--line-strong);
    position: sticky;
    top: 0; z-index: 100;
}
.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
}
.brand:hover { color: var(--primary-hover); }
.brand-mark {
    display: inline-block;
    font-size: 22px;
    transform: rotate(-8deg);
    transition: transform 0.3s;
}
.brand:hover .brand-mark { transform: rotate(8deg) scale(1.1); }
.brand-name { letter-spacing: 0.05em; }

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-links a {
    color: var(--ink-soft);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    transition: all 0.2s;
    font-weight: 500;
}
.nav-links a:hover { color: var(--ink); background: var(--primary-fade); }
.nav-links a.active, .nav-links a.nav-cat.active {
    color: var(--ink);
    background: var(--primary);
    box-shadow: 2px 2px 0 var(--ink);
}
.nav-links a.nav-cat:hover {
    background: var(--secondary-fade);
}
.theme-toggle {
    background: none;
    border: 0;
    color: var(--ink-soft);
    font-size: 18px;
    padding: 6px 8px;
    cursor: pointer;
    line-height: 1;
    margin-left: 8px;
    transition: transform 0.3s;
}
.theme-toggle:hover { transform: rotate(20deg); }

/* ============ 阅读进度条：圆头粗线 ============ */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 200;
    transition: width 0.15s ease-out;
    border-radius: 0 4px 4px 0;
}

/* ============ Hero：散落星星 + 波浪线 + 楷体大字 ============ */
.hero {
    background: var(--bg);
    padding: 70px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "✦";
    position: absolute;
    top: 30px; left: 12%;
    font-size: 22px;
    color: var(--primary);
    transform: rotate(-12deg);
    animation: twinkle 3s ease-in-out infinite;
}
.hero::after {
    content: "★";
    position: absolute;
    top: 50px; right: 14%;
    font-size: 18px;
    color: var(--secondary);
    transform: rotate(8deg);
    animation: twinkle 3s ease-in-out infinite 1.5s;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.5; transform: scale(1) rotate(-12deg); }
    50%      { opacity: 1;   transform: scale(1.2) rotate(-12deg); }
}
.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}
.hero-eyebrow {
    display: inline-block;
    color: var(--ink);
    background: var(--secondary-fade);
    border: 2px dashed var(--secondary);
    border-radius: var(--radius-pill);
    padding: 5px 18px;
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    transform: rotate(-1.5deg);
    font-weight: 600;
}
.hero-title {
    font-family: var(--serif);
    font-size: clamp(36px, 5.5vw, 54px);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
    letter-spacing: 0.08em;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}
.hero-title::after {
    content: "";
    display: block;
    width: 80%;
    height: 14px;
    margin: 4px auto 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 14' preserveAspectRatio='none'><path d='M0,7 Q12.5,0 25,7 T50,7 T75,7 T100,7' stroke='%23fbb43d' stroke-width='3' fill='none' stroke-linecap='round'/></svg>") repeat-x;
    background-size: 80px 14px;
}
.hero-sub {
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.85;
    margin: 28px auto 32px;
    max-width: 520px;
}
.hero-sub::after { content: " ✏️"; opacity: 0.7; }

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 460px;
    margin: 0 auto 30px;
    position: relative;
}
.hero-search input[type="search"] {
    flex: 1;
    padding: 12px 18px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-shadow: 3px 3px 0 var(--primary);
}
.hero-search input[type="search"]:focus {
    box-shadow: 5px 5px 0 var(--primary);
    transform: translate(-1px, -1px);
}
.hero-search-btn {
    background: var(--primary);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: var(--radius-pill);
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 3px 3px 0 var(--ink);
}
.hero-search-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--ink);
}
.hero-search-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--ink);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: var(--radius-lg);
    max-height: 420px;
    overflow-y: auto;
    text-align: left;
    z-index: 50;
    box-shadow: 4px 4px 0 var(--secondary);
}
.search-results ul { list-style: none; padding: 8px; margin: 0; }
.search-results li a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--ink);
}
.search-results li a:hover { background: var(--primary-fade); }
.sr-title { font-size: 14px; display: block; margin-bottom: 4px; font-weight: 600; }
.sr-meta { font-size: 11px; color: var(--muted); }
.sr-more { padding: 10px 14px; font-size: 12px; color: var(--muted); text-align: center; border-top: 2px dashed var(--line-strong); }
.search-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }

/* Hero 簇导航：虚线粗框小方块 */
.hero-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 32px auto 0;
    max-width: 720px;
}
.hero-cat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    color: var(--ink);
    background: var(--paper);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 86px;
}
.hero-cat:nth-child(2n)   { transform: rotate(-1.5deg); }
.hero-cat:nth-child(2n+1) { transform: rotate(1deg); }
.hero-cat:hover {
    transform: rotate(0deg) translateY(-3px);
    border-style: solid;
    background: var(--primary-fade);
    box-shadow: 4px 4px 0 var(--ink);
}
.hero-cat-emoji {
    font-size: 28px;
    transition: transform 0.3s;
}
.hero-cat:hover .hero-cat-emoji { transform: scale(1.2) rotate(-10deg); }
.hero-cat-name { letter-spacing: 0.05em; }

/* 分类页 hero */
.cat-hero { background: var(--secondary-fade); }
.cat-hero .hero-eyebrow {
    background: var(--bg);
    border-color: var(--ink);
}

/* ============ 布局容器 ============ */
.layout-index {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}
.layout-article {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ============ 面包屑 ============ */
.breadcrumb { margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li::after { content: "✎"; margin-left: 8px; color: var(--primary); font-size: 11px; }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-hover); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ============ 区块标题 ============ */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 28px;
    padding-bottom: 0;
}
.section-title h2 {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
    letter-spacing: 0.06em;
    position: relative;
    padding-left: 30px;
}
.section-title h2::before {
    content: "✏️";
    position: absolute;
    left: 0; top: -2px;
    font-size: 22px;
    transform: rotate(-15deg);
}
.section-title h2.section-hot::before { content: "🔥"; }
.section-title .section-meta {
    font-size: 12px;
    color: var(--muted);
    background: var(--bg-soft);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px dashed var(--line-strong);
}

/* ============ 文章列表：虚线卡片 + 微旋转 + 角标 ============ */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0 0 56px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.post-card {
    background: var(--paper);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: all 0.2s ease;
    position: relative;
}
.post-card:nth-child(3n+1) { transform: rotate(-0.6deg); }
.post-card:nth-child(3n+2) { transform: rotate(0.4deg); }
.post-card:nth-child(3n+3) { transform: rotate(-0.3deg); }
.post-card:hover {
    transform: rotate(0deg) translate(-2px, -2px);
    border-style: solid;
    box-shadow: 5px 5px 0 var(--primary);
}
.post-card:nth-child(3n+2):hover { box-shadow: 5px 5px 0 var(--secondary); }
.post-card:nth-child(3n+3):hover { box-shadow: 5px 5px 0 var(--pink); }
.post-card-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--ink);
}
.post-card-link:hover { color: var(--ink); }
.post-card-thumb { display: none; }
.post-card-body { display: flex; flex-direction: column; gap: 8px; }
.post-card-title {
    font-family: var(--serif);
    font-size: 20px;
    color: var(--ink);
    line-height: 1.55;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.post-card:hover .post-card-title { color: var(--primary-hover); }
.post-card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
}
.post-card-date::before { content: "📅 "; opacity: 0.8; }

/* 分类徽章：彩色圆角小标签 */
.cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    background: var(--primary-fade);
    border: 1.5px solid var(--ink);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.2s;
}
.cat-badge:hover {
    color: var(--ink);
    background: var(--primary);
    transform: rotate(-2deg);
}

/* ============ 首页"各簇预览"小区：8 个虚线小卡片 ============ */
.cat-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
    margin: 64px 0 0;
}
.cat-preview {
    background: var(--paper);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    transition: all 0.25s;
    position: relative;
}
.cat-preview:nth-child(4n+1) { transform: rotate(-0.8deg); }
.cat-preview:nth-child(4n+2) { transform: rotate(0.6deg); }
.cat-preview:nth-child(4n+3) { transform: rotate(-0.4deg); }
.cat-preview:nth-child(4n+4) { transform: rotate(0.5deg); }
.cat-preview:hover {
    transform: rotate(0deg) translate(-2px, -2px);
    border-style: solid;
    box-shadow: 4px 4px 0 var(--secondary);
}
.cat-preview:nth-child(2n):hover { box-shadow: 4px 4px 0 var(--primary); }
.cat-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px dotted var(--line-strong);
}
.cat-preview-head h3 {
    font-family: var(--serif);
    font-size: 18px;
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.cat-preview-emoji { font-size: 20px; margin-right: 4px; }
.cat-preview-more {
    font-size: 11px;
    color: var(--muted);
    background: var(--bg-soft);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    border: 1px dashed var(--muted-light);
}
.cat-preview-more:hover { color: var(--ink); background: var(--primary-fade); border-color: var(--ink); }
.cat-preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cat-preview-list li {
    padding: 6px 0;
}
.cat-preview-list li + li { border-top: 1px dashed var(--line-soft); }
.cat-preview-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    color: var(--ink);
}
.cat-preview-list a:hover { color: var(--primary-hover); }
.cat-preview-title {
    font-size: 14px;
    line-height: 1.55;
    flex: 1;
}
.cat-preview-date {
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 56px 0 0;
    align-items: center;
}
.pagination a, .pagination .cur, .pagination .disabled {
    color: var(--ink);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
}
.pagination a {
    background: var(--paper);
    border: 2px dashed var(--ink);
    transition: all 0.15s;
}
.pagination a:hover {
    background: var(--primary);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 var(--ink);
}
.pagination .cur {
    background: var(--ink);
    color: var(--paper);
    transform: rotate(-2deg);
}
.pagination .disabled { color: var(--muted-light); }

/* ============ 文章页 ============ */
.post-head {
    text-align: center;
    margin: 0 0 40px;
    padding-bottom: 32px;
    border-bottom: 2px dashed var(--line-strong);
    position: relative;
}
.post-head::after {
    content: "✦   ✎   ✦";
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    padding: 0 14px;
    color: var(--primary);
    font-size: 13px;
    letter-spacing: 0.8em;
}
.post-eyebrow { margin: 0 0 18px; }
.post-title {
    font-family: var(--serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    margin: 0 0 18px;
    letter-spacing: 0.04em;
}
.post-lede {
    font-size: 15.5px;
    color: var(--ink-soft);
    line-height: 1.85;
    max-width: 560px;
    margin: 0 auto 22px;
    padding: 14px 22px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1.5px dashed var(--primary);
    transform: rotate(-0.4deg);
}
.post-meta {
    font-size: 12px;
    color: var(--muted);
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.post-meta .dot { color: var(--muted-light); }
.post-actions { margin: 18px 0 0; }
.copy-btn {
    background: var(--paper);
    border: 2px dashed var(--ink);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.15s;
}
.copy-btn:hover {
    background: var(--secondary);
    border-style: solid;
    box-shadow: 2px 2px 0 var(--ink);
    transform: translate(-1px, -1px);
}
.copy-btn.copied {
    background: var(--secondary);
    border-style: solid;
}

.post-cover {
    margin: 0 0 32px;
}
.post-cover img {
    border-radius: var(--radius-lg);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--primary);
}

/* 正文 */
.post-body {
    font-size: 17px;
    line-height: 1.95;
    color: var(--ink);
}
.post-body p { margin: 0 0 22px; }
.post-body h2 {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    margin: 48px 0 22px;
    padding: 0 0 6px 0;
    letter-spacing: 0.04em;
    position: relative;
    display: inline-block;
}
.post-body h2::before {
    content: "✎";
    color: var(--primary);
    margin-right: 10px;
    font-weight: 400;
}
.post-body h2::after {
    content: "";
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 10px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'><path d='M0,5 Q12.5,0 25,5 T50,5 T75,5 T100,5' stroke='%23fbb43d' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>") repeat-x;
    background-size: 60px 10px;
}
.post-body h3 {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin: 32px 0 14px;
}
.post-body h3::before { content: "✿ "; color: var(--secondary); }
.post-body strong {
    color: var(--ink);
    background: linear-gradient(180deg, transparent 60%, var(--primary-fade) 60%);
    padding: 0 2px;
    font-weight: 700;
}
.post-body em { font-style: italic; color: var(--primary-hover); }
.post-body ul, .post-body ol {
    margin: 0 0 22px;
    padding-left: 0;
    list-style: none;
}
.post-body ul li {
    position: relative;
    padding-left: 26px;
    margin: 10px 0;
}
.post-body ul li::before {
    content: "✦";
    position: absolute;
    left: 0; top: 2px;
    color: var(--secondary);
    font-size: 13px;
}
.post-body ol {
    counter-reset: ol-counter;
    padding-left: 0;
}
.post-body ol li {
    position: relative;
    padding-left: 32px;
    margin: 10px 0;
    counter-increment: ol-counter;
}
.post-body ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0; top: 1px;
    background: var(--primary);
    color: var(--ink);
    width: 22px; height: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid var(--ink);
}
.post-body a {
    color: var(--primary-hover);
    border-bottom: 1.5px dashed var(--primary);
}
.post-body a:hover { border-bottom-style: solid; color: var(--ink); }
.post-body code {
    background: var(--bg-soft);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.9em;
    border: 1px dashed var(--line-strong);
}
.post-body blockquote {
    margin: 24px 0;
    padding: 18px 22px;
    background: var(--secondary-fade);
    border-radius: var(--radius);
    border: 2px dashed var(--secondary);
    color: var(--ink);
    font-style: italic;
    position: relative;
    transform: rotate(-0.3deg);
}
.post-body blockquote::before {
    content: "“";
    position: absolute;
    top: -10px; left: 10px;
    font-size: 40px;
    color: var(--secondary);
    background: var(--bg);
    padding: 0 6px;
    line-height: 1;
}

/* 延伸阅读 */
.related {
    margin: 48px 0 0;
    padding: 22px 24px;
    background: var(--bg-soft);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    position: relative;
}
.related::before {
    content: "📌";
    position: absolute;
    top: -14px; left: 20px;
    background: var(--bg);
    padding: 0 8px;
    font-size: 20px;
}
.related h3 {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--ink);
    margin: 0 0 14px;
    font-weight: 700;
}
.related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related li {
    padding: 8px 0;
}
.related li + li { border-top: 1px dashed var(--line-strong); }
.related a {
    color: var(--ink);
    font-size: 14.5px;
}
.related a:hover { color: var(--primary-hover); }
.related a::before { content: "→ "; color: var(--primary); margin-right: 4px; }

/* 上一篇/下一篇 */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 48px 0 0;
    padding-top: 32px;
    border-top: 2px dashed var(--line-strong);
}
.post-nav-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px;
    color: var(--ink);
    background: var(--paper);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}
.post-nav-card:nth-child(1) { transform: rotate(-0.5deg); }
.post-nav-card:nth-child(2) { transform: rotate(0.5deg); }
.post-nav-card:not(.disabled):hover {
    transform: rotate(0deg) translate(-2px, -2px);
    border-style: solid;
    box-shadow: 3px 3px 0 var(--primary);
}
.post-nav-card.right { text-align: right; align-items: flex-end; }
.post-nav-card.disabled { color: var(--muted-light); cursor: default; border-color: var(--line-strong); background: transparent; }
.post-nav-card .lbl {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.1em;
}
.post-nav-card:not(.disabled):hover .lbl { color: var(--primary-hover); }
.post-nav-card .ttl {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

/* ============ 文章侧栏目录（>=1280px 显示） ============ */
.post-toc { display: none; }
@media (min-width: 1280px) {
    .post-toc {
        display: block;
        position: fixed;
        top: 110px;
        right: 28px;
        max-width: 220px;
        padding: 16px 18px;
        background: var(--paper);
        border: 2px dashed var(--ink);
        border-radius: var(--radius-lg);
        font-size: 12px;
        color: var(--ink-soft);
        z-index: 50;
        transform: rotate(-1deg);
    }
    .post-toc-title {
        font-family: var(--serif);
        font-size: 13px;
        color: var(--ink);
        font-weight: 700;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px dashed var(--primary);
    }
    .post-toc-title::before { content: "📑 "; }
    .post-toc-list { list-style: none; padding: 0; margin: 0; max-height: 60vh; overflow-y: auto; }
    .post-toc-list li { margin: 4px 0; }
    .post-toc-list a {
        color: var(--ink-soft);
        font-size: 12.5px;
        line-height: 1.6;
        display: block;
        padding: 4px 8px;
        border-radius: var(--radius);
    }
    .post-toc-list a:hover { color: var(--ink); background: var(--primary-fade); }
    .post-toc-list a.active { color: var(--ink); background: var(--primary); font-weight: 600; }
}

/* ============ 友链页 ============ */
.links-grid {
    list-style: none;
    padding: 0;
    margin: 0 0 56px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.link-card {
    background: var(--paper);
    border: 2px dashed var(--ink);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}
.link-card:nth-child(3n+1) { transform: rotate(-0.8deg); }
.link-card:nth-child(3n+2) { transform: rotate(0.6deg); }
.link-card:nth-child(3n+3) { transform: rotate(-0.3deg); }
.link-card:hover {
    transform: rotate(0deg) translate(-2px, -2px);
    border-style: solid;
    box-shadow: 4px 4px 0 var(--primary);
}
.link-card a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    color: var(--ink);
}
.link-card-name {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
    font-weight: 700;
}
.link-card-name::before { content: "🔗 "; opacity: 0.7; }
.link-card-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }
.link-card-url { font-size: 11px; color: var(--muted-light); }
.links-apply {
    margin: 56px 0 0;
    padding: 28px;
    background: var(--secondary-fade);
    border: 2px dashed var(--secondary);
    border-radius: var(--radius-lg);
    text-align: center;
    transform: rotate(-0.3deg);
}
.links-apply h3 {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
    margin: 0 0 12px;
    font-weight: 700;
}
.links-apply h3::before { content: "💌 "; }
.links-apply p { color: var(--ink-soft); font-size: 14px; line-height: 1.8; max-width: 480px; margin: 0 auto; }

/* ============ 空状态 / 404 ============ */
.empty-state {
    text-align: center;
    padding: 70px 24px;
    color: var(--muted);
}
.empty-emoji {
    font-size: 56px;
    margin-bottom: 16px;
    display: inline-block;
    animation: gentle-wave 3s ease-in-out infinite;
}
@keyframes gentle-wave {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(8deg); }
}

/* ============ 页脚 ============ */
.site-foot {
    border-top: 2px dashed var(--line-strong);
    margin-top: 70px;
    padding: 32px 24px 50px;
    background: var(--bg);
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    position: relative;
}
.site-foot::before {
    content: "✦ ～ ✦ ～ ✦";
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    padding: 0 14px;
    color: var(--primary);
    font-size: 13px;
    letter-spacing: 0.4em;
}
.foot-friends {
    max-width: 720px;
    margin: 0 auto 20px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line-strong);
}
.foot-friends-label {
    display: block;
    margin-bottom: 10px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 13px;
}
.foot-friends-label::before { content: "🤝 "; }
.foot-friends-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
}
.foot-friends-list a {
    color: var(--ink-soft);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    border: 1px dashed transparent;
    font-size: 13px;
}
.foot-friends-list a:hover { color: var(--ink); border-color: var(--primary); background: var(--primary-fade); }
.foot-friends-more { font-size: 12px !important; color: var(--muted) !important; }
.foot-inner { max-width: 720px; margin: 0 auto; }
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--primary-hover); }
.foot-inner .sep { margin: 0 8px; color: var(--muted-light); }

/* ============ 广告位 ============ */
.ad-slot {
    margin: 32px 0;
    text-align: center;
    color: var(--muted-light);
    font-size: 12px;
}
.ad-slot:empty { display: none; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    body { background-size: 60px 60px, 100px 100px; }
    .nav-inner { padding: 12px 18px; gap: 12px; flex-wrap: wrap; }
    .brand { font-size: 22px; }
    .nav-links { font-size: 13px; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
    .nav-links a { padding: 5px 10px; font-size: 12px; }
    .hero { padding: 50px 18px 40px; }
    .hero-title { font-size: 32px; }
    .hero-cats { gap: 10px; }
    .hero-cat { padding: 10px 14px; min-width: 76px; }
    .hero-cat-emoji { font-size: 24px; }
    .layout-index, .layout-article { padding: 36px 18px 56px; }
    .post-card { padding: 16px 18px; }
    .post-card-title { font-size: 17px; }
    .post-body { font-size: 16px; }
    .post-body h2 { font-size: 21px; margin: 36px 0 18px; }
    .cat-previews { gap: 18px; grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; gap: 12px; }
    .post-nav-card.right { text-align: left; align-items: flex-start; }
    .section-title { flex-wrap: wrap; gap: 8px; }
}
