/* ============================================================
   墨韵 moyun · 宣纸水墨古风主题
   为中文长文阅读而生 · 深/浅双色
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
    /* 宣纸 · 浅色 */
    --bg: #f5f0e3;
    --bg-elev: #faf6ec;
    --bg-alt: #ece4cf;
    --text: #2b2820;
    --text-strong: #1d1b15;
    --muted: #7d7563;
    --accent: #b03a26;
    --accent-deep: #932f1f;
    --accent-soft: rgba(176, 58, 38, 0.08);
    --line: #ded4bc;
    --link: #9c3a24;
    --shadow: 0 2px 10px rgba(74, 58, 32, 0.08), 0 10px 30px rgba(74, 58, 32, 0.07);
    --shadow-hover: 0 6px 18px rgba(74, 58, 32, 0.14), 0 16px 42px rgba(74, 58, 32, 0.12);
    --header-bg: rgba(245, 240, 227, 0.88);
    --code-bg: #2e2b25;
    --code-text: #e8e1cf;

    /* 字体 */
    --font-body: "Noto Serif SC", "Noto Serif TC", "Source Han Serif SC", "Source Han Serif TC", "Songti SC", "STSong", "STZhongsong", "SimSun", serif;
    --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "TW-Kai", "AR PL KaitiM GB", serif;

    /* 尺寸 */
    --header-h: 64px;
    --content-w: 46rem;
    --radius: 8px;
    --ease: cubic-bezier(0.25, 0.6, 0.25, 1);
}

[data-theme="dark"] {
    /* 墨夜 · 深色 */
    --bg: #1d1f24;
    --bg-elev: #24272e;
    --bg-alt: #2a2d35;
    --text: #dcd4c0;
    --text-strong: #ede5d0;
    --muted: #968e7a;
    --accent: #d4694f;
    --accent-deep: #e08a70;
    --accent-soft: rgba(212, 105, 79, 0.14);
    --line: #3b3e47;
    --link: #e08a70;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.42), 0 16px 42px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(29, 31, 36, 0.88);
    --code-bg: #15171b;
    --code-text: #ddd5c0;
}

/* ---------- 基础 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
    background-color: var(--bg);
    /* 宣纸细纹：极淡的纤维噪点，用多层渐变模拟 */
    background-image:
        radial-gradient(rgba(120, 96, 48, 0.035) 1px, transparent 1px),
        radial-gradient(rgba(120, 96, 48, 0.028) 1px, transparent 1px);
    background-size: 23px 23px, 41px 41px;
    background-position: 0 0, 11px 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

[data-theme="dark"] body {
    background-image:
        radial-gradient(rgba(230, 222, 196, 0.03) 1px, transparent 1px),
        radial-gradient(rgba(230, 222, 196, 0.022) 1px, transparent 1px);
}

::selection {
    background: var(--accent);
    color: #fff8ee;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--accent-deep);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    padding: 0;
}

svg {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.22em;
    fill: none;
}

.container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main {
    min-height: calc(100vh - var(--header-h) - 320px);
    padding-bottom: 4rem;
}

/* ---------- 祥云分隔 ---------- */
.cloud-divider {
    height: 26px;
    margin: 0 auto;
    max-width: 16rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cg fill='none' stroke='%23a84a36' stroke-width='1.4' stroke-linecap='round' opacity='0.5'%3E%3Cpath d='M6 13h46'/%3E%3Cpath d='M108 13h46'/%3E%3Cpath d='M80 5.5c4.2 0 7.5 3.3 7.5 7.5s-3.3 7.5-7.5 7.5-7.5-3.3-7.5-7.5 3-6.9 6.8-7.4'/%3E%3Cpath d='M80 9.5c2 0 3.5 1.6 3.5 3.5S82 16.5 80 16.5s-3.5-1.6-3.5-3.5 1.4-3.2 3.2-3.4'/%3E%3Cpath d='M68 13a5 5 0 0 1 5-5'/%3E%3Cpath d='M92 13a5 5 0 0 0-5-5'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* ---------- 页头 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s var(--ease);
}

.site-header::after {
    /* 页头下方的朱砂细线 */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
    opacity: 0.35;
    pointer-events: none;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 72rem;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-shrink: 0;
    color: var(--text-strong);
}

