/* ==========================================================================
   笺墨 · Inklog theme
   素笺的骨架（白卡、细线、圆角），墨韵的气韵（衬线、朱砂、留白）
   ========================================================================== */

:root {
    /* 底色：中性白灰，不走米色；白卡靠 1px 细线与这层浅灰分层 */
    --bg: #f6f7f7;
    --paper: #ffffff;
    --paper-2: #fbfcfc;
    --paper-3: #f2f4f3;
    --ink: #1d2422;
    --ink-soft: #4b5350;
    --muted: #8b9390;
    --line: #e9eceb;
    --line-soft: #f1f3f2;
    --line-strong: #d5dad8;
    /* 主色只负责「交互」*/
    --accent: #2e6b57;
    --accent-deep: #245544;
    --accent-wash: rgba(46, 107, 87, .075);
    /* 印记色只负责「印」：品牌印章、首字、小节标，一屏不超过 3 处 */
    --seal: #9a3f34;
    --seal-wash: rgba(154, 63, 52, .06);
    --danger: #9a3f34;
    --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --shell: 1000px;
    --r: 10px;
    --r-sm: 6px;
    --r-xs: 4px;
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14.5px;
    line-height: 1.78;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(46, 107, 87, .16); color: var(--ink); }

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

.dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(29, 36, 34, .26);
    vertical-align: middle;
    flex: 0 0 3px;
}

.site-main { flex: 1 0 auto; }

.meta-link { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.meta-link:hover { color: var(--accent); border-color: rgba(46, 107, 87, .35); }

/* ------------------------------- 顶部 ------------------------------- */

.site-head {
    position: sticky;
    top: 0;
    z-index: 40;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}

/* 底色与毛玻璃放在伪元素上：backdrop-filter 会让页头成为 fixed 子元素的包含块，
   挪走后移动端侧边栏才能相对视口定位 */
.site-head::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(246, 247, 247, .88);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
    backdrop-filter: blur(10px) saturate(1.05);
    transition: background .3s ease;
    pointer-events: none;
}

.site-head.is-scrolled {
    border-bottom-color: var(--line);
}
.site-head.is-scrolled::before { background: rgba(246, 247, 247, .96); }

.head-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
    margin-right: auto;
}

.brand-seal {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    background: var(--seal);
    color: #ffffff;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1;
    /* 唯一不跟圆角系统的地方：印是方的 */
    border-radius: 2px;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.3;
    white-space: nowrap;
}
.brand-text i {
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: .8px;
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 0 0 auto;
    order: 1;
    margin-right: 24px;
}

.nav > a {
    position: relative;
    font-size: 13.5px;
    letter-spacing: .3px;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 6px 0;
    transition: color .25s;
}
.nav > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 1px;
    background: var(--accent);
    opacity: .8;
    transition: right .32s ease;
}
.nav > a:hover, .nav > a.is-active { color: var(--accent); }
.nav > a:hover::after, .nav > a.is-active::after { right: 0; }

.nav-tools { display: flex; align-items: center; gap: 8px; order: 2; }

/* 导航与账户入口统一收进右侧抽屉（全宽度生效，桌面端不再内联展开） */
.nav-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
    transition: border-color .25s, color .25s;
}
.nav-toggle:hover { border-color: rgba(46, 107, 87, .34); color: var(--accent); background: var(--accent-wash); }

.theme-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 0;
    transition: border-color .25s, color .25s, transform .25s;
}
.theme-btn:hover { border-color: rgba(46, 107, 87, .34); color: var(--accent); background: var(--accent-wash); }
.theme-btn .ico-sun { display: none; }
[data-theme="dark"] .theme-btn .ico-sun { display: block; }
[data-theme="dark"] .theme-btn .ico-moon { display: none; }

.brand-logo { display: block; height: 40px; width: auto; max-width: 220px; object-fit: contain; }
/* 设置了自定义 Logo 时，Logo 本身即品牌标识，不再重复显示站名 */
.brand.has-logo .brand-text { display: none; }

.search-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: border-color .25s, color .25s, transform .25s;
}
.search-btn:hover { border-color: rgba(46, 107, 87, .34); color: var(--accent); background: var(--accent-wash); }

.search-panel {
    display: none;
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.search-panel.is-open { display: block; animation: fadeDown .28s ease both; }
.search-panel form { display: flex; align-items: center; gap: 16px; padding: 26px 0; }
.search-panel input[type=text] {
    flex: 1;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    padding: 8px 2px 10px;
    font-family: var(--serif);
    font-size: 19px;
    letter-spacing: 1px;
    color: var(--ink);
    outline: none;
}
.search-panel input[type=text]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.search-panel input::placeholder { color: var(--muted); }
.search-panel button {
    border: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: 3px;
    padding: 9px 20px;
    border-radius: var(--r-sm);
    cursor: pointer;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------- 提示 ------------------------------- */

.flash-wrap { padding-top: 22px; }
.flash {
    font-size: 13px;
    padding: 11px 16px;
    border: 1px solid rgba(63, 107, 82, .22);
    background: rgba(63, 107, 82, .055);
    color: #3c6750;
    border-radius: var(--r-sm);
    margin-bottom: 10px;
    transition: opacity .35s ease, transform .35s ease;
}
.flash.error { border-color: rgba(154, 63, 52, .26); background: rgba(154, 63, 52, .06); color: var(--danger); }
.flash.is-hiding { opacity: 0; transform: translateY(-4px); pointer-events: none; }

.notice {
    font-size: 12.5px;
    letter-spacing: .5px;
    text-align: center;
    color: var(--accent-deep);
    background: var(--accent-wash);
    border: 1px solid rgba(46, 107, 87, .2);
    padding: 9px 14px;
    border-radius: var(--r-sm);
    margin-bottom: 26px;
}

/* ------------------------------- 首页头图 ------------------------------- */

/* 首页头部：一张白卡，左侧标题，右侧统计 */
.hero { padding: 24px 0 0; }

/* 首页头部：一张「笺」。白卡做纸，卡内极淡宣纸纹只在这里出现 */
.hero-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 32px 34px 30px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    background-image: radial-gradient(rgba(30, 37, 35, .05) .6px, transparent .6px);
    background-size: 3px 3px;
}

.hero-inner { min-width: 0; position: relative; z-index: 2; }

/* 右上角一枚小印：朱砂只在这一处做「印」，不参与交互 */
.hero-seal {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-family: var(--serif);
    font-size: 12px;
    line-height: 1;
    color: var(--seal);
    border: 1px solid rgba(154, 63, 52, .45);
    border-radius: 2px;
    opacity: .85;
    transform: rotate(-3deg);
    pointer-events: none;
}

.hero-eyebrow {
    margin: 0 0 12px;
    font-size: 11px;
    letter-spacing: .22em;
    color: var(--muted);
}

/* 标题回衬线（墨韵的魂），但字号与字距都收下来，才装得进卡片 */
.hero-title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 600;
    line-height: 1.36;
    letter-spacing: .045em;
    color: var(--ink);
}

