@charset "utf-8";
/* ==========================================================================
   PureBlog · EMLOG 模板样式
   Author: nswin.cn  https://www.nswin.cn/
   结构：固定毛玻璃顶栏 + 1280 容器 + 1fr/320px 双栏 + 左图右文卡片列表
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: rgba(59, 130, 246, .1);
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);

    --text: #1f2937;
    --text-body: #374151;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --bg: #f3f4f6;
    --card: #ffffff;
    --border: #e5e7eb;
    --soft: #f9fafb;                                /* 版权声明等浅底区块 */
    --header-bg: rgba(255, 255, 255, .95);          /* 毛玻璃顶栏 */
    --code-bg: #1f2937;                             /* 代码块 */
    --code-text: #e5e7eb;
    --code-inline: #e11d48;                         /* 行内代码 */
    --flag-bg: #fef2f2;                             /* 置顶标识 */
    --flag-text: #ef4444;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, .1);

    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 50px;

    --transition: all .3s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

    --header-height: 70px;
    --sidebar-width: 320px;

    color-scheme: light;
}

/* ---------- 1.1 暗黑模式令牌（由页头脚本写入 html[data-theme]，可跟随系统或后台指定） ---------- */
:root[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: rgba(96, 165, 250, .15);
    --gradient: linear-gradient(135deg, #60a5fa, #a78bfa);

    --text: #e8eaed;
    --text-body: #c9cdd4;
    --text-muted: #9aa1ac;
    --text-light: #7c838f;

    --bg: #0f1115;
    --card: #171a21;
    --border: #2a2f39;
    --soft: #1c2028;
    --header-bg: rgba(23, 26, 33, .88);
    --code-bg: #0b0d11;
    --code-text: #d5d9df;
    --code-inline: #fb7185;
    --flag-bg: rgba(239, 68, 68, .16);
    --flag-text: #fca5a5;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .55);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, .6);

    color-scheme: dark;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* 带 display 的元素会盖掉浏览器默认的 [hidden]{display:none}，导致 JS 里 el.hidden = true 失效
   （典型症状：弹窗关不掉、按钮该隐藏却一直显示）。这里统一兜底。
   受影响组件：.pb-modal（flex）、.pb-auth-panel（block）、.btn（inline-flex）、.emoticon-panel 等。 */
[hidden] { display: none !important; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color .25s ease, color .25s ease;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; border: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.4; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.pb-icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 3. 容器 ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 4. 顶部导航 ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--header-height);
}

.site-logo { flex: none; display: flex; align-items: center; }
.site-logo a { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.25rem; font-weight: 700; }
.site-logo a:hover { color: var(--primary); }
.site-logo img { height: 40px; width: auto; }

.logo-badge {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--radius);
    background: var(--gradient); color: #fff; font-size: 1.1rem; font-weight: 800;
}

/* 导航 */
.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
    display: flex; align-items: center; gap: 4px;
    padding: 10px 16px; border-radius: var(--radius);
    font-size: .95rem; font-weight: 500; color: var(--text-muted);
    white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--primary); background: var(--primary-light); }
.nav-link.is-active { color: var(--primary); background: var(--primary-light); }
.nav-link .pb-icon { font-size: .9rem; opacity: .8; }

.dropdown-menu {
    position: absolute; top: 100%; left: 0;
    min-width: 160px; padding: 6px 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: var(--transition); z-index: 10;
}
.nav-item:hover > .dropdown-menu,
.nav-item:focus-within > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 8px 18px; font-size: .9rem; color: var(--text-muted); }
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

/* 右侧工具 */
.header-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    background: transparent; border: 0; border-radius: var(--radius);
    color: var(--text-muted); font-size: 1.15rem; transition: var(--transition);
}
.tool-btn:hover { background: var(--primary-light); color: var(--primary); }

.menu-toggle { display: none; }

/* 搜索面板 */
.search-panel {
    display: none;
    padding: 14px 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-input {
    flex: 1; min-width: 0; height: 42px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .95rem; color: var(--text); background: var(--bg); outline: none;
    transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); background: var(--card); }
.search-submit {
    flex: none; height: 42px; padding: 0 20px; border: 0; border-radius: var(--radius);
    background: var(--primary); color: #fff; font-size: 1rem; transition: var(--transition);
}
.search-submit:hover { background: var(--primary-hover); }

.mobile-search { display: none; }

/* ---------- 5. 主布局 ---------- */
.site-main { padding-top: calc(var(--header-height) + 20px); min-height: 60vh; }

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: 24px;
    align-items: start;
}
.content-area { min-width: 0; }
.sidebar-area { min-width: 0; }