/* 印章 Logo */
.seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.75rem;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    color: #fdf6e9;
    font-family: var(--font-kai);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    writing-mode: vertical-rl;
    text-orientation: upright;
    border-radius: 5px;
    box-shadow:
        inset 0 0 0 1.5px rgba(253, 246, 233, 0.5),
        1px 2px 5px rgba(60, 30, 16, 0.25);
    transform: rotate(-1.5deg);
    user-select: none;
    transition: transform 0.25s var(--ease);
}

.brand:hover .seal {
    transform: rotate(1.5deg) scale(1.04);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-title {
    font-family: var(--font-kai);
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-strong);
}

.brand-desc {
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 15rem;
}

/* 主导航 */
.main-nav {
    margin-left: auto;
    min-width: 0;
}

.main-nav ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: block;
    padding: 0.42rem 0.55rem;
    font-size: 0.92rem;
    white-space: nowrap;
    color: var(--text);
    border-radius: 6px;
    position: relative;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.main-nav a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.main-nav a.active {
    color: var(--accent);
    font-weight: 700;
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.1rem;
    width: 1.1rem;
    height: 2px;
    transform: translateX(-50%);
    background: var(--accent);
    border-radius: 2px;
}

/* 页头操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.header-actions button,
.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
    border-radius: 6px;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.header-actions button:hover,
.lang-switch:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.lang-switch span {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* 日/月图标随主题切换 */
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

#nav-toggle {
    display: none;
}

/* ---------- 首页 Hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: 3.6rem 1rem 2.6rem;
}

.hero .seal {
    width: 4.4rem;
    height: 4.9rem;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    box-shadow:
        inset 0 0 0 2px rgba(253, 246, 233, 0.5),
        2px 4px 12px rgba(60, 30, 16, 0.28);
}

.hero-title {
    margin: 0;
    font-family: var(--font-kai);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.32em;
    text-indent: 0.32em; /* 补偿末字间距，视觉居中 */
    color: var(--text-strong);
}

.hero-sub {
    margin: 0.9rem auto 0;
    max-width: 34rem;
    font-family: var(--font-kai);
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    color: var(--muted);
}

/* 竖排装饰联句 */
.hero-vertical {
    position: absolute;
    top: 3.4rem;
    display: flex;
    gap: 0.7rem;
    font-family: var(--font-kai);
    font-size: 1.05rem;
    letter-spacing: 0.35em;
    color: var(--muted);
    opacity: 0.75;
    writing-mode: vertical-rl;
    text-orientation: upright;
    user-select: none;
    pointer-events: none;
}

.hero-vertical.v-left {
    left: 2.5rem;
}

.hero-vertical.v-right {
    right: 2.5rem;
}

.hero-vertical::before {
    content: "";
    width: 1px;
    height: 2.2rem;
    margin: 0 auto 0.9rem;
    background: linear-gradient(to bottom, transparent, var(--muted));
}

/* 首页寄语（homeContent） */
.home-intro {
    position: relative;
    max-width: var(--content-w);
    margin: 1.4rem auto 0;
    padding: 1.6rem 2rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.97rem;
    text-align: justify;
}

.home-intro::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.2rem;
    bottom: 1.2rem;
    width: 3px;
    border-radius: 3px;
    background: var(--accent);
    opacity: 0.75;
}

.home-intro ul {
    margin: 0;
    padding-left: 1.3rem;
}

.home-intro li + li {
    margin-top: 0.8rem;
}

.home-intro strong {
    color: var(--accent);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: var(--content-w);
    margin: 3.2rem auto 1.6rem;
    font-family: var(--font-kai);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-strong);
}

.section-title::before,
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.section-title .seal-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    background: var(--accent);
    color: #fdf6e9;
    font-size: 0.95rem;
    border-radius: 4px;
    letter-spacing: 0;
    box-shadow: inset 0 0 0 1px rgba(253, 246, 233, 0.5);
}