/* 副标题接回墨韵的 hero-rule：一道朱砂短线起头 */
.hero-sub {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    font-family: var(--serif);
    font-size: 12.5px;
    letter-spacing: .24em;
    color: var(--muted);
}
.hero-sub::before {
    content: "";
    flex: 0 0 30px;
    width: 30px;
    height: 1px;
    background: var(--seal);
    opacity: .75;
}

.hero-stats {
    display: flex;
    gap: 30px;
    margin: 0;
    flex: 0 0 auto;
}
.hero-stats div { text-align: right; }
.hero-stats dt { font-size: 11.5px; color: var(--muted); }
.hero-stats dd {
    margin: 2px 0 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.chip {
    display: inline-block;
    font-size: 12px;
    letter-spacing: .5px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: color .25s, border-color .25s, background .25s;
}
.chip:hover {
    color: var(--accent);
    border-color: rgba(46, 107, 87, .34);
    background: var(--accent-wash);
}

/* ------------------------------- 列表 ------------------------------- */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 4px 12px;
    border-top: 0;
    margin-top: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-family: var(--serif);
    font-size: 16.5px;
    font-weight: 600;
    letter-spacing: .12em;
}
/* 小节标：朱砂的第二个落点 */
.section-title::before {
    content: "";
    flex: 0 0 3px;
    width: 3px;
    height: 14px;
    background: var(--seal);
    border-radius: 1px;
    opacity: .85;
}

.section-more { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }

.post-list { display: flex; flex-direction: column; gap: 12px; }

.post-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 184px;
    gap: 26px;
    align-items: start;
    padding: 20px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    transition: border-color .2s ease;
}
.post-item:hover { border-color: var(--line-strong); }
.post-item:last-child { border-bottom: 1px solid var(--line); }

.post-item-main { min-width: 0; }

.post-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 9px;
    font-size: 11.5px;
    letter-spacing: .2px;
    color: var(--muted);
}
.post-meta-top .meta-link { color: var(--muted); }
.post-meta-top .meta-link:hover { color: var(--accent); }

.post-item-title {
    margin: 0 0 7px;
    font-family: var(--serif);
    font-size: 18.5px;
    line-height: 1.55;
    font-weight: 600;
    letter-spacing: .03em;
}
/* hover 只动颜色与下划线，不做位移——扁平体系里位移就是噪音 */
.post-item-title a {
    color: var(--ink);
    text-decoration: none;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: color .25s ease, background-size .32s ease;
}
.post-item-title a:hover { color: var(--accent); background-size: 100% 1px; }

.post-item-moment .post-item-moment-thumb { cursor: default; }
.post-item-moment .post-item-moment-thumb:hover img { transform: none; filter: none; }
.post-moment-text { margin: 0 0 10px; color: var(--ink); font-family: var(--serif); font-size: 15.5px; line-height: 1.9; font-weight: 400; letter-spacing: 0; overflow-wrap: anywhere; }
.post-item-moment .post-item-foot { margin-top: 2px; }

.post-item-excerpt {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-item-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px dashed var(--line-soft);
    font-size: 11.5px;
    color: var(--muted);
}
/* 动态（moment）没有独立脚注，不画这条虚线 */
.post-item-moment .post-item-foot { border-top: 0; padding-top: 0; margin-top: 2px; }

.read-more {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color .25s;
}
.read-more i { font-style: normal; display: inline-block; transition: transform .3s; }
.read-more:hover { color: var(--accent); }
.read-more:hover i { transform: translateX(3px); }

.post-item-thumb {
    display: block;
    overflow: hidden;
    border-radius: var(--r-sm);
    background: var(--paper-3);
    aspect-ratio: 4 / 3;
    margin-top: 2px;
}
.post-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(.88) contrast(.98);
    transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .4s;
}
.post-item-thumb:hover img { transform: scale(1.045); filter: saturate(1) contrast(1); }

/* ------------------------------- 分页 ------------------------------- */

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 46px 0 8px;
    flex-wrap: wrap;
}

.pager a, .pager span {
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--paper);
    font-size: 12.5px;
    color: var(--ink-soft);
    text-decoration: none;
    transition: border-color .25s, color .25s, background .25s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.pager .disabled { opacity: .32; }
.pager .pg-gap { border: 0; color: var(--muted); }

/* ------------------------------- 空状态 ------------------------------- */

.empty {
    text-align: center;
    padding: 72px 20px 62px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.empty-seal {
    width: 46px;
    height: 46px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(154, 63, 52, .38);
    color: var(--seal);
    font-family: var(--serif);
    font-size: 21px;
    /* 空状态也是一枚印，所以同样是直角 */
    border-radius: 2px;
}
.empty h3 {
    margin: 0 0 8px;
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
}
.empty p { margin: 0 0 22px; color: var(--muted); font-size: 13px; letter-spacing: .5px; }
.empty-link {
    display: inline-block;
    padding: 9px 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 12.5px;
    letter-spacing: .3px;
    text-decoration: none;
    color: var(--ink-soft);
    transition: border-color .25s, color .25s, background .25s;
}
.empty-link:hover { border-color: rgba(46, 107, 87, .34); color: var(--accent); background: var(--accent-wash); }

/* ------------------------------- 文章 ------------------------------- */

.article {
    max-width: 780px;
    margin: 24px auto 0;
    padding: 36px 40px 42px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.post-head { text-align: left; margin-bottom: 26px; }
.post-head-moment { text-align: left; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.post-head-moment .post-kicker { margin-bottom: 8px; }
.post-head-moment .post-meta { justify-content: flex-start; }
.article-moment .prose { margin-top: 0; }

.post-kicker {
    margin-bottom: 14px;
    font-size: 11.5px;
    letter-spacing: .6px;
    color: var(--accent);
}
.post-kicker a { color: inherit; text-decoration: none; }
.post-kicker a:hover { text-decoration: underline; text-underline-offset: 4px; }

.post-title {
    margin: 0 0 18px;
    font-family: var(--serif);
    font-size: clamp(24px, 3.1vw, 31px);
    line-height: 1.44;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--ink);
}

.post-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11.8px;
    letter-spacing: .6px;
    color: var(--muted);
}
.post-meta .meta-link { color: var(--muted); }

.post-cover { margin: 34px 0 6px; }
.post-cover img { display: block; width: 100%; border-radius: var(--r); }
.post-cover figcaption { margin-top: 10px; text-align: center; font-size: 11.5px; color: var(--muted); }

.prose {
    padding-top: 20px;
    font-family: var(--serif);
    font-size: 15.5px;
    line-height: 1.95;
    letter-spacing: .2px;
    color: var(--ink);
    overflow-wrap: break-word;
}

.prose > *:first-child { margin-top: 0; }
.prose p { margin: 1.15em 0; }
.prose a {
    color: var(--accent-deep);
    text-decoration: none;
    border-bottom: 1px solid rgba(46, 107, 87, .3);
    transition: border-color .25s;
}
.prose a:hover { border-bottom-color: var(--accent); }
.prose strong { font-weight: 600; }

.prose h2, .prose h3, .prose h4 {
    font-family: var(--serif);
    color: var(--ink);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -.2px;
}
.prose h2 {
    position: relative;
    margin: 2.1em 0 .75em;
    padding-left: 17px;
    font-size: 22.5px;
    letter-spacing: 1px;
}
.prose h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: .58em;
    width: 3px;
    height: .92em;
    background: var(--accent);
    opacity: .6;
}
/* 首字下沉：一篇文章只有这一处朱砂，落在开篇第一笔 */
.prose > p:first-child::first-letter {
    float: left;
    padding: 5px 9px 0 0;
    font-family: var(--serif);
    font-size: 2.9em;
    line-height: .92;
    color: var(--seal);
}
.prose h3 { margin: 1.8em 0 .6em; font-size: 18.5px; letter-spacing: .6px; }
.prose h4 { margin: 1.6em 0 .5em; font-size: 16.5px; }

