/* Mofang v1.7.0 — 星度式设计（THYUU/XingDu 风格还原，代码原创）
   令牌体系：HSL 双色（主色/辅助色）、16px 圆角、极轻阴影、5% 透明描边 */

/* ---------- 设计令牌 ---------- */
:root {
    --mf-main-h: 215deg;
    --main-color: var(--mf-main-h) 75% 55%;
    --subs-color: 20deg 75% 55%;
    --back: hsl(0 0% 98%);
    --card: hsl(0 0% 100%);
    --font: 220deg 15% 30%;
    --font-alpha: 1;
    --muted: 220deg 10% 55%;
    --line: hsl(var(--font) / 8%);
    --shadow: 0 0 1em hsl(0deg 0% 15% / 5%);
    --shadow-hover: 0 .2rem 1rem hsl(0deg 0% 15% / 12%);
    --radius: 16px;
    --head-h: 4rem;
    --content-w: 68rem;
    --card-w: 22.5rem;
    --edge: 1.5rem;
    --sans: 'MiSans', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --mono: 'SFMono-Regular', Consolas, Menlo, monospace;
    /* 动效令牌：统一时长与缓动，避免各处硬编码互相打架 */
    --ease-out: cubic-bezier(.22, .61, .36, 1);
    --ease-soft: cubic-bezier(.2, .7, .3, 1);
    --t-fast: .15s;
    --t-base: .25s;
    --t-slow: .5s;
}

html[data-theme="dark"] {
    --back: hsl(220 6% 7%);
    --card: hsl(220 5% 11%);
    --font: 219deg 14% 72%;
    --muted: 219deg 10% 48%;
    --line: hsl(var(--font) / 10%);
    --shadow: 0 0 1em hsl(0deg 0% 0% / 25%);
    --shadow-hover: 0 .2rem 1rem hsl(0deg 0% 0% / 35%);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --back: hsl(220 6% 7%);
        --card: hsl(220 5% 11%);
        --font: 219deg 14% 72%;
        --muted: 219deg 10% 48%;
        --line: hsl(var(--font) / 10%);
        --shadow: 0 0 1em hsl(0deg 0% 0% / 25%);
        --shadow-hover: 0 .2rem 1rem hsl(0deg 0% 0% / 35%);
    }
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--back);
    color: hsl(var(--font) / var(--font-alpha));
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.8;
    transition: background .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
a:hover { color: hsl(var(--main-color)); }
img { max-width: 100%; }
::selection { background: hsl(var(--main-color) / .25); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: hsl(var(--font) / 15%); border-radius: 4px; }

.wrap { max-width: calc(var(--content-w) + 22rem + 3rem); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- 全屏封面 ---------- */
.site-cover {
    position: relative;
    height: 100dvh;
    min-height: 34rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: hsl(230 25% 5%);
    color: hsl(0 0% 100%);
}
.cover-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-color: hsl(230 25% 5%);
}
.cover-bg:not([style]) {
    /* 内置星空：星点 + 星云光晕 + 行星弧线 */
    background-image:
        radial-gradient(1px 1px at 22% 18%, hsl(0 0% 100% / .9), transparent 100%),
        radial-gradient(1.5px 1.5px at 68% 8%, hsl(0 0% 100% / .7), transparent 100%),
        radial-gradient(1px 1px at 82% 30%, hsl(0 0% 100% / .8), transparent 100%),
        radial-gradient(1px 1px at 12% 42%, hsl(0 0% 100% / .6), transparent 100%),
        radial-gradient(2px 2px at 45% 22%, hsl(210 80% 85% / .8), transparent 100%),
        radial-gradient(1px 1px at 58% 38%, hsl(0 0% 100% / .5), transparent 100%),
        radial-gradient(1.5px 1.5px at 90% 55%, hsl(0 0% 100% / .6), transparent 100%),
        radial-gradient(1px 1px at 33% 55%, hsl(0 0% 100% / .4), transparent 100%),
        radial-gradient(1px 1px at 8% 12%, hsl(0 0% 100% / .7), transparent 100%),
        radial-gradient(1px 1px at 73% 47%, hsl(0 0% 100% / .5), transparent 100%),
        radial-gradient(1px 1px at 50% 5%, hsl(0 0% 100% / .6), transparent 100%),
        radial-gradient(1.2px 1.2px at 15% 70%, hsl(0 0% 100% / .4), transparent 100%),
        radial-gradient(ellipse 60% 35% at 75% 12%, hsl(var(--main-color) / .18), transparent 70%),
        radial-gradient(ellipse 45% 30% at 15% 8%, hsl(var(--subs-color) / .12), transparent 70%),
        radial-gradient(ellipse 160% 55% at 50% 132%, hsl(25 45% 32%) 0%, hsl(20 40% 14%) 42%, hsl(230 25% 5%) 68%);
}
.site-cover::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(hsl(230 25% 5% / .35), hsl(230 25% 5% / 0) 30%, hsl(230 25% 5% / 0) 62%, var(--back) 100%);
    pointer-events: none;
}
.cover-inner { position: relative; z-index: 2; text-align: center; padding: 0 1.5rem; }
.cover-greet {
    display: inline-flex; align-items: center; gap: .5em;
    padding: .45em 1.2em; margin: 0 0 1.6em;
    border-radius: 999px;
    background: hsl(0 0% 100% / .08);
    border: 1px solid hsl(0 0% 100% / .16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: .92rem;
    color: hsl(0 0% 100% / .92);
}
.cover-slogn {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    font-weight: 800;
    font-style: italic;
    letter-spacing: .08em;
    line-height: 1.2;
    text-shadow: 0 .04rem .2rem hsl(0 0 0 / 30%);
}
.cover-sub {
    margin: 1.1em 0 0;
    color: hsl(0 0% 100% / .68);
    font-size: 1.02rem;
    letter-spacing: .06em;
}
.cover-actions { margin-top: 2.2em; display: flex; gap: .9em; justify-content: center; flex-wrap: wrap; }
.cover-note {
    position: absolute; z-index: 2;
    left: 50%; bottom: 1.4rem; transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: .8em;
    padding: .55em 1.3em; white-space: nowrap;
    border-radius: 999px;
    /* 深色底：封面底部渐变到浅色，浅底白字此前几乎看不清 */
    background: hsl(230 25% 5% / .55);
    border: 1px solid hsl(0 0% 100% / .18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: .85rem;
    color: hsl(0 0% 100% / .92);
}
.cover-note:hover { color: hsl(0 0% 100%); border-color: hsl(0 0% 100% / .32); }
.cover-note-tag {
    font-size: .7rem; font-weight: 700; letter-spacing: .14em;
    color: hsl(var(--main-color));
}
.cover-note-arrow { animation: cover-bounce 1.6s infinite; }
@keyframes cover-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* ---------- 玻璃固定导航 ---------- */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 100;
    height: var(--head-h);
    transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: var(--back); /* color-mix 不支持时的回退 */
    background: color-mix(in srgb, var(--back) 78%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
}
.header-area {
    max-width: calc(var(--content-w) + 22rem + 3rem);
    height: 100%; margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 1.25em;
    font-size: .875rem;
}
.site-menu { display: flex; gap: .4em; flex-wrap: wrap; }
.site-menu a {
    padding: .3em .8em; border-radius: 999px;
    color: inherit; opacity: .82;
    transition: opacity .2s, background .2s;
}
.site-menu a:hover { opacity: 1; }
.site-menu a.active {
    opacity: 1; font-weight: 600;
    background: hsl(var(--main-color) / .14);
    color: hsl(var(--main-color));
}
/* 仅首页全屏封面之上（未滚动）导航文字用白色，内页保持深色 */
body.has-cover .site-header:not(.scrolled) { color: hsl(0 0% 100%); }
body.has-cover .site-header:not(.scrolled) .site-menu a.active {
    background: hsl(0 0% 100% / .14);
    color: hsl(0 0% 100%);
}
body.has-cover .site-header:not(.scrolled) .theme-toggle {
    background: hsl(0 0% 100% / .1);
    border-color: hsl(0 0% 100% / .25);
    color: hsl(0 0% 100%);
}
body.has-cover .site-header:not(.scrolled) .nav-search input {
    background: hsl(0 0% 100% / .1);
    border-color: hsl(0 0% 100% / .2);
    color: hsl(0 0% 100%);
}
.site-logo {
    font-size: 1.18rem; font-weight: 700; letter-spacing: .02em;
    white-space: nowrap;
}
.site-tools { display: flex; align-items: center; justify-content: flex-end; gap: .6em; }
.nav-search input {
    width: 8rem; height: 2.1rem; padding: 0 1em;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: inherit;
    font-family: inherit; font-size: .85rem; outline: none;
    transition: width .25s ease, border-color .2s;
}
.nav-search input:focus { width: 11rem; border-color: hsl(var(--main-color) / .5); }
.theme-toggle {
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    border: 1px solid var(--line); background: var(--card);
    color: inherit; font-size: .95rem; cursor: pointer;
    display: grid; place-items: center;
    transition: transform .2s ease, border-color .2s;
}
.theme-toggle:hover { transform: rotate(30deg); border-color: hsl(var(--main-color) / .5); }

/* ---------- 布局：内容 + 侧栏 ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: var(--edge);
    align-items: start;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}
.site-main { min-width: 0; }
.site-main.is-single { max-width: calc(var(--content-w) + 3rem); margin: 0 auto; width: 100%; }
.layout.no-side { grid-template-columns: minmax(0, 1fr); max-width: calc(var(--content-w) + 3rem); margin: 0 auto; }

/* ---------- 区块标题 ---------- */
.section { margin-bottom: 3rem; }
.section-head {
    display: flex; align-items: baseline; gap: .75em;
    margin-bottom: 1.2rem;
}
.section-head h2 {
    margin: 0; font-size: 1.3rem; font-weight: 700;
    padding-left: .65em;
    border-left: 4px solid hsl(var(--main-color));
    line-height: 1.35;
}
.section-sub { color: hsl(var(--muted)); font-size: .85rem; }
.section-more { margin-left: auto; color: hsl(var(--muted)); font-size: .88rem; }
.section-more:hover { color: hsl(var(--main-color)); }

/* ---------- 通用卡片 ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- 瞬间流 ---------- */
.moment-list { display: flex; flex-direction: column; gap: 1rem; }
.moment {
    padding: 1.2rem 1.4rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.moment:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.moment-head { display: flex; align-items: center; gap: .7em; margin-bottom: .6rem; }
.moment-avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; }
.moment-author { font-weight: 600; font-size: .93rem; display: block; line-height: 1.35; }
.moment-time { color: hsl(var(--muted)); font-size: .8rem; }
.moment-content { font-size: .96rem; }
.moment-imgs { margin-top: .8rem; }

.img-grid { display: grid; gap: .4rem; }
.img-grid img {
    display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: calc(var(--radius) - 6px);
    cursor: zoom-in;
}
.img-grid.n1 img { aspect-ratio: auto; max-height: 24rem; width: auto; max-width: 100%; }
.img-grid.n2, .img-grid.n4 { grid-template-columns: 1fr 1fr; }
.img-grid.n3, .img-grid.n5, .img-grid.n6, .img-grid.n7, .img-grid.n8, .img-grid.n9 { grid-template-columns: 1fr 1fr 1fr; }

/* ---------- 焦点区 ---------- */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
    gap: 1.2rem;
}
.post-card {
    display: flex; flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-card.is-first { grid-column: span 2; }
.post-card-cover {
    display: block; position: relative;
    aspect-ratio: 16 / 9; overflow: hidden;
    background: hsl(var(--main-color) / .1);
}
.post-card.is-first .post-card-cover { aspect-ratio: 21 / 10; }
.cover-fallback {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, hsl(var(--main-color) / .25), transparent 60%),
        radial-gradient(ellipse 70% 60% at 85% 80%, hsl(var(--subs-color) / .22), transparent 60%),
        hsl(var(--main-color) / .08);
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card-cover img { transform: scale(1.05); }
.post-card-body { padding: 1rem 1.2rem .6rem; flex: 1; }
.post-card-body h3 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 600; line-height: 1.55; }
.post-card-body p { margin: 0; color: hsl(var(--muted)); font-size: .88rem; line-height: 1.7; }
.post-card-meta {
    padding: .7rem 1.2rem .9rem;
    color: hsl(var(--muted)); font-size: .82rem;
    display: flex; justify-content: space-between;
}
.heat { color: hsl(var(--main-color)); font-variant-numeric: tabular-nums; }

/* ---------- 分类色卡组 ---------- */
.cate-head h2 { border-left-color: hsl(var(--cate-hue, var(--main-color))); }
.cate-head.hue-1 { --cate-hue: 215deg 75% 55%; }
.cate-head.hue-2 { --cate-hue: 160deg 55% 45%; }
.cate-head.hue-3 { --cate-hue: 45deg 85% 50%; }
.cate-head.hue-4 { --cate-hue: 20deg 80% 55%; }
.cate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
}
.cate-item {
    display: flex; flex-direction: column; gap: .2em;
    padding: .9rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cate-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: hsl(var(--cate-hue, var(--main-color)) / .5);
    color: inherit;
}
.cate-item-title { font-weight: 600; font-size: .95rem; line-height: 1.5; }
.cate-item:hover .cate-item-title { color: hsl(var(--cate-hue, var(--main-color))); }
.cate-item-meta { color: hsl(var(--muted)); font-size: .8rem; }