/* ---------- 文章列表 ---------- */
.post-list {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.post-item {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.post-item-link {
    display: block;
    padding: 1.5rem 1.8rem 1.3rem;
    color: inherit;
}

.post-item-link:hover {
    color: inherit;
}

.post-item-title {
    margin: 0 0 0.55rem;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-strong);
    transition: color 0.2s var(--ease);
}

.post-item:hover .post-item-title {
    color: var(--accent);
}

.post-item-meta,
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.1rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.post-item-meta span,
.post-meta span,
.post-meta a {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.post-meta a {
    color: var(--muted);
}

.post-meta a:hover {
    color: var(--accent);
}

.post-item-summary {
    margin: 0.75rem 0 0;
    font-size: 0.93rem;
    line-height: 1.85;
    color: var(--text);
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    font-family: var(--font-kai);
    letter-spacing: 0.1em;
    color: var(--accent);
}

.read-more svg {
    transition: transform 0.2s var(--ease);
}

.post-item:hover .read-more svg {
    transform: translateX(4px);
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin: 3rem auto 0;
    max-width: var(--content-w);
    flex-wrap: wrap;
}

.pagination a,
.pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.3rem;
    height: 2.3rem;
    padding: 0 0.6rem;
    font-size: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-elev);
    color: var(--text);
    transition: all 0.2s var(--ease);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.pagination span.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fdf6e9;
    font-weight: 700;
}

.pagination span.dots {
    border: none;
    background: none;
    color: var(--muted);
}

/* ---------- 简繁切换开关（单页标题下） ---------- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    background: var(--bg-elev);
}

.lang-toggle .lt-current,
.lang-toggle a {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 1rem;
    color: var(--muted);
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.lang-toggle .lt-current {
    background: var(--accent);
    color: #fdf6e9;
    font-weight: 700;
}

.lang-toggle a:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    max-width: var(--content-w);
    margin: 1.6rem auto 0;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.4rem;
    opacity: 0.5;
}

.breadcrumbs li[aria-current] {
    color: var(--text);
}

/* ---------- 页面标题（列表/栏目页） ---------- */
.page-header {
    max-width: var(--content-w);
    margin: 2.8rem auto 2.2rem;
    text-align: center;
}

.page-header h1 {
    margin: 0;
    font-family: var(--font-kai);
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.24em;
    text-indent: 0.24em;
    color: var(--text-strong);
}

.page-header .page-desc {
    margin: 0.8rem auto 0;
    max-width: 36rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.page-header .cloud-divider {
    margin-top: 1.4rem;
}

.page-header .rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.page-header .rss-link:hover {
    color: var(--accent);
}

/* ---------- 文章页 ---------- */
.post {
    max-width: var(--content-w);
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin: 2.4rem 0 0;
}

.post-header h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4.5vw, 2.15rem);
    font-weight: 700;
    line-height: 1.55;
    letter-spacing: 0.04em;
    color: var(--text-strong);
}

.post-header .post-meta {
    justify-content: center;
    margin-top: 1rem;
}

.post-header .cloud-divider {
    margin-top: 1.8rem;
}

.post-description {
    margin: 1.4rem 0 0;
    padding: 1rem 1.4rem;
    font-family: var(--font-kai);
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--muted);
    background: var(--bg-alt);
    border-radius: var(--radius);
    text-align: justify;
}

/* 正文排版 —— 阅读体验核心 */
.post-content {
    margin-top: 2.2rem;
    font-size: 1.06rem;
    line-height: 1.95;
    letter-spacing: 0.015em;
    text-align: justify;
    overflow-wrap: break-word;
}

.post-content > p {
    margin: 1.35em 0;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-strong);
    scroll-margin-top: calc(var(--header-h) + 1rem);
}

.post-content h2 {
    position: relative;
    margin: 2.4em 0 1em;
    padding-left: 0.85em;
    font-size: 1.42rem;
}

.post-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.28em;
    bottom: 0.28em;
    width: 4px;
    border-radius: 4px;
    background: var(--accent);
}

.post-content h3 {
    margin: 2em 0 0.9em;
    font-size: 1.22rem;
}

.post-content h3::before {
    content: "❖";
    margin-right: 0.45em;
    font-size: 0.85em;
    color: var(--accent);
}

.post-content h4 {
    margin: 1.8em 0 0.8em;
    font-size: 1.1rem;
}

.post-content h5,
.post-content h6 {
    margin: 1.6em 0 0.7em;
    font-size: 1rem;
    color: var(--muted);
}

.post-content a {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    text-decoration-skip-ink: auto;
}

.post-content a:hover {
    background: var(--accent-soft);
}

.post-content strong {
    color: var(--text-strong);
    font-weight: 700;
}

