/* Doone theme for Typecho 1.3 — www.nvidia.fun */

:root {
  --bg: #f7f7f2;
  --surface: #ffffff;
  --surface-2: #f0f0e9;
  --text: #1d1f1a;
  --text-2: #4a4d45;
  --muted: #73776c;
  --line: #e4e4dc;
  --accent: #4b7a0f;
  --accent-strong: #3a6008;
  --accent-soft: #ecf3df;
  --mark: #fff3b0;
  --shadow: 0 1px 2px rgba(29, 31, 26, .04), 0 8px 24px rgba(29, 31, 26, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 760px;
  --header-h: 60px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121410;
    --surface: #1a1d17;
    --surface-2: #22261e;
    --text: #e7e9e2;
    --text-2: #c3c7bb;
    --muted: #949a8b;
    --line: #2d3228;
    --accent: #a6d65e;
    --accent-strong: #c0e88a;
    --accent-soft: #232f17;
    --mark: #4a4415;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121410;
  --surface: #1a1d17;
  --surface-2: #22261e;
  --text: #e7e9e2;
  --text-2: #c3c7bb;
  --muted: #949a8b;
  --line: #2d3228;
  --accent: #a6d65e;
  --accent-strong: #c0e88a;
  --accent-soft: #232f17;
  --mark: #4a4415;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.icon { width: 1em; height: 1em; flex: none; vertical-align: -.125em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--bg);
}
.skip-link:focus { top: 12px; color: var(--bg); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding: 0 16px; }
.site-main { flex: 1; padding: 32px 0 64px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); max-width: calc(1080px + 32px); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 6px 12px; border-radius: 999px;
  color: var(--text-2); font-size: 15px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
  font-size: 19px; cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

.menu-btn, .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.search-panel { border-top: 1px solid var(--line); background: var(--bg); }
.search-form { display: flex; align-items: center; gap: 10px; height: 56px; color: var(--muted); font-size: 18px; max-width: calc(1080px + 32px); }
.search-form input { flex: 1; height: 100%; border: 0; background: transparent; outline: none; font-size: 17px; color: var(--text); }

@media (max-width: 720px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; margin: 0; padding: 8px 12px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 16px; }
  .header-actions { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { display: flex; gap: 28px; align-items: flex-start; padding: 28px 0 36px; }
.hero-avatar {
  width: 88px; height: 88px; flex: none; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line);
}
.hero-text { min-width: 0; }
.hero-title { margin: 0 0 8px; font: 700 clamp(28px, 5vw, 36px)/1.25 var(--font-serif); letter-spacing: .04em; }
.hero-desc {
  overflow-wrap: anywhere;
  margin: 0 0 18px; padding-left: 14px; border-left: 3px solid var(--accent);
  color: var(--text-2); font: 16px/1.85 var(--font-serif);
}
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--muted); font-size: 14px; }
.hero-stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.social { display: flex; gap: 6px; margin: 0; }
.social a {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; color: var(--muted); font-size: 17px;
  border: 1px solid var(--line); background: var(--surface);
  transition: color .15s, border-color .15s, transform .15s;
}
.social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

@media (max-width: 560px) {
  .hero { flex-direction: column; gap: 18px; padding-top: 12px; }
  .hero-avatar { width: 72px; height: 72px; }
}

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 14px; line-height: 1.6;
  transition: border-color .15s, color .15s;
}
.chip small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--accent); border-color: var(--accent); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- post list ---------- */
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.post-item-date { display: flex; flex-direction: column; padding-top: 4px; font-family: var(--font-mono); line-height: 1.3; }
.d-day { font-size: 16px; font-weight: 600; color: var(--text); }
.d-year { font-size: 12px; color: var(--muted); }
.post-item-body { min-width: 0; }
.post-item-title { margin: 0 0 6px; font-size: 20px; line-height: 1.45; font-weight: 600; }
.post-item-title a { color: var(--text); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .25s, color .15s; }
.post-item-title a:hover { color: var(--accent); background-size: 100% 2px; }
.post-item-excerpt { margin: 0 0 10px; color: var(--text-2); font-size: 15px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.meta > * { display: inline-flex; align-items: center; gap: 5px; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--accent); }
.meta-cats a + a { margin-left: 2px; }