/* ---------- 图文动态 ---------- */
.wall-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.wall-item {
    margin: 0; position: relative;
    aspect-ratio: 1; overflow: hidden;
    border-radius: var(--radius);
    background: hsl(var(--main-color) / .08);
    border: 1px solid var(--line);
}
.wall-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.wall-item:hover img { transform: scale(1.06); }
.wall-item figcaption {
    position: absolute; inset: auto 0 0;
    padding: 1.6em .8em .5em;
    background: linear-gradient(transparent, hsl(0 0 0 / .55));
    color: hsl(0 0% 100%); font-size: .78rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 周年 ---------- */
.anniversary {
    text-align: center; padding: 2.2rem 1.5rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
}
.anniv-num {
    margin: 0;
    font-size: 2.4rem; font-weight: 800;
    color: hsl(var(--main-color));
    font-variant-numeric: tabular-nums;
}
.anniv-num small { font-size: 1rem; font-weight: 400; color: hsl(var(--muted)); margin-left: .2em; }
.anniv-text { margin: 0; color: hsl(var(--muted)); font-size: .95rem; }

/* ---------- 侧栏 ---------- */
.side-area {
    position: sticky; top: calc(var(--head-h) + 1rem);
    display: flex; flex-direction: column; gap: 1.1rem;
    min-width: 0;
}
.side-block {
    padding: 1.1rem 1.25rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.side-block h3 {
    margin: 0 0 .8rem; font-size: .95rem; font-weight: 700;
    display: flex; align-items: center; gap: .5em;
}
.side-block h3::before {
    content: ""; width: .5em; height: .5em;
    border-radius: 50%; background: hsl(var(--main-color));
}
.side-avatar { width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover; margin-bottom: .6rem; }
/* v1.15：概览卡改为「头像 + 昵称/口头禅」居中的个人名片 */
.side-count { text-align: center; }
.side-count h3 { text-align: left; }
.side-profile {
    display: flex; align-items: center; justify-content: center; gap: .8rem;
    margin: .2rem 0 .95rem; text-align: left;
}
.side-count .side-avatar { flex-shrink: 0; margin-bottom: 0; width: 4.2rem; height: 4.2rem; }
.side-profile-text { min-width: 0; max-width: 100%; }
.side-name { margin: 0; font-size: 1.24rem; font-weight: 700; color: hsl(var(--font)); line-height: 1.3; overflow-wrap: anywhere; }
.side-bio { margin: .25rem 0 0; font-size: .85rem; color: hsl(var(--muted)); line-height: 1.5; overflow-wrap: anywhere; }
.side-count ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 1.2em; font-size: .88rem; color: hsl(var(--muted)); flex-wrap: wrap; }
.side-count ul li { white-space: nowrap; }
.side-count strong { color: hsl(var(--main-color)); font-weight: 700; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.side-list li { display: flex; align-items: baseline; gap: .5em; font-size: .88rem; }
.side-list a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-heat { color: hsl(var(--main-color)); font-size: .78rem; font-variant-numeric: tabular-nums; }
.side-cmt-author { font-weight: 600; font-size: .82rem; flex-shrink: 0; }
.side-cmt-text { color: hsl(var(--muted)); }
.side-cmt-author + .side-cmt-text { flex: 1; }
.side-tags { display: flex; flex-wrap: wrap; gap: .4em; }
.side-tags a {
    padding: .15em .8em; border-radius: 999px;
    background: hsl(var(--font) / 5%);
    font-size: .8rem; color: hsl(var(--font) / .75);
    transition: background .2s, color .2s;
}
.side-tags a:hover { background: hsl(var(--main-color) / .14); color: hsl(var(--main-color)); }
.side-empty { color: hsl(var(--muted)); font-size: .85rem; }

/* ---------- 文章列表 / 归档 ---------- */
.archive-head { text-align: center; margin: .5rem 0 2rem; }
.archive-head h1 {
    display: inline-block; margin: 0 0 .4rem;
    font-size: 1.7rem; font-weight: 700;
}
.archive-desc { color: hsl(var(--muted)); font-size: .9rem; margin: 0; }
.post-list { display: flex; flex-direction: column; gap: 1rem; }
.post-item {
    padding: 1.2rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.post-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.post-item-title { margin: 0 0 .4rem; font-size: 1.15rem; font-weight: 600; line-height: 1.5; }
.post-item-excerpt { margin: 0 0 .7rem; color: hsl(var(--muted)); font-size: .92rem; }
.post-item-meta {
    color: hsl(var(--muted)); font-size: .82rem;
    display: flex; align-items: center; gap: .4em; flex-wrap: wrap;
}

/* ---------- 文章页 ---------- */
.post {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.post-cover {
    position: relative;
    max-height: 26rem; overflow: hidden;
    background: hsl(var(--main-color) / .1);
}
.post-cover img { width: 100%; max-height: 26rem; object-fit: cover; }
.post-head { padding: 1.8rem 2.2rem 0; }
.post-title { font-size: 1.85rem; font-weight: 700; margin: 0 0 .7rem; line-height: 1.45; }
.post-meta { color: hsl(var(--muted)); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .45em; align-items: center; }
.post-content { padding: 1.4rem 2.2rem 2rem; }
.post-tags { padding: 0 2.2rem 1.6rem; display: flex; gap: .5em; flex-wrap: wrap; }
.post-tags a {
    font-size: .8rem; color: hsl(var(--font) / .75);
    padding: .1em .9em;
    border-radius: 999px;
    background: hsl(var(--font) / 5%);
    border: 1px solid transparent;
}
.post-tags a:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .4); }
/* 上下篇：通栏贴边（完整规则见文末 v1.13 区块） */

/* ---------- 正文排版 ---------- */
.markdown-body { line-height: 2; word-break: break-word; font-size: 1rem; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { font-weight: 700; margin: 1.7em 0 .7em; line-height: 1.5; }
.markdown-body h2 { font-size: 1.35rem; }
.markdown-body h3 { font-size: 1.18rem; }
.markdown-body p { margin: 0 0 1.1em; }
.markdown-body a:not(.btn) { color: hsl(var(--main-color)); }
.markdown-body a:not(.btn):hover { border-bottom: 1px solid hsl(var(--main-color) / .5); }
.markdown-body img { border-radius: var(--radius); }
.markdown-body blockquote {
    margin: 1.2em 0; padding: .9em 1.3em;
    border-left: 3px solid hsl(var(--main-color) / .7);
    background: hsl(var(--main-color) / .06);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: hsl(var(--font) / .8);
}
.markdown-body code { font-family: var(--mono); font-size: .87em; background: hsl(var(--font) / 6%); padding: .15em .45em; border-radius: 6px; }
.markdown-body pre { background: hsl(var(--font) / 4%); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; overflow-x: auto; }
.markdown-body pre code { background: none; padding: 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .92rem; }
.markdown-body th, .markdown-body td { border: 1px solid var(--line); padding: .5em .8em; }
.markdown-body th { background: hsl(var(--font) / 4%); }
.markdown-body ul li::marker { color: hsl(var(--main-color)); }

/* ---------- 评论 ---------- */
.comments {
    padding: 1.6rem 1.8rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.comments-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.2rem; }
.comments-head h2 { font-size: 1.2rem; font-weight: 700; margin: 0; display: flex; align-items: baseline; gap: .45em; }
.comments-head small {
    color: hsl(var(--main-color)); font-size: .78rem; font-weight: 600;
    background: hsl(var(--main-color) / .1); border-radius: 999px; padding: .05em .7em;
    font-variant-numeric: tabular-nums;
}
.comments-hint { margin-left: auto; color: hsl(var(--muted)); font-size: .78rem; }

.comment-list, .comment-children .comment-list { list-style: none; margin: 0; padding: 0; }
.comment-item { border-top: 1px solid var(--line); }
.comment-list > .comment-item:first-child { border-top: 0; }
.comment-item:first-child { border-top: 0; }
.comment-body {
    display: flex; gap: .85rem; align-items: flex-start;
    padding: .95rem .6rem; border-radius: 12px;
    transition: background .2s ease;
}
.comment-body:hover { background: hsl(var(--font) / 3%); }
.comment-avatar { flex-shrink: 0; }
.comment-avatar img {
    width: 2.6rem; height: 2.6rem; border-radius: 50%; display: block;
    border: 1px solid var(--line); background: var(--back);
}
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; margin-bottom: .3rem; }
.comment-name { font-weight: 600; font-size: .9rem; }
.comment-name a { color: inherit; }
.comment-name a:hover { color: hsl(var(--main-color)); }
.comment-badge {
    display: inline-flex; align-items: center; gap: .2em;
    font-size: .7rem; color: hsl(var(--main-color));
    background: hsl(var(--main-color) / .12);
    padding: .1em .65em; border-radius: 999px; font-weight: 600;
}
.comment-badge .mf-icon { width: .8rem; height: .8rem; }
.comment-floor { margin-left: auto; color: hsl(var(--muted) / .75); font-size: .74rem; font-variant-numeric: tabular-nums; }
.comment-content { font-size: .93rem; line-height: 1.7; margin-bottom: .4rem; overflow-wrap: anywhere; }
.comment-content p { margin: .25em 0; }
.comment-content p:first-child { margin-top: 0; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-meta { color: hsl(var(--muted)); font-size: .78rem; display: flex; align-items: center; flex-wrap: wrap; gap: .9em; }
.comment-meta time, .comment-ip { display: inline-flex; align-items: center; gap: .3em; }
.comment-meta .mf-icon { width: .85rem; height: .85rem; opacity: .85; }
.comment-ip { font-variant-numeric: tabular-nums; }
.comment-reply-btn {
    display: inline-flex; align-items: center; gap: .3em;
    margin-left: auto; padding: .2em .7em; border-radius: 999px;
    border: 1px solid var(--line); background: transparent; color: hsl(var(--muted));
    font-family: inherit; font-size: .76rem; cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.comment-reply-btn .mf-icon { width: .85rem; height: .85rem; }
.comment-reply-btn:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .45); background: hsl(var(--main-color) / .07); }
/* 子评论：竖向导引线 + 缩进 */
.comment-children {
    margin-left: 1.4rem; padding-left: 1.1rem;
    border-left: 2px solid hsl(var(--main-color) / .14);
}
.comment-children .comment-item { border-top: 1px solid var(--line); }
.comment-children .comment-item:first-child { border-top: 0; }
.comment-item.is-owner > .comment-body { background: hsl(var(--main-color) / .04); }

.comments-empty, .comments-closed {
    color: hsl(var(--muted)); display: flex; align-items: center; gap: .45em;
    padding: 1.2rem 0; font-size: .9rem;
}
.comments-empty .mf-icon, .comments-closed .mf-icon { width: 1.05rem; height: 1.05rem; }

.respond { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.3rem; }
.respond-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.respond h3 {
    font-size: 1rem; margin: 0; display: inline-flex; align-items: center; gap: .4em;
}
.respond h3 .mf-icon { color: hsl(var(--main-color)); width: 1.05rem; height: 1.05rem; }
.cancel-comment-reply { margin: 0 0 0 auto; }
.cancel-comment-reply a {
    font-size: .8rem; color: hsl(var(--muted)); padding: .2em .8em;
    border: 1px solid var(--line); border-radius: 999px;
}
.cancel-comment-reply a:hover { color: hsl(350 75% 58%); border-color: hsl(350 75% 58% / .45); }
.respond-login { font-size: .88rem; color: hsl(var(--muted)); }
.respond-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: .7rem; }
.respond-field { position: relative; display: block; }
.respond-field .rf-icon {
    position: absolute; left: .8em; top: 50%; transform: translateY(-50%);
    color: hsl(var(--muted)); pointer-events: none; display: inline-flex;
}
.respond-field .rf-icon .mf-icon { width: .95rem; height: .95rem; }
.respond-field .input { padding-left: 2.5em; }
.input {
    width: 100%; padding: .65em 1em;
    border: 1px solid var(--line); border-radius: calc(var(--radius) - 6px);
    background: var(--back); color: inherit;
    font-family: inherit; font-size: .92rem; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: hsl(var(--main-color) / .6); box-shadow: 0 0 0 3px hsl(var(--main-color) / .1); }
.respond-editor { border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px); background: var(--back); overflow: hidden; }
.respond-editor textarea.input {
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    resize: vertical; margin: 0; min-height: 7rem; display: block;
}
.respond-editor textarea.input:focus { box-shadow: none; }
.respond-tip { color: hsl(var(--muted)); font-size: .76rem; }
/* 回复时回复框被移入评论内部 */
.comment-item > .respond,
.comment-children > .respond {
    margin: 0 .6rem 1rem; padding-top: 1rem;
    animation: pjax-in .22s ease;
}
.comment-item > .respond .respond-editor textarea.input { min-height: 5.5rem; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: .5em 1.5em;
    border-radius: 999px;
    font-size: .92rem; cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s ease;
}
.btn-primary {
    background: hsl(var(--main-color)); color: hsl(0 0% 100%);
    box-shadow: 0 .2rem 1rem hsl(var(--main-color) / .35);
}
.btn-primary:hover { color: hsl(0 0% 100%); filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
    background: hsl(0 0% 100% / .08);
    border-color: hsl(0 0% 100% / .2);
    color: hsl(0 0% 100% / .9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { color: hsl(0 0% 100%); border-color: hsl(0 0% 100% / .4); }

/* ---------- 友链 / 图库 ---------- */
.gallery-grid { columns: 3; column-gap: 1rem; margin-bottom: 1.5rem; }
.gallery-item {
    margin: 0 0 1rem; break-inside: avoid; position: relative;
    overflow: hidden; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line);
}
.gallery-item img { width: 100%; display: block; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item figcaption {
    position: absolute; inset: auto 0 0; padding: 1.6em .9em .6em;
    background: linear-gradient(transparent, hsl(0 0 0 / .55));
    color: hsl(0 0% 100%); font-size: .82rem;
}

/* ---------- 时光轴 ---------- */
.archive-timeline { padding: 1.6rem 1.9rem; }
.tl-year h2 { font-size: 1.3rem; font-weight: 700; color: hsl(var(--main-color)); margin: 1.2rem 0 .8rem; }
.tl-year:first-child h2 { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 .3rem; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding: .35rem 0 .35rem 1.3rem; }
.tl-item::before {
    content: ""; position: absolute; left: -.38rem; top: .95rem;
    width: .55rem; height: .55rem; border-radius: 50%;
    background: var(--back); border: 2px solid hsl(var(--main-color));
}
.tl-item time { color: hsl(var(--muted)); font-size: .84rem; margin-right: .8em; }

/* ---------- 分页 / 空状态 ----------
   Typecho 的 pageNav() 输出 <ol class="page-navigator">，此前样式误写在 .pagination 上导致
   全站分页退化成带序号的裸列表 */
.page-navigator, .pagination {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .5rem; margin: 1.8rem 0 0; padding: 0; list-style: none;
}
.page-navigator li, .pagination li { display: inline-flex; }
.page-navigator a, .page-navigator li > span,
.pagination a, .pagination li > span {
    min-width: 2.4rem; height: 2.4rem; padding: 0 .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: .9rem; color: hsl(var(--font) / .8);
}
.page-navigator li.current a, .pagination .current a, .pagination .current {
    background: hsl(var(--main-color)); border-color: transparent; color: hsl(0 0% 100%);
}
.page-navigator a:hover, .pagination a:hover { border-color: hsl(var(--main-color) / .5); color: hsl(var(--main-color)); }
.empty { padding: 4rem 1.5rem; text-align: center; color: hsl(var(--muted)); }

/* ---------- 页脚 ---------- */
.site-footer {
    position: relative;
    padding: 2.4rem 0 2.6rem;
    color: hsl(var(--muted)); font-size: .86rem;
    text-align: center;
}
/* 顶部分隔线：左右渐隐的发丝线，避免整幅硬线贴住上方内容 */
.site-footer::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg,
        transparent, hsl(var(--font) / 12%) 24%,
        hsl(var(--font) / 12%) 76%, transparent);
}
.site-footer p { margin: .3rem 0; }
.site-footer a { color: hsl(var(--font) / .7); }
.site-footer a:hover { color: hsl(var(--main-color)); }

