/* =========================================================
   hsBlog 前台主题（v3 · 经典博客风 · 扁平克制）
   —— 顶栏 + 文章列表 + 右侧栏，规整、朴素、不花哨
   ========================================================= */

:root {
    --accent: #4c6ef5;
    --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 35%, transparent);

    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #2b2f36;
    --text-soft: #5b626c;
    --text-mute: #939aa4;

    --border: #e6e8ec;
    --border-2: #d6d9df;

    --radius: 8px;
    --maxw: 1140px;
    --sidebar-w: 300px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;
}

[data-theme="dark"] {
    --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
    --bg: #15171c;
    --surface: #1c1f25;
    --text: #e3e6ea;
    --text-soft: #a7adb8;
    --text-mute: #6e757f;
    --border: #2b2f37;
    --border-2: #3a3f49;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
    font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased;
    overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.4; }

.container { max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 24px 16px 48px; flex: 1 0 auto; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 16px; z-index: 999; }
.skip-link:focus { left: 0; }

/* ---------- 顶栏 ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; height: 58px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 7px; flex: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-text small { color: var(--text-mute); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.main-nav > a { color: var(--text-soft); padding: 8px 12px; border-radius: 6px; font-size: 14.5px; white-space: nowrap; }
.main-nav > a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.nav-user { display: inline-flex; align-items: center; gap: 7px; color: var(--text) !important; font-weight: 600; padding: 5px 11px 5px 5px; border-radius: 999px; border: 1px solid var(--border-2); }
.nav-user:hover { border-color: var(--accent); text-decoration: none; }
.nav-user-avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.nav-cta { background: var(--accent); color: #fff !important; padding: 7px 14px !important; border-radius: 6px; }
.nav-cta:hover { text-decoration: none; opacity: .92; }

.search-box { margin-left: 6px; }
.search-box input { border: 1px solid var(--border-2); background: var(--bg); color: var(--text); border-radius: 6px; padding: 7px 12px; font-size: 14px; width: 150px; transition: width .2s, border-color .15s; }
.search-box input::placeholder { color: var(--text-mute); }
.search-box input:focus { outline: none; width: 180px; border-color: var(--accent); }

.theme-toggle { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-soft); cursor: pointer; display: grid; place-items: center; flex: none; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Flash ---------- */
.flash-stack { max-width: var(--maxw); margin: 14px auto 0; padding: 0 16px; display: grid; gap: 8px; }
.flash { padding: 11px 15px; border-radius: var(--radius); font-size: 14px; border: 1px solid transparent; }
.flash-success { background: #eafaf3; color: #157347; border-color: #b6e6cf; }
.flash-error { background: #fdeeee; color: #b42323; border-color: #f3c9c9; }
[data-theme="dark"] .flash-success { background: #11271d; color: #5fd6a0; border-color: #1c4533; }
[data-theme="dark"] .flash-error { background: #2a1515; color: #f08a8a; border-color: #4a2222; }

/* ---------- 主体布局 ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-w); gap: 24px; align-items: start; }
.layout-single { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
.content { min-width: 0; }

/* ---------- 轮播图 ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 18px; height: clamp(190px, 30vw, 350px); }
.carousel-track { display: flex; height: 100%; transition: transform .5s ease; }
.slide { position: relative; flex: 0 0 100%; height: 100%; display: block; }
.slide:hover { text-decoration: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 26px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.slide-cat { display: inline-block; font-size: 12px; background: var(--accent); color: #fff; padding: 2px 11px; border-radius: 4px; margin-bottom: 9px; }
.slide-cap h3 { margin: 0; font-size: clamp(16px, 2.4vw, 22px); line-height: 1.4; color: #fff; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .38); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; opacity: .75; transition: opacity .2s, background .2s; z-index: 2; }
.carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: rgba(0, 0, 0, .62); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }
.carousel-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 2; }
.cdot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.cdot.active { background: #fff; width: 22px; border-radius: 5px; }

/* ---------- 文章列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card { display: flex; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--border-2); box-shadow: 0 1px 6px rgba(0, 0, 0, .05); }
.post-thumb { display: block; flex: none; width: 210px; align-self: stretch; overflow: hidden; background: var(--bg); border-right: 1px solid var(--border); }
.post-thumb img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
.post-card-body { flex: 1; min-width: 0; padding: 20px 24px; }
.post-card-title { margin: 0 0 10px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }
.post-meta { font-size: 13px; color: var(--text-mute); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.post-meta .dot { opacity: .5; }
.post-meta .cat-link { color: var(--accent); }
.post-card-excerpt { color: var(--text-soft); margin: 0 0 14px; font-size: 14.5px; line-height: 1.75; }
.read-more { font-size: 13.5px; color: var(--accent); }

/* 列表/归档页标题条 */
.archive-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 22px; margin-bottom: 18px; }
.archive-head h1 { font-size: 20px; margin: 0; }
.archive-head p { color: var(--text-soft); margin: 6px 0 0; font-size: 14px; }
.archive-count { font-size: 13px; color: var(--text-mute); margin-left: 8px; font-weight: 400; }

/* 空状态 */
.empty-state { text-align: center; padding: 56px 24px; color: var(--text-soft); }
.empty-emoji { font-size: 40px; margin-bottom: 12px; }
.empty-state p { margin: 0; font-size: 15px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); font-size: 14px; }
.page-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-dots { align-self: end; color: var(--text-mute); padding: 0 2px; }

/* ---------- 侧边栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 74px; }
.widget { padding: 16px 18px 18px; }
.widget-title { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--text); padding-bottom: 11px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.widget-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.widget p { color: var(--text-soft); font-size: 14px; margin: 0; line-height: 1.75; }
.recent-list, .cat-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { padding: 9px 0; border-bottom: 1px dashed var(--border); display: flex; flex-direction: column; gap: 3px; }
.recent-list li:last-child { border-bottom: 0; }
.recent-list a { color: var(--text-soft); font-size: 14px; }
.recent-list a:hover { color: var(--accent); text-decoration: none; }
.recent-list time { color: var(--text-mute); font-size: 12px; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { color: var(--text-soft); font-size: 14px; }
.cat-list a:hover { color: var(--accent); text-decoration: none; }
.cat-list .count { background: var(--bg); color: var(--text-mute); font-size: 12px; padding: 1px 9px; border-radius: 999px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 13px; padding: 4px 10px; border-radius: 4px; background: var(--bg); color: var(--text-soft); border: 1px solid var(--border); }
.tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ---------- 面包屑 / 返回 ---------- */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--text-mute); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55vw; }