.post-content blockquote {
    margin: 1.8em 0;
    padding: 1.2em 1.5em;
    font-family: var(--font-kai);
    font-size: 0.98em;
    color: var(--text);
    background: var(--bg-alt);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p {
    margin: 0.6em 0;
}

.post-content blockquote p:first-child {
    margin-top: 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content ul,
.post-content ol {
    margin: 1.3em 0;
    padding-left: 1.6em;
}

.post-content li + li {
    margin-top: 0.45em;
}

.post-content li::marker {
    color: var(--accent);
}

.post-content hr {
    border: none;
    height: 26px;
    margin: 2.6em auto;
    max-width: 16rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26' viewBox='0 0 160 26'%3E%3Cg fill='none' stroke='%23a84a36' stroke-width='1.4' stroke-linecap='round' opacity='0.5'%3E%3Cpath d='M6 13h46'/%3E%3Cpath d='M108 13h46'/%3E%3Cpath d='M80 5.5c4.2 0 7.5 3.3 7.5 7.5s-3.3 7.5-7.5 7.5-7.5-3.3-7.5-7.5 3-6.9 6.8-7.4'/%3E%3Cpath d='M80 9.5c2 0 3.5 1.6 3.5 3.5S82 16.5 80 16.5s-3.5-1.6-3.5-3.5 1.4-3.2 3.2-3.4'/%3E%3Cpath d='M68 13a5 5 0 0 1 5-5'/%3E%3Cpath d='M92 13a5 5 0 0 0-5-5'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.post-content img {
    margin: 1.6em auto;
    box-shadow: var(--shadow);
}

.post-content figure {
    margin: 1.8em 0;
}

.post-content figcaption {
    margin-top: 0.6em;
    text-align: center;
    font-size: 0.85em;
    color: var(--muted);
}

.post-content code {
    font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
    font-size: 0.86em;
    padding: 0.15em 0.4em;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.post-content pre {
    margin: 1.6em 0;
    padding: 1.1em 1.3em;
    background: var(--code-bg);
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.7;
}

.post-content pre code {
    padding: 0;
    background: none;
    border: none;
    color: var(--code-text);
    font-size: 0.88rem;
}

.post-content table {
    width: 100%;
    margin: 1.8em 0;
    border-collapse: collapse;
    font-size: 0.92em;
    display: block;
    overflow-x: auto;
}

.post-content th,
.post-content td {
    padding: 0.6em 0.9em;
    border: 1px solid var(--line);
    text-align: left;
}

.post-content th {
    background: var(--bg-alt);
    font-weight: 700;
}

.post-content sup {
    font-size: 0.75em;
}

/* 脚注 */
.post-content .footnotes {
    margin-top: 3em;
    padding-top: 1.2em;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- 标签 / 分享 / 上下篇 ---------- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.8rem;
}

.post-tags a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: all 0.2s var(--ease);
}

.post-tags a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

.share-buttons a,
.share-buttons button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: all 0.2s var(--ease);
}

.share-buttons a:hover,
.share-buttons button:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.post-weixin {
    margin-top: 2rem;
    text-align: center;
}

.post-weixin img {
    max-width: 320px;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.8rem;
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.3rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all 0.25s var(--ease);
    min-width: 0;
}

.post-nav a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.post-nav .nav-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-family: var(--font-kai);
    letter-spacing: 0.12em;
    color: var(--accent);
}

.post-nav .nav-title {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-nav .next {
    text-align: right;
    align-items: flex-end;
}

/* ---------- 归档页 ---------- */
.archives {
    max-width: var(--content-w);
    margin: 0 auto;
}

.archive-year {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin: 2.6rem 0 1rem;
    font-family: var(--font-kai);
}

.archive-year h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.archive-year .count {
    font-size: 0.82rem;
    color: var(--muted);
}

.archive-year::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.archive-group {
    display: flex;
    flex-direction: column;
}

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px dashed var(--line);
    transition: background-color 0.2s var(--ease);
}

.archive-item:hover {
    background: var(--accent-soft);
    border-radius: 4px;
}

.archive-item time {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.archive-item a {
    color: var(--text);
    line-height: 1.6;
}

.archive-item a:hover {
    color: var(--accent);
}

/* ---------- 分类/标签聚合页 ---------- */
.terms-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    max-width: var(--content-w);
    margin: 2.5rem auto;
}