/* ---------- 灯箱 ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 200; display: none;
    background: hsl(0 0 0 / .88); place-items: center; cursor: zoom-out;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: var(--radius); }

/* ---------- 响应式 ---------- */
@media (max-width: 1152px) {
    .layout { grid-template-columns: 1fr; }
    .side-area { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
}
@media (max-width: 760px) {
    .cover-slogn { font-size: 2.2rem; }
    .site-menu a { padding: .25em .55em; }
    .site-logo { font-size: 1rem; }
    .nav-search { display: none; }
    .post-card.is-first { grid-column: span 1; }
    .post-card.is-first .post-card-cover { aspect-ratio: 16 / 9; }
    .cate-grid { grid-template-columns: 1fr; }
    .wall-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { columns: 2; }
    .post-head, .post-content, .post-tags { padding-left: 1.3rem; padding-right: 1.3rem; }
    .respond-row { grid-template-columns: 1fr; }
    .anniversary { gap: .5rem; }
    .cover-note { font-size: .78rem; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
}

/* ============ v1.2.1 响应式与细节 ============ */

/* ---------- 封面高度：svh 防移动端地址栏跳动 ---------- */
.site-cover { height: 100vh; }
.site-cover { height: 100svh; }

/* ---------- 平滑滚动与锚点偏移 ---------- */
html { scroll-behavior: smooth; }
.section, #feed { scroll-margin-top: calc(var(--head-h) + 1rem); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 键盘可达性 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid hsl(var(--main-color));
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- 触屏：去除悬浮位移依赖 ---------- */
@media (hover: none) {
    .post-card:hover, .moment:hover, .post-item:hover, .cate-item:hover, .link-card:hover { transform: none; }
    .post-card-cover img, .wall-item img, .gallery-item img { transform: none !important; }
    * { -webkit-tap-highlight-color: hsl(var(--main-color) / .18); }
}

/* ---------- 正文溢出保护 ---------- */
.markdown-body pre { max-width: 100%; }
.markdown-body table { display: block; overflow-x: auto; max-width: 100%; }
.markdown-body img { height: auto; }
.markdown-body iframe, .markdown-body video { max-width: 100%; }

/* ---------- 返回顶部 ---------- */
.back-top {
    position: fixed; right: 1.2rem; bottom: 1.4rem; z-index: 90;
    width: 2.7rem; height: 2.7rem; border-radius: 50%;
    background: var(--card); border: 1px solid var(--line);
    color: hsl(var(--font) / .75); font-size: 1rem;
    display: grid; place-items: center; cursor: pointer;
    box-shadow: var(--shadow-hover);
    opacity: 0; transform: translateY(.6rem); pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, color .2s ease;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .4); }

/* ---------- 内容渐入（星度式 fade-up） ---------- */
.reveal { opacity: 0; transform: translateY(1em); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}

/* ---------- 移动抽屉菜单 ---------- */
.menu-toggle {
    display: none;
    width: 2.1rem; height: 2.1rem;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--card); cursor: pointer;
    place-items: center; align-content: center; gap: 4px;
    padding: 0;
}
.menu-toggle span {
    display: block; width: 14px; height: 1.5px;
    background: currentColor; border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-drawer {
    position: fixed; top: var(--head-h); left: 0; right: 0; z-index: 99;
    max-height: 0; overflow: hidden; visibility: hidden;
    background: var(--back); /* color-mix 不支持时的回退 */
    background: color-mix(in srgb, var(--back) 94%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: max-height .35s cubic-bezier(.6, .1, 0, 1), visibility 0s .35s;
}
.mobile-drawer.open { max-height: 70vh; overflow-y: auto; visibility: visible; border-bottom: 1px solid var(--line); transition: max-height .35s cubic-bezier(.6, .1, 0, 1); }
.drawer-search { padding: .9rem 1.4rem .4rem; }
.drawer-search input {
    width: 100%; height: 2.6rem; padding: 0 1em;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: inherit;
    font-family: inherit; font-size: .92rem; outline: none;
}
.drawer-menu { display: flex; flex-direction: column; padding: .5rem 1rem 1.2rem; }
.drawer-menu a {
    padding: .8em 1rem; font-size: 1rem;
    border-radius: 10px; color: hsl(var(--font) / .85);
    min-height: 2.75rem; display: flex; align-items: center;
}
.drawer-menu a.active { color: hsl(var(--main-color)); background: hsl(var(--main-color) / .1); font-weight: 600; }
.drawer-menu a:hover { background: hsl(var(--font) / 5%); color: inherit; }

/* 导航未滚动态下汉堡同样白色化（仅首页封面之上） */
body.has-cover .site-header:not(.scrolled) .menu-toggle {
    background: hsl(0 0% 100% / .1);
    border-color: hsl(0 0% 100% / .25);
    color: hsl(0 0% 100%);
}
/* 抽屉打开时 header 强制实体背景 */
.site-header.drawer-open { background: var(--back); background: color-mix(in srgb, var(--back) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom-color: var(--line); color: hsl(var(--font)); }
.site-header.drawer-open .site-menu a.active { background: hsl(var(--main-color) / .14); color: hsl(var(--main-color)); }

body.drawer-locked { overflow: hidden; }

/* ---------- 断点：≤920px 收起为抽屉 ---------- */
@media (max-width: 920px) {
    .site-menu, .nav-search { display: none; }
    .menu-toggle { display: grid; }
    .header-area { grid-template-columns: 1fr auto 1fr; padding-left: calc(1.1rem + env(safe-area-inset-left, 0px)); padding-right: calc(1.1rem + env(safe-area-inset-right, 0px)); }
    .site-tools { gap: .45em; grid-column: 3; justify-self: end; }
    /* 菜单隐藏后自动摆放会把 logo 挤到第 1 列，需显式落到中列才居中 */
    .site-logo { grid-column: 2; justify-self: center; }
    .site-cover { min-height: 30rem; }
    .cover-slogn { font-size: clamp(2rem, 9vw, 3rem); letter-spacing: .06em; }
    .cover-note { bottom: 1rem; font-size: .78rem; }
    .layout { padding-top: 1.6rem; }
}

/* ---------- 断点：≤760px 手机 ---------- */
@media (max-width: 760px) {
    body { font-size: 15.5px; }
    .wrap { padding: 0 1.1rem; }
    .header-area { padding-left: calc(1.1rem + env(safe-area-inset-left, 0px)); padding-right: calc(1.1rem + env(safe-area-inset-right, 0px)); }
    .site-logo { font-size: 1.02rem; }
    .cover-actions .btn { padding: .65em 1.4em; min-height: 2.6rem; }
    .post-head, .post-content, .post-tags { padding-left: 1.2rem; padding-right: 1.2rem; }
    .post-media, .post-actions { margin-left: 1.2rem; margin-right: 1.2rem; }
    .post-title { font-size: 1.5rem; }
    .post-cover { margin: 1rem 1rem 0; }
    .comments { padding: 1.2rem 1.1rem; }
    .comment-children { margin-left: .5rem; padding-left: .8rem; }
    .respond-row { grid-template-columns: 1fr; gap: .5rem; }
    .anniversary { padding: 1.6rem 1rem; }
    .anniv-num { font-size: 2rem; }
    .archive-timeline { padding: 1.2rem 1.2rem; }
    .side-area { display: flex; flex-direction: column; }
    .back-top { right: .9rem; bottom: 1.1rem; }
    .page-navigator a, .page-navigator li > span,
    .pagination a, .pagination .current { min-width: 2.2rem; height: 2.2rem; font-size: .85rem; }
    .img-grid.n3, .img-grid.n5, .img-grid.n6, .img-grid.n7, .img-grid.n8, .img-grid.n9 { grid-template-columns: 1fr 1fr; }
}

/* ---------- 大屏微调 ---------- */
@media (min-width: 1600px) {
    .wrap { max-width: calc(var(--content-w) + 24rem + 3rem); }
}

/* ============ v1.5.0：修复与阅读体验 ============ */

/* ---------- 内页上下留白（顶部避让固定导航；底部避免内容顶住页脚分隔线） ---------- */
.site-main.is-single { padding-top: calc(var(--head-h) + 1rem); padding-bottom: 3.5rem; }

/* ---------- 友链 / 通用卡片网格（page-links 此前缺失，卡片直排） ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}
.links-grid { margin-bottom: 1.5rem; }

/* ---------- 瞬间页手帐胶带（v1.2 重写时丢失的 .taped / .tape-* 还原） ---------- */
:root {
    --tape-yellow: hsl(45 82% 58% / .85);
    --tape-blue: hsl(210 52% 60% / .8);
    --tape-pink: hsl(350 62% 72% / .8);
    --tape-green: hsl(96 38% 55% / .8);
}
html[data-theme="dark"] {
    --tape-yellow: hsl(45 55% 50% / .4);
    --tape-blue: hsl(210 45% 55% / .38);
    --tape-pink: hsl(350 45% 62% / .38);
    --tape-green: hsl(96 32% 48% / .38);
}
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --tape-yellow: hsl(45 55% 50% / .4);
        --tape-blue: hsl(210 45% 55% / .38);
        --tape-pink: hsl(350 45% 62% / .38);
        --tape-green: hsl(96 32% 48% / .38);
    }
}
.moment.taped { position: relative; }
.moment.taped:nth-child(odd) { transform: rotate(-.5deg); }
.moment.taped:nth-child(even) { transform: rotate(.5deg); }
.moment.taped:hover { transform: rotate(0) translateY(-2px); }
.moment.taped::before {
    content: ""; position: absolute; top: -10px; left: 50%; z-index: 1;
    width: 6rem; height: 1.5rem; margin-left: -3rem;
    background: var(--tape-yellow);
    border-radius: 1px;
    transform: rotate(-2deg);
    box-shadow: 0 1px 3px hsl(0 0% 0% / .12);
    pointer-events: none;
}
.moment.taped.tape-blue::before { background: var(--tape-blue); transform: rotate(2.5deg); }
.moment.taped.tape-pink::before { background: var(--tape-pink); transform: rotate(-3.5deg); }
.moment.taped.tape-green::before { background: var(--tape-green); transform: rotate(2deg); }

/* ---------- 阅读进度条 ---------- */
.read-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
    background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color)));
    transform: scaleX(0); transform-origin: 0 50%;
    will-change: transform; pointer-events: none;
}

/* ---------- 本文目录 ---------- */
.post-toc { margin: 1.4rem 2.2rem 1.2rem; }
.post-toc details {
    padding: .7rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) - 4px);
    background: hsl(var(--font) / 3%);
}
.post-toc summary {
    display: flex; align-items: center; gap: .5em;
    font-size: .95rem; font-weight: 600;
    cursor: pointer; list-style: none;
}
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary::before { content: "≡"; color: hsl(var(--main-color)); font-size: 1.05em; }
.post-toc details[open] summary { margin-bottom: .55rem; }
.post-toc summary small { color: hsl(var(--muted)); font-size: .8rem; font-weight: 400; }
.post-toc ol { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.post-toc li { font-size: .9rem; line-height: 1.6; }
.post-toc li::marker { color: hsl(var(--main-color)); }
.post-toc .toc-lv3 { margin-left: 1rem; font-size: .85rem; }
.post-toc a { color: hsl(var(--font) / .82); }
.post-toc a:hover { color: hsl(var(--main-color)); }
.markdown-body h2, .markdown-body h3 { scroll-margin-top: calc(var(--head-h) + 1rem); }

/* ---------- 代码块复制按钮 ---------- */
.markdown-body pre { position: relative; }
.code-copy {
    position: absolute; top: .5rem; right: .5rem;
    padding: .2em .75em;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--card); color: hsl(var(--muted));
    font-family: var(--sans); font-size: .72rem; cursor: pointer;
    opacity: 0; transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}
.markdown-body pre:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .4); }
@media (hover: none) { .code-copy { opacity: 1; } }

@media (max-width: 760px) {
    .post-toc { margin: 1.1rem 1.2rem 1rem; }
}

/* ============ v1.6.0：后台能力与阅读体验补全 ============ */

/* ---------- 目录分页：Typecho 输出 ol.page-navigator，此前只有 .pagination 样式 ---------- */
.page-navigator {
    display: flex; justify-content: center; flex-wrap: wrap;
    gap: .5rem; margin: 1.8rem 0 0; padding: 0; list-style: none;
}
.page-navigator li { list-style: none; }
.page-navigator a, .page-navigator span {
    min-width: 2.4rem; height: 2.4rem; padding: 0 .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: .9rem; color: hsl(var(--font) / .8);
}
.page-navigator a:hover { border-color: hsl(var(--main-color) / .5); color: hsl(var(--main-color)); }
.page-navigator .current a,
.page-navigator li.current a {
    background: hsl(var(--main-color)); border-color: transparent; color: hsl(0 0% 100%);
}
.page-navigator .next a, .page-navigator .prev a { padding: 0 1rem; }