.prose blockquote {
    margin: 1.7em 0;
    padding: 12px 18px;
    border-left: 2px solid var(--accent);
    border-radius: 0 var(--r-xs) var(--r-xs) 0;
    background: var(--accent-wash);
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.9;
}
.prose blockquote p { margin: .45em 0; }

.prose img { display: block; max-width: 100%; height: auto; margin: 1.7em auto; border-radius: var(--r-sm); }
.prose figure { margin: 1.9em 0; }
.prose figure svg { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }
.prose figcaption { margin-top: 10px; text-align: center; font-family: var(--sans); font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }

.prose ul, .prose ol { margin: 1.1em 0; padding-left: 1.5em; }
.prose li { margin: .42em 0; }
.prose li::marker { color: var(--muted); }

.prose pre {
    margin: 1.7em 0;
    padding: 20px 22px;
    background: #1e2422;
    color: #e6e2d8;
    border-radius: var(--r-sm);
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.75;
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose code {
    font-family: var(--mono);
    font-size: .87em;
    background: var(--paper-3);
    padding: 2px 5px;
    border-radius: var(--r-xs);
}

.md-table { margin: 1.7em 0; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--paper-3); font-weight: 600; }

/* 音乐 / 视频 */

.ink-audio {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 1.8em 0;
    padding: 16px 18px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.ink-audio-title { font-size: 13.5px; font-weight: 600; letter-spacing: .4px; }
.ink-audio-artist { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.ink-audio audio { width: 100%; height: 34px; margin-top: 4px; accent-color: var(--accent); color-scheme: light dark; }

.ink-video { margin: 1.8em 0; }
.ink-video video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); background: #1b1f20; }
.ink-video figcaption { margin-top: 10px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* 文章尾部 */

.post-foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.post-end {
    margin: 34px 0 6px;
    text-align: center;
    font-family: var(--serif);
    font-size: 12px;
    letter-spacing: 8px;
    color: var(--muted);
    text-indent: 8px;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 34px;
    border: 1px solid var(--line);
    background: var(--line-soft);
    gap: 1px;
}
.post-nav > a, .post-nav .empty-cell {
    display: block;
    padding: 18px 22px;
    background: var(--paper);
    text-decoration: none;
    color: var(--ink);
    transition: background .3s;
}
.post-nav > a:hover { background: var(--paper-2); }
.post-nav span { display: block; font-size: 10.5px; letter-spacing: 1.6px; color: var(--muted); margin-bottom: 5px; }
.post-nav b {
    display: block;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-nav .next { text-align: right; }
.post-nav .empty-cell b { color: var(--muted); }

/* ------------------------------- 评论 ------------------------------- */

.comments { margin-top: 58px; padding-top: 30px; border-top: 1px solid var(--line); }

.comments-title {
    margin: 0 0 20px;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 4px;
}
.comments-title span { color: var(--muted); font-size: 12px; letter-spacing: 0; margin-left: 4px; }

.comment-list { list-style: none; margin: 0 0 38px; padding: 0; }

.comment {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px dashed var(--line);
}
.comment-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-wash);
    color: var(--accent);
    font-family: var(--serif);
    font-size: 15px;
}
.comment-body { min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-head b { font-size: 13px; font-weight: 600; }
.comment-head b a { text-decoration: none; border-bottom: 1px solid var(--line); }
.comment-head time { font-size: 11px; color: var(--muted); }
.comment-text { font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); overflow-wrap: break-word; }

.comments-none, .comments-closed {
    margin: 0 0 28px;
    padding: 18px 0;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px dashed var(--line-soft);
    border-bottom: 1px dashed var(--line-soft);
}

.comment-form {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
}
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px 12px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink);
    border-radius: var(--r-sm);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.comment-form textarea { resize: vertical; min-height: 110px; line-height: 1.85; margin-bottom: 14px; }