/* ---------- 6. 首页轮播 ---------- */
.slider { position: relative; margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.slider-track { position: relative; aspect-ratio: 21 / 9; }
.slider-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.slider-slide.is-active { opacity: 1; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    margin: 0; padding: 40px 24px 18px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    color: #fff; font-size: 1.05rem; font-weight: 500;
}
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff;
    font-size: 1.3rem; transition: var(--transition);
}
.slider-btn:hover { background: rgba(0, 0, 0, .6); }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-dots { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.slider-dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 5px;
    background: rgba(255, 255, 255, .5); transition: var(--transition);
}
.slider-dots button.is-active { width: 22px; background: #fff; }

/* ---------- 7. 文章列表卡片 ---------- */
.posts-list { display: flex; flex-direction: column; gap: 15px; }

.post-card {
    display: flex; align-items: stretch;
    background: var(--card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-thumbnail {
    position: relative; flex: none;
    width: 240px; height: 213px; align-self: flex-start;
    overflow: hidden; background: var(--bg);
}
.post-thumbnail a { display: block; width: 100%; height: 100%; }
.post-thumbnail img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    transition: transform .5s ease;
}
.post-card:hover .post-thumbnail img { transform: scale(1.05); }

.post-category {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 12px; border-radius: 5px;
    background: var(--primary); color: #fff;
    font-size: .75rem; font-weight: 500; z-index: 2;
}
.post-category a { color: #fff; }
.post-category a:hover { color: #fff; opacity: .85; }

.post-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    padding: 20px 24px;
}
.post-header { margin-bottom: 10px; }
.post-title { font-size: 1.2rem; font-weight: 700; line-height: 1.4; margin: 0; }
.post-title a {
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.post-title a:hover { color: var(--primary); }

.top-flag {
    display: inline-block; margin-right: 6px; padding: 1px 8px;
    border-radius: 4px; background: var(--flag-bg); color: var(--flag-text);
    font-size: .7rem; font-weight: 500; vertical-align: middle;
}

.post-excerpt {
    flex: 1;
    color: var(--text-muted); font-size: .9rem; line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag-link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 5px;
    background: var(--bg); color: var(--text-muted); font-size: .75rem;
}
.tag-link:hover { background: var(--primary-light); color: var(--primary); }

.post-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-top: 12px; margin-top: auto;
    border-top: 1px solid var(--border);
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: .8rem; color: var(--text-light); }
.meta-item { display: flex; align-items: center; gap: 4px; }
.meta-item a { color: var(--text-muted); }
.meta-item a:hover { color: var(--primary); }
.meta-item .avatar {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
    background: var(--bg);
}

.read-more {
    flex: none;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border-radius: 5px;
    background: var(--primary-light); color: var(--primary);
    font-size: .8rem; font-weight: 500;
}
.read-more:hover { background: var(--primary); color: #fff; }

/* 无封面时退化为纯文本卡片 */
.post-card.is-textonly { display: block; }
.post-card.is-textonly .post-content { padding: 24px; }

/* 列表广告位（可选） */
.list-ad { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-ad img { width: 100%; }

/* ---------- 8. 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 24px; padding: 16px 0; }
.pagination a,
.pagination span,
.pagination .active {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .9rem; color: var(--text); transition: var(--transition);
}
.pagination a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .active,
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }

/* ---------- 9. 文章详情 ---------- */
.post-single { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.post-header-single { padding: 32px 32px 24px; }

.post-breadcrumb { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: .82rem; color: var(--text-light); }
.post-breadcrumb a { color: var(--text-muted); }
.post-breadcrumb a:hover { color: var(--primary); }

.post-title-single { font-size: 1.75rem; line-height: 1.35; margin: 0; word-break: break-word; }

.post-meta-single {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    margin-top: 16px; font-size: .82rem; color: var(--text-light);
}
.post-meta-single .meta-item { gap: 5px; }
.post-meta-single .avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.post-cover-single { padding: 0 32px; }
.post-cover-single img { width: 100%; border-radius: var(--radius); }

.post-content-single { padding: 24px 32px 8px; font-size: 1rem; line-height: 1.85; color: var(--text-body); word-wrap: break-word; }
.post-content-single h1, .post-content-single h2, .post-content-single h3,
.post-content-single h4, .post-content-single h5, .post-content-single h6 {
    position: relative; margin: 1.8em 0 .8em; color: var(--text);
}
.post-content-single h1 { font-size: 1.6rem; }
.post-content-single h2 { font-size: 1.4rem; padding-left: 14px; }
.post-content-single h3 { font-size: 1.2rem; padding-left: 14px; }
.post-content-single h4 { font-size: 1.05rem; }
.post-content-single h5, .post-content-single h6 { font-size: 1rem; }
.post-content-single h2::before,
.post-content-single h3::before {
    content: ""; position: absolute; left: 0; top: .45em; bottom: .45em;
    width: 4px; border-radius: 2px; background: var(--primary);
}
.post-content-single p { margin: 0 0 1.1em; }
.post-content-single a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(59, 130, 246, .35); }
.post-content-single a:hover { color: var(--primary-hover); }
.post-content-single img { max-width: 100%; height: auto; border-radius: var(--radius); margin: .5em 0; }
.post-content-single ul, .post-content-single ol { margin: 0 0 1.1em; padding-left: 1.6em; }
.post-content-single ul { list-style: disc; }
.post-content-single ol { list-style: decimal; }
.post-content-single li { margin-bottom: .4em; }
.post-content-single blockquote {
    margin: 1.2em 0; padding: 14px 18px;
    border-left: 4px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--primary-light); color: var(--text-muted);
}
.post-content-single blockquote p:last-child { margin-bottom: 0; }
.post-content-single code {
    padding: 2px 6px; border-radius: 4px;
    background: var(--bg); color: var(--code-inline); font-size: .9em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.post-content-single pre {
    margin: 1.2em 0; padding: 16px; overflow-x: auto;
    background: var(--code-bg); border-radius: var(--radius); color: var(--code-text);
    font-size: .875rem; line-height: 1.7;
}
.post-content-single pre code { padding: 0; background: transparent; color: inherit; }
.post-content-single table { width: 100%; margin: 1.2em 0; border-collapse: collapse; }
.post-content-single th, .post-content-single td { padding: 10px 12px; border: 1px solid var(--border); }
.post-content-single th { background: var(--bg); text-align: left; }
.post-content-single hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border); }

.post-tags-single { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 32px 24px; }

/* 文章操作条：点赞 / 收藏 / 关注作者（需 pb_member 插件，未启用时整块不输出） */
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 32px 24px; }
.pa-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border: 1px solid var(--border); border-radius: 20px;
    background: var(--card); color: var(--text-muted);
    font-size: .85rem; cursor: pointer; user-select: none;
    transition: all .18s ease;
}
.pa-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pa-btn .pb-icon { width: 15px; height: 15px; }
.pa-btn.is-on { border-color: var(--primary); color: var(--primary); background: var(--soft); }
.pa-btn.is-busy { opacity: .6; pointer-events: none; }
.pa-btn.pa-like.is-on { color: #ef4444; border-color: #ef4444; background: rgba(239, 68, 68, .08); }
.pa-btn.pa-like.is-on .pb-icon { fill: #ef4444; }
.pa-btn.pa-follow.is-on { color: #10b981; border-color: #10b981; background: rgba(16, 185, 129, .08); }
[data-theme="dark"] .pa-btn.pa-like.is-on { color: #f87171; border-color: #f87171; background: rgba(239, 68, 68, .14); }
[data-theme="dark"] .pa-btn.pa-follow.is-on { color: #34d399; border-color: #34d399; background: rgba(16, 185, 129, .14); }


/* 版权声明：虚线圆角框 + 一行一条「标签 + 内容」，标签与内容都由后台逐行配置。
   外层用 grid（标签列 max-content）让换行后的内容与上一行内容左对齐，不随标签长短漂移。 */
.post-copyright {
    position: relative;
    display: grid; grid-template-columns: max-content minmax(0, 1fr);
    gap: 3px 10px; align-items: baseline;
    margin: 0 32px 24px; padding: 16px 18px;
    border: 1px dashed var(--border); border-radius: var(--radius);
    background: var(--soft);
    font-size: .85rem; line-height: 1.9; color: var(--text-muted);
}
.post-copyright-row { display: contents; }         /* 让标签 / 内容直接参与外层 grid 对齐 */
.pc-label { white-space: nowrap; font-weight: 700; color: var(--text); }
.pc-value { min-width: 0; word-break: break-word; }

/* 本文链接：整段文字作为复制触发器，悬停／聚焦时浮出「复制本文链接」提示 */
.pc-copy-link {
    position: relative;
    max-width: 100%; padding: 0; border: 0; background: none;
    font: inherit; line-height: inherit; text-align: left;
    color: var(--text-muted); word-break: break-all;
    cursor: pointer; transition: var(--transition);
}
.pc-copy-link:hover, .pc-copy-link:focus-visible { color: var(--primary); }
.pc-copy-link::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: 100%; margin-bottom: 6px;
    transform: translate(-50%, 4px);
    padding: 5px 10px; border-radius: var(--radius-sm);
    background: var(--text); color: var(--bg);
    font-size: .74rem; font-weight: 400; line-height: 1.4; white-space: nowrap;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: var(--transition); z-index: 6;
}
.pc-copy-link::before {
    content: ''; position: absolute; left: 50%; bottom: 100%;
    transform: translate(-50%, 0);
    border: 5px solid transparent; border-top-color: var(--text);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: var(--transition); z-index: 6;
}
.pc-copy-link:hover::after, .pc-copy-link:focus-visible::after,
.pc-copy-link.is-copied::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.pc-copy-link:hover::before, .pc-copy-link:focus-visible::before,
.pc-copy-link.is-copied::before { opacity: 1; visibility: visible; }
.pc-copy-link.is-copied::after { content: attr(data-copied); }

.post-navigation {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin: 0 32px 32px;
}
.post-navigation a {
    display: block; padding: 12px 16px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card); transition: var(--transition);
}
.post-navigation a:hover { border-color: var(--primary); background: var(--primary-light); }
.post-navigation .nav-label { display: block; font-size: .75rem; color: var(--text-light); margin-bottom: 4px; }
.post-navigation .nav-title {
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    font-size: .9rem; color: var(--text);
}
.post-navigation .nav-next { text-align: right; }

/* ---------- 10. 评论 ---------- */
.comments-section {
    margin-top: 20px; padding: 24px 32px 32px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.comments-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.comments-header h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.comments-header h3 .pb-icon { width: 18px; height: 18px; color: var(--primary); }
.comments-header h3 small { font-size: .82rem; font-weight: 400; color: var(--text-light); }

.comment-empty { margin: 6px 0 0; font-size: .9rem; color: var(--text-light); }
.comment-closed {
    display: flex; align-items: center; gap: 8px; margin-top: 18px;
    padding: 14px 16px; border-radius: var(--radius); background: var(--bg);
    font-size: .9rem; color: var(--text-light);
}
.comment-closed .pb-icon { width: 16px; height: 16px; }

.comment-list,
.comment-children { list-style: none; margin: 0; padding: 0; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-children {
    display: flex; flex-direction: column; gap: 12px;
    margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--border);
}
.comment-item { display: flex; gap: 12px; }
.comment-avatar {
    flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
    background: var(--bg); border: 1px solid var(--border);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-main { flex: 1; min-width: 0; }
.comment-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; }
.comment-author { font-weight: 600; color: var(--text); }
.comment-author a { color: var(--text); }
.comment-author a:hover { color: var(--primary); }
.comment-time { color: var(--text-light); font-size: .78rem; }
.comment-floor { margin-left: auto; font-size: .75rem; color: var(--text-light); font-variant-numeric: tabular-nums; }
.comment-badge { padding: 1px 7px; border-radius: 4px; font-size: .68rem; line-height: 1.7; color: #fff; }
.comment-badge.is-author { background: var(--primary); }
.comment-badge.is-member { background: #10b981; }
.comment-badge.is-pending { background: #f59e0b; }

/* 会员中心插件（pb_member）徽章：认证名称 / 会员等级 */
.pb-mbadge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
    vertical-align: 1px;
}

.pb-mbadge svg { width: 11px; height: 11px; fill: #fff; flex: none; }

.pb-mbadge img { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; flex: none; }

.pb-mbadge.is-cert {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
    box-shadow: 0 1px 3px rgba(239, 68, 68, .3);
}

.pb-mbadge.is-level.lv-blue   { background: rgba(59, 130, 246, .13);  color: #3b82f6; }
.pb-mbadge.is-level.lv-green  { background: rgba(16, 185, 129, .13);  color: #10b981; }
.pb-mbadge.is-level.lv-amber  { background: rgba(245, 158, 11, .16);  color: #d97706; }
.pb-mbadge.is-level.lv-purple { background: rgba(139, 92, 246, .13);  color: #8b5cf6; }
.pb-mbadge.is-level.lv-red    { background: rgba(239, 68, 68, .12);   color: #ef4444; }

[data-theme="dark"] .pb-mbadge.is-level.lv-blue   { color: #60a5fa; }
[data-theme="dark"] .pb-mbadge.is-level.lv-green  { color: #34d399; }
[data-theme="dark"] .pb-mbadge.is-level.lv-amber  { color: #fbbf24; }
[data-theme="dark"] .pb-mbadge.is-level.lv-purple { color: #a78bfa; }
[data-theme="dark"] .pb-mbadge.is-level.lv-red    { color: #f87171; }

/* 各调用位置的间距微调（首页列表卡片 / 文章页 / 站内卡片） */
.post-meta .pb-mbadge { margin-left: 2px; }
.post-meta-single .pb-mbadge { margin-left: 4px; }
.author-name .pb-mbadge { margin-left: 6px; vertical-align: 2px; font-size: .72rem; }
.newcomm-author .pb-mbadge { margin-left: 4px; font-size: .62rem; padding: 0 6px; }
.comment-content { margin: 6px 0 0; font-size: .92rem; line-height: 1.75; color: var(--text-body); word-wrap: break-word; }
.comment-content img { max-width: 100%; height: auto; vertical-align: middle; }
.comment-content a { color: var(--primary); }
.comment-actions { margin-top: 8px; }
.comment-reply-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; background: var(--bg); border: 0; border-radius: 5px;
    font-size: .78rem; color: var(--text-muted); transition: var(--transition);
}
.comment-reply-btn .pb-icon { width: 13px; height: 13px; }
.comment-reply-btn:hover { background: var(--primary-light); color: var(--primary); }

.comment-form { margin-top: 26px; }
.comment-editor { position: relative; }
/* 工具条：所有按钮等高（28px）、图标统一 15px 线性图标、圆角/配色沿用全站令牌
   ⚠ 以下规则必须限定在 .comment-toolbar 内：
   1) 站头 .header-tools 里也有 .tool-btn（38×38 方形图标按钮），不加限定会互相污染；
   2) 文字按钮必须显式 width:auto —— 否则会继承第 3 节 .tool-btn 的 width:38px，
      内容区仅剩约 20px，图标（15px+5px 间距）占满后「表 / 情」被挤成两行竖排、与图标错位。 */
.comment-toolbar {
    position: relative;               /* 表情面板锚点：贴在工具条正下方，与触发按钮左对齐 */
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 4px 6px; padding: 6px 8px; background: var(--bg);
    border: 1px solid var(--border); border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}
.comment-toolbar .tool-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    width: auto; height: 28px; padding: 0 9px;
    white-space: nowrap;              /* 文字按钮永不折行 */
    background: transparent; border: 0; border-radius: var(--radius-sm);
    font-size: .8rem; line-height: 1; color: var(--text-muted);
    transition: var(--transition);
}
.comment-toolbar .tool-btn.is-icon { width: 28px; padding: 0; }   /* 纯图标按钮：正方形，与文字按钮等高 */
.comment-toolbar .tool-btn .pb-icon { width: 15px; height: 15px; flex: none; }
.comment-toolbar .tool-btn > span { white-space: nowrap; }
.comment-toolbar .tool-btn b { font-size: .85rem; font-weight: 700; line-height: 1; }
.comment-toolbar .tool-btn:hover { background: var(--card); color: var(--primary); }
.comment-toolbar .tool-btn.is-active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.comment-toolbar .tool-count { margin-left: auto; font-size: .76rem; color: var(--text-light); font-variant-numeric: tabular-nums; }

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .92rem; font-family: inherit; color: var(--text); background: var(--card);
    transition: var(--transition);
}
.comment-form textarea { border-radius: 0 0 var(--radius) var(--radius); min-height: 110px; resize: vertical; }
.comment-form textarea:focus,
.comment-form input:focus { border-color: var(--primary); outline: none; }
.comment-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.comment-captcha { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.comment-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.comment-login-tip { font-size: .88rem; color: var(--text-muted); }
.comment-login-tip a { color: var(--primary); }
.comment-pagination { margin-top: 22px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border: 0; border-radius: var(--radius);
    background: var(--primary); color: #fff; font-size: .9rem; font-weight: 500;
    transition: var(--transition);
}
.btn:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: var(--bg); color: var(--text-muted); }
.btn-ghost:hover { background: var(--border); color: var(--text); }

/* 表情面板：锚定工具条左下角，卡片 / 圆角 / 边框 / 阴影与其它浮层（下拉菜单、二维码气泡）一致 */
.emoticon-panel {
    position: absolute; left: 0; top: calc(100% + 6px); z-index: 20;
    width: min(340px, 100%);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); overflow: hidden;
    animation: emoticon-in .18s ease;
}
.emoticon-panel[hidden] { display: none; }
@keyframes emoticon-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* 分组标签：胶囊选中态，与全站 pill 风格（btn-ghost / 分类筛选）对齐 */
.emoticon-tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 8px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.emoticon-tab {
    height: 26px; padding: 0 12px;
    background: transparent; border: 0; border-radius: var(--radius-pill);
    font-size: .78rem; line-height: 1; color: var(--text-muted);
    transition: var(--transition);
}
.emoticon-tab:hover { color: var(--primary); }
.emoticon-tab.is-active {
    background: var(--card); color: var(--primary); font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.emoticon-body {
    padding: 10px; max-height: 216px; overflow-y: auto;
    overscroll-behavior: contain; scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.emoticon-group { display: none; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.emoticon-group.is-active { display: grid; }
.emoticon-item {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 34px; padding: 0;
    background: transparent; border: 0; border-radius: var(--radius-sm);
    font-size: 1.15rem; line-height: 1;
    transition: background-color .2s ease, transform .15s ease;
}
.emoticon-item img { width: 22px; height: 22px; object-fit: contain; }
.emoticon-item:hover { background: var(--primary-light); }   /* 去掉 scale，避免挤压相邻格子与抖动 */
.emoticon-item:active { background: var(--primary-light); transform: scale(.92); }

/* 键盘可达：与输入框 focus 同色系 */
.tool-btn:focus-visible,
.emoticon-tab:focus-visible,
.emoticon-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---------- 11. 侧边栏组件 ---------- */
.widget {
    background: var(--card); border-radius: var(--radius);
    padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.widget:last-child { margin-bottom: 0; }
.widget-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.widget-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin: 0; }
.widget-title .pb-icon { color: var(--primary); }

/* 作者卡片 */
.author-card { text-align: center; }
.author-bg { height: 60px; margin: -20px -20px 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--gradient); }
.author-main { padding-top: 0; }
.author-avatar-lg {
    width: 72px; height: 72px; margin: -50px auto 12px;
    border: 3px solid var(--card); border-radius: 50%; overflow: hidden;
    box-shadow: var(--shadow-md); background: var(--bg);
}
.author-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.author-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.author-stats {
    display: flex; justify-content: center; gap: 24px;
    padding: 16px 0; margin-bottom: 16px;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .75rem; color: var(--text-light); }
.author-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.author-actions .btn { padding: 8px 16px; font-size: .85rem; }
.author-actions .btn .pb-icon { width: 14px; height: 14px; }

/* 搜索框 */
.sidebar-search-form { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.sidebar-search-form:focus-within { border-color: var(--primary); }
.sidebar-search-input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; background: transparent; font-size: .9rem; outline: none; }
.sidebar-search-btn { padding: 10px 16px; border: 0; background: var(--primary); color: #fff; font-size: 1rem; transition: var(--transition); }
.sidebar-search-btn:hover { background: var(--primary-hover); }

/* 最新文章 */
.posts-widget-list { display: flex; flex-direction: column; }
.posts-widget-item { border-bottom: 1px solid var(--border); }
.posts-widget-item:last-child { border-bottom: 0; }
.posts-widget-item .post-link { display: flex; flex-direction: column; padding: 12px 0; }
.posts-widget-item .post-title-text {
    font-size: .9rem; font-weight: 500; color: var(--text); margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: var(--transition);
}
.posts-widget-item:hover .post-title-text { color: var(--primary); }
.posts-widget-item .post-date { font-size: .8rem; color: var(--text-light); }

/* 热门文章 */
.hot-widget-list { display: flex; flex-direction: column; gap: 12px; }
.hot-widget-item { display: flex; align-items: center; gap: 10px; }
.hot-rank {
    flex: none; width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); border-radius: 5px;
    font-size: .75rem; font-weight: 600; color: var(--text-muted);
}
.hot-rank.rank-1 { background: #fbbf24; color: #fff; }
.hot-rank.rank-2 { background: #9ca3af; color: #fff; }
.hot-rank.rank-3 { background: #cd7f32; color: #fff; }
.hot-thumb { flex: none; width: 60px; height: 45px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hot-body { flex: 1; min-width: 0; }
.hot-title {
    display: block; font-size: .88rem; color: var(--text); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hot-title:hover { color: var(--primary); }
.hot-meta { font-size: .75rem; color: var(--text-light); }

/* 标签云 */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-item {
    padding: 4px 12px; border-radius: var(--radius-pill);
    background: var(--bg); color: var(--text-muted); font-size: .8rem;
}
.tag-cloud-item:hover { background: var(--primary); color: #fff; }

/* 分类 / 归档 / 链接 */
.widget-list li { border-bottom: 1px solid var(--border); }
.widget-list li:last-child { border-bottom: 0; }
.widget-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: .9rem; color: var(--text-muted); }
.widget-list a:hover { color: var(--primary); }
.widget-list .count { font-size: .78rem; color: var(--text-light); }
.widget-list .children { padding-left: 16px; }

/* 最新评论 */
.newcomm-list { display: flex; flex-direction: column; gap: 12px; }
.newcomm-item { display: flex; gap: 10px; }
.newcomm-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--bg); }
.newcomm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.newcomm-body { flex: 1; min-width: 0; }
.newcomm-author { font-size: .82rem; color: var(--text-muted); }
.newcomm-content {
    font-size: .85rem; color: var(--text); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.newcomm-content:hover { color: var(--primary); }

/* 日历 */
.widget-calendar table { width: 100%; border-collapse: collapse; text-align: center; font-size: .82rem; }
.widget-calendar th { padding: 6px 0; color: var(--text-light); font-weight: 500; }
.widget-calendar td { padding: 6px 0; color: var(--text-muted); }
.widget-calendar td a { display: inline-block; padding: 2px 6px; border-radius: 4px; background: var(--primary); color: #fff; }

/* 自定义组件正文 */
.custom-widget-content { font-size: .9rem; color: var(--text-muted); line-height: 1.8; word-wrap: break-word; }
.custom-widget-content img { max-width: 100%; height: auto; }

/* ---------- 12. 空状态 / 404 ---------- */
.no-content { padding: 60px 20px; text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.no-content-icon {
    width: 80px; height: 80px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); border-radius: 50%; color: var(--text-light); font-size: 2rem;
}
.no-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
.no-content p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- 13. 页脚（三栏栅格，结构参考 nswin.cn） ---------- */

/* 13.1 站点数据条：一条完整的等分统计带（图标 + 数字/标签） */
.footer-sta-area {
    position: relative;
    margin-top: 36px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.footer-sta-area.has-wave { padding-top: 56px; }

.sta-wave { position: absolute; top: 0; left: 0; right: 0; height: 56px; overflow: hidden; }
.sta-wave-bg {
    position: absolute; inset: 0;
    background: linear-gradient(45deg, #69aef3, #1cc88a, #ff6699, #6c6cee, #efa131);
    background-size: 400% 400%;
    animation: pbBgFlow 12s ease infinite;
    opacity: .9;
}
.sta-wave .waves-svg { position: absolute; left: 0; bottom: -2px; width: 100%; height: 56px; }
.sta-wave .waves-svg .parallax > use { animation: pbWaveMove 22s cubic-bezier(.55, .5, .45, .5) infinite; }
.sta-wave .waves-svg .parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; fill: rgba(255, 255, 255, .18); }
.sta-wave .waves-svg .parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; fill: rgba(255, 255, 255, .28); }
.sta-wave .waves-svg .parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; fill: rgba(255, 255, 255, .45); }
.sta-wave .waves-svg .parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; fill: #ffffff; }
@keyframes pbWaveMove { from { transform: translate3d(-90px, 0, 0); } to { transform: translate3d(85px, 0, 0); } }
@keyframes pbBgFlow { 0%, 100% { background-position: 0 50%; } 50% { background-position: 100% 50%; } }

/* 等分栅格：gap 1px + 底色 = 自动分隔线，任意数量/换行都整齐 */
.sta-list {
    display: grid; gap: 1px; margin: 0; padding: 0; list-style: none;
    background: var(--border);
}
.sta-list.cols-1 { grid-template-columns: minmax(0, 1fr); }
.sta-list.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sta-list.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sta-list.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sta-list.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sta-list.cols-6,
.sta-list.cols-7 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.sta-item {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    background: var(--card);
    transition: background .3s ease;
}
.sta-item:hover { background: var(--primary-light); }

.sta-icon {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
}
.sta-icon .pb-icon { width: 20px; height: 20px; }
.sta-icon .pb-icon-img { width: 20px; height: 20px; object-fit: contain; }

.sta-body { display: flex; flex-direction: column; min-width: 0; }
.sta-num {
    font-size: 1.25rem; font-weight: 700; line-height: 1.3;
    color: var(--text); font-variant-numeric: tabular-nums;
}
.sta-label { font-size: .8rem; color: var(--text-light); line-height: 1.4; }

/* 卡片式：每项独立圆角小卡，均匀排列 */
.footer-sta-area.is-card { padding: 20px; }
.footer-sta-area.is-card.has-wave { padding-top: 76px; }
.footer-sta-area.is-card .sta-list {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 12px; background: transparent;
}
.footer-sta-area.is-card .sta-item {
    min-width: 132px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg);
}

@media (max-width: 900px) {
    .sta-list.cols-4, .sta-list.cols-5,
    .sta-list.cols-6, .sta-list.cols-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .sta-list.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sta-item { padding: 14px 16px; }
    .sta-icon { width: 36px; height: 36px; }
    .sta-num { font-size: 1.1rem; }
}

/* 13.2 友情链接：紧贴数据条下方，数据取自后台「链接」管理，两种布局（胶囊并排 / 网格分栏） */
.footer-friend {
    margin-bottom: 26px; padding-bottom: 22px;
    border-bottom: 1px dashed var(--border);
}
.footer-friend.is-solo { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }   /* 下方无三栏内容时不留空与分隔线 */
.footer-friend-title {
    display: flex; align-items: center; gap: 6px;
    margin: 0 0 12px; font-size: .9rem; font-weight: 600; line-height: 1.5; color: var(--text);
}
.footer-friend-title .pb-icon { width: 15px; height: 15px; color: var(--primary); flex: none; }
.friend-list { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0; padding: 0; list-style: none; }
.friend-list li { min-width: 0; }
.friend-list a {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    padding: 5px 12px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill);
    font-size: .82rem; line-height: 1.5; color: var(--text-muted);
    transition: var(--transition);
}
.friend-list a:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.friend-list .friend-icon { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; flex: none; }
.friend-list a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 网格分栏：等宽对齐，链接较多时更整齐 */
.footer-friend.is-grid .friend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.footer-friend.is-grid .friend-list a { width: 100%; }

/* 13.3 页脚主体：三栏栅格 + 统一字号/行距节奏 */
.site-footer {
    margin-top: 20px; padding: 34px 0 24px;
    background: var(--card); border-top: 1px solid var(--border);
    font-size: .875rem; line-height: 1.75; color: var(--text-muted);
}
.site-footer.is-plain { background: var(--bg); }
.site-footer.is-card { --footer-col-bg: var(--bg); }

.footer-grid { display: grid; gap: 28px 44px; align-items: start; }
.footer-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.footer-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid.cols-3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, .95fr); }

.footer-col { min-width: 0; }

/* 栏目标题：统一 15px/600 + 渐变短横线，三栏对齐形成节奏 */
.footer-col-title {
    position: relative;
    margin: 0 0 14px; padding-bottom: 10px;
    font-size: .9375rem; font-weight: 600; line-height: 1.5;
    color: var(--text); letter-spacing: .02em;
}
.footer-col-title::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 24px; height: 2px; border-radius: 2px;
    background: var(--gradient);
}

.footer-site-name { font-size: .9375rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.footer-desc { margin: 0; max-width: 46em; font-size: .85rem; line-height: 1.85; color: var(--text-muted); }

.footer-info { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-info li { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; line-height: 1.7; }
.footer-info .pb-icon { width: 15px; height: 15px; margin-top: 4px; color: var(--primary); flex: none; }
.footer-info a { color: var(--text-muted); }
.footer-info a:hover { color: var(--primary); }
.footer-info .fi-more { color: var(--text-light); }
.footer-info .fi-text { flex: 1; min-width: 0; }

/* 13.4 社交联系方式 */
.social-icon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social-icon li { position: relative; }
.social-link {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--bg); color: var(--text-muted);
    transition: var(--transition);
}
.social-link .social-graphic { display: inline-flex; align-items: center; justify-content: center; }
.social-link .pb-icon { width: 19px; height: 19px; }
.social-link .pb-icon-img { width: 19px; height: 19px; object-fit: contain; }

.social-icon.is-circle .social-link { border-radius: 50%; }
.social-icon.is-square .social-link { border-radius: var(--radius-sm); }
.social-icon.is-plain .social-link { width: 34px; height: 34px; background: transparent; border-radius: var(--radius-sm); }

.social-link:hover { color: #fff; background: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.social-icon.is-plain .social-link:hover { background: transparent; color: var(--primary); box-shadow: none; }

.social-link.c-blue:hover { background: #12b7f5; }
.social-link.c-green:hover { background: #07c160; }
.social-link.c-red:hover { background: #e6162d; }
.social-link.c-orange:hover { background: #ff7d00; }
.social-link.c-cyan:hover { background: #00a1d6; }
.social-link.c-purple:hover { background: #8b5cf6; }
.social-link.c-pink:hover { background: #ff6699; }
.social-link.c-dark:hover { background: #24292f; }
.social-icon.is-plain .social-link.c-blue:hover { color: #12b7f5; }
.social-icon.is-plain .social-link.c-green:hover { color: #07c160; }
.social-icon.is-plain .social-link.c-red:hover { color: #e6162d; }
.social-icon.is-plain .social-link.c-orange:hover { color: #ff7d00; }
.social-icon.is-plain .social-link.c-cyan:hover { color: #00a1d6; }
.social-icon.is-plain .social-link.c-purple:hover { color: #8b5cf6; }
.social-icon.is-plain .social-link.c-pink:hover { color: #ff6699; }
.social-icon.is-plain .social-link.c-dark:hover { color: #24292f; }

.hover-show-con {
    position: absolute; left: 50%; bottom: 100%;
    transform: translate(-50%, 6px);
    width: 140px; padding: 8px; padding-bottom: 12px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: var(--transition); z-index: 5;
}
.hover-show-con img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.hover-show:hover .hover-show-con,
.hover-show:focus-within .hover-show-con {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
}

/* 13.5 底栏：自定义链接 + 附加内容 */
.footer-bottom {
    margin-top: 28px; padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 24px; }
.footer-links a { display: inline-flex; align-items: center; gap: 5px; font-size: .86rem; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-links .pb-icon { width: 14px; height: 14px; }
.footer-extra { margin-top: 12px; font-size: .82rem; color: var(--text-light); }
.footer-extra img { max-width: 100%; }
.footer-credit { margin-top: 8px; font-size: .78rem; color: var(--text-light); }
.footer-credit a { color: var(--text-muted); }
.footer-credit a:hover { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
    .sta-wave-bg, .sta-wave .waves-svg .parallax > use { animation: none; }
}

/* 返回顶部 */
.back-to-top {
    position: fixed; right: 24px; bottom: 24px;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 1.2rem;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: var(--transition); z-index: 999;
}
.back-to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-hover); }

/* 登录 / 注册弹窗（由 footer.php 的 pb_auth_modal() 输出，仅访客可见） */
body.pb-modal-open { overflow: hidden; }
.pb-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pb-modal-mask {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, .5);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    animation: pbFade .2s ease;
}
.pb-modal-card {
    position: relative; width: 100%; max-width: 400px;
    max-height: calc(100dvh - 40px); overflow-y: auto;
    padding: 26px 26px 22px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: pbPop .22s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes pbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pbPop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .pb-modal-mask, .pb-modal-card { animation: none; }
}

.pb-modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: var(--radius-sm); background: transparent;
    color: var(--text-light); transition: var(--transition);
}
.pb-modal-close .pb-icon { width: 17px; height: 17px; }
.pb-modal-close:hover { background: var(--primary-light); color: var(--primary); }

.pb-auth-tabs {
    display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 3px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill);
}
.pb-auth-tab {
    padding: 6px 20px; border: 0; border-radius: var(--radius-pill); background: transparent;
    font-size: .88rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
}
.pb-auth-tab:hover { color: var(--primary); }
.pb-auth-tab.is-active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

.pb-auth-title { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; color: var(--text); }

.pb-auth-msg {
    margin: 0 0 14px; padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: .82rem; line-height: 1.6;
    background: rgba(59, 130, 246, .1); border: 1px solid rgba(59, 130, 246, .3); color: var(--primary);
}
.pb-auth-msg.is-err {
    background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .32); color: #ef4444;
}
.pb-auth-msg.is-ok {
    background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .32); color: #10b981;
}

.pb-auth-panel { display: none; }
.pb-auth-panel.is-active { display: block; }

.pb-field { display: block; margin-bottom: 14px; }
.pb-field-label { display: block; margin-bottom: 6px; font-size: .8rem; color: var(--text-muted); }
.pb-field input {
    width: 100%; height: 42px; padding: 0 13px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    font-family: inherit; font-size: .9rem; color: var(--text); outline: none;
    transition: var(--transition);
}
.pb-field input::placeholder { color: var(--text-light); }
.pb-field input:focus { border-color: var(--primary); background: var(--card); box-shadow: 0 0 0 3px var(--primary-light); }
.pb-field-code { display: flex; gap: 8px; align-items: stretch; }
.pb-field-code input { flex: 1; min-width: 0; }
.pb-captcha {
    flex: none; width: 104px; height: 42px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg);
    object-fit: cover; cursor: pointer;
}
.pb-send-code {
    flex: none; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); font-family: inherit; font-size: .82rem; color: var(--text-muted);
    white-space: nowrap; transition: var(--transition);
}
.pb-send-code:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.pb-send-code:disabled { opacity: .6; cursor: not-allowed; }

.pb-check { display: flex; align-items: center; gap: 7px; margin: 0 0 16px; font-size: .82rem; color: var(--text-muted); cursor: pointer; }
.pb-check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.pb-auth-submit {
    width: 100%; height: 44px; border: 0; border-radius: var(--radius);
    background: var(--primary); color: #fff; font-family: inherit; font-size: .95rem; font-weight: 500;
    transition: var(--transition);
}
.pb-auth-submit:hover { background: var(--primary-hover); }
.pb-auth-submit:disabled { opacity: .7; cursor: not-allowed; }
.pb-auth-foot { margin: 12px 0 0; font-size: .8rem; color: var(--text-light); text-align: center; }

/* 暗黑模式切换：位于顶栏搜索按钮之后（复用 .tool-btn 的方形图标按钮规格） */
.tool-btn.theme-toggle .pb-icon { width: 18px; height: 18px; }
.tool-btn.theme-toggle .icon-moon { display: inline-block; }   /* 浅色时显示月亮：点击进入深色 */
.tool-btn.theme-toggle .icon-sun { display: none; }            /* 深色时显示太阳：点击回到浅色 */
:root[data-theme="dark"] .tool-btn.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .tool-btn.theme-toggle .icon-sun { display: inline-block; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1024px) {
    .main-layout { grid-template-columns: minmax(0, 1fr); }
    .post-thumbnail { width: 200px; height: 150px; }
    .post-navigation { grid-template-columns: 1fr; }

    /* 页脚三栏在中等屏降为两栏 */
    .footer-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }

    .container { padding: 0 14px; }
    .site-main { padding-top: calc(var(--header-height) + 14px); }

    .menu-toggle { display: flex; order: -1; }
    .site-logo { flex: 1; min-width: 0; }
    .site-logo a { font-size: 1.1rem; }

    .site-nav {
        position: fixed; top: 56px; left: 0; right: 0;
        display: block; width: 100%; max-height: 0; padding: 0;
        background: var(--card); overflow: hidden; opacity: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
        transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease, padding .3s ease;
        z-index: 1001;
    }
    .site-nav.is-open { max-height: calc(100dvh - 56px); padding: 8px 0; opacity: 1; overflow-y: auto; }

    .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
    .nav-link { padding: 14px 20px; border-radius: 0; }
    .dropdown-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; border-radius: 0; min-width: 0; padding: 0 0 0 14px;
    }
    .mobile-search { display: block; padding: 8px 14px 4px; }
    .mobile-search-form { display: flex; gap: 8px; }

    .post-card { flex-direction: column; }
    .post-thumbnail { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .post-content { padding: 16px 18px; }
    .post-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
    .read-more { align-self: flex-start; }

    .post-header-single { padding: 20px 18px 16px; }
    .post-title-single { font-size: 1.35rem; }
    .post-cover-single { padding: 0 18px; }
    .post-content-single { padding: 16px 18px 8px; }
    .post-tags-single { padding: 8px 18px 18px; }
    .post-copyright { margin: 0 18px 18px; padding: 14px 16px; gap: 3px 8px; }
    .post-navigation { margin: 0 18px 24px; }
    .comments-section { padding: 18px 18px 24px; }
    .comment-form-row { grid-template-columns: 1fr; }
    .comment-children { padding-left: 10px; }
    .comment-avatar { width: 36px; height: 36px; }
    /* 表情面板：移动端通栏、触控目标放大到 40px */
    .emoticon-panel { left: 0; right: 0; width: auto; max-width: none; }
    .emoticon-group { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
    .emoticon-item { height: 40px; font-size: 1.3rem; }
    .emoticon-item img { width: 26px; height: 26px; }
    .emoticon-body { padding: 12px; max-height: 44vh; }
    .comment-toolbar .tool-btn { width: auto; height: 32px; padding: 0 11px; }
    .comment-toolbar .tool-btn.is-icon { width: 32px; padding: 0; }

    .pagination a, .pagination span, .pagination .active { min-width: 32px; height: 32px; padding: 0 8px; font-size: .85rem; }

    /* 页脚：统一降为单栏 */
    .footer-grid.cols-2, .footer-grid.cols-3 { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .footer-desc { max-width: none; }
    /* 友情链接：位于页脚首个区块，压缩与下方三栏的间距；胶囊加大触控面积；网格布局退为两列起 */
    .footer-friend { margin-bottom: 22px; padding-bottom: 18px; }
    .friend-list { gap: 8px; }
    .friend-list a { padding: 7px 14px; font-size: .84rem; }
    .footer-friend.is-grid .friend-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
    .footer-bottom { margin-top: 22px; padding-top: 16px; }

    .back-to-top { right: 14px; bottom: 14px; }

    /* 登录 / 注册弹窗：移动端贴底弹出，输入框加大触控高度 */
    .pb-modal { padding: 0; align-items: flex-end; }
    .pb-modal-card {
        max-width: none; border-radius: var(--radius) var(--radius) 0 0;
        border-bottom: 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
        max-height: 88dvh;
    }
    .pb-auth-tab { padding: 7px 18px; }
    .pb-field input, .pb-captcha { height: 44px; }
    .pb-auth-submit { height: 46px; }
    .pb-modal-card { animation: pbSlideUp .24s ease; }
    @keyframes pbSlideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 480px) {
    .author-stats { gap: 16px; }
    .footer-links { gap: 6px 14px; }
    .slider-track { aspect-ratio: 16 / 9; }
    .slider-btn { width: 34px; height: 34px; font-size: 1.1rem; }

    /* 用户中心：移动端压缩为单列 */
}

/* ---------- 15. 打印 ---------- */
@media print {
    .site-header, .sidebar-area, .back-to-top, .theme-toggle, .comments-section, .post-navigation { display: none !important; }
    .site-main { padding-top: 0; }
    .main-layout { grid-template-columns: 1fr; }
    .post-single { box-shadow: none; }
}