/* ---------- 相关阅读 ---------- */
.post-related { margin-bottom: 1.5rem; padding: 1.3rem 1.6rem 1.5rem; }
.post-related h3 {
    margin: 0 0 .9rem; font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; gap: .5em;
}
.post-related h3::before {
    content: ""; width: .5em; height: .5em; border-radius: 50%;
    background: hsl(var(--main-color));
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.related-item {
    display: flex; align-items: baseline; gap: .5em;
    padding: .7rem 1rem;
    background: hsl(var(--font) / 3%);
    border: 1px solid var(--line); border-radius: calc(var(--radius) - 6px);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.related-item:hover {
    transform: translateY(-2px);
    border-color: hsl(var(--main-color) / .45);
    background: hsl(var(--main-color) / .06);
    color: inherit;
}
.related-title { flex: 1; min-width: 0; font-size: .9rem; line-height: 1.55; }
.related-heat { color: hsl(var(--main-color)); font-size: .76rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ---------- 版权声明 ---------- */
.post-copyright {
    display: flex; gap: .9em; align-items: flex-start;
    margin: 0 2.2rem 1.6rem; padding: 1rem 1.2rem;
    border: 1px dashed hsl(var(--main-color) / .35);
    border-radius: calc(var(--radius) - 4px);
    background: hsl(var(--main-color) / .05);
}
.pc-mark {
    flex-shrink: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    display: grid; place-items: center;
    background: hsl(var(--main-color) / .16); color: hsl(var(--main-color));
    font-size: .95rem; font-weight: 700;
}
.post-copyright p { margin: 0; font-size: .88rem; line-height: 1.8; color: hsl(var(--font) / .85); }
.post-copyright small { color: hsl(var(--muted)); font-size: .82rem; }
.post-copyright a { color: hsl(var(--main-color)); }

/* ---------- 文章卡片悬停时的内容渐显已存在，补摘要保护 ---------- */
.post-card-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 2rem 1.5rem 2.6rem; }
.notfound .nf-code {
    margin: 0; font-size: 4.5rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, hsl(var(--main-color)), hsl(var(--subs-color)));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound .nf-text { margin: .6rem 0 1.4rem; color: hsl(var(--muted)); }
.notfound .nf-search { display: flex; gap: .6rem; max-width: 26rem; margin: 0 auto; }
.notfound .nf-search input {
    flex: 1; min-width: 0; height: 2.6rem; padding: 0 1.1em;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--back); color: inherit; font-family: inherit; font-size: .95rem; outline: none;
}
.notfound .nf-search input:focus { border-color: hsl(var(--main-color) / .6); }
.notfound .nf-links { margin-top: 1.8rem; display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.notfound .nf-links a {
    font-size: .85rem; color: hsl(var(--muted));
    padding: .35em 1em; border-radius: 999px;
    border: 1px solid var(--line); background: var(--card);
}
.notfound .nf-links a:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .45); }

@media (max-width: 760px) {
    .post-copyright { margin: 0 1.2rem 1.4rem; }
    .post-related { padding: 1.1rem 1.2rem 1.3rem; }
    .notfound .nf-code { font-size: 3.4rem; }
}

/* ============ v1.7.0：本地图标 / 评论表情 / 响应式补强 ============ */