.comment-form input:focus, .comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-wash);
}
.comment-form input::placeholder, .comment-form textarea::placeholder { color: #a8aca7; }
.cf-url { margin-bottom: 12px; }
.cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cf-foot span { font-size: 11.5px; color: var(--muted); }
.cf-foot button {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .4px;
    padding: 10px 24px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background .25s, transform .25s;
}
.cf-foot button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ------------------------------- 归档 ------------------------------- */

.archive-head { padding: 30px 0 22px; max-width: 780px; }
.archive-kicker { margin: 0 0 10px; font-size: 11.5px; letter-spacing: .5px; color: var(--muted); }
.archive-title {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(24px, 3.2vw, 31px);
    font-weight: 600;
    letter-spacing: -.3px;
    line-height: 1.42;
}
.archive-subcats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.archive-desc { margin: 12px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .6px; }

.archive-search { display: flex; align-items: center; gap: 12px; margin-top: 26px; max-width: 480px; }
.archive-search input[type=text] {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 9px 13px;
    border-radius: var(--r-sm);
    font-family: var(--sans);
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.archive-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.archive-search button {
    border: 1px solid var(--line);
    background: transparent;
    padding: 9px 18px;
    font-size: 12.5px;
    letter-spacing: .3px;
    color: var(--ink-soft);
    cursor: pointer;
    border-radius: var(--r-sm);
    background: var(--paper);
}
.archive-search button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

.timeline { padding: 6px 0 20px; max-width: 780px; display: flex; flex-direction: column; gap: 13px; }
.tl-year {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 16px 22px 8px;
}
.tl-year-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ink);
}
.tl-year-title span { font-size: 11px; color: var(--muted); letter-spacing: 1px; font-family: var(--sans); }
.tl-list { list-style: none; margin: 0; padding: 0; }
.tl-list li { border-bottom: 1px solid var(--line-soft); }
.tl-list a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 13px 4px;
    text-decoration: none;
    color: var(--ink);
    transition: background .25s, padding-left .25s;
}
.tl-list a:hover { background: var(--accent-wash); padding-left: 10px; border-radius: var(--r-xs); }
.tl-list time { flex: 0 0 52px; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.tl-title { flex: 1; font-family: var(--serif); font-size: 14.5px; line-height: 1.7; letter-spacing: .02em; }
.tl-arrow { color: var(--muted); font-size: 12px; opacity: 0; transition: opacity .25s; }
.tl-list a:hover .tl-arrow { opacity: 1; color: var(--accent); }

/* ------------------------------- 404 ------------------------------- */

.notfound {
    text-align: center;
    padding: 76px 20px 66px;
    margin-top: 26px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.nf-seal {
    width: 50px;
    height: 50px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(46, 107, 87, .3);
    color: var(--accent);
    font-family: var(--serif);
    font-size: 22px;
    border-radius: var(--r-sm);
}
.notfound h1 {
    margin: 0 0 16px;
    font-family: var(--sans);
    font-size: 54px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--ink);
    opacity: .9;
}
.nf-poem { margin: 0 0 10px; font-family: var(--serif); font-size: 15px; letter-spacing: .6px; color: var(--ink-soft); }
.nf-desc { margin: 0 0 26px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------- 页脚 ------------------------------- */

/* 首页收尾：远山从 hero 挪到这里，替整页收一下气。
   山的下缘与页脚的「纸尾」相接，作为整页的落款位置 */
.home-mount {
    margin: 16px 0 0;
    height: 116px;
    color: var(--ink);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 54%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 54%, rgba(0, 0, 0, 0) 100%);
}
/* 内容撑不满一屏时，让远山贴着页脚，把空白留在山之前，而不是山与页脚之间 */
.page-home .site-main { display: flex; flex-direction: column; }
.page-home .home-mount { margin-top: auto; padding-top: 16px; height: 100px; }
.home-mount svg { display: block; width: 100%; height: 100%; }
[data-theme="dark"] .home-mount { opacity: .85; }

/* 页脚：居中的三行收尾——题记 / 友链 / 版权，像一本书的末页题跋 */
.site-foot {
    margin-top: 44px;
    padding: 0;
    border-top: 1px solid var(--line);
    background: var(--paper-2);
}
.page-home .site-foot { margin-top: 0; }

.foot-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 38px;
    padding-bottom: 32px;
    text-align: center;
}

/* 第一行：题记，衬线、居中，与下方链接留一档呼吸 */
.foot-note {
    max-width: min(92%, 640px);
    margin: 0 0 16px;
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: .3px;
    color: var(--ink-soft);
    line-height: 1.85;
}
.foot-note-text { min-width: 0; }
.foot-note-text > :first-child { margin-top: 0; }
.foot-note-text > :last-child { margin-bottom: 0; }
.foot-note-text p { margin: 0; }
.foot-note strong { color: var(--ink); font-weight: 600; }
.foot-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.foot-note code { padding: 1px 4px; border: 1px solid var(--line); border-radius: var(--r); font-size: .9em; }
.foot-note img { max-height: 42px; width: auto; vertical-align: middle; }
.foot-note ul, .foot-note ol { display: inline-block; margin: 0 0 4px; padding-left: 1.3em; text-align: left; }
.foot-note h1, .foot-note h2, .foot-note h3, .foot-note h4 { margin: 0 0 4px; font-size: 14px; letter-spacing: 1px; }
.foot-note blockquote { margin: 0; padding-left: 10px; border-left: 2px solid var(--line); }

/* 第二行：友链只留链接本身，横向铺开居中，不用标题也不用分隔点 */
.foot-links {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.7;
}
.foot-links-list {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 8px 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.foot-links-list li { display: flex; align-items: baseline; }
.foot-links-list a {
    color: var(--ink-soft);
    font-size: 13px;
    letter-spacing: .4px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color .25s, border-color .25s;
}
.foot-links-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* 第三行：版权与元信息收成一条印刷脚注 */
.foot-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px 0;
    margin: 0;
    font-size: 12px;
    letter-spacing: .4px;
    line-height: 1.7;
    color: var(--muted);
}
/* 中点分隔，让元信息读起来是一条印刷脚注，而不是散落的词 */
.foot-meta > span + span::before {
    content: "·";
    margin: 0 9px;
    color: var(--line-strong);
}
.foot-meta a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color .25s; }
.foot-meta a:hover { color: var(--accent); border-bottom-color: rgba(46, 107, 87, .3); }
.foot-meta .ink-uptime { color: var(--muted); opacity: .9; }

/* ------------------------------- 响应式 ------------------------------- */

@media (max-width: 900px) {
    .post-item { grid-template-columns: minmax(0, 1fr) 158px; gap: 20px; }
    .post-item-title { font-size: 17px; }
    .post-moment-text { font-size: 15px; }
    .hero { padding-top: 18px; }
    .hero-card { padding: 24px 24px; gap: 20px; }
}

