/* ==========================================================================
   个人网站 · 前台样式
   简约 · 大方 · 高级 · 移动端优先（Mobile First）
   ========================================================================== */

:root {
    --bg: #f6f8f9;
    --surface: #ffffff;
    --ink: #20242a;
    --ink-soft: #4b5560;
    --muted: #8b97a5;
    --line: #e6eaee;
    --line-strong: #d5dce1;
    --accent: #5b7a94;
    --accent-strong: #46637c;
    --accent-soft: rgba(91, 122, 148, 0.09);
    --radius: 6px;
    --font-body: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-head: "Noto Serif SC", "Songti SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
    --header-h: 60px;
    --container: 1120px;
    --content-w: 720px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: 600; line-height: 1.35; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   头部导航
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(246, 248, 249, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
}
.brand {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.brand::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.9;
}
.brand:hover { color: var(--accent); }

.site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(32, 36, 42, 0.25);
    padding: 8px 20px 14px;
    gap: 2px;
}
.site-nav.open { display: flex; }
.site-nav a {
    display: block;
    padding: 10px 4px;
    font-size: 15px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); font-weight: 600; }
.site-nav .nav-admin {
    color: var(--accent);
    font-size: 13px;
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink-soft);
    transition: color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { color: var(--ink); background: var(--accent-soft); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 30px;
        background: none;
        margin-left: auto;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .site-nav a {
        padding: 0;
        font-size: 15px;
        border: 0;
        position: relative;
    }
    .site-nav a::after {
        content: "";
        display: block;
        height: 2px;
        width: 100%;
        margin-top: 4px;
        background: var(--accent);
        border-radius: 2px;
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .site-nav a:hover::after,
    .site-nav a.active::after { transform: scaleX(1); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: 84px 0 64px;
    text-align: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero::before {
    content: "";
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 760px;
    height: 520px;
    background: radial-gradient(closest-side, rgba(91, 122, 148, 0.13), transparent 72%);
    filter: blur(6px);
    z-index: -1;
    pointer-events: none;
}
.hero-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 28px;
    box-shadow: 0 0 0 4px var(--surface), 0 10px 28px -10px rgba(32, 36, 42, 0.32);
}
.hero-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 12px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
    content: "";
    display: block;
    width: 34px;
    height: 1px;
    background: var(--accent);
    opacity: 0.55;
}
.hero-eyebrow::after { transform: scaleX(-1); }
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(32px, 6.5vw, 56px);
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.32;
    margin-bottom: 20px;
}
.hero-subtitle {
    max-width: 560px;
    margin: 0 auto;
    font-size: clamp(15px, 2.5vw, 17px);
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.hero-sub {
    max-width: 560px;
    margin: 0 auto;
    font-size: 15px;
    letter-spacing: 0.03em;
    color: var(--ink-soft);
}
/* ==========================================================================
   通用区块
   ========================================================================== */
.section { padding: 48px 0; }
.section-photo { background: var(--surface); border-top: 1px solid var(--line); }
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.section-title {
    font-size: clamp(22px, 4vw, 28px);
    letter-spacing: 0.03em;
}
.section-title::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 2px;
    background: var(--accent);
    margin-right: 12px;
    vertical-align: middle;
}
.section-more {
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.2s;
}
.section-more:hover { color: var(--accent); }