/* ---------- 图标基础 ---------- */
.mf-icon {
    width: 1.1em; height: 1.1em;
    vertical-align: -0.18em;
    fill: none; flex-shrink: 0;
}
.post-meta .mf-icon { width: 1em; height: 1em; color: hsl(var(--muted)); margin-right: .3em; }
.post-meta time, .post-meta span { white-space: nowrap; }
.heat .mf-icon { width: 1em; height: 1em; margin-right: .25em; }
.section-more .mf-icon { width: 1em; height: 1em; margin-left: .15em; transition: transform .2s ease; }
.section-more:hover .mf-icon { transform: translateX(.2em); }
.footer-meta .mf-icon { width: 1em; height: 1em; margin-right: .3em; }
.cover-note-arrow .mf-icon { width: 1.15em; height: 1.15em; }
.menu-toggle + .theme-toggle .mf-icon { width: 1.15rem; height: 1.15rem; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle .mf-icon { width: 1.05rem; height: 1.05rem; }
.back-top .mf-icon { width: 1.25rem; height: 1.25rem; }
.toc-caret { width: 1em; height: 1em; margin-right: .4em; transition: transform .25s ease; color: hsl(var(--muted)); }
.post-toc details[open] .toc-caret { transform: rotate(180deg); }

/* 搜索框图标 */
.nav-search { position: relative; }
.nav-search-icon {
    position: absolute; left: .75em; top: 50%; transform: translateY(-50%);
    display: inline-flex; color: hsl(var(--muted)); pointer-events: none;
}
.nav-search-icon .mf-icon { width: .95rem; height: .95rem; }
.nav-search input { padding-left: 2.2em; }
.nav-search input:focus { padding-left: 2.4em; }

/* 灯箱关闭按钮 */
.lightbox-close {
    position: absolute; top: 1.1rem; right: 1.1rem; z-index: 2;
    width: 2.6rem; height: 2.6rem; border-radius: 50%;
    border: 1px solid hsl(0 0% 100% / .25); cursor: pointer;
    background: hsl(0 0% 100% / .08); color: hsl(0 0% 100%);
    display: grid; place-items: center; transition: background .2s;
}
.lightbox-close:hover { background: hsl(0 0% 100% / .18); }
.lightbox-close .mf-icon { width: 1.2rem; height: 1.2rem; }

/* ---------- 评论表情 ---------- */
.respond-toolbar {
    display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
    padding: .55rem .8rem;
    border-top: 1px solid var(--line);
    background: var(--card);
}
.respond-toolbar .respond-submit { margin-left: auto; display: inline-flex; align-items: center; }
.respond-toolbar .respond-submit .mf-icon { margin-right: .35em; }
.emote-wrap { position: relative; }
.emote-btn {
    display: inline-flex; align-items: center; gap: .35em;
    padding: .4em .95em; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: inherit;
    font-family: inherit; font-size: .85rem; transition: border-color .2s, color .2s;
}
.emote-btn:hover, .emote-btn[aria-expanded="true"] {
    border-color: hsl(var(--main-color) / .5); color: hsl(var(--main-color));
}
.emote-picker {
    position: absolute; z-index: 60; bottom: calc(100% + .6rem); left: 0;
    width: min(21rem, calc(100vw - 3rem));
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: .7rem;
}
.emote-tabs { display: flex; gap: .3rem; margin-bottom: .6rem; }
.emote-tab-btn {
    flex: 1; border: 1px solid transparent; background: transparent; cursor: pointer;
    border-radius: 8px; padding: .3em 0; font-size: .82rem; font-family: inherit;
    color: hsl(var(--muted)); transition: all .15s;
}
.emote-tab-btn:hover { color: inherit; background: var(--back); }
.emote-tab-btn.on { background: hsl(var(--main-color) / .12); color: hsl(var(--main-color)); font-weight: 600; }
.emote-tab { display: none; max-height: 14rem; overflow-y: auto;
    grid-template-columns: repeat(6, 1fr); gap: .3rem; }
.emote-tab.on { display: grid; }
.emote-item {
    border: 0; background: transparent; cursor: pointer; border-radius: 8px;
    padding: .25rem; display: grid; place-items: center;
    font-size: .8rem; line-height: 1.3; color: inherit; transition: background .15s;
}
.emote-item:hover { background: hsl(var(--main-color) / .1); }
.emote-item img { width: 100%; height: auto; }
.emote-kaomoji { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-emote {
    display: inline-block; width: 3.5em; height: auto;
    vertical-align: -.9em; border-radius: 6px;
}

/* ---------- 断点：≤560px 大屏手机 / 小平板竖屏 ---------- */
@media (max-width: 560px) {
    .focus-grid { grid-template-columns: 1fr; }
    .post-card.is-first { grid-column: auto; }
    .post-card.is-first .post-card-cover { aspect-ratio: 16 / 9; }
    .wall-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { columns: 1; }
    .cover-actions { gap: .6em; justify-content: center; }
    .cover-actions .btn { padding: .5em 1.3em; min-height: 2.3rem; font-size: .86rem; }
    .section-head { flex-wrap: wrap; row-gap: .2rem; }
    .section-head h2 { font-size: 1.2rem; }
    .post-meta { line-height: 1.9; }
    .comment-children { margin-left: .2rem; padding-left: .6rem; }
    .comment-avatar img { width: 2.2rem; height: 2.2rem; }
    .comment-body { padding: .8rem .3rem; }
    .comments-hint { display: none; }
    .side-area { grid-template-columns: 1fr; }
    .emote-picker { position: fixed; left: 50%; bottom: 4.6rem; transform: translateX(-50%); z-index: 150; }
}

/* ---------- 断点：≤380px 小屏手机 ---------- */
@media (max-width: 380px) {
    body { font-size: 15px; }
    .wrap { padding: 0 1rem; }
    .header-area { padding-left: calc(1rem + env(safe-area-inset-left, 0px)); padding-right: calc(1rem + env(safe-area-inset-right, 0px)); }
    .cover-slogn { font-size: clamp(1.7rem, 10vw, 2.2rem); }
    .cover-sub { font-size: .88rem; }
    .post-title { font-size: 1.32rem; }
    .post-head, .post-content, .post-tags { padding-left: 1rem; padding-right: 1rem; }
    .post-media, .post-actions { margin-left: 1rem; margin-right: 1rem; }
    .anniv-num { font-size: 1.7rem; }
    .emote-tab { grid-template-columns: repeat(5, 1fr); }
    .respond-toolbar .respond-submit { margin-left: 0; width: 100%; justify-content: center; }
    .comments { padding: 1rem .9rem; }
}

/* ---------- 大屏 ≥1920px ---------- */
@media (min-width: 1920px) {
    :root { --content-w: 74rem; }
    .wrap { max-width: calc(var(--content-w) + 24rem + 3rem); padding: 0 2rem; }
    .wall-grid { grid-template-columns: repeat(6, 1fr); }
    .focus-grid { grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); }
    body { font-size: 16.5px; }
}

/* ---------- 横屏矮窗口（手机横屏 / 半屏浏览器） ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .cover-slogn { font-size: clamp(1.5rem, 9vh, 2.4rem); margin: .2em 0; }
    .cover-actions { margin-top: 1em; }
    .cover-actions .btn { padding: .45em 1.2em; min-height: 2.2rem; }
    .cover-note { bottom: .6rem; padding: .4em 1em; }
}

/* ---------- 打印：只留正文 ---------- */
@media print {
    .site-header, .site-footer, .side-area, .back-top, .read-progress,
    .post-toc, .post-neighbor, .post-related, .comments, .respond,
    .cover-note, .menu-toggle, .theme-toggle, .lightbox { display: none !important; }
    .site-cover { min-height: 0; height: auto; padding: 3rem 0; }
    .layout { display: block; }
    body { background: #fff; color: #111; }
    .card, .post { box-shadow: none; border: 0; }
}

/* ============ v1.8.0：幻灯 / 代码高亮 / 音视频 / 友链页 / 页脚 ============ */

/* ---------- 多功能灯箱 ---------- */
.lightbox { cursor: default; }
.lightbox img {
    max-width: 92vw; max-height: calc(100vh - 6.5rem);
    border-radius: var(--radius);
    transition: transform .25s ease;
    will-change: transform;
}
.lightbox-bar {
    position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: .3rem; padding: .35rem;
    background: hsl(0 0% 100% / .1); border: 1px solid hsl(0 0% 100% / .18);
    border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lightbox-tool {
    width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 0; cursor: pointer;
    background: transparent; color: hsl(0 0% 100% / .85);
    display: grid; place-items: center; transition: background .15s, color .15s;
}
.lightbox-tool:hover { background: hsl(0 0% 100% / .18); color: #fff; }
.lightbox-tool .mf-icon { width: 1.15rem; height: 1.15rem; }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 0; cursor: pointer;
    background: hsl(0 0% 100% / .1); color: hsl(0 0% 100% / .85);
    display: grid; place-items: center; transition: background .15s, opacity .2s;
    opacity: 0;
}
.lightbox:hover .lightbox-nav { opacity: 1; }
.lightbox-nav:hover { background: hsl(0 0% 100% / .22); }
.lightbox-nav .mf-icon { width: 1.3rem; height: 1.3rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox:not(.has-multi) .lightbox-nav { display: none; }
@media (hover: none) { .lightbox-nav { opacity: 1; } }
@media (max-width: 560px) {
    .lightbox-bar { gap: .15rem; bottom: .8rem; }
    .lightbox-tool { width: 2rem; height: 2rem; }
    .lightbox-tool .mf-icon { width: 1rem; height: 1rem; }
}

/* ---------- 代码区块：语言标签 ---------- */
.markdown-body pre { position: relative; }
.code-lang {
    position: absolute; top: .45rem; right: 3.6rem;
    font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
    color: hsl(var(--muted)); background: var(--back);
    border: 1px solid var(--line); border-radius: 6px;
    padding: .1em .6em; pointer-events: none;
    text-transform: lowercase;
}
.markdown-body pre .code-copy { top: .45rem; }
.hljs { border-radius: inherit; }

/* ---------- 外链音频 / 视频区块 ---------- */
.post-media { margin: .4rem 2.2rem 1.6rem; }
.post-media h3 {
    display: flex; align-items: center; gap: .45em;
    font-size: 1.02rem; margin: 1.4rem 0 .8rem; color: hsl(var(--font));
}
.post-media h3 .mf-icon { color: hsl(var(--main-color)); }
.post-audio {
    display: flex; align-items: center; gap: 1rem;
    padding: .8rem 1.1rem; margin-bottom: .7rem;
}
.pa-icon {
    width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-shrink: 0;
    background: hsl(var(--main-color) / .12); color: hsl(var(--main-color));
    display: grid; place-items: center;
}
.pa-icon .mf-icon { width: 1.25rem; height: 1.25rem; }
.post-audio audio { flex: 1; min-width: 0; height: 2.4rem; }
.post-video { position: relative; padding: 0; overflow: hidden; margin-bottom: .9rem; aspect-ratio: 16 / 9; }
.post-video iframe, .post-video video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ---------- 友链页 v2 ---------- */
.links-grid { grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }
.link-card {
    display: flex; flex-direction: row; align-items: center; gap: .8rem;
    padding: .8rem .95rem; position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.link-avatar {
    position: relative; width: 3rem; height: 3rem; border-radius: 12px; flex-shrink: 0;
    background: hsl(var(--main-color) / .1); color: hsl(var(--main-color));
    display: grid; place-items: center; overflow: hidden;
    font-weight: 700; font-size: 1.15rem;
}
.link-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.link-info { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.link-info strong { font-size: .95rem; line-height: 1.35; }
.link-desc {
    color: hsl(var(--muted)); font-size: .8rem; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.link-host { color: hsl(var(--muted) / .7); font-size: .72rem; font-family: var(--mono); line-height: 1.4; }
.link-go {
    margin-left: auto; color: hsl(var(--muted) / .5);
    transition: transform .2s ease, color .2s ease; flex-shrink: 0;
}
.link-card:hover .link-go { transform: translateX(.2em); color: hsl(var(--main-color)); }
.friend-feed { margin-top: 1.6rem; padding: 1.3rem 1.5rem 1.1rem; }
.friend-feed h2, .friend-apply h2 {
    display: flex; align-items: center; gap: .45em;
    font-size: 1.1rem; margin: 0 0 .3rem;
}
.friend-feed h2 .mf-icon, .friend-apply h2 .mf-icon { color: hsl(var(--main-color)); }
.friend-feed-sub, .friend-apply-sub { color: hsl(var(--muted)); font-size: .82rem; margin: 0 0 1rem; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
    display: flex; align-items: baseline; gap: .8rem;
    padding: .55rem 0; border-bottom: 1px dashed var(--line);
}
.feed-list li:last-child { border-bottom: 0; }
.feed-site {
    flex-shrink: 0; font-size: .8rem; color: hsl(var(--main-color));
    background: hsl(var(--main-color) / .08); border-radius: 999px;
    padding: .12em .7em; max-width: 8.5rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-title { min-width: 0; flex: 1; font-size: .9rem; line-height: 1.6;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-title:hover { color: hsl(var(--main-color)); }
.feed-time { flex-shrink: 0; color: hsl(var(--muted)); font-size: .78rem; }
.friend-apply { margin-top: 1.6rem; padding: 1.3rem 1.5rem 1.4rem; }
.friend-apply .respond-row { margin-bottom: .6rem; }
.friend-apply textarea.input { margin-bottom: .6rem; }
.apply-note { color: hsl(var(--muted)); font-size: .78rem; }
@media (max-width: 560px) {
    .feed-list li { flex-wrap: wrap; row-gap: .1rem; }
    .feed-time { margin-left: auto; }
    .links-grid { grid-template-columns: 1fr; }
}

/* ---------- 页脚趣功能 ---------- */
.footer-quote {
    margin: .5rem 0 0; font-size: .85rem; color: hsl(var(--muted));
    font-style: italic; letter-spacing: .02em;
}
.footer-quote::before { content: '「'; }
.footer-quote::after { content: '」'; }
.footer-runtime {
    margin: .3rem 0 0; font-size: .78rem; color: hsl(var(--muted) / .8);
    font-variant-numeric: tabular-nums;
}
.footer-loadtime { font-variant-numeric: tabular-nums; }

/* ============ v1.9.0+1.10.0：PJAX / 播放器 / 页面差异化 / 互动组件 ============ */

/* ---------- PJAX 加载条与切页过渡 ---------- */
.pjax-bar {
    position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 300;
    background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color)));
    transform: scaleX(0); transform-origin: left; opacity: 0;
    transition: transform .4s ease, opacity .3s;
}
.pjax-bar.run { opacity: 1; transform: scaleX(.65); transition: transform 1.4s ease; }
@keyframes pjax-in { from { opacity: 0; transform: translateY(.7rem); } }
#pjax-container.swap { animation: pjax-in .5s cubic-bezier(.2, .7, .3, 1); }

/* ---------- 封面入场动效（错落浮现） ---------- */
@keyframes cover-in { from { opacity: 0; transform: translateY(1.3rem); } }
.cover-greet, .cover-slogn, .cover-sub, .cover-actions, .cover-note {
    animation: cover-in .8s cubic-bezier(.2, .7, .3, 1) backwards;
}
.cover-slogn { animation-delay: .08s; }
.cover-sub { animation-delay: .18s; }
.cover-actions { animation-delay: .28s; }
.cover-note { animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
    .cover-greet, .cover-slogn, .cover-sub, .cover-actions, .cover-note { animation: none; }
}

/* ---------- 菜单悬停下划线 ---------- */
.site-menu a { position: relative; }
.site-menu a::after {
    content: ''; position: absolute; left: 50%; bottom: .12em;
    width: 0; height: 2px; border-radius: 2px;
    background: hsl(var(--main-color));
    transition: width .25s ease, left .25s ease;
}
.site-menu a:hover::after, .site-menu a.active::after { left: 18%; width: 64%; }
.site-menu a.active { background: transparent; }

/* ---------- 内容渐入交错（同组子元素依次浮现） ---------- */
.reveal { transition-delay: 0s; }
.focus-grid .reveal:nth-child(2), .cate-grid .reveal:nth-child(2), .moment-list .reveal:nth-child(2) { transition-delay: .07s; }
.focus-grid .reveal:nth-child(3), .cate-grid .reveal:nth-child(3), .moment-list .reveal:nth-child(3) { transition-delay: .14s; }
.focus-grid .reveal:nth-child(4), .cate-grid .reveal:nth-child(4), .moment-list .reveal:nth-child(4) { transition-delay: .21s; }

/* ---------- 页面类型差异化 hero ---------- */
.page-hero {
    position: relative; overflow: hidden;
    border-radius: var(--radius);
    padding: 2.3rem 1.9rem 2.1rem;
    margin: 0 0 1.8rem;
    color: hsl(0 0% 100%);
    background:
        radial-gradient(hsl(0 0% 100% / .13) 1px, transparent 1.4px),
        linear-gradient(135deg, hsl(var(--ph-h, var(--mf-main-h)) 68% 52%), hsl(var(--ph-h, var(--mf-main-h)) 62% 38%));
    background-size: 18px 18px, 100% 100%;
    box-shadow: var(--shadow);
}
.page-hero::after {
    content: ''; position: absolute; right: -3.5rem; top: -3.5rem;
    width: 11rem; height: 11rem; border-radius: 50%;
    background: hsl(0 0% 100% / .1);
}
.ph-icon {
    display: inline-grid; place-items: center;
    width: 2.9rem; height: 2.9rem; border-radius: 12px;
    background: hsl(0 0% 100% / .16); border: 1px solid hsl(0 0% 100% / .3);
    margin-bottom: .8rem;
}
.ph-icon .mf-icon { width: 1.4rem; height: 1.4rem; }
.page-hero h1 { margin: 0 0 .3rem; font-size: 1.65rem; font-weight: 700; letter-spacing: .01em; }
.ph-sub { margin: 0; font-size: .85rem; color: hsl(0 0% 100% / .78); }
.hero-cat { --ph-h: var(--mf-main-h); }
.hero-tag { --ph-h: 20deg; }
.hero-search { --ph-h: 168deg; }
.hero-date { --ph-h: 262deg; }
.hero-author { --ph-h: 330deg; }
.hero-page {
    background:
        repeating-linear-gradient(-45deg, hsl(0 0% 100% / .05) 0 10px, transparent 10px 20px),
        linear-gradient(135deg, hsl(var(--ph-h, var(--mf-main-h)) 60% 46%), hsl(var(--ph-h, var(--mf-main-h)) 55% 33%));
    background-size: auto, 100% 100%;
}
@media (max-width: 560px) {
    .page-hero { padding: 1.7rem 1.3rem 1.6rem; }
    .page-hero h1 { font-size: 1.35rem; }
}

/* ---------- 十年之约卡片 ---------- */
.anniversary { position: relative; text-align: center; padding: 1.6rem 1.4rem 1.4rem; overflow: hidden; }
/* v1.13：周年卡迁入侧栏（标签云下方），复用 side-block 外壳；v1.15 去掉「周年之约」标题 */
.side-block.anniversary {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    padding: 1.5rem 1.25rem 1.25rem;
}
.side-block.anniversary .anniv-num { font-size: 2.2rem; }
.side-block.anniversary .anniv-text { font-size: .84rem; }
.side-block.anniversary .anniv-track { margin-top: .75rem; }
.anniv-num { margin: 0; font-size: 2.5rem; font-weight: 700; line-height: 1.1; color: hsl(var(--main-color)); font-variant-numeric: tabular-nums; }
.anniv-num small { font-size: 1.1rem; margin-left: .1em; color: hsl(var(--muted)); font-weight: 600; }
.anniv-text { margin: .1rem 0 0; color: hsl(var(--muted)); font-size: .88rem; }
.anniv-track { width: min(100%, 24rem); height: 6px; border-radius: 999px; background: var(--line); margin: .85rem auto 0; overflow: hidden; }
.anniv-fill {
    display: block; height: 100%; width: var(--w, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color)));
    transition: width 1.2s cubic-bezier(.2, .7, .3, 1) .3s;
}
.reveal .anniv-fill { width: 0; }
.reveal.in .anniv-fill { width: var(--w, 0%); }

/* ---------- 文章内页 UI 优化 ---------- */
.post-title { font-size: 2rem; font-weight: 700; line-height: 1.4; letter-spacing: .01em; }
.post-title::after {
    content: ''; display: block; width: 3.2rem; height: 3px; border-radius: 3px;
    margin-top: .55em;
    background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color)));
}
.post-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem .45rem; align-items: center; }
.post-meta > span[aria-hidden="true"] { display: none; }
.post-meta time, .post-meta > span {
    display: inline-flex; align-items: center;
    background: var(--back); border: 1px solid var(--line); border-radius: 999px;
    padding: .14em .75em; font-size: .78rem; color: hsl(var(--muted));
}
.post-meta .heat { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .25); background: hsl(var(--main-color) / .06); }
.markdown-body blockquote {
    margin: 1.2rem 0; padding: .7rem 1.1rem;
    border-left: 3px solid hsl(var(--main-color) / .55);
    background: hsl(var(--main-color) / .05);
    border-radius: 0 10px 10px 0; color: hsl(var(--font) / .9);
}
.markdown-body blockquote p { margin: .3rem 0; }
.markdown-body img { border-radius: 10px; }
.markdown-body hr { border: 0; height: 1px; background: var(--line); margin: 2rem auto; position: relative; overflow: visible; }
.markdown-body hr::after {
    content: '· · ·'; position: absolute; left: 50%; top: -0.85em; transform: translateX(-50%);
    background: var(--card); padding: 0 .8em; color: hsl(var(--muted)); letter-spacing: .3em; font-size: .8rem;
}
.post-neighbor { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); gap: 0; margin: 0 0 1.4rem; }
.post-neighbor .pn-item {
    flex: 1 1 0; min-width: 0; display: block;
    background: transparent; border: 0; border-radius: 0;
    padding: 1rem 2.2rem; transition: background .2s ease;
}
.post-neighbor .pn-item:hover { background: hsl(var(--main-color) / .05); }
.post-neighbor .pn-item + .pn-item { border-left: 1px solid var(--line); }
.post-neighbor .pn-item small { color: hsl(var(--muted)); font-size: .74rem; display: block; margin-bottom: .2em; }
.post-neighbor .pn-item a { color: inherit; }
.post-neighbor .pn-next { text-align: right; }
@media (max-width: 760px) {
    .post-title { font-size: 1.6rem; }
    .post-neighbor .pn-item { padding: 1rem 1.2rem; }
    .post-neighbor { flex-direction: column; margin: 0 0 1.1rem; }
    .post-neighbor .pn-item + .pn-item { border-left: 0; border-top: 1px solid var(--line); }
    .post-neighbor .pn-next { text-align: left; }
}

/* ---------- 音乐播放器 ---------- */
.mf-player { position: fixed; right: 1.2rem; bottom: 4.8rem; z-index: 95; }
.mp-fab {
    width: 3.1rem; height: 3.1rem; border-radius: 50%; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: hsl(var(--main-color));
    box-shadow: var(--shadow-hover); display: grid; place-items: center;
    transition: transform .2s ease, border-color .2s ease; padding: 0;
}
.mp-fab:hover { transform: scale(1.06); border-color: hsl(var(--main-color) / .45); }
.mp-disc { display: grid; place-items: center; }
.mp-disc .mf-icon { width: 1.35rem; height: 1.35rem; }
.mp-disc.spin { animation: mp-spin 7s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-panel {
    position: absolute; right: 0; bottom: calc(100% + .8rem);
    width: min(20.5rem, calc(100vw - 2.2rem));
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: .9rem;
    animation: pjax-in .3s ease;
}
.mp-panel[hidden] { display: none; }
.mp-head { display: flex; align-items: center; gap: .85rem; }
.mp-cover { flex-shrink: 0; }
.mp-cover img {
    display: block; width: 4.6rem; height: 4.6rem; object-fit: cover;
    border-radius: 12px; box-shadow: var(--shadow); background: var(--back);
}
.mp-main { flex: 1; min-width: 0; }
.mp-name { margin: 0 0 .55rem; font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-progress { height: 5px; border-radius: 999px; background: var(--line); cursor: pointer; overflow: hidden; }
.mp-bar { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color))); }
.mp-row { display: flex; align-items: center; justify-content: space-between; margin-top: .45rem; font-size: .72rem; color: hsl(var(--muted)); font-variant-numeric: tabular-nums; }
.mp-ctrls { display: flex; gap: .25rem; }
.mp-btn {
    width: 2.05rem; height: 2.05rem; border-radius: 50%; border: 0; cursor: pointer;
    background: transparent; color: inherit; display: grid; place-items: center;
    transition: background .15s, color .15s; padding: 0;
}
.mp-btn:hover { background: var(--back); color: hsl(var(--main-color)); }
.mp-btn .mf-icon { width: 1.05rem; height: 1.05rem; }
.mp-play { background: hsl(var(--main-color)); color: hsl(0 0% 100%); }
.mp-play:hover { background: hsl(var(--main-color)); color: hsl(0 0% 100%); opacity: .88; }
.mp-list { margin: .7rem 0 0; padding: 0; list-style: none; border-top: 1px dashed var(--line); max-height: 9rem; overflow-y: auto; }
.mp-list button {
    display: block; width: 100%; text-align: left; padding: .5em .3em;
    border: 0; border-bottom: 1px dashed var(--line); background: none;
    font-family: inherit; font-size: .83rem; color: inherit; cursor: pointer;
}
.mp-list li:last-child button { border-bottom: 0; }
.mp-list button:hover { color: hsl(var(--main-color)); }
.mp-list button.on { color: hsl(var(--main-color)); font-weight: 600; }
@media (max-width: 560px) {
    .mf-player { right: .9rem; bottom: 4.3rem; }
    .mp-fab { width: 2.7rem; height: 2.7rem; }
    .mp-panel { width: min(20.5rem, calc(100vw - 1.8rem)); }
}
@media print { .mf-player, .pjax-bar { display: none !important; } }