@media (max-width: 560px) {
  .post-item { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .post-item-date { flex-direction: row; gap: 0; font-size: 13px; }
  .d-day { order: 2; font-size: 13px; font-weight: 400; color: var(--muted); }
  .d-year::after { content: "-"; }
  .post-item-title { font-size: 18px; }
}

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; }
.pager-side { flex: 1; }
.pager-next { text-align: right; }
.pager a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font-size: 14px;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager-count { color: var(--muted); font: 13px var(--font-mono); }

.empty { padding: 64px 0; text-align: center; color: var(--muted); }
.empty-title { font-size: 18px; color: var(--text-2); }

/* ---------- page head ---------- */
.page-head { padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.eyebrow a { color: inherit; }
.page-title { margin: 0; font: 700 clamp(26px, 4.5vw, 32px)/1.3 var(--font-serif); }
.page-desc { margin: 8px 0 0; color: var(--text-2); }
.page-count { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- article ---------- */
.article-head { padding: 12px 0 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.article-title { margin: 0 0 14px; font: 700 clamp(26px, 5vw, 36px)/1.35 var(--font-serif); letter-spacing: .01em; }

.article-layout { position: relative; }
.toc {
  position: absolute; top: 0; left: calc(100% + 40px); width: 220px; height: 100%;
}
.toc-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.toc-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.toc-list {
  max-height: calc(100vh - var(--header-h) - 96px); overflow-y: auto;
  border-left: 1px solid var(--line); font-size: 13px; line-height: 1.5;
}
.toc-list a {
  display: block; padding: 4px 0 4px 14px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toc-list a.lv-3 { padding-left: 26px; }
.toc-list a:hover { color: var(--text); }
.toc-list a.is-active { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 1340px) { .toc { display: none !important; } }

/* prose */
.prose { font-size: 17px; line-height: 1.85; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose pre, .prose figure { margin: 0 0 1.25em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { line-height: 1.4; font-weight: 700; margin: 2em 0 .8em; }
.prose h1 { font-size: 1.6em; }
.prose h2 { font-size: 1.4em; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.2em; }
.prose h4 { font-size: 1.05em; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose mark { background: var(--mark); color: inherit; padding: 0 .2em; border-radius: 3px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose blockquote {
  padding: .8em 1.2em; border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose img { display: block; margin: 1.5em auto; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.prose img.emoji { display: inline; width: 1.6em; margin: 0 .1em; box-shadow: none; border-radius: 0; vertical-align: -.35em; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .92em; }
.prose th, .prose td { padding: .55em .9em; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }

.prose :not(pre) > code {
  padding: .15em .4em; border-radius: 5px;
  background: var(--surface-2); color: var(--text);
  font: .86em var(--font-mono); word-break: break-word;
}
.prose pre {
  position: relative; overflow: auto; padding: 1em 1.2em;
  border-radius: var(--radius); background: #1d1f21; color: #c5c8c6;
  font: 14px/1.65 var(--font-mono); -webkit-overflow-scrolling: touch; tab-size: 4;
}
.prose pre[class*="language-"] { margin: 0 0 1.25em; border-radius: var(--radius); font-size: 14px; }
.prose pre code { font: inherit; background: none; padding: 0; }
.prose .toolbar-item button, .prose div.code-toolbar > .toolbar .toolbar-item > button {
  border-radius: 6px; padding: 2px 8px; font-size: 12px;
}

/* 密码保护文章 */
.prose form.protected { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.prose form.protected p { margin: 0; display: flex; gap: 10px; width: 100%; }
.prose form.protected .word { width: 100%; color: var(--text-2); }
.prose form.protected input[type="password"] { min-width: 0; flex: 1; max-width: 360px; }

.article-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.article-foot p { margin: 0; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tags a { padding: 1px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.tags a:hover { color: var(--accent-strong); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 32px 0 0; }
.post-nav-item:empty { visibility: hidden; }
.post-nav-item a {
  display: block; height: 100%; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text); font-weight: 600; line-height: 1.5;
  transition: border-color .15s, transform .15s;
}
.post-nav-item a:hover { border-color: var(--accent); color: var(--accent); }
.post-nav-label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.post-nav-next { text-align: right; }
.post-nav-item { display: flex; flex-direction: column; }
.post-nav-item .post-nav-label + a { margin-top: 0; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { text-align: left; } }

/* ---------- forms / buttons ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form input[type="search"], .search-form input[type="search"]:focus { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.btn, .prose form.protected .submit, button.submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: 15px;
  cursor: pointer; white-space: nowrap; flex: none; transition: background .15s, transform .1s;
}
.btn:hover, .prose form.protected .submit:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }

/* ---------- comments ---------- */
.comments { margin-top: 56px; }
.section-title { margin: 0 0 20px; font-size: 20px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-list .comment-list { margin-top: 8px; padding-left: 52px; }
.comment-list .comment-list .comment { border-top: 0; padding: 10px 0; }
.comment-body { display: flex; gap: 12px; }
.comment-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--surface-2); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; }
.comment-author { font-weight: 600; color: var(--text); }
.comment-author a { color: inherit; }
.badge { padding: 0 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 12px; line-height: 1.6; }
.comment-time { color: var(--muted); font-size: 12px; }
.comment-content { margin: 4px 0 2px; font-size: 15px; color: var(--text-2); }
.comment-content p { margin: 0 0 .5em; }
.comment-content img { max-height: 2.2em; width: auto; vertical-align: middle; box-shadow: none; }
.comment-content img.emoji { width: 1.5em; vertical-align: -.35em; }
.comment-waiting { margin: 4px 0; color: var(--accent); font-size: 13px; }
.comment-reply a { color: var(--muted); font-size: 13px; }
.comment-reply a:hover { color: var(--accent); }
@media (max-width: 560px) { .comment-list .comment-list { padding-left: 20px; } }

.comment-pager { display: flex; gap: 6px; list-style: none; padding: 0; margin: 16px 0; }
.comment-pager a { display: block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); }
.comment-pager .current a { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.respond { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.comment-list .respond { margin: 12px 0 4px; }
.respond-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.respond-title { margin: 0; font-size: 16px; }
.cancel-reply a { color: var(--muted); font-size: 13px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.form-row label span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.textarea-label { display: block; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.form-hint { color: var(--muted); font-size: 13px; }
.logged-in { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .form-hint { display: none; } .form-foot { justify-content: flex-end; } }

/* ---------- friends ---------- */
.friends { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.friend a {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.friend a:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.friend-avatar {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; overflow: hidden;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px;
}
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-body { display: flex; flex-direction: column; min-width: 0; }
.friend-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-desc { color: var(--muted); font-size: 13px; }

/* ---------- 404 ---------- */
.notfound { padding: 48px 0; text-align: center; }
.notfound-code { margin: 0; font: 700 96px/1 var(--font-mono); color: var(--accent-soft); -webkit-text-stroke: 1px var(--accent); }
.notfound .page-title { margin: 16px 0 8px; }
.notfound-search { display: flex; gap: 8px; max-width: 420px; margin: 28px auto 16px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 13px; }
.footer-inner p { margin: 0; }
.hitokoto { margin-bottom: 12px !important; font-family: var(--font-serif); font-size: 14px; }
.hitokoto a { color: var(--text-2); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.site-footer a { color: var(--text-2); }

.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 40;
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text-2);
  box-shadow: var(--shadow); font-size: 18px; cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 插件兼容 ---------- */
.prose .dplayer, .prose .jwplayer { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25em; }

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

@media print {
  .site-header, .site-footer, .to-top, .toc, .comments, .post-nav { display: none !important; }
  body { background: #fff; color: #000; }
}