@media (max-width: 720px) {
    .shell { padding: 0 20px; }
    .head-inner { min-height: 66px; }
    /* 保留站点副标题：手机端与桌面端一致显示，超长时由 .brand-text i 自身省略 */
    .nav { gap: 18px; }
    .nav > a { font-size: 12.5px; letter-spacing: 1px; }
    .hero { padding: 14px 0 0; }
    .hero-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 22px 20px; }
    /* 给右上角小印让出位置，标题换行时不会压到印上 */
    .hero-inner { padding-right: 30px; }
    .hero-seal { top: 14px; right: 14px; width: 22px; height: 22px; font-size: 10.5px; }
    .hero-title { font-size: 24px; letter-spacing: .04em; line-height: 1.42; }
    .hero-eyebrow { margin-bottom: 8px; font-size: 10.5px; letter-spacing: .18em; }
    .hero-sub { margin-top: 16px; font-size: 11.5px; letter-spacing: .2em; }
    .hero-stats { gap: 26px; width: 100%; }
    .hero-stats div { text-align: left; }
    .hero-stats dd { font-size: 20px; }
    .section-head { padding: 20px 2px 10px; }
    .post-item { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
    .post-item-thumb { order: -1; aspect-ratio: 16 / 9; margin: 0; }
    /* 标题与随笔字号已由 900px 断点接管，这里不再重复声明 */
    .post-item-excerpt { font-size: 13px; -webkit-line-clamp: 3; }
    .article { padding: 24px 20px 28px; margin-top: 16px; }
    .post-title { font-size: 22px; letter-spacing: .03em; }
    .post-meta { gap: 8px; font-size: 11px; }
    .prose { font-size: 16px; line-height: 1.95; }
    .prose h2 { font-size: 20px; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav .next { text-align: left; }
    .cf-row { grid-template-columns: 1fr; }
    .comment-form { padding: 18px; }
    .archive-head { padding: 22px 0 16px; }
    .archive-title { font-size: 23px; }
    .notfound { padding: 56px 18px 48px; margin-top: 16px; }
    .notfound h1 { font-size: 48px; }
    .site-foot { margin-top: 26px; }

    /* 页脚三行居中，移动端只收间距，不改排布 */
    .home-mount { height: 88px; padding-top: 12px; }
    .foot-inner {
        padding-top: 28px;
        padding-bottom: 24px;
    }
    .foot-note { margin: 0 0 14px; font-size: 14px; }
    .foot-links { margin: 0 0 16px; }
    .foot-links-list { gap: 6px 22px; }
    .foot-meta {
        gap: 5px 0;
        font-size: 11.5px;
    }
    .foot-meta > span + span::before { margin: 0 7px; }
}

@keyframes navSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes navFade { from { opacity: 0; } to { opacity: 1; } }

/* ===== 右侧抽屉（全宽度生效） ===== */
body.nav-open { overflow: hidden; }

.nav-drawer { display: none; position: fixed; inset: 0; z-index: 70; }
.nav-drawer.is-open { display: block; }

.nav-mask {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(26, 22, 20, .42);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    animation: navFade .22s ease both;
}

.nav-panel {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);
    flex-direction: column;
    gap: 0;
    padding: 18px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    background: var(--paper);
    border-left: 1px solid var(--line-soft);
    box-shadow: -24px 0 60px -34px rgba(30, 25, 20, .55);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: navSlide .26s cubic-bezier(.22, .7, .3, 1) both;
}

.nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.nav-panel-brand {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--ink);
    margin-left: 0;
    border-left: 2px solid transparent;
}
.nav-close {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
}
.nav-close:hover { color: var(--accent); border-color: var(--accent); }

.nav-panel .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    order: 0;
}
.nav-panel .nav > a {
    padding: 14px 2px 14px 0;
    margin-left: 0;
    font-size: 14.5px;
    letter-spacing: 1.2px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
    text-decoration: none;
}
.nav-panel .nav > a::after { display: none; }
.nav-panel .nav > a:active,
.nav-panel .nav > a.is-active { color: var(--ink); border-left-color: var(--accent); }

.nav-panel .nav-user-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    /* 账户入口不再紧跟导航，压到抽屉底部自成一组 */
    margin: auto 0 0;
    padding-top: 20px;
    font-size: 14.5px;
    order: 0;
}
/* 最后一个入口走到面板底，不再留一条悬空的线 */
.nav-panel .nav-user-menu > :last-child { border-bottom: 0; }
.nav-panel .nav-user-menu .nav-link {
    padding: 13px 2px 13px 0;
    margin-left: 0;
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
    color: var(--ink-soft);
    text-decoration: none;
}
/* 账户入口在抽屉里统一成正文色，不因管理员身份单独染色 */
.nav-panel .nav-user-menu .nav-entry.is-admin {
    padding: 13px 2px 13px 0;
    margin-left: 0;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
    border-left: 2px solid transparent;
    color: var(--ink-soft);
}


/* 窄屏：页头只留 Logo 与图标按钮，导航与账户入口收进右侧抽屉 */
@media (max-width: 640px) {
    .head-inner { min-height: 60px; }
    .nav-tools { gap: 6px; }
}

@media (max-width: 520px) {
    .shell { padding: 0 16px; }
    .head-inner { min-height: 58px; }
    .brand { gap: 8px; }
    .brand-seal { width: 31px; height: 31px; flex-basis: 31px; font-size: 16px; }
    .brand-logo { height: 24px; max-width: 92px; }
    .brand-text b { font-size: 16.5px; letter-spacing: 2px; }
    .nav-tools { gap: 5px; }
    .search-btn, .theme-btn, .nav-toggle { width: 30px; height: 30px; }
    .hero-title { font-size: 21px; letter-spacing: .05em; }
    .chip { font-size: 11.5px; padding: 4px 11px; }
    .foot-links { margin: 0 0 12px; }
    .foot-links-list { gap: 5px 18px; }
}

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

/* ------------------------------- 夜间墨色 ------------------------------- */

/* ==========================================================================
   夜间模式：由 <html data-theme="dark"> 驱动，可在页面右上角手动切换
   ========================================================================== */