/* ---------- v1.9.1：Logo 昼夜跟随 ---------- */
.site-logo .logo-img { display: none; max-height: 2.1rem; width: auto; vertical-align: middle; }
.site-logo .logo-light { display: inline-block; }
html[data-theme="dark"] .site-logo .logo-light { display: none; }
html[data-theme="dark"] .site-logo .logo-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] .site-logo .logo-light { display: none; }
    html[data-theme="auto"] .site-logo .logo-dark { display: inline-block; }
}

/* ============ v1.10.0：公告/置顶/互动条/短代码/友链页优化 ============ */

/* ---------- 顶栏毛玻璃透明度可调 ---------- */
.site-header.scrolled {
    background: var(--back); /* 回退 */
    background: color-mix(in srgb, var(--back) calc(var(--head-alpha, 78) * 1%), transparent);
}
.site-header.drawer-open {
    background: color-mix(in srgb, var(--back) calc(max(var(--head-alpha, 78), 90) * 1%), transparent);
}

/* ---------- 公告：悬浮通知气泡（不占布局，自动消失） ---------- */
.site-notice {
    position: fixed; top: calc(var(--head-h) + .7rem); left: 50%; transform: translateX(-50%);
    z-index: 96;
    display: flex; align-items: center; gap: .7rem;
    width: min(30rem, calc(100vw - 2rem));
    padding: .6rem .9rem;
    background: var(--card); border: 1px solid hsl(var(--main-color) / .35);
    border-radius: 14px; box-shadow: var(--shadow-hover);
    animation: notice-in .45s cubic-bezier(.2, .7, .3, 1);
    transition: opacity .4s ease, transform .4s ease;
}
.site-notice[hidden] { display: none; } /* display:flex 会压过 hidden 属性，须显式关掉 */
.site-notice.bye { opacity: 0; transform: translate(-50%, -.6rem); pointer-events: none; }
@keyframes notice-in { from { opacity: 0; transform: translate(-50%, -.8rem); } }
.notice-tag {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: .3em;
    color: hsl(var(--main-color)); font-weight: 600; font-size: .8rem;
    background: hsl(var(--main-color) / .1); border-radius: 999px; padding: .15em .7em;
}
.notice-text { margin: 0; flex: 1; min-width: 0; font-size: .85rem; line-height: 1.6; }
.notice-close {
    flex-shrink: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    border: 0; background: transparent; color: hsl(var(--muted)); cursor: pointer;
    display: grid; place-items: center;
}
.notice-close:hover { background: var(--back); color: hsl(var(--font)); }
.notice-close .mf-icon { width: .95rem; height: .95rem; }
@media (max-width: 560px) {
    .site-notice { top: calc(var(--head-h) + .5rem); width: calc(100vw - 1.6rem); }
    .notice-text { font-size: .8rem; }
}

/* ---------- 置顶区 ---------- */
.sticky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.sticky-item {
    position: relative; display: flex; align-items: center; gap: .6rem;
    padding: .95rem 1.1rem; overflow: hidden;
}
.sticky-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, hsl(var(--main-color)), hsl(var(--subs-color)));
}
.sticky-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.sticky-badge {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: .2em;
    font-size: .72rem; font-weight: 600; color: hsl(0 0% 100%);
    background: linear-gradient(135deg, hsl(var(--main-color)), hsl(var(--subs-color)));
    border-radius: 999px; padding: .18em .7em;
}
.sticky-badge .mf-icon { width: .8rem; height: .8rem; }
.sticky-title {
    min-width: 0; font-size: .92rem; font-weight: 600; line-height: 1.5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 互动条：分段式卡片条 ---------- */
.post-actions {
    display: flex; align-items: stretch;
    margin: .4rem 2.2rem 1.8rem;
    background: var(--back); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
}
.pa-btn {
    flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    padding: .9em .4em; border: 0; border-radius: 0; cursor: pointer;
    background: transparent; color: inherit;
    font-family: inherit; font-size: .9rem;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.pa-btn:hover { color: hsl(var(--main-color)); background: hsl(var(--main-color) / .06); }
.pa-btn + .pa-btn { border-left: 1px solid var(--line); }
.pa-btn .mf-icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.pa-text { white-space: nowrap; }
.pa-like.liked { color: hsl(350 75% 58%); border-color: hsl(350 75% 58% / .45); background: hsl(350 75% 58% / .07); }
.pa-like.liked .mf-icon { fill: hsl(350 75% 58% / .85); }
.pa-like .like-count { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pa-like.bump { animation: pa-bump .5s cubic-bezier(.2, .7, .3, 1); }
@keyframes pa-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.pa-reward:hover { color: hsl(38 90% 48%); border-color: hsl(38 90% 48% / .5); }
.pa-share:hover { color: hsl(var(--main-color)); }

/* ---------- 模态（打赏 / 分享 / 海报） ---------- */
.mf-modal {
    position: fixed; inset: 0; z-index: 250;
    background: hsl(0 0 0 / .55);
    display: grid; place-items: center; padding: 1rem;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: pjax-in .25s ease;
}
.mf-modal[hidden] { display: none; }
.mf-modal-box {
    position: relative; max-width: min(26rem, 100%);
    max-height: 88vh; overflow-y: auto;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: 1.4rem 1.4rem 1.2rem;
}
.mf-modal-close {
    position: absolute; top: .7rem; right: .7rem;
    width: 2rem; height: 2rem; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--back); color: hsl(var(--muted)); display: grid; place-items: center;
}
.mf-modal-close:hover { color: hsl(var(--font)); }
.mf-modal-close .mf-icon { width: 1rem; height: 1rem; }
.mf-modal-title {
    display: flex; align-items: center; gap: .45em;
    margin: 0 0 1rem; font-size: 1rem; font-weight: 700;
}
.mf-modal-title .mf-icon { color: hsl(var(--main-color)); }
.reward-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.reward-grid:has(figure:only-child) { grid-template-columns: minmax(0, 16rem); justify-content: center; }
.reward-grid figure { margin: 0; text-align: center; }
.reward-grid img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 12px; border: 1px solid var(--line);
}
.reward-grid figcaption { margin-top: .4rem; font-size: .82rem; color: hsl(var(--muted)); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.share-item {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    padding: .8rem .3rem; border-radius: 12px; cursor: pointer;
    border: 1px solid var(--line); background: var(--back); color: inherit;
    font-family: inherit; font-size: .78rem; text-decoration: none;
    transition: all .18s ease;
}
.share-item:hover { border-color: hsl(var(--main-color) / .45); color: hsl(var(--main-color)); transform: translateY(-2px); }
.share-item .mf-icon { width: 1.3rem; height: 1.3rem; }
.share-qr { margin-top: 1rem; text-align: center; }
.share-qr img { border: 8px solid #fff; border-radius: 10px; box-shadow: var(--shadow); }
.poster-box { max-width: min(24rem, 100%); text-align: center; }
.poster-stage { position: relative; min-height: 12rem; display: grid; place-items: center; }
#poster-image { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); opacity: 0; transition: opacity var(--t-base, .25s) var(--ease-out, ease); }
#poster-image.is-ready { opacity: 1; }
#poster-image.is-error { display: none; }
.poster-loading, .poster-error {
    grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
    font-size: .82rem; color: hsl(var(--muted)); padding: 3rem 1rem;
}
.poster-loading[hidden], .poster-error[hidden], #poster-download[hidden], #poster-retry[hidden], .poster-tip[hidden] { display: none; }
.poster-error { color: hsl(var(--muted)); }
.poster-spin {
    width: 1rem; height: 1rem; border-radius: 50%;
    border: 2px solid hsl(var(--line)); border-top-color: hsl(var(--main-color));
    animation: mp-spin .8s linear infinite;
}
.poster-ops { margin-top: .9rem; display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.poster-ops .btn { display: inline-flex; align-items: center; gap: .3rem; }
.poster-tip { margin: .6rem 0 0; font-size: .74rem; color: hsl(var(--muted)); }

/* ---------- 短代码卡片 ---------- */
.mf-note {
    display: flex; gap: .7rem; align-items: flex-start;
    margin: 1.1rem 0; padding: .8rem 1rem;
    border-radius: 12px; line-height: 1.7; font-size: .92rem;
}
.mf-note-icon { flex-shrink: 0; display: grid; place-items: center; margin-top: .15em; }
.mf-note-icon .mf-icon { width: 1.15rem; height: 1.15rem; }
.mf-note-body strong { display: block; margin-bottom: .15em; font-size: .92rem; }
.mf-note-body p { margin: .2rem 0; }
.mf-note-success { background: hsl(152 60% 46% / .1); border: 1px solid hsl(152 60% 46% / .3); color: hsl(152 45% 32%); }
.mf-note-success .mf-note-icon { color: hsl(152 60% 40%); }
.mf-note-info { background: hsl(var(--main-color) / .08); border: 1px solid hsl(var(--main-color) / .3); color: hsl(var(--main-color) / .9); }
.mf-note-info .mf-note-icon { color: hsl(var(--main-color)); }
.mf-note-warning { background: hsl(42 90% 55% / .12); border: 1px solid hsl(42 90% 50% / .4); color: hsl(28 80% 38%); }
.mf-note-warning .mf-note-icon { color: hsl(38 92% 46%); }
.mf-note-danger { background: hsl(355 70% 55% / .09); border: 1px solid hsl(355 70% 55% / .35); color: hsl(355 65% 42%); }
.mf-note-danger .mf-note-icon { color: hsl(355 70% 52%); }
html[data-theme="dark"] .mf-note-success { color: hsl(152 50% 68%); }
html[data-theme="dark"] .mf-note-info { color: hsl(var(--main-color) / .95); }
html[data-theme="dark"] .mf-note-warning { color: hsl(42 90% 66%); }
html[data-theme="dark"] .mf-note-danger { color: hsl(355 80% 72%); }
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] .mf-note-success { color: hsl(152 50% 68%); }
    html[data-theme="auto"] .mf-note-info { color: hsl(var(--main-color) / .95); }
    html[data-theme="auto"] .mf-note-warning { color: hsl(42 90% 66%); }
    html[data-theme="auto"] .mf-note-danger { color: hsl(355 80% 72%); }
}
.mf-collapse {
    margin: 1.1rem 0; border: 1px solid var(--line); border-radius: 12px;
    background: var(--back); overflow: hidden;
}
.mf-collapse summary {
    list-style: none; cursor: pointer; user-select: none;
    padding: .75rem 1rem; font-weight: 600; font-size: .92rem;
    display: flex; align-items: center;
}
.mf-collapse summary::-webkit-details-marker { display: none; }
.mf-collapse summary .toc-caret { margin: 0 .5em 0 0; }
.mf-collapse[open] summary { border-bottom: 1px dashed var(--line); }
.mf-collapse[open] summary .toc-caret { transform: rotate(180deg); }
.mf-collapse-body { padding: .8rem 1rem; }
.mf-collapse-body > :last-child { margin-bottom: 0; }
.mf-mark { background: linear-gradient(transparent 55%, hsl(var(--main-color) / .3) 55%); color: inherit; padding: 0 .1em; }
.mf-center { text-align: center; }
.mf-sbtn { margin: .4rem .3rem .4rem 0; }

/* ---------- 友链页布局优化 ---------- */
.links-grid { gap: .85rem; }
.link-card { padding: .8rem .95rem; border-radius: 14px; }
.link-card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(135deg, hsl(var(--main-color) / .07), transparent 45%);
    opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.link-card:hover::after { opacity: 1; }
.link-avatar { width: 3.3rem; height: 3.3rem; border-radius: 14px; box-shadow: var(--shadow); }
.link-info strong { font-size: .98rem; }
.link-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-feed { border-radius: 14px; }
.feed-list li { padding: .7rem .4rem; border-radius: 8px; transition: background .18s ease; }
.feed-list li:hover { background: hsl(var(--main-color) / .05); }
.friend-apply { border-radius: 14px; }
@media (max-width: 560px) {
    .link-card { padding: .85rem .95rem; }
    .share-grid { grid-template-columns: repeat(3, 1fr); }
    .reward-grid { gap: .7rem; }
}

/* ---------- 十年之约 / 虫洞徽章（进度条下方居中，昼夜自动切换） ---------- */
.anniv-badges {
    display: flex; justify-content: center; align-items: center;
    gap: 1.5rem; margin-top: .95rem;
}
.anniv-badges a {
    display: inline-flex; align-items: center;
    opacity: .85; transition: opacity .2s ease, transform .2s ease;
}
.anniv-badges a:hover { opacity: 1; transform: translateY(-1px); }
.anniv-badges img { width: auto; height: 25px; }
.anniv-badges a:last-child img { height: 30px; } /* 虫洞图内容偏小，放大补偿 */
.anniv-badges a:nth-child(2) { margin-left: -.2rem; }
.anniv-badges .fb-dark { display: none; }
html[data-theme="dark"] .anniv-badges .fb-light { display: none; }
html[data-theme="dark"] .anniv-badges .fb-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] .anniv-badges .fb-light { display: none; }
    html[data-theme="auto"] .anniv-badges .fb-dark { display: inline-block; }
}
@media (max-width: 560px) {
    .anniversary { padding: 1.3rem 1.1rem 1.2rem; }
    .anniv-num { font-size: 2.1rem; }
    .anniv-badges { gap: 1.1rem; margin-top: .8rem; }
    .anniv-badges img { height: 20px; }
    .anniv-badges a:last-child img { height: 24px; }
}
@media (max-width: 380px) {
    .anniv-badges img { height: 17px; }
    .anniv-badges a:last-child img { height: 20px; }
}