.post-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); font-size: 14px; }
.back-btn:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- 单篇文章 ---------- */
.single { padding: 28px 32px 32px; }
.single-head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.single-cat { display: inline-block; font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 3px 11px; border-radius: 4px; margin-bottom: 12px; }
.single-title { font-size: 26px; line-height: 1.3; margin: 0 0 12px; }
.single-meta { color: var(--text-mute); font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.single-meta .dot { opacity: .5; }
.single-cover { width: 100%; border-radius: var(--radius); margin-bottom: 22px; }
.single-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- 正文排版 ---------- */
.prose { font-size: 16px; color: var(--text); line-height: 1.85; word-wrap: break-word; overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.7em 0 .7em; scroll-margin-top: 70px; }
.prose h1 { font-size: 1.55em; }
.prose h2 { font-size: 1.35em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.18em; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.prose li { margin: .3em 0; }
.prose img { border-radius: 6px; margin: 1.2em 0; border: 1px solid var(--border); }
.prose blockquote { margin: 1.3em 0; padding: 8px 18px; border-left: 3px solid var(--accent); background: var(--bg); color: var(--text-soft); border-radius: 0 4px 4px 0; }
.prose blockquote p { margin: .5em 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg); color: #c0392b; padding: .15em .4em; border-radius: 4px; border: 1px solid var(--border); }
[data-theme="dark"] .prose code { color: #f0a59a; }
.prose pre { background: #1e2228; color: #e6e9ee; padding: 16px 18px; border-radius: 6px; overflow-x: auto; margin: 1.3em 0; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; color: inherit; padding: 0; border: 0; font-size: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.3em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.prose thead th { background: var(--bg); font-weight: 700; }
.prose del { color: var(--text-mute); }

/* ---------- 评论 ---------- */
.comments { margin-top: 18px; padding: 24px 32px 28px; }
.comments-title { font-size: 17px; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.comments-title span { color: var(--text-mute); font-weight: 400; }
.comment-list { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.comment { display: flex; gap: 12px; }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 16px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 2px; flex-wrap: wrap; }
.comment-head strong { font-size: 14px; }
.comment-head time { font-size: 12px; color: var(--text-mute); }
.comment-body p { margin: 0; color: var(--text-soft); font-size: 14.5px; line-height: 1.7; word-wrap: break-word; }
.no-comments { color: var(--text-mute); text-align: center; padding: 12px 0 24px; }

.comment-form h4 { margin: 0 0 14px; font-size: 15px; }
.comment-as { background: var(--bg); color: var(--text-soft); padding: 10px 14px; border-radius: 6px; font-size: 14px; margin: 0 0 12px; }
.comment-as strong { color: var(--accent); }
.comment-login-tip { font-size: 13px; color: var(--text-mute); margin: 0 0 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.comment-form input, .comment-form textarea { width: 100%; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); border-radius: 6px; padding: 10px 13px; font-size: 14px; font-family: inherit; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form textarea { margin-bottom: 12px; resize: vertical; min-height: 100px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-hint { margin-left: 10px; color: var(--text-mute); font-size: 13px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; font-family: inherit; transition: .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; opacity: .92; }
.btn-block { width: 100%; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 32px 0; }
.auth-card { width: 100%; max-width: 400px; padding: 32px 30px; }
.auth-title { font-size: 21px; margin: 0 0 5px; text-align: center; }
.auth-sub { text-align: center; color: var(--text-mute); font-size: 14px; margin: 0 0 24px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.auth-form input { border: 1px solid var(--border-2); background: var(--surface); color: var(--text); border-radius: 6px; padding: 10px 13px; font-size: 14.5px; font-family: inherit; }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form .btn { margin-top: 4px; }
.auth-switch { text-align: center; margin: 20px 0 0; font-size: 14px; color: var(--text-soft); }
.auth-back { display: block; text-align: center; margin-top: 16px; color: var(--text-mute); font-size: 13px; }

/* ---------- 会员中心 ---------- */
.member { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.member-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 74px; }
.member-card { padding: 24px 20px; text-align: center; }
.member-avatar { width: 68px; height: 68px; border-radius: 50%; color: #fff; font-size: 28px; font-weight: 700; display: grid; place-items: center; margin: 0 auto 14px; }
.member-name { font-size: 17px; margin: 0 0 8px; }
.member-role { display: inline-block; font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 3px 12px; border-radius: 999px; }
.member-bio { color: var(--text-soft); font-size: 13.5px; margin: 14px 0 0; line-height: 1.65; }
.member-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.member-nav a { padding: 10px 14px; border-radius: 6px; color: var(--text-soft); font-size: 14.5px; }
.member-nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.member-nav a.active { background: var(--accent); color: #fff; }
.member-logout { color: var(--text-mute) !important; }
.member-logout:hover { background: #fdeeee !important; color: #b42323 !important; }
[data-theme="dark"] .member-logout:hover { background: #2a1515 !important; color: #f08a8a !important; }
.member-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.section-card { padding: 24px 26px; }
.section-title { font-size: 18px; margin: 0 0 18px; display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.count-badge { font-size: 13px; background: var(--accent-soft); color: var(--accent); padding: 1px 10px; border-radius: 999px; font-weight: 600; }
.member-info { display: flex; flex-direction: column; }
.member-info > div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 2px; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.member-info > div:last-child { border-bottom: 0; }
.member-info span { color: var(--text-mute); flex: none; }
.member-info strong { font-weight: 600; text-align: right; word-break: break-word; }
.member-form { display: flex; flex-direction: column; gap: 14px; }
.member-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.member-form input, .member-form textarea { border: 1px solid var(--border-2); background: var(--surface); color: var(--text); border-radius: 6px; padding: 10px 13px; font-size: 14.5px; font-family: inherit; }
.member-form input:focus, .member-form textarea:focus { outline: none; border-color: var(--accent); }
.member-form input:disabled { opacity: .55; }
.member-hr { border: 0; border-top: 1px solid var(--border); margin: 2px 0; }
.member-hint { color: var(--text-mute); font-size: 13px; margin: 0; }
.my-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.my-comments li { padding: 13px 15px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.mc-text { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; }
.mc-meta { font-size: 12.5px; color: var(--text-mute); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mc-status { padding: 1px 8px; border-radius: 4px; font-weight: 600; }
.mc-approved { background: #eafaf3; color: #157347; }
.mc-pending { background: #fdf3e2; color: #b06a08; }
.mc-spam { background: var(--border); color: var(--text-mute); }
[data-theme="dark"] .mc-approved { background: #11271d; color: #5fd6a0; }
[data-theme="dark"] .mc-pending { background: #2c2310; color: #e8b765; }
.member-empty { color: var(--text-mute); text-align: center; padding: 20px 0; }

/* ---------- 错误页 ---------- */
.error-page { text-align: center; padding: 64px 24px; }
.error-code { font-size: 72px; font-weight: 800; line-height: 1; color: var(--accent); }
.error-page h1 { margin: 10px 0 6px; font-size: 22px; }
.error-page p { color: var(--text-soft); margin-bottom: 22px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 26px 16px; flex-shrink: 0; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer-social { display: flex; gap: 18px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.footer-social a { color: var(--text-soft); font-size: 13.5px; }
.footer-social a:hover { color: var(--accent); }
.footer-inner p { color: var(--text-mute); font-size: 13px; margin: 0; }

/* ---------- 返回顶部 ---------- */
.back-to-top { position: fixed; right: 20px; bottom: 20px; width: 42px; height: 42px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: 19px; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); z-index: 90; }
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ====================================================================
   响应式
   ==================================================================== */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; order: 2; }
    .member { grid-template-columns: 1fr; }
    .member-side { position: static; }
}
@media (max-width: 700px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 58px 0 auto 0; flex-direction: column; align-items: stretch; gap: 3px;
        background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 16px 18px;
        margin: 0; transform: translateY(-130%); transition: transform .25s; box-shadow: 0 8px 16px rgba(0, 0, 0, .1);
        max-height: calc(100vh - 58px); overflow-x: hidden; overflow-y: auto;
    }
    body.nav-open .main-nav { transform: none; }
    .main-nav > a { padding: 12px; }
    .nav-user { justify-content: flex-start; }
    .search-box { width: 100%; margin-left: 0; }
    .search-box input { width: 100%; }
    .search-box input:focus { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .single { padding: 22px 18px 24px; }
    .comments { padding: 20px 18px 22px; }
    .single-title { font-size: 22px; }
    .post-nav { flex-direction: column; }
    .back-btn { justify-content: center; }
    /* 手机端：隐藏侧栏（关于/最新文章/分类/标签云） */
    .sidebar { display: none; }
    /* 手机端：文章卡片仍为左图右文，缩略图缩小 */
    .post-thumb { width: 116px; }
    .post-card-body { padding: 14px 16px; }
    .post-card-title { font-size: 17px; margin-bottom: 8px; }
    .post-card-excerpt { display: none; }
    .carousel { height: clamp(150px, 42vw, 220px); }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: .01ms !important; }
}