.page-hero {
    padding: 56px 0 32px;
    border-bottom: 1px solid var(--line);
}
.page-title {
    font-size: clamp(26px, 5vw, 38px);
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.page-title::before {
    content: "";
    display: inline-block;
    width: 26px;
    height: 2px;
    background: var(--accent);
    margin-right: 14px;
    vertical-align: middle;
    border-radius: 1px;
}
.page-desc { color: var(--ink-soft); }
.page-desc.muted { color: var(--muted); font-size: 14px; }

/* 文章搜索框：左对齐页头下贴左 */
.page-hero .search-form {
    margin: 22px 0 0;
}

.empty {
    padding: 56px 0;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9;
}
.empty-art {
    margin: 0 auto 20px;
    color: var(--accent);
    opacity: 0.55;
}

/* ---------- 文章列表 ---------- */
.article-list {
    max-width: 720px;
    margin: 0 auto;
}
.article-row {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}
.article-row:last-child { border-bottom: 0; }
.article-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.article-row-main { display: block; }
.article-row-title {
    font-size: clamp(19px, 3.4vw, 23px);
    /* 雾蓝下划线生长动画 */
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: color 0.2s ease, background-size 0.35s ease;
    padding-bottom: 2px;
}
.article-row:hover .article-row-title {
    color: var(--accent);
    background-size: 100% 2px;
}
.article-row-cover {
    flex-shrink: 0;
    width: 150px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eaf1f6;
}
.article-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}
.article-row:hover .article-row-cover img { transform: scale(1.05); }
.article-row-cover-wide {
    width: 240px;
    aspect-ratio: 16 / 9;
}
@media (max-width: 560px) {
    .article-row-cover { width: 112px; }
    .article-row-cover-wide { width: 168px; }
}
.top-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 2px 9px;
    margin-right: 8px;
    vertical-align: 2px;
}
.article-row-excerpt {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.article-row:hover .article-row-excerpt { color: var(--ink); }
.article-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.article-row-meta time { letter-spacing: 0.04em; }
.dot { opacity: 0.6; }
.meta-tag { color: var(--accent); }
.meta-tag:hover { text-decoration: underline; }

/* ---------- 搜索 ---------- */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 24px auto 0;
}
.search-form input {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-form button {
    padding: 11px 22px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}
.search-form button:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* ==========================================================================
   相册网格
   ========================================================================== */
.album-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.album-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(32, 36, 42, 0.03), 0 10px 26px -22px rgba(32, 36, 42, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.album-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eaf1f6;
}
.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-cover-empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8eff5, #dfe7ef);
}
.album-card-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
}
.album-card-title {
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.album-card-count {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}
.album-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 122, 148, 0.45);
    box-shadow: 0 20px 40px -24px rgba(32, 36, 42, 0.35);
}