/* ---------- 文章音乐卡片（kxpyq 风格移植，随昼夜令牌自适应） ---------- */
.music-card {
    position: relative; overflow: hidden;
    border-radius: var(--radius); border: 1px solid var(--line);
    background: var(--card); margin-bottom: .9rem;
}
.mc-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    filter: brightness(.8) saturate(1.4) blur(14px);
    transform: scale(1.15);
}
.mc-main {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: .95rem;
    padding: .95rem 1rem;
    background: hsl(var(--main-color) / .06);
}
.mc-cover {
    width: 3.9rem; height: 3.9rem; border-radius: 12px; overflow: hidden;
    flex-shrink: 0; box-shadow: var(--shadow);
    background: var(--back); display: grid; place-items: center;
}
.mc-cover img { width: 100%; height: 100%; object-fit: cover; }
.mc-cover-fallback { color: hsl(var(--main-color)); }
.mc-cover-fallback .mf-icon { width: 1.6rem; height: 1.6rem; }
.mc-info { flex: 1; min-width: 0; }
.mc-name {
    margin: 0; font-weight: 600; font-size: .98rem; line-height: 1.4;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-artist { margin: .05rem 0 .35rem; font-size: .78rem; color: hsl(var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-time { display: flex; justify-content: space-between; font-size: .68rem; color: hsl(var(--muted)); font-variant-numeric: tabular-nums; margin-bottom: .18rem; }
.mc-progress {
    position: relative; height: 4px; border-radius: 999px;
    background: hsl(var(--font) / .12); cursor: pointer;
}
.mc-bar { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, hsl(var(--main-color)), hsl(var(--subs-color))); }
.mc-dot {
    position: absolute; top: 50%; left: 0; width: .65rem; height: .65rem;
    border-radius: 50%; background: hsl(var(--main-color));
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px hsl(var(--main-color) / .18);
}
.mc-play {
    width: 2.9rem; height: 2.9rem; border-radius: 50%; flex-shrink: 0;
    border: 0; cursor: pointer; display: grid; place-items: center;
    background: hsl(var(--main-color)); color: hsl(0 0% 100%);
    box-shadow: var(--shadow-hover);
    transition: transform .2s ease;
}
.mc-play:hover { transform: scale(1.06); }
.mc-play .mf-icon { width: 1.3rem; height: 1.3rem; grid-area: 1 / 1; }
.mc-play .mc-icon-pause { display: none; }
.mc-play.playing .mc-icon-play { display: none; }
.mc-play.playing .mc-icon-pause { display: block; }
.mc-play.playing { animation: mc-pulse 2.4s ease infinite; }
@keyframes mc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 hsl(var(--main-color) / .3); }
    50% { box-shadow: 0 0 0 .5rem hsl(var(--main-color) / 0); }
}
.mc-lrc-toggle {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: .3em;
    width: 100%; padding: .45em 0; border: 0; cursor: pointer;
    background: hsl(var(--font) / .04); color: hsl(var(--muted));
    font-family: inherit; font-size: .76rem;
    border-top: 1px dashed var(--line);
}
.mc-lrc-toggle:hover { color: hsl(var(--main-color)); }
.mc-lrc-toggle .mf-icon { width: .9rem; height: .9rem; transition: transform .25s ease; }
.mc-lrc-toggle.open .mc-caret { transform: rotate(180deg); }
.mc-lrc { position: relative; overflow: hidden; }
.mc-lrc[hidden] { display: none; }
.mc-lrc-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: brightness(.6) saturate(1.3) blur(18px); transform: scale(1.2);
}
.mc-lrc-overlay { position: absolute; inset: 0; background: hsl(220 30% 8% / .55); }
.mc-lrc-lines {
    position: relative; z-index: 1;
    max-height: 9rem; overflow-y: auto;
    padding: 1rem 1.2rem; margin: 0; list-style: none;
    text-align: center;
    scrollbar-width: none;
}
.mc-lrc-lines::-webkit-scrollbar { display: none; }
.lrc-line {
    padding: .28em 0; line-height: 1.7;
    font-size: .86rem; color: hsl(0 0% 100% / .72);
    transition: color .25s ease, transform .25s ease, font-size .25s ease;
}
.lrc-line.active {
    color: #fff; font-weight: 600; font-size: .95rem;
    text-shadow: 0 1px 8px hsl(0 0% 0% / .4);
}

/* ---------- 友链申请：蜜罐字段 + 提交回执提示 ---------- */
/* 蜜罐：正常用户不可见，脚本填充则拒收（不用 display:none，避免被识别） */
.mf-hp {
    position: absolute !important; left: -9999px !important; top: auto !important;
    width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.friend-apply-result {
    display: flex; align-items: center; gap: .5rem;
    margin: 0 0 1.2rem; padding: .8rem 1.1rem; border-radius: 12px;
    font-size: .88rem; line-height: 1.6; border: 1px solid transparent;
}
.friend-apply-result .mf-icon { flex-shrink: 0; }
.friend-apply-result.is-ok  { background: hsl(150 60% 96%); border-color: hsl(150 40% 80%); color: hsl(155 60% 28%); }
.friend-apply-result.is-err { background: hsl(0 70% 97%);   border-color: hsl(0 50% 86%);   color: hsl(0 62% 40%); }
html[data-theme="dark"] .friend-apply-result.is-ok  { background: hsl(155 40% 14%); border-color: hsl(155 30% 26%); color: hsl(150 45% 72%); }
html[data-theme="dark"] .friend-apply-result.is-err { background: hsl(0 35% 15%);   border-color: hsl(0 30% 30%);   color: hsl(0 65% 76%); }
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] .friend-apply-result.is-ok  { background: hsl(155 40% 14%); border-color: hsl(155 30% 26%); color: hsl(150 45% 72%); }
    html[data-theme="auto"] .friend-apply-result.is-err { background: hsl(0 35% 15%);   border-color: hsl(0 30% 30%);   color: hsl(0 65% 76%); }
}
.friend-apply .respond-row { grid-template-columns: repeat(2, 1fr); }
.friend-apply .respond-submit[disabled] { cursor: not-allowed; }

/* ---------- 侧栏广告位（HTML 原样输出，图片自适应） ---------- */
.side-ad-body { font-size: .88rem; line-height: 1.7; color: hsl(var(--font) / 85%); }
.side-ad-body img,
.side-ad-body video,
.side-ad-body iframe { max-width: 100%; height: auto; display: block; border-radius: 10px; }
.side-ad-body a { color: hsl(var(--main-color)); }
.side-ad-body p { margin: 0 0 .6rem; }
.side-ad-body p:last-child { margin-bottom: 0; }
.side-ad-body > :first-child { margin-top: 0; }

/* ==================================================================
   v1.16.0 流畅度专项：动效收敛 / 合成层 / 图片渐显 / PJAX 过渡
   ================================================================== */

/* ---------- 1. 热路径 transition 收敛到合成属性 ----------
   此前卡片 hover 过渡 box-shadow（每帧重绘），列表页十几张卡同时悬浮时
   掉帧明显；改为只过渡 transform/opacity，阴影切换改为瞬时（视觉上因为
   配合位移，感知不到"跳变"）。 */
.card, .moment, .post-card, .post-item, .cate-item, .link-card, .side-block {
    transition: transform var(--t-base) var(--ease-out), border-color var(--t-fast) linear;
}
.post-card-cover img, .wall-item img, .gallery-item img { will-change: auto; }

/* 只在精确指针设备上启用位移动效：触屏滑动时不再触发 hover 重绘 */
@media (hover: hover) and (pointer: fine) {
    .post-card:hover, .post-item:hover, .cate-item:hover, .link-card:hover { transform: translateY(-3px); }
    .moment:hover { transform: translateY(-2px); }
}

/* ---------- 2. 毛玻璃降级 ----------
   backdrop-filter 在低端 Android / 无 GPU 合成环境下会让整条顶栏每帧
   重采样，是滚动卡顿的头号来源。不支持或性能敏感设备上退化为不透明底。 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header.scrolled, .mobile-drawer { background: var(--back); }
    .cover-greet, .cover-note { background: hsl(230 25% 5% / .72); }
}
/* 尊重系统"减少透明度"无障碍设置 */
@media (prefers-reduced-transparency: reduce) {
    .site-header.scrolled, .mobile-drawer, .site-header.drawer-open {
        background: var(--back) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ---------- 3. 移动抽屉改用 transform 展开 ----------
   原来过渡 max-height（触发整棵子树布局与重绘，而且 0→70vh 的动画时长
   与实际高度无关，内容少时显得拖沓）。改为 translateY + opacity 纯合成动画。 */
.mobile-drawer {
    max-height: none; height: auto; visibility: hidden;
    transform: translateY(-.6rem); opacity: 0;
    transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out), visibility 0s var(--t-base);
}
.mobile-drawer.open {
    visibility: visible;
    transform: translateY(0); opacity: 1;
    max-height: 70vh; overflow-y: auto;
    transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
}

/* ---------- 4. 长列表渲染跳过 ----------
   离屏卡片不再参与样式与绘制（长列表 / 图文墙上收益最大）。
   只作用于第 N 个之后的元素，首屏那几张照常渲染，避免预估高度造成滚动条
   跳动；contain-intrinsic-size 的 auto 关键字会记住真实高度。 */
@supports (content-visibility: auto) {
    .moment:nth-child(n+3),
    .post-item:nth-child(n+4),
    .post-card:nth-child(n+5),
    .wall-item:nth-child(n+6),
    .gallery-item:nth-child(n+5),
    .link-card:nth-child(n+8) {
        content-visibility: auto;
        contain-intrinsic-size: auto 320px;
    }
}

/* ---------- 5. 图片渐显 + 加载骨架 ----------
   懒加载图片解码完成前先占位，解码完成后淡入，避免"半张图刷出来"的突兀感。
   JS 未执行（无 JS）时 .mf-img-on 不会被加上，图片照常直接显示。 */
img.mf-fade { opacity: 0; }
img.mf-fade.mf-img-on { opacity: 1; transition: opacity var(--t-base) var(--ease-out); }
@media (prefers-reduced-motion: reduce) { img.mf-fade { opacity: 1 !important; } }
.img-grid img, .wall-item img, .gallery-item img { background: hsl(var(--font) / 6%); }

/* ---------- 6. PJAX 进出过渡（配合 View Transitions 时自动让位） ---------- */
#pjax-container.pjax-out {
    opacity: 0; transform: translateY(-.35rem);
    transition: opacity .16s ease, transform .16s ease;
}
#pjax-container.swap { animation: pjax-in .42s var(--ease-soft); }
/* 支持 View Transitions 的浏览器由原生做 PJAX 交叉淡入（更顺、不掉帧），
   这里只调快时长；不支持时退回 #pjax-container 的 out/swap 两段动画 */
::view-transition-old(root) { animation-duration: .18s; }
::view-transition-new(root) { animation-duration: .26s; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    #pjax-container.swap { animation: none; }
}

/* ---------- 7. 悬停预取状态（JS 打标记时用，避免重复请求） ---------- */
a[data-prefetched] { /* 仅作状态标记 */ }

/* ---------- 8. 交互按压反馈：主按钮统一按压缩放 ---------- */
.btn, .post-card, .cate-item, .link-card, .moment { -webkit-tap-highlight-color: transparent; }
.btn:active, .section-more:active, .pa-btn:active { transform: scale(.97); }
.btn { transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) linear, color var(--t-fast) linear, border-color var(--t-fast) linear; }

/* ---------- 9. PJAX 进度条收尾 & 封面底衬 ---------- */
.pjax-bar.done { transform: scaleX(1) !important; opacity: 0; transition: transform .22s ease, opacity .3s ease .12s; }

/* ---------- 10. 「轻量」动效档（设置 motionLevel=lite） ----------
   关闭滚动渐入、错落延迟与悬停位移，只留状态过渡：
   低端设备上省掉大量 IntersectionObserver 回调与合成层。 */
.mf-motion-lite .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.mf-motion-lite .reveal .anniv-fill { width: var(--w, 0%); }
.mf-motion-lite .cover-greet, .mf-motion-lite .cover-slogn, .mf-motion-lite .cover-sub,
.mf-motion-lite .cover-actions, .mf-motion-lite .cover-note { animation: none; }
.mf-motion-lite .post-card:hover, .mf-motion-lite .post-item:hover,
.mf-motion-lite .cate-item:hover, .mf-motion-lite .link-card:hover,
.mf-motion-lite .moment:hover { transform: none; }
.mf-motion-lite .post-card:hover .post-card-cover img,
.mf-motion-lite .wall-item:hover img, .mf-motion-lite .gallery-item:hover img { transform: none; }
.mf-motion-lite .site-cover { content-visibility: visible; }
.mf-motion-lite .cover-note-arrow { animation: none; }
.mf-motion-lite .mp-disc.spin { animation-duration: 12s; }

/* ==================================================================
 * 短代码组件（v1.17.0）
 * 由写作页工具栏插入，全部服务端渲染，前端零依赖。
 * 纯 CSS 交互（标签卡用 radio）保证 PJAX 换页后依然可用。
 * ================================================================== */