[data-theme="dark"] {
    --bg: #1b201e;
    --seal: #c4705f;
    --seal-wash: rgba(196, 112, 95, .10);
    --paper: #232928;
    --paper-2: #272e2c;
    --paper-3: #2c3431;
    --ink: #dfe4e1;
    --ink-soft: #b7bfbb;
    --muted: #949c98;
    --line: rgba(223, 228, 225, .10);
    --line-soft: rgba(223, 228, 225, .06);
    --line-strong: rgba(223, 228, 225, .21);
    --accent: #79b39a;
    --accent-deep: #96c7b0;
    --accent-wash: rgba(121, 179, 154, .12);
    --danger: #c4705f;
    color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .site-head::before { background: rgba(27, 32, 30, .88); }
[data-theme="dark"] .site-head.is-scrolled::before { background: rgba(27, 32, 30, .96); }
[data-theme="dark"] .search-panel { background: rgba(35, 41, 40, .97); }
[data-theme="dark"] .chip { background: var(--paper); }
[data-theme="dark"] .comment-form input[type=text],
[data-theme="dark"] .comment-form input[type=email],
[data-theme="dark"] .comment-form textarea { background: #1f2624; }
[data-theme="dark"] .prose pre { background: #171d1b; border: 1px solid var(--line); }
[data-theme="dark"] .prose pre code { color: #e0dcd2; }
[data-theme="dark"] .tl-list a:hover { background: var(--accent-wash); }
[data-theme="dark"] .empty-link:hover { background: var(--accent-wash); }
[data-theme="dark"] .search-btn:hover { color: var(--accent); }

/* --------------------- 留言：点赞 / 回复 / 表情 --------------------- */
.comment-actions { display: flex; align-items: center; gap: 16px; margin-top: 9px; }
.comment-like {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 11.5px;
    line-height: 1.4;
    cursor: pointer;
    transition: color .2s;
}
.comment-like-heart { font-size: 13px; line-height: 1; transition: transform .2s; }
.comment-like:hover, .comment-like.is-liked { color: var(--accent); }
.comment-like.is-liked .comment-like-heart { transform: scale(1.18); }
.comment-like:disabled { cursor: default; opacity: .65; }
.comment-reply {
    color: var(--muted);
    font-size: 11.5px;
    text-decoration: none;
    border-bottom: 1px dotted var(--line);
    transition: color .2s, border-color .2s;
}
.comment-reply:hover { color: var(--accent); border-color: var(--accent); }
.comment-reply-to { color: var(--accent); font-size: 12px; margin-right: 5px; }

.comment-children { list-style: none; margin: 14px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.comment-children .comment { padding: 14px 0 0; border-bottom: 0; }
.comment-children .comment:last-child { padding-bottom: 0; }
.comment-child .comment-avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; }

.cf-reply {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 12px;
    background: var(--accent-wash);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-xs);
    font-size: 12px;
    color: var(--ink-soft);
}
.cf-reply[hidden] { display: none; }
.cf-reply b { color: var(--accent); font-weight: 600; }
.cf-reply a { margin-left: auto; color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }
.cf-reply a:hover { color: var(--accent); }

.cf-editor { position: relative; margin-bottom: 14px; }
.cf-editor textarea { margin-bottom: 0; }
.cf-emoji { position: relative; margin-top: 8px; }
.emoji-toggle {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 12px;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.emoji-toggle:hover { color: var(--accent); border-color: rgba(46, 107, 87, .34); }
.emoji-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    width: min(320px, 100%);
    max-height: 190px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: 0 14px 32px rgba(20, 30, 30, .14);
}
.emoji-panel[hidden] { display: none; }
.emoji-item { padding: 4px 0; border: 0; border-radius: var(--r); background: none; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif; font-size: 18px; line-height: 1.3; cursor: pointer; }
.emoji-item:hover { background: var(--paper-3); }

[data-theme="dark"] .emoji-toggle { background: #1f2624; }
[data-theme="dark"] .emoji-panel { background: #262d2b; box-shadow: 0 14px 32px rgba(0, 0, 0, .4); }
[data-theme="dark"] .emoji-item:hover { background: #2f3735; }
[data-theme="dark"] .cf-reply { background: var(--accent-wash); }

@media (max-width: 640px) {
    .comment-children { padding-left: 10px; }
    .comment-actions { gap: 14px; }
}

/* 加密文章：密码表单 */
.post-locked {
    max-width: 520px;
    margin: 10px auto;
    padding: 24px 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper-2);
    text-align: center;
}
.post-locked-text { margin: 0 0 14px; color: var(--ink-soft); }
.post-locked-error { margin: 0 0 12px; color: var(--accent); font-size: 13px; }
.post-locked-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.post-locked-form input[type="password"] {
    flex: 1 1 200px; max-width: 260px; padding: 9px 12px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--paper); color: var(--ink); font-size: 14px;
}
.post-locked-form input[type="password"]:focus { outline: none; border-color: var(--accent); }

/* 加密文章标记 */
.lock-mark { font-size: .8em; margin-right: 4px; filter: grayscale(.1); }

/* ---------- 账户 / 用户菜单 ----------
   与 .nav > a 使用同一字体栈；显式引用 --sans，外观设置所选字体同步生效。 */
.nav-user-menu { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 13px; order: 3; margin-left: 8px; }
.nav-user-menu .nav-link { color: var(--ink-soft); font-family: inherit; text-decoration: none; }
.nav-user-menu .nav-link:hover { color: var(--accent); }
/* 角色入口：管理员入口加细描边，与普通用户的「用户中心」区分 */
.nav-user-menu .nav-entry.is-admin { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); }
.nav-user-menu .nav-entry.is-admin:hover { border-color: var(--accent); }
.nav-user-menu .nav-user {
    width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 13px;
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 18px; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; transition: background .2s, border-color .2s, color .2s; }
.btn-block { width: 100%; }
.btn-ink { background: var(--ink); color: #f6f3ec; }
.btn-ink:hover { background: #12181a; }
.btn-ink:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.panel { background: var(--paper-2, #fff); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 22px 24px; }
.panel h2 { font-family: var(--serif); font-size: 17px; margin: 0 0 10px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 1.6; }
.badge-green { background: #e3efe7; color: #3f6b52; }
.badge-gray { background: #ececec; color: #6b7174; }
.badge-amber { background: #f4ecd8; color: #9a6b18; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint-line { font-size: 12.5px; color: var(--muted); margin: -4px 0 14px; }

.account-wrap { padding: 56px 20px 72px; }
.account-card { max-width: 420px; margin: 0 auto; background: var(--paper-2, #fff); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 36px 34px; box-shadow: 0 18px 44px -34px rgba(35,42,44,.4); }
.account-title { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; letter-spacing: 1px; }
.account-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.account-card .field { display: block; margin-bottom: 16px; }
.account-card .field > span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }
.account-card .field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); font-size: 14px; font-family: inherit; }
.account-card .field input:focus { outline: none; border-color: var(--accent); }
.account-alt { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.account-alt a { color: var(--accent); }
.account-note { font-size: 13px; line-height: 1.7; color: var(--ink-soft); background: color-mix(in srgb, var(--accent) 7%, transparent); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 0 0 14px; }
.account-hint { font-size: 12.5px; line-height: 1.7; color: var(--muted); margin: 12px 0 0; }
.account-card .field input + .account-hint { margin-top: 6px; }

.member-wrap { padding: 40px 20px 72px; max-width: 760px; margin: 0 auto; }
.member-wrap .panel { margin-bottom: 18px; }
.member-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper-2, #fff); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 22px 24px; }
.member-id { display: flex; align-items: center; gap: 14px; }
.member-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; overflow: hidden; }
.member-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; }
.member-id h1 { font-family: var(--serif); font-size: 20px; margin: 0; }
.member-id p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.member-stats { display: flex; gap: 22px; }
.member-stats .stat { text-align: center; }
.member-stats .stat b { display: block; font-size: 22px; font-family: var(--serif); color: var(--accent); }
.member-stats .stat span { font-size: 12px; color: var(--muted); }
.member-actions { display: flex; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.member-posts { list-style: none; margin: 0; padding: 0; }
.member-posts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member-posts li:last-child { border-bottom: 0; }
.mp-title { color: var(--ink); text-decoration: none; font-weight: 600; }
.mp-title:hover { color: var(--accent); }
.mp-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.mp-actions { display: flex; align-items: center; gap: 10px; }
.mp-edit { color: var(--accent); font-size: 12px; text-decoration: none; }
.mp-edit:hover { text-decoration: underline; }
.me-submit-box .btn + .btn { margin-left: 8px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .member-head { flex-direction: column; align-items: flex-start; } }

/* ---------------------------------------------------------------------------
   会员投稿编辑器 · 与后台「写文章」同款布局（主编辑区 + 侧栏：归类/封面/摘要）
   --------------------------------------------------------------------------- */
.member-editor-panel h2 { margin: 0 0 4px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.me-main { grid-column: 1 / -1; }
.me-grid > .me-side { display: contents; }
.me-box-category { grid-column: 1; grid-row: 2; }
.me-box-summary { grid-column: 2; grid-row: 2; }
.me-media-row { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.me-media-row > .me-box { min-width: 0; }
.me-grid .me-submit-box { grid-column: 1 / -1; grid-row: 4; text-align: left; }
.me-grid .me-submit-box .btn { width: auto; }
.me-main { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; }
.me-title { display: block; width: 100%; padding: 14px 16px 6px; border: 0; background: transparent; color: var(--ink); font-family: var(--serif); font-size: 20px; }
.me-title:focus { outline: none; }
.me-title::placeholder { color: var(--muted); }
.me-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.me-toolbar button {
    min-width: 30px; height: 28px; padding: 0 7px; border: 0; border-radius: var(--r-sm); background: transparent;
    color: var(--ink-soft); font-size: 13px; line-height: 1; cursor: pointer; font-family: inherit;
}
.me-toolbar button:hover { background: var(--paper-2, rgba(0,0,0,.04)); color: var(--accent); }
.me-toolbar button.is-on { background: var(--accent); color: #fff; }
.me-sep { width: 1px; height: 16px; background: var(--line); margin: 0 5px; }
.me-preview-btn { margin-left: auto; }
.me-area { position: relative; }
.me-area textarea {
    display: block; width: 100%; min-height: 320px; padding: 14px 16px; border: 0; background: transparent;
    color: var(--ink); font-size: 14.5px; line-height: 1.9; font-family: var(--sans); resize: vertical;
}
.me-area textarea:focus { outline: none; }
.me-preview { min-height: 320px; max-height: 480px; overflow: auto; padding: 14px 16px; }
.me-foot { display: flex; gap: 6px; padding: 8px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.me-foot b { color: var(--accent); font-weight: 600; }
.me-side { display: grid; gap: 14px; }
.me-box { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2, #fff); padding: 14px; }
.me-box h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 14px; color: var(--ink); }
.me-field { display: block; margin-bottom: 10px; }
.me-field:last-child { margin-bottom: 0; }
.me-field > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }
.me-field input, .me-field select {
    width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--paper); color: var(--ink); font-size: 13.5px; font-family: inherit;
}
.me-field input:focus, .me-field select:focus { outline: none; border-color: var(--accent); }
.me-cover { display: flex; align-items: center; justify-content: center; height: 110px; margin-bottom: 10px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; }
.me-cover span { font-size: 12px; color: var(--muted); }
.me-cover img { width: 100%; height: 100%; object-fit: cover; }
.me-cover-actions { display: flex; gap: 8px; }
.me-upload {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px;
    border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink-soft);
    font-size: 12.5px; cursor: pointer; text-align: center;
}
.me-upload:hover { border-color: var(--accent); color: var(--accent); }
.me-cover-actions button {
    padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent;
    color: var(--muted); font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.me-cover-actions button:hover { border-color: var(--accent); color: var(--accent); }
.me-hint { margin: 9px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.me-inline-check, .m-inline-check, .mo-inline-check { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; font-size: 11px; font-weight: normal; color: var(--muted); cursor: pointer; vertical-align: middle; }
.me-inline-check input, .m-inline-check input, .mo-inline-check input { width: auto; margin: 0; accent-color: var(--accent, var(--m-accent, var(--mo-green, #07c160))); }
.me-check, .m-check, .mo-check { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.me-cover-actions { flex-wrap: wrap; }
.me-cover-actions .me-check { margin-top: 0; }
.me-check input, .m-check input, .mo-check input { width: auto; margin: 0; accent-color: var(--accent, var(--m-accent, var(--mo-green, #07c160))); }
.me-box textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
    color: var(--ink); font-size: 13.5px; line-height: 1.7; font-family: inherit; resize: vertical;
}
.me-box textarea:focus { outline: none; border-color: var(--accent); }
.me-submit-box { text-align: center; }
.me-submit-box .btn { width: 100%; }
@media (max-width: 720px) {
    .me-grid { grid-template-columns: 1fr; }
    .me-main, .me-box-category, .me-box-summary, .me-media-row, .me-submit-box { grid-column: 1; grid-row: auto; }
    .me-area textarea { min-height: 240px; }
}
@media (max-width: 560px) { .me-media-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   文章分享 · v1.7.0 精简工具条（链接 / 二维码 / 主题海报）
   常驻仅一行；二维码与海报按需浮层呈现，不占正文篇幅
   ========================================================================== */
.share-box { position: relative; margin: 22px 0 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.share-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.share-label { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.share-actions { display: flex; align-items: center; gap: 6px; }
.share-btn { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink-soft); font-size: 12px; font-family: inherit; line-height: 1.4; text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.share-btn:hover, .share-btn.is-active, .share-btn.is-flash { border-color: var(--accent); color: var(--accent); }
.share-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.share-btn.is-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.share-tip { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.share-qr-pop { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: 184px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); box-shadow: 0 14px 36px rgba(0, 0, 0, .14); }
.share-qr-img { display: block; width: 160px; height: 160px; background: #fff; }
.share-qr-save { display: block; margin-top: 8px; font-size: 11.5px; text-align: center; color: var(--accent); text-decoration: none; }
.share-qr-save:hover { text-decoration: underline; }
.share-modal { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.share-modal[hidden], .share-qr-pop[hidden], .share-modal-loading[hidden], .share-modal-img[hidden] { display: none !important; }
.share-modal-mask { position: absolute; inset: 0; background: rgba(18, 22, 22, .74); }
.share-modal-card { position: relative; width: min(420px, 94vw); max-height: 92vh; max-height: 92dvh; overflow: auto; padding: 18px; text-align: center; border-radius: var(--r-sm); background: var(--paper); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.share-modal-close { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.share-modal-close:hover { color: var(--accent); }
.share-modal-img { display: block; width: 100%; max-width: 340px; margin: 6px auto 15px; border: 1px solid var(--line); }
.share-modal-loading { padding: 80px 0; margin: 0; font-size: 13px; color: var(--muted); }
.share-modal-foot { display: flex; justify-content: center; }
@media (max-width: 560px) {
    .share-label { display: none; }
    .share-actions { justify-content: flex-end; gap: 6px; }
    .share-btn { padding: 8px 11px; font-size: 12px; min-height: 34px; }
    .share-qr-pop { position: static; margin-top: 10px; }
}
[data-theme="dark"] .share-qr-img { background: #fff; }

/* 插件 / 小工具：默认只占一个图标位置，沿用工具栏当前颜色 */
.ink-widget { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 30px; height: 30px; color: var(--muted); }
.ink-widget svg { display: block; flex: 0 0 auto; }
a.ink-widget { text-decoration: none; }
.ink-widget:hover { color: var(--ink); }
.ink-weather { cursor: help; }
.ink-weather-temp { margin-left: 3px; font-size: 11px; white-space: nowrap; }
.ink-weather.is-full, .ink-plugin.is-wide { width: auto; min-width: 30px; }
.nav-tools > .ink-weather.is-full {
    width: auto;
    min-width: 0;
    height: 34px;
    padding: 0 10px 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    line-height: 1;
    transition: border-color .25s, color .25s;
}
.nav-tools > .ink-weather.is-full:hover { border-color: rgba(46, 107, 87, .34); color: var(--accent); }
.nav-tools > .ink-weather.is-full svg { width: 15px; height: 15px; }
.nav-tools > .ink-weather.is-full .ink-weather-temp { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 500; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.ink-plugin-text { margin-left: 3px; font-size: 11px; white-space: nowrap; }
.ink-plugin { cursor: default; }
a.ink-plugin { cursor: pointer; }

/* 极窄屏：编辑工具栏收紧为一行，底部说明另起一行（须排在本文件编辑器样式之后） */
@media (max-width: 520px) {
    .me-toolbar { gap: 0; padding: 5px 5px; }
    .me-toolbar button { min-width: 25px; height: 26px; padding: 0 3px; font-size: 12.5px; }
    .me-sep { margin: 0 3px; }
    .me-foot { flex-wrap: wrap; align-items: baseline; row-gap: 2px; }
    .me-foot > span:nth-child(2) { display: none; }
    .me-foot > span:last-child { flex: 1 1 100%; }
}

/* 超窄屏（≤360）：编辑工具栏进一步收紧，按钮不再折行 */
@media (max-width: 360px) {
    .me-toolbar button { min-width: 22px; padding: 0 2px; }
    .me-sep { display: none; }
}

/* ==========================================================================
   一键回到顶部（v1.11.4）：仅在页面可滚动且已向下滚动时出现在右下角
   层级低于抽屉 / 提示条 / 分享弹窗，隐藏时不接收指针事件
   ========================================================================== */
.back-to-top {
    position: fixed;
    right: clamp(16px, 2.4vw, 30px);
    bottom: calc(clamp(16px, 2.4vw, 30px) + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-soft);
    box-shadow: 0 8px 24px rgba(34, 41, 43, .13);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease,
                border-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 10px 28px rgba(34, 41, 43, .18);
}
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.back-to-top svg { display: block; }
[data-theme="dark"] .back-to-top { box-shadow: 0 8px 24px rgba(0, 0, 0, .42); }
@media (max-width: 640px) {
    .back-to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    .back-to-top { transition: none; transform: none; }
}

/* ---------- 内置插件：运行时间（页脚） ---------- */
.ink-uptime {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* ---------- 内置插件：背景音乐（全站浮动播放器，置于「回到顶部」之下，同款圆形按钮） ---------- */
.ink-bgm {
    position: fixed;
    right: clamp(16px, 2.4vw, 30px);
    bottom: calc(clamp(16px, 2.4vw, 30px) + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    line-height: 0;
}
/* 启用背景音乐时，把「回到顶部」上移，使音乐按钮位于其正下方；未启用时回到顶部仍在原位 */
.ink-bgm ~ .back-to-top {
    bottom: calc(clamp(16px, 2.4vw, 30px) + env(safe-area-inset-bottom, 0px) + 44px + 12px);
}
.ink-bgm-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-soft);
    box-shadow: 0 8px 24px rgba(34, 41, 43, .13);
    cursor: pointer;
    transition: border-color .25s ease, color .25s ease, box-shadow .25s ease, background .25s ease;
}
.ink-bgm-btn:hover {
    border-color: var(--ink-soft);
    box-shadow: 0 10px 28px rgba(34, 41, 43, .18);
}
.ink-bgm-btn:focus-visible { outline: 2px solid var(--ink-soft); outline-offset: 3px; }
/* 始终与「回到顶部」一致的灰色外框，播放/暂停不改变颜色 */
.ink-bgm-btn svg { display: block; }
[data-theme="dark"] .ink-bgm-btn { box-shadow: 0 8px 24px rgba(0, 0, 0, .42); }
@media (max-width: 640px) {
    .ink-bgm { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    .ink-bgm ~ .back-to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px) + 44px + 10px); }
}

/* ==========================================================================
   v1.20.0 品牌主符号（默认 Logo / 印章）
   浅色底用墨色版、深色底用反白版；后台上传自定义 Logo 时不再输出这些元素
   ========================================================================== */
.brand-mark { display: block; width: 100%; height: 100%; object-fit: contain; }
.mark-on-dark { display: none; }
[data-theme="dark"] .mark-on-light { display: none; }
[data-theme="dark"] .mark-on-dark { display: block; }

/* 页头默认印章：去掉旧「墨」字方块的填充，直接展示品牌主符号 */
.brand-seal { display: block; background: none; box-shadow: none; border-radius: 0; }
.brand-seal .brand-mark { object-fit: contain; }

/* ===== 相关文章 ===== */
.related { margin-top: 30px; }
.related-title { font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin: 0 0 14px; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.related-list li { margin: 0; }
.related-list a { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: border-color .18s; }
.related-list a:hover { border-color: var(--accent); }
.related-cover { flex: none; width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.related-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.related-text b { font-size: 14px; line-height: 1.4; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-text time { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .related-list { grid-template-columns: 1fr; } }