/* ---------- 相册轮播 ---------- */
.carousel { position: relative; }
.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: auto; /* rAF 缓动完全接管，避免原生 smooth / snap 干扰动画 */
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .album-card {
    flex: 0 0 100%;
    margin-bottom: 0;
}
.carousel-btn {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 2;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: rgba(24, 28, 32, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.carousel-btn:hover {
    background: rgba(24, 28, 32, 0.8);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}
.carousel-btn svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.carousel-btn.prev { left: -20px; }
.carousel-btn.next { right: -20px; }
@media (min-width: 480px) {
    .carousel-track .album-card { flex-basis: calc(50% - 12px); }
}
@media (min-width: 900px) {
    .carousel-track .album-card { flex-basis: calc(33.333% - 16px); }
}

/* ---------- 画廊 ---------- */
.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.gallery-item { overflow: hidden; border-radius: var(--radius); background: #eaf1f6; }
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 4 / 3;
    transition: transform 0.4s ease;
    cursor: zoom-in;
}
.gallery-item:hover img { transform: scale(1.03); }

@media (min-width: 480px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (min-width: 900px) {
    .album-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* ==========================================================================
   文章详情
   ========================================================================== */
.post { padding: 48px 0 64px; }
.post-wrap { max-width: var(--content-w); }
.post-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}
.post-meta time { letter-spacing: 0.04em; }
.post-title { font-size: clamp(26px, 5vw, 38px); letter-spacing: 0.04em; line-height: 1.4; }
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.post-tags a {
    font-size: 13px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    padding: 4px 12px;
    border-radius: 999px;
}
.post-tags a:hover { background: rgba(91, 122, 148, 0.16); }

.post-body-wrap { display: block; }

.post-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.post-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color 0.2s;
}
.post-nav span { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.post-nav:hover { border-color: var(--accent); }
.post-nav.disabled { color: var(--muted); opacity: 0.7; cursor: default; }

@media (min-width: 900px) {
    .post-foot { grid-template-columns: 1fr 1fr; }
    .post-nav.next { text-align: right; }
}

/* 目录：桌面端侧栏 */
.post-toc {
    display: none;
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
    padding: 0 0 0 20px;
    border-left: 1px solid var(--line);
    font-size: 13px;
    min-width: 190px;
    max-width: 220px;
}
.toc-title {
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 12px;
}
.post-toc nav { display: flex; flex-direction: column; gap: 8px; }
.toc-link { color: var(--ink-soft); line-height: 1.5; }
.toc-link:hover { color: var(--accent); }
.toc-link.active { color: var(--accent); font-weight: 500; }
.toc-l3 { padding-left: 14px; }
.toc-l4 { padding-left: 28px; }

@media (min-width: 1180px) {
    .post-body-wrap { display: flex; gap: 48px; }
    .post-body { flex: 1; min-width: 0; }
    .post-toc { display: block; }
}

/* ==========================================================================
   Markdown 正文
   ========================================================================== */
.markdown-body { color: var(--ink); font-size: 16px; line-height: 1.85; }
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 2em 0 0.8em;
    letter-spacing: 0.02em;
    scroll-margin-top: calc(var(--header-h) + 16px);
}
.markdown-body h1 { font-size: 1.7em; }
.markdown-body h2 { font-size: 1.4em; padding-bottom: 0.4em; border-bottom: 1px solid var(--line); }
.markdown-body h3 { font-size: 1.2em; }
.markdown-body h4 { font-size: 1.05em; }
.markdown-body p { margin: 1.1em 0; }
.markdown-body a {
    color: var(--accent-strong);
    border-bottom: 1px solid rgba(91, 122, 148, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.markdown-body a:hover { color: var(--accent); border-color: var(--accent); }
.markdown-body strong { font-weight: 600; }
.markdown-body blockquote {
    margin: 1.4em 0;
    padding: 12px 18px;
    border-left: 3px solid var(--accent-strong);
    color: var(--ink-soft);
    background: rgba(91, 122, 148, 0.12);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.markdown-body ul, .markdown-body ol { margin: 1.1em 0; padding-left: 1.5em; }
.markdown-body li { margin: 0.4em 0; }
.markdown-body li::marker { color: var(--accent); }
.markdown-body code {
    font-family: "SF Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
    background: rgba(32, 36, 42, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}
.markdown-body pre {
    margin: 1.4em 0;
    padding: 18px 20px;
    background: #20242a;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.markdown-body pre code {
    background: none;
    padding: 0;
    color: #dfe4e8;
    font-size: 0.88em;
}
.markdown-body img {
    border-radius: var(--radius);
    margin: 1.4em auto;
    box-shadow: 0 10px 30px -14px rgba(32, 36, 42, 0.35);
}
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.95em;
    overflow-x: auto;
    display: block;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}
.markdown-body th { background: var(--surface); font-weight: 600; }
.markdown-body tr:nth-child(even) td { background: rgba(32, 36, 42, 0.02); }
.markdown-body hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 2.4em 0;
}
.markdown-body .heading-permalink {
    color: var(--line-strong);
    margin-left: 6px;
    font-weight: 400;
    border: 0;
}
.markdown-body .heading-permalink:hover { color: var(--accent); }

.simple-body { max-width: var(--content-w); margin: 0 auto; }

/* ==========================================================================
   归档
   ========================================================================== */
.archive-month { margin-bottom: 40px; }
.archive-month-title {
    font-size: 18px;
    color: var(--accent-strong);
    margin-bottom: 14px;
    letter-spacing: 0.06em;
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 12px 10px;
    margin: 0 -10px;
    border-bottom: 1px dashed var(--line);
    border-radius: var(--radius);
    transition: background 0.2s, border-color 0.2s;
}
.archive-list li:hover {
    background: var(--accent-soft);
    border-bottom-color: var(--line-strong);
}
.archive-list time {
    color: var(--muted);
    font-size: 14px;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    flex: 0 0 4.8em;
    white-space: nowrap;
}
.archive-list a { flex: 1; min-width: 0; }
.archive-list a:hover { color: var(--accent); }
.archive-cat {
    font-size: 12px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    border: 0;
    padding: 3px 10px;
    border-radius: 999px;
}

/* ==========================================================================
   分页
   ========================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 48px 0 8px;
}
.page-item {
    padding: 7px 14px;
    font-size: 14px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    transition: all 0.2s;
}
a.page-item:hover { border-color: var(--accent); color: var(--accent); }
.page-item.current {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--surface);
}
.page-item.disabled { opacity: 0.45; cursor: default; }
.page-item.dots { border: 0; background: none; }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
    margin-top: 72px;
    padding: 48px 0 40px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    text-align: center;
}
.footer-brand {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
}
.footer-brand::after {
    content: "";
    width: 5px;
    height: 5px;
    margin-left: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.9;
}
.footer-text { color: var(--ink-soft); font-size: 14px; }
.footer-meta { color: var(--muted); font-size: 12px; margin-top: 14px; letter-spacing: 0.04em; }
.footer-icp {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.02em;
}
.footer-icp a { color: inherit; }
.footer-icp a:hover { color: var(--accent); }
.footer-police-icon { flex-shrink: 0; }
.footer-sep { opacity: 0.55; margin: 0 2px; }

/* ==========================================================================
   页面入场淡入
   ========================================================================== */
main { animation: page-fade 0.45s ease both; }
@keyframes page-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   无障碍 & 选区
   ========================================================================== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
::selection {
    background: rgba(91, 122, 148, 0.22);
    color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   滚动入场 & 图片淡入
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

img.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img.fade-in.loaded { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .reveal, img.fade-in { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   声光片刻
   ========================================================================== */
.section-moments { background: var(--surface); border-top: 1px solid var(--line); }

.moment-flows {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 760px;
    margin: 0 auto;
}
.moment-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 1px 2px rgba(32, 36, 42, 0.03), 0 10px 26px -22px rgba(32, 36, 42, 0.22);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.moment-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 16px 40px -22px rgba(32, 36, 42, 0.28);
}
.moment-cover {
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    background: #eaf1f6;
}
.moment-cover img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.moment-card:hover .moment-cover img {
    transform: scale(1.025);
}
.moment-body { display: flex; flex-direction: column; gap: 16px; }

.moment-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.moment-title {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.moment-time { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.moment-quote { position: relative; padding: 4px 6px; }
.moment-quote-mark {
    position: absolute;
    top: -12px;
    left: -2px;
    font-family: var(--font-head);
    font-size: 34px;
    line-height: 1;
    color: var(--accent);
    opacity: 0.22;
    pointer-events: none;
}
.moment-lyric {
    position: relative;
    font-family: var(--font-head);
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: var(--ink);
    white-space: pre-line;
}
.moment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.03em;
}
.moment-singer { color: var(--accent-strong); font-weight: 500; }
.moment-dot { opacity: 0.6; }
.moment-listen {
    align-self: flex-start;
    margin-top: 2px;
    font-size: 14px;
    color: var(--accent-strong);
    border-bottom: 1px solid rgba(91, 122, 148, 0.4);
    transition: color 0.2s, border-color 0.2s;
}
.moment-listen:hover { color: var(--accent); border-color: var(--accent); }

/* 首页横向排列（有图时图在右，图片按原始比例完整显示，宽图更大） */
.moment-home .moment-card { gap: 28px; }
@media (min-width: 640px) {
    .moment-home .moment-card.has-cover { flex-direction: row; align-items: center; }
    .moment-home .moment-card.has-cover .moment-cover {
        flex: 0 0 46%;
        width: 46%;
        align-self: center;
    }
    .moment-home .moment-card.has-cover .moment-body { flex: 1 1 54%; }
}

/* 片刻列表页：竖图（长图）改为横向排列，图在右、正文在左（与首页一致） */
@media (min-width: 640px) {
    .moment-card.is-portrait { flex-direction: row; align-items: center; }
    .moment-card.is-portrait .moment-cover { flex: 0 0 42%; order: 2; align-self: center; }
    .moment-card.is-portrait .moment-body { flex: 1 1 58%; order: 1; }
}

/* 片刻列表页：默认「图在上」的横图，铺满卡片宽度 */
.moment-flows .moment-card:not(.is-portrait) .moment-cover {
    width: 100%;
}

@media (min-width: 480px) {
    .moment-card { padding: 40px; }
}

/* ==========================================================================
   足迹地图
   ========================================================================== */
.map-wrap {
    position: relative;
    max-width: 820px;
    margin: 8px auto 0;
    padding: 20px 16px 10px;
    background: #fbfcfd;
    border: 1px solid #e4eaef;
    border-radius: calc(var(--radius) + 6px);
    box-shadow: 0 18px 44px -30px rgba(32, 36, 42, 0.18);
    user-select: none;
}
.china-map-svg {
    display: block;
    width: 100%;
    height: auto;
}
.china-map-svg .province {
    fill: #e9eef3;
    stroke: #b4c3d0;
    stroke-width: 0.9;
    stroke-linejoin: round;
    transition: fill 0.35s ease, stroke 0.35s ease, filter 0.35s ease;
}
.china-map-svg .province.is-lit {
    fill: #5b7a94;
    stroke: #d5e2ec;
    cursor: pointer;
    filter: drop-shadow(0 0 7px rgba(91, 122, 148, 0.5));
}
.china-map-svg .province.is-lit:hover {
    fill: #46637c;
    filter: drop-shadow(0 0 12px rgba(91, 122, 148, 0.7));
}

/* 悬停浮层 */
.map-tooltip {
    position: absolute;
    width: 220px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 20px 44px -22px rgba(32, 36, 42, 0.35);
    padding: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}
.map-tooltip.show { opacity: 1; transform: translateY(0); }
.map-tip-img {
    display: block;
    margin: 0 auto 8px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    background: #eaf1f6;
}
.map-tip-img.is-landscape { width: 100%; }
.map-tip-img.is-portrait { height: 200px; width: auto; }
.map-tip-city {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.03em;
}
.map-tip-count { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 图例 & 计数 */
.map-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 13px;
    color: var(--ink-soft);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bcc8d3;
    display: inline-block;
    margin-left: 8px;
}
.legend-dot:first-child { margin-left: 0; }
.legend-dot.legend-lit { background: #5b7a94; box-shadow: 0 0 8px rgba(91, 122, 148, 0.6); border: 1px solid #ffffff15; }
.map-count {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.03em;
}
.map-count b { color: var(--accent-strong); font-weight: 600; }

/* 省份详情模态 */
.map-modal-scrim {
    position: fixed;
    inset: 0;
    background: rgba(26, 32, 40, 0.46);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 120;
}
.map-modal-scrim.show { opacity: 1; pointer-events: auto; }
.map-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(680px, calc(100vw - 32px));
    max-height: min(82vh, 620px);
    overflow-y: auto;
    background: var(--surface);
    border-radius: calc(var(--radius) + 8px);
    box-shadow: 0 30px 70px -24px rgba(32, 36, 42, 0.5);
    padding: 30px 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 121;
}
.map-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.map-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink-soft);
    font-size: 21px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.map-modal-close:hover { background: var(--line); color: var(--ink); }
.map-modal-province {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-right: 40px;
    margin-bottom: 24px;
}
.map-modal-province::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--accent);
}
.map-modal-card { margin-bottom: 26px; }
.map-modal-card:last-child { margin-bottom: 0; }
.map-modal-card + .map-modal-card {
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.map-modal-imgs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
}
.map-modal-imgs img {
    display: block;
    flex: 0 0 auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: calc(var(--radius) + 2px);
    background: #eaf1f6;
    box-shadow: 0 8px 20px -12px rgba(32, 36, 42, 0.3);
    transition: transform 0.4s ease;
}
.map-modal-imgs img.is-landscape { width: auto; height: 300px; }
.map-modal-imgs img.is-portrait { width: min(320px, 100%); height: auto; }
.map-modal-imgs img:hover { transform: scale(1.02); }
.map-modal-info { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.map-modal-city {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--ink);
}
.map-modal-desc {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-soft);
}

body.modal-open { overflow: hidden; }

/* ==========================================================================
   夜读模式 · 暗色主题（data-theme="dark"）
   ========================================================================== */
[data-theme="dark"] {
    --bg: #14181f;
    --surface: #1c222b;
    --ink: #e6edf4;
    --ink-soft: #b6c2cf;
    --muted: #788594;
    --line: #26303b;
    --line-strong: #374451;
    --accent: #7fa1c0;
    --accent-strong: #9db9d2;
    --accent-soft: rgba(127, 161, 192, 0.12);
}
[data-theme="dark"] .site-header {
    background: rgba(20, 24, 31, 0.85);
}
[data-theme="dark"] .article-row-cover,
[data-theme="dark"] .album-cover,
[data-theme="dark"] .gallery-item,
[data-theme="dark"] .moment-card,
[data-theme="dark"] .map-tip-img,
[data-theme="dark"] .map-modal-imgs img {
    background: #232b36;
}
[data-theme="dark"] .album-cover-empty {
    background: linear-gradient(135deg, #232b36, #1d2530);
}
/* 足迹地图 · 暗色 */
[data-theme="dark"] .map-wrap {
    background: #1c222b;
    border-color: #2b3642;
}
[data-theme="dark"] .china-map-svg .province {
    fill: #2b3540;
    stroke: #46596a;
}
[data-theme="dark"] .china-map-svg .province.is-lit {
    fill: #7fa1c0;
    stroke: #3a4c5e;
    filter: drop-shadow(0 0 8px rgba(127, 161, 192, 0.55));
}
[data-theme="dark"] .china-map-svg .province.is-lit:hover {
    fill: #93b3cf;
    filter: drop-shadow(0 0 13px rgba(127, 161, 192, 0.7));
}
[data-theme="dark"] .map-legend .legend-dot { background: #46596a; }
[data-theme="dark"] .map-legend .legend-dot.legend-lit { background: #7fa1c0; box-shadow: 0 0 6px rgba(127, 161, 192, 0.55); }
/* Markdown：行内代码、表格斑马行、引用、链接适配暗色 */
[data-theme="dark"] .markdown-body code {
    background: rgba(230, 237, 244, 0.08);
}
[data-theme="dark"] .markdown-body tr:nth-child(even) td {
    background: rgba(230, 237, 244, 0.03);
}
[data-theme="dark"] .markdown-body blockquote {
    background: var(--accent-soft);
}
[data-theme="dark"] .markdown-body a {
    border-color: rgba(157, 185, 210, 0.4);
}
/* highlight.js：亮色主题在暗色代码块内的语法换色，保证可读 */
[data-theme="dark"] .markdown-body .hljs-comment,
[data-theme="dark"] .markdown-body .hljs-quote { color: #7a8796; }
[data-theme="dark"] .markdown-body .hljs-keyword,
[data-theme="dark"] .markdown-body .hljs-selector-tag,
[data-theme="dark"] .markdown-body .hljs-tag,
[data-theme="dark"] .markdown-body .hljs-name,
[data-theme="dark"] .markdown-body .hljs-built_in { color: #df8f5a; }
[data-theme="dark"] .markdown-body .hljs-string { color: #a5c98a; }
[data-theme="dark"] .markdown-body .hljs-number,
[data-theme="dark"] .markdown-body .hljs-literal { color: #d0a6e0; }
[data-theme="dark"] .markdown-body .hljs-title,
[data-theme="dark"] .markdown-body .hljs-function,
[data-theme="dark"] .markdown-body .hljs-title.class_ { color: #7fb2e0; }
[data-theme="dark"] .markdown-body .hljs-variable,
[data-theme="dark"] .markdown-body .hljs-attribute { color: #c9bc7f; }
[data-theme="dark"] .markdown-body .hljs-symbol,
[data-theme="dark"] .markdown-body .hljs-attr { color: #8fa6c0; }
[data-theme="dark"] .markdown-body .hljs-meta,
[data-theme="dark"] .markdown-body .hljs-selector-class { color: #9db9d2; }

/* ==========================================================================
   音乐模块
   ========================================================================== */
/* 栏目头（此刻，在听 / 有些话，等光路过） */
.band-head {
    margin-bottom: 22px;
}
.band-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.04em;
}
.band-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    margin-right: 10px;
    vertical-align: -2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0.85;
}
.band-sub {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

/* 音乐网格（声光片刻页 · 此刻，在听） */
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}
.music-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.music-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 16px 34px -26px rgba(32, 36, 42, 0.30);
}
.music-card-cover {
    aspect-ratio: 1 / 1;
    background: var(--line);
}
.music-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.music-card-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--muted);
    background: linear-gradient(135deg, var(--line), var(--surface));
}
.music-card-body {
    padding: 12px 14px 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.music-card-title {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-card-artist {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-card-ver {
    margin-top: 4px;
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 2px 8px;
    align-self: flex-start;
}
.band-empty {
    font-size: 14px;
    color: var(--muted);
}

/* 音乐详情页 */
.music-detail {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: start;
}
.music-cover {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
}
.music-cover img {
    width: 100%;
    display: block;
}
.music-cover-empty {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: var(--muted);
    background: linear-gradient(135deg, var(--line), var(--surface));
}
.music-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.music-meta {
    font-size: 14px;
    color: var(--ink-soft);
}
.music-artist {
    color: var(--accent-strong);
    font-weight: 600;
}
.music-meta-dot {
    margin: 0 8px;
    color: var(--muted);
}
.music-intro {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-soft);
}

/* 版本切换 */
.mv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mv-item {
    padding: 8px 16px;
    font-size: 13px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: all 0.2s ease;
}
.mv-item:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}
.mv-item.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.mv-name { vertical-align: middle; }
.mv-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 7px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.6;
}

/* 播放器 */
.music-player {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.music-playing {
    font-size: 13px;
    color: var(--muted);
}
.music-player audio {
    width: 100%;
}

/* 歌词区 */
.lyric-panel {
    margin-top: 44px;
    max-width: var(--content-w);
    margin-left: auto;
    margin-right: auto;
}
.lyric-head {
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.08em;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.lyric-version {
    color: var(--accent);
    font-weight: 600;
}
.lyric-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 520px;
    overflow-y: auto;
    padding: 6px 0;
    scroll-behavior: smooth;
}
.lyric-line {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--muted);
    padding: 3px 6px;
    border-radius: 4px;
    transition: color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.85;
}
.lyric-line.is-plain {
    color: var(--ink-soft);
    opacity: 1;
}
.lyric-line.is-active {
    color: var(--ink);
    opacity: 1;
    font-weight: 600;
    transform: translateX(4px);
}
.lyric-empty {
    font-size: 14px;
    color: var(--muted);
}

/* 音乐 · 详情页暗色 */
[data-theme="dark"] .music-card-cover-empty,
[data-theme="dark"] .music-cover-empty {
    background: linear-gradient(135deg, #232b36, #1d2530);
}
[data-theme="dark"] .mv-item.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0f141b;
}
[data-theme="dark"] .music-playing,
[data-theme="dark"] .lyric-line { color: #9fb0c0; }
[data-theme="dark"] .lyric-line.is-active { color: #e6edf4; }
[data-theme="dark"] .music-intro { color: #b6c2cf; }

/* 移动端：详情页单列 */
@media (max-width: 760px) {
    .music-detail {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
        gap: 14px;
    }
}