/* ---------- 标签卡（radio + label，无 JS） ---------- */
.mf-tabs { position: relative; margin: 1.4rem 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.mf-tabs > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mf-tabs > label {
    display: inline-block; padding: .7rem 1.15rem; cursor: pointer; font-size: .92rem;
    color: var(--muted); border-bottom: 2px solid transparent;
    transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.mf-tabs > label:hover { color: hsl(var(--main-color)); }
.mf-tabs > input:focus-visible + label { outline: 2px solid hsl(var(--main-color) / .5); outline-offset: -2px; }
.mf-tab-body { border-top: 1px solid var(--line); }
.mf-tab-pane { display: none; padding: 1.1rem 1.25rem; }
.mf-tab-pane > :first-child { margin-top: 0; }
.mf-tab-pane > :last-child { margin-bottom: 0; }
.mf-tabs > input:nth-of-type(1):checked ~ label:nth-of-type(1),
.mf-tabs > input:nth-of-type(2):checked ~ label:nth-of-type(2),
.mf-tabs > input:nth-of-type(3):checked ~ label:nth-of-type(3),
.mf-tabs > input:nth-of-type(4):checked ~ label:nth-of-type(4),
.mf-tabs > input:nth-of-type(5):checked ~ label:nth-of-type(5),
.mf-tabs > input:nth-of-type(6):checked ~ label:nth-of-type(6),
.mf-tabs > input:nth-of-type(7):checked ~ label:nth-of-type(7),
.mf-tabs > input:nth-of-type(8):checked ~ label:nth-of-type(8) {
    color: hsl(var(--main-color)); border-bottom-color: hsl(var(--main-color));
}
.mf-tabs > input:nth-of-type(1):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(1),
.mf-tabs > input:nth-of-type(2):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(2),
.mf-tabs > input:nth-of-type(3):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(3),
.mf-tabs > input:nth-of-type(4):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(4),
.mf-tabs > input:nth-of-type(5):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(5),
.mf-tabs > input:nth-of-type(6):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(6),
.mf-tabs > input:nth-of-type(7):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(7),
.mf-tabs > input:nth-of-type(8):checked ~ .mf-tab-body > .mf-tab-pane:nth-child(8) { display: block; }

/* ---------- 相册 ---------- */
.mf-photo { margin: 1.4rem 0; text-align: center; }
.mf-photo img { display: block; width: 100%; border-radius: var(--radius); }
.mf-photo figcaption { margin-top: .55rem; font-size: .85rem; color: var(--muted); }

/* ---------- 图片网格：--gcm/--gct/--gcl/--gcd 四档列数 ---------- */
.mf-grid { display: grid; grid-template-columns: repeat(var(--gcd, 4), 1fr); gap: .5rem; margin: 1.4rem 0; }
.mf-grid img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 10px; margin: 0 !important;
    aspect-ratio: var(--gar, 4 / 3);
}
.mf-grid > p { margin: 0 !important; display: contents; }
@media (max-width: 1152px) { .mf-grid { grid-template-columns: repeat(var(--gcl, 4), 1fr); } }
@media (max-width: 920px) { .mf-grid { grid-template-columns: repeat(var(--gct, 3), 1fr); } }
@media (max-width: 560px) { .mf-grid { grid-template-columns: repeat(var(--gcm, 2), 1fr); gap: .35rem; } }

/* ---------- 时间线 ---------- */
.mf-timeline { margin: 1.4rem 0; padding-left: .25rem; }
.mf-tl-item { position: relative; display: flex; gap: .85rem; padding-bottom: 1.15rem; }
.mf-tl-item:not(:last-child)::before {
    content: ''; position: absolute; left: .5rem; top: 1.35rem; bottom: 0;
    width: 1px; background: hsl(var(--main-color) / .28);
}
.mf-tl-dot { width: 1.05rem; height: 1.05rem; flex-shrink: 0; margin-top: .28rem; color: hsl(var(--main-color)); background: var(--card); border-radius: 50%; }
.mf-tl-body { flex: 1; min-width: 0; }
.mf-tl-body time {
    display: inline-block; font-size: .76rem; font-variant-numeric: tabular-nums;
    color: hsl(var(--main-color)); background: hsl(var(--main-color) / .1);
    border-radius: 6px; padding: .1rem .45rem; margin-bottom: .3rem;
}
.mf-tl-body p { margin: 0; font-size: .93rem; }
.mf-timeline .mf-tl-item:last-child { padding-bottom: 0; }

/* ---------- 友链卡片 ---------- */
.mf-linkcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .7rem; margin: 1.4rem 0; }
.mf-linkcard {
    display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.mf-linkcard:hover { transform: translateY(-2px); border-color: hsl(var(--main-color) / .45); box-shadow: var(--shadow-hover); }
.mf-lc-logo { width: 2.6rem; height: 2.6rem; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--back); }
.mf-lc-fallback { display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; color: hsl(var(--main-color)); background: hsl(var(--main-color) / .12); }
.mf-lc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.mf-lc-name { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-lc-desc { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-lc-go { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--muted); transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) linear; }
.mf-linkcard:hover .mf-lc-go { transform: translateX(.2em); color: hsl(var(--main-color)); }

/* ---------- 下载 / PDF 卡片 ---------- */
.mf-file {
    display: flex; align-items: center; gap: .85rem; margin: 1.4rem 0; padding: .85rem 1rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.mf-file:hover { border-color: hsl(var(--main-color) / .45); box-shadow: var(--shadow-hover); }
.mf-file-ico { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex-shrink: 0; border-radius: 10px; color: hsl(var(--main-color)); background: hsl(var(--main-color) / .12); }
.mf-file-ico .mf-icon { width: 1.25rem; height: 1.25rem; }
.mf-file-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mf-file-name { font-size: .93rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-file-tag { font-size: .74rem; color: var(--muted); }
.mf-file-go { width: 1.05rem; height: 1.05rem; flex-shrink: 0; color: var(--muted); }
.mf-file:hover .mf-file-go { color: hsl(var(--main-color)); }

/* ---------- 地点卡片 ---------- */
.mf-map { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin: 1.4rem 0; padding: .9rem 1.05rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.mf-map-main { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 11rem; }
.mf-map-main > .mf-icon { width: 1.35rem; height: 1.35rem; color: hsl(var(--main-color)); flex-shrink: 0; }
.mf-map-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mf-map-text strong { font-size: .93rem; }
.mf-map-text small { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mf-map-ops { display: flex; gap: .4rem; flex-wrap: wrap; }
.mf-map-ops a {
    font-size: .78rem; padding: .28rem .6rem; border-radius: 8px; border: 1px solid var(--line);
    color: var(--muted); transition: color var(--t-fast) linear, border-color var(--t-fast) linear;
}
.mf-map-ops a:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .45); }

/* ---------- GitHub 仓库卡 ---------- */
.mf-gh { display: flex; align-items: flex-start; gap: .85rem; margin: 1.4rem 0; padding: .95rem 1.05rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.mf-gh:hover { border-color: hsl(var(--main-color) / .45); box-shadow: var(--shadow-hover); }
.mf-gh-avatar { width: 2.5rem; height: 2.5rem; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--back); }
.mf-gh-fallback { display: grid; place-items: center; color: var(--muted); }
.mf-gh-fallback .mf-icon { width: 1.35rem; height: 1.35rem; }
.mf-gh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .18rem; }
.mf-gh-name { display: flex; align-items: center; gap: .4rem; font-size: .93rem; font-weight: 600; }
.mf-gh-name .mf-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.mf-gh-desc { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.mf-gh-meta { display: flex; align-items: center; gap: .3rem; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mf-gh-meta .mf-icon { width: .85rem; height: .85rem; color: hsl(42 90% 52%); }
.mf-gh-lang { color: hsl(var(--main-color)); }

/* ---------- 引用文章卡 ---------- */
.mf-postcard { display: flex; gap: .9rem; margin: 1.4rem 0; padding: .85rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.mf-postcard:hover { border-color: hsl(var(--main-color) / .45); box-shadow: var(--shadow-hover); }
.mf-pc-cover { width: 8.5rem; aspect-ratio: 16 / 10; flex-shrink: 0; border-radius: 10px; background-size: cover; background-position: center; }
.mf-pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .22rem; }
.mf-pc-kicker { display: flex; align-items: center; gap: .3rem; font-size: .72rem; color: hsl(var(--main-color)); }
.mf-pc-kicker .mf-icon { width: .85rem; height: .85rem; }
.mf-pc-title { font-size: .95rem; font-weight: 600; line-height: 1.5; }
.mf-pc-desc { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.mf-pc-meta { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
    .mf-pc-cover { width: 5.5rem; }
    .mf-pc-desc { display: none; }
}

/* ---------- 文章目录（[postindex]） ---------- */
.mf-postindex { margin: 1.4rem 0; padding: 1rem 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.mf-pi-head { display: flex; align-items: center; gap: .45rem; margin: 0 0 .6rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.mf-pi-head .mf-icon { width: 1rem; height: 1rem; color: hsl(var(--main-color)); }
.mf-postindex ol { margin: 0; padding-left: 1.1rem; }
.mf-postindex li { margin: .28rem 0; font-size: .88rem; line-height: 1.6; }
.mf-postindex li.toc-lv3 { padding-left: 1rem; }
.mf-postindex a { color: var(--font); }
.mf-postindex a:hover { color: hsl(var(--main-color)); }

/* ---------- 权限可见（登录 / 评论） ---------- */
.mf-gate { margin: 1.4rem 0; border-radius: var(--radius); overflow: hidden; }
.mf-gate-open { padding: 1rem 1.15rem; background: hsl(var(--main-color) / .06); border: 1px solid hsl(var(--main-color) / .22); }
.mf-gate-locked { position: relative; padding: 1.1rem 1.15rem; background: var(--card); border: 1px dashed hsl(var(--main-color) / .45); text-align: center; }
.mf-gate-ico { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: hsl(var(--main-color) / .12); color: hsl(var(--main-color)); }
.mf-gate-ico .mf-icon { width: 1.2rem; height: 1.2rem; }
.mf-gate-tip { display: block; margin-top: .55rem; font-size: .87rem; color: var(--muted); }
.mf-gate-tip a { color: hsl(var(--main-color)); text-decoration: underline; }
.mf-gate-blur { display: block; margin-top: .8rem; font-size: .88rem; color: var(--muted); filter: blur(4px); opacity: .5; user-select: none; pointer-events: none; max-height: 4.5em; overflow: hidden; }

/* ---------- 复制按钮 ---------- */
.mf-copy {
    display: inline-flex; align-items: center; gap: .4rem; margin: .3rem .3rem .3rem 0;
    padding: .42rem .85rem; font-size: .85rem; font-family: inherit; cursor: pointer;
    color: var(--font); background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    transition: color var(--t-fast) linear, border-color var(--t-fast) linear, background var(--t-fast) linear;
}
.mf-copy .mf-icon { width: 1rem; height: 1rem; }
.mf-copy:hover { color: hsl(var(--main-color)); border-color: hsl(var(--main-color) / .45); }
.mf-copy.is-done { color: hsl(152 55% 42%); border-color: hsl(152 55% 42% / .45); }

/* ---------- 按钮（六色） ---------- */
.mf-sbtn {
    display: inline-block; margin: .4rem .35rem .4rem 0; padding: .5rem 1.1rem;
    font-size: .89rem; font-weight: 500; border-radius: 10px; color: #fff !important;
    background: hsl(215 75% 55%);
    transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast) linear;
}
.mf-sbtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.mf-sbtn:active { transform: translateY(0) scale(.98); }
.mf-sbtn-blue { background: hsl(215 75% 55%); }
.mf-sbtn-red { background: hsl(355 70% 56%); }
.mf-sbtn-green { background: hsl(152 58% 44%); }
.mf-sbtn-purple { background: hsl(265 62% 60%); }
.mf-sbtn-yellow { background: hsl(38 88% 50%); }
.mf-sbtn-gray { background: hsl(220 10% 52%); }

/* ---------- 渐变虚线分隔（[dotted]） ---------- */
.mf-dotted { height: 3px; margin: 1.8rem 0; border-radius: 2px; background-size: 12px 3px, 100% 3px; background-repeat: repeat-x, no-repeat; opacity: .85; }

/* ---------- 文本样式（[text]） ---------- */
.mf-t-underline { text-decoration: underline; }
.mf-t-double { text-decoration: underline double; text-underline-offset: 3px; }
.mf-t-strike { text-decoration: line-through; }
.mf-t-dashed { text-decoration: underline dashed; text-underline-offset: 3px; }
.mf-t-wavy { text-decoration: underline wavy; text-underline-offset: 3px; }
.mf-t-wavy-red { text-decoration-color: hsl(355 70% 56%); }
.mf-t-blackout { background: #111; color: #111 !important; border-radius: 3px; padding: 0 .15em; transition: color var(--t-base) var(--ease-out), background var(--t-base) var(--ease-out); }
.mf-t-blackout:hover { background: transparent; color: inherit !important; }

/* ---------- 右对齐 ---------- */
.mf-right { text-align: right; }

/* ---------- 移动端微调 ---------- */
@media (max-width: 760px) {
    .mf-tabs > label { padding: .6rem .9rem; font-size: .87rem; }
    .mf-tab-pane { padding: .95rem 1rem; }
    .mf-linkcards { grid-template-columns: 1fr; }
    .mf-postcard { flex-direction: column; }
    .mf-pc-cover { width: 100%; aspect-ratio: 16 / 9; }
}

/* ---------- 补漏（v1.17.2 审计）：PHP 里用到但样式表缺的类 ---------- */
/* 友链头像首字回退：与 logo 叠放，logo 加载成功后由 onload 隐藏 */
.link-avatar-fallback {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 600; color: hsl(var(--muted));
    background: hsl(var(--main-h) 40% 96%);
}
html[data-theme="dark"] .link-avatar-fallback { background: hsl(var(--main-h) 14% 18%); }
/* 目录二级缩进（.toc-lv3 已有，补 lv2 让层级对齐） */
.post-toc .toc-lv2 { margin-left: .5rem; }
/* [text] 行内样式基类：原先只有 mf-t-* 修饰符，基类缺失 */
.mf-t { -webkit-text-decoration-skip-ink: none; text-decoration-skip-ink: none; }