.terms-cloud a {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    transition: all 0.22s var(--ease);
}

.terms-cloud a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.terms-cloud a .name {
    font-family: var(--font-kai);
    letter-spacing: 0.06em;
}

.terms-cloud a .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    color: #fdf6e9;
    background: var(--accent);
    border-radius: 999px;
}

/* ---------- 搜索页 ---------- */
.search-box {
    position: relative;
    max-width: var(--content-w);
    margin: 0 auto 2rem;
}

.search-box svg {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.15rem;
    height: 1.15rem;
    color: var(--muted);
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 0.95rem 1.2rem 0.95rem 3rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
}

#searchInput::placeholder {
    color: var(--muted);
}

.search-status {
    max-width: var(--content-w);
    margin: 0 auto 1.2rem;
    font-size: 0.85rem;
    color: var(--muted);
    min-height: 1.4em;
}

#searchResults {
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#searchResults li {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: all 0.2s var(--ease);
}

#searchResults li:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

#searchResults a {
    display: block;
    padding: 1.1rem 1.4rem;
    color: inherit;
}

#searchResults .sr-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-strong);
}

#searchResults .sr-summary {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#searchResults mark {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0 0.1em;
    border-radius: 2px;
}

/* ---------- 404 ---------- */
.not-found {
    text-align: center;
    padding: 5rem 1rem;
}

.not-found .code {
    font-family: var(--font-kai);
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    letter-spacing: 0.1em;
}

.not-found p {
    margin: 1.2rem 0 2rem;
    font-family: var(--font-kai);
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--muted);
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.6rem;
    font-size: 0.92rem;
    color: #fdf6e9;
    background: var(--accent);
    border-radius: 6px;
    transition: all 0.2s var(--ease);
}

.back-home:hover {
    color: #fdf6e9;
    background: var(--accent-deep);
    transform: translateY(-2px);
}

/* ---------- 站点说明（prompt） ---------- */
.site-prompt {
    max-width: var(--content-w);
    margin: 3.5rem auto 0;
    padding-top: 1.4rem;
    border-top: 1px dashed var(--line);
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--muted);
    text-align: center;
}

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 0rem;
}

.site-footer .cloud-divider {
    margin-bottom: 2rem;
}

.footer-inner {
    text-align: center;
    padding-bottom: 2.6rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-links p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.footer-contact a {
    color: var(--muted);
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-copy {
    margin-bottom: 0.4rem;
}

.footer-copy a {
    color: var(--text);
    font-weight: 700;
}

.footer-power {
    font-size: 0.72rem;
    opacity: 0.75;
}

.footer-power a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- 回到顶部 ---------- */
#to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.6rem;
    z-index: 90;
    width: 2.6rem;
    height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--ease);
}

#to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#to-top:hover {
    color: #fdf6e9;
    background: var(--accent);
    border-color: var(--accent);
}

/* ---------- 空列表提示 ---------- */
.empty-hint {
    text-align: center;
    padding: 3rem 1rem;
    font-family: var(--font-kai);
    letter-spacing: 0.1em;
    color: var(--muted);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .hero-vertical {
        display: none;
    }
}

@media (max-width: 1020px) {
    .brand-desc {
        display: none;
    }
}

@media (max-width: 920px) {
    #nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        margin: 0;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-hover);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s var(--ease);
    }

    body.nav-open .main-nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.6rem;
        max-height: calc(100vh - var(--header-h) - 1rem);
        overflow-y: auto;
    }

    .main-nav a {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .main-nav a.active::after {
        left: 0.35rem;
        bottom: 50%;
        transform: translateY(50%);
        width: 3px;
        height: 1.1rem;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .hero {
        padding: 2.4rem 0.5rem 1.8rem;
    }

    .hero .seal {
        width: 3.6rem;
        height: 4rem;
        font-size: 1.1rem;
    }

    .home-intro {
        padding: 1.2rem 1.3rem;
    }

    .post-item-link {
        padding: 1.2rem 1.2rem 1rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav .next {
        text-align: left;
        align-items: flex-start;
    }

    .archive-item {
        gap: 0.7rem;
    }

    .lang-switch span {
        display: none;
    }

    #to-top {
        right: 1rem;
        bottom: 1.2rem;
    }
}
