@charset "UTF-8";
/* ==========================================================================
   主题主样式表
   - 亮 / 暗双色：由 <html data-theme="light|dark"> 控制
   - 主推颜色：由 --brand / --brand-rgb 两个变量驱动（后台可改）
   - 自适应：>1040 桌面双栏 / 769–1040 平板堆叠 / <=768 手机单栏
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 变量
   -------------------------------------------------------------------------- */
:root {
    --brand: #2E6BE6;
    --brand-rgb: 46, 107, 230;
    --brand-soft: rgba(var(--brand-rgb), .10);
    --brand-soft-2: rgba(var(--brand-rgb), .18);
    --hot: #FF6B35;

    --bg: #F4F5F7;
    --card: #FFFFFF;
    --card-2: #F8F9FB;
    --line: #ECEEF2;
    --text-1: #1F2329;
    --text-2: #6B7280;
    --text-3: #9CA3AF;
    --code-bg: #0F172A;
    --code-text: #E2E8F0;

    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .05);
    --shadow-hover: 0 8px 28px rgba(16, 24, 40, .10);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --container: 1200px;
    --gap: 24px;
    --hero-h: 320px;
    --nav-h: 64px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Sarasa Mono SC", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
}

html[data-theme="dark"] {
    --bg: #0F1115;
    --card: #181B21;
    --card-2: #1F232A;
    --line: #262B33;
    --text-1: #E6E8EB;
    --text-2: #9BA1AC;
    --text-3: #6B7280;
    --code-bg: #0B0E13;
    --code-text: #D7DBE0;
    --brand-soft: rgba(var(--brand-rgb), .16);
    --brand-soft-2: rgba(var(--brand-rgb), .26);
    --shadow: 0 1px 2px rgba(0, 0, 0, .30), 0 6px 20px rgba(0, 0, 0, .26);
    --shadow-hover: 0 10px 32px rgba(0, 0, 0, .42);
    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s ease, color .25s ease;
}

a { color: var(--brand); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { color: var(--brand); opacity: .85; }
img { max-width: 100%; height: auto; border: 0; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.45; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand-soft-2); }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    padding: 10px 18px; background: var(--brand); color: #fff; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(140, 148, 160, .45); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(140, 148, 160, .7); background-clip: content-box; }

/* --------------------------------------------------------------------------
   3. 布局骨架
   -------------------------------------------------------------------------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.main-wrap {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    padding: 24px 0 48px;
}
.main-wrap.sidebar-left { flex-direction: row-reverse; }

.main-col {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar { flex: 0 0 316px; width: 316px; min-width: 0; }
.sidebar__inner { display: flex; flex-direction: column; gap: 16px; }

/* --------------------------------------------------------------------------
   4. 通用组件
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border: 0; border-radius: var(--radius-xs);
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: filter .18s ease, background-color .18s ease, color .18s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { color: #fff; filter: brightness(.94); opacity: 1; }
.btn--ghost { background: var(--card-2); color: var(--text-2); }
.btn--ghost:hover { color: var(--brand); opacity: 1; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    background: transparent; border: 0; border-radius: var(--radius-xs);
    color: var(--text-2); cursor: pointer; transition: background-color .18s ease, color .18s ease;
}
.icon-btn:hover { background: var(--card-2); color: var(--brand); }

.slash { color: var(--brand); font-weight: 700; letter-spacing: -1.5px; }

.side-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.side-title {
    display: flex; align-items: center; gap: 6px;
    margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--text-1);
}
.side-title__count { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 500; color: var(--text-3); }

/* --------------------------------------------------------------------------
   5. 顶部导航
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky; top: 0; z-index: 60;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(10px);
    transition: background-color .25s ease, border-color .25s ease;
}
.navbar__inner {
    max-width: var(--container); margin: 0 auto; padding: 0 24px;
    height: var(--nav-h);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand__icon { display: inline-flex; color: var(--brand); }
.brand__img { height: 34px; width: auto; display: block; }
.brand__text { font-size: 21px; font-weight: 700; color: var(--brand); letter-spacing: .2px; }
.brand:hover { opacity: 1; }

.nav { flex: 1 1 auto; min-width: 0; }
.nav__list { display: flex; align-items: center; gap: 2px; justify-content: center; }
.nav__item { position: relative; }
.nav__link {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: var(--radius-xs);
    font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.nav__link:hover { color: var(--brand); background: var(--card-2); opacity: 1; }
.nav__item.is-active > .nav__link { color: var(--brand); background: var(--brand-soft); }
.nav__caret { transition: transform .2s ease; }

.nav__sub {
    position: absolute; top: 100%; left: 0; min-width: 168px;
    padding: 8px; margin-top: 4px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow-hover);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.nav__item.has-children:hover .nav__sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__item.has-children:hover .nav__caret { transform: rotate(180deg); }
.nav__sub a {
    display: block; padding: 8px 12px; border-radius: var(--radius-xs);
    font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.nav__sub a:hover { background: var(--brand-soft); color: var(--brand); opacity: 1; }

.navbar__right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.navbar__btn { height: 36px; padding: 0 16px; font-size: 14px; }
.navbar__burger { display: none; }

/* 亮暗切换图标：亮色显示月亮，暗色显示太阳 */
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }

.navbar__search {
    max-width: var(--container); margin: 0 auto; padding: 0 24px 14px;
    display: none;
}
.navbar__search.is-open { display: block; }
.navbar__search-form {
    display: flex; align-items: center; gap: 10px;
    height: 46px; padding: 0 14px;
    background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
    color: var(--text-3);
}
.navbar__search-form input {
    flex: 1 1 auto; min-width: 0; height: 100%;
    background: transparent; border: 0; outline: none; font-size: 14px;
}
.navbar__search-form button {
    flex: 0 0 auto; padding: 6px 14px; border: 0; border-radius: var(--radius-xs);
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* --------------------------------------------------------------------------
   6. 移动抽屉
   -------------------------------------------------------------------------- */
.drawer-mask {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(15, 20, 30, .45);
    backdrop-filter: blur(2px);
}
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
    width: min(320px, 84vw);
    background: var(--card);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    transform: translateX(102%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.drawer__search { display: flex; gap: 8px; padding: 14px 16px 4px; }
.drawer__search input {
    flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 12px;
    background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-xs); outline: none;
}
.drawer__search button {
    padding: 0 14px; border: 0; border-radius: var(--radius-xs);
    background: var(--brand); color: #fff; font-weight: 600; cursor: pointer;
}
.drawer__nav { padding: 10px 10px 10px; }
.drawer__link {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 12px; border: 0; background: transparent;
    border-radius: var(--radius-xs);
    font-size: 15px; font-weight: 500; color: var(--text-1); text-align: left; cursor: pointer;
}
.drawer__link:hover { background: var(--card-2); color: var(--brand); }
.drawer__item.is-active > .drawer__link { color: var(--brand); background: var(--brand-soft); }
.drawer__sub { display: none; padding: 2px 0 6px 14px; }
.drawer__item.is-expanded .drawer__sub { display: block; }
.drawer__item.is-expanded .nav__caret { transform: rotate(180deg); }
.drawer__sub a {
    display: block; padding: 9px 12px; border-radius: var(--radius-xs);
    font-size: 14px; color: var(--text-2);
}
.drawer__sub a:hover { background: var(--brand-soft); color: var(--brand); }
.drawer__foot {
    margin-top: auto; padding: 16px; border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 10px;
}

/* --------------------------------------------------------------------------
   7. 焦点图
   -------------------------------------------------------------------------- */
.hero {
    position: relative; height: var(--hero-h);
    border-radius: var(--radius); overflow: hidden;
    background: var(--card-2); box-shadow: var(--shadow);
}
.hero__track { position: absolute; inset: 0; }
.hero__slide {
    position: absolute; inset: 0; display: block;
    opacity: 0; visibility: hidden;
    transition: opacity .6s ease, visibility .6s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__fallback {
    position: absolute; inset: 0; display: block;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.hero__mask {
    position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
    background: linear-gradient(to top, rgba(9, 14, 24, .92) 0%, rgba(9, 14, 24, 0) 100%);
}
.hero__title {
    position: absolute; left: 24px; right: 24px; bottom: 22px;
    color: #fff; font-size: 22px; font-weight: 700; line-height: 1.45;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
.hero__title .ttag { color: #A8C7FF; }
.hero__dots { position: absolute; right: 18px; bottom: 22px; display: flex; gap: 7px; z-index: 3; }
.hero__dot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .55); cursor: pointer; transition: all .25s ease;
}
.hero__dot.is-active { width: 22px; border-radius: 4px; background: #fff; }

/* --------------------------------------------------------------------------
   8. 近期热点
   -------------------------------------------------------------------------- */
.hotspot {
    display: flex; flex-direction: column; gap: 12px;
    padding: 18px 20px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hotspot__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hotspot__title { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--text-1); }
.hotspot__sub { font-size: 12px; color: var(--text-3); }
.hotspot__list { display: flex; flex-direction: column; gap: 10px; }
.hotspot__item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hotspot__rank { flex: 0 0 auto; font-size: 15px; font-weight: 700; }
.hotspot__link {
    flex: 1 1 auto; min-width: 0;
    font-size: 14px; font-weight: 500; color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hotspot__link:hover { color: var(--brand); opacity: 1; }
.hotspot__fire { flex: 0 0 auto; }

.rank-1 { color: var(--brand); }
.rank-2 { color: var(--hot); }
.rank-3 { color: #F59E0B; }
.rank-x { color: var(--text-3); }

/* --------------------------------------------------------------------------
   9. 文章横卡
   -------------------------------------------------------------------------- */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-list--sticky { margin-bottom: 0; }

.post-card {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 16px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    min-width: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.post-card.is-sticky { border: 1px solid var(--brand-soft-2); }

.post-card__thumb {
    flex: 0 0 120px; width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__thumb:hover { opacity: 1; }
.thumb-letter { color: #fff; font-size: 34px; font-weight: 700; letter-spacing: 1px; }

.post-card__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.badge-sticky {
    align-self: flex-start;
    padding: 2px 8px; border-radius: 4px;
    background: rgba(255, 107, 53, .13); color: var(--hot);
    font-size: 11px; font-weight: 700; line-height: 1.6;
}
.post-card__title { font-size: 17px; }
.post-card__title a { color: var(--text-1); }
.post-card__title a:hover { color: var(--brand); opacity: 1; }
.ttag { font-style: normal; font-weight: 700; color: var(--brand); margin-right: 2px; }

.post-card__excerpt {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px; line-height: 1.75; color: var(--text-2);
}

.post-card__meta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: auto; padding-top: 4px;
}
.meta-left { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--text-3); }
.meta-avatar {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.meta-date, .meta-comments { white-space: nowrap; }
.meta-cat {
    flex: 0 0 auto; padding: 3px 8px; border-radius: 4px;
    background: var(--brand-soft); color: var(--brand);
    font-size: 12px; white-space: nowrap;
}
.meta-cat:hover { color: var(--brand); opacity: 1; }

/* 空状态 */
.empty-box {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 56px 20px; text-align: center;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.empty-box strong { font-size: 17px; color: var(--text-1); }
.empty-box span { font-size: 13px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   10. 分页
   -------------------------------------------------------------------------- */
.pager-wrap { display: flex; justify-content: center; }

.page-navigator {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 12px 16px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.page-navigator li { display: inline-flex; }
.page-navigator li a,
.page-navigator li span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 10px;
    border-radius: var(--radius-xs);
    background: var(--card-2); color: var(--text-2); font-size: 13px;
}
.page-navigator li a:hover { background: var(--brand-soft); color: var(--brand); opacity: 1; }
.page-navigator li.current a,
.page-navigator li.current span { background: var(--brand); color: #fff; }
.comment-pager { display: flex; justify-content: center; margin-top: 16px; }

/* --------------------------------------------------------------------------
   11. 归档页头 / 面包屑
   -------------------------------------------------------------------------- */
.archive-head {
    display: flex; flex-direction: column; gap: 8px;
    padding: 18px 22px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.archive-head__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.archive-head__title { font-size: 20px; }
.archive-head__count { font-size: 13px; color: var(--text-3); }
.archive-head__desc { font-size: 13px; line-height: 1.8; color: var(--text-2); }

.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-3); padding: 0 2px; }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--brand); opacity: 1; }
.crumb__sep { color: var(--text-3); opacity: .6; }
.crumb__current { color: var(--brand); }

/* --------------------------------------------------------------------------
   12. 文章详情
   -------------------------------------------------------------------------- */
.post-full {
    padding: 28px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    min-width: 0;
}
.post-full__head { display: flex; flex-direction: column; gap: 14px; }
.post-full__title { font-size: 26px; line-height: 1.4; color: var(--text-1); }

.post-full__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
    font-size: 13px; color: var(--text-3);
}
.meta-author { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.meta-author:hover { color: var(--brand); opacity: 1; }
.meta-author img { width: 24px; height: 24px; border-radius: 50%; display: block; }
.post-full__meta .meta-cats a { color: var(--brand); }

.post-full__cover { margin: 0; border-radius: var(--radius-sm); overflow: hidden; }
.post-full__cover img { width: 100%; display: block; }

.post-full__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.post-full__tags-label { font-size: 12px; color: var(--text-3); }
.post-full__tags a {
    padding: 4px 10px; border-radius: 4px;
    background: var(--card-2); color: var(--text-2); font-size: 12px;
}
.post-full__tags a:hover { background: var(--brand-soft); color: var(--brand); opacity: 1; }

/* 正文排版 */
.post-full__content { font-size: 15px; line-height: 1.95; color: var(--text-1); word-wrap: break-word; }
.post-full__content > *:first-child { margin-top: 0; }
.post-full__content p { margin: 0 0 18px; }
.post-full__content h2 { margin: 34px 0 14px; font-size: 20px; }
.post-full__content h3 { margin: 28px 0 12px; font-size: 17px; }
.post-full__content h4 { margin: 24px 0 10px; font-size: 15px; }
.post-full__content a { border-bottom: 1px solid var(--brand-soft-2); }
.post-full__content img { border-radius: var(--radius-sm); display: block; margin: 18px auto; }
.post-full__content ul, .post-full__content ol { margin: 0 0 18px; padding-left: 22px; }
.post-full__content ul { list-style: disc; }
.post-full__content ol { list-style: decimal; }
.post-full__content li { margin-bottom: 8px; }
.post-full__content hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.post-full__content blockquote {
    margin: 20px 0; padding: 14px 18px;
    background: rgba(var(--brand-rgb), .06);
    border-left: 3px solid var(--brand); border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 14px;
}
html[data-theme="dark"] .post-full__content blockquote { background: rgba(var(--brand-rgb), .12); }
.post-full__content blockquote p:last-child { margin-bottom: 0; }

.post-full__content code {
    padding: 2px 6px; border-radius: 4px;
    background: var(--card-2);
    font-family: var(--font-mono); font-size: 13px; color: var(--brand);
}
.post-full__content pre {
    margin: 20px 0; padding: 16px 18px;
    background: var(--code-bg); border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--code-text);
}
.post-full__content pre code { padding: 0; background: transparent; color: inherit; font-size: 13px; }

.post-full__content table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 13.5px; }
.post-full__content th, .post-full__content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.post-full__content th { background: var(--card-2); font-weight: 700; }

/* 上下篇 */
.post-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.post-nav__prev, .post-nav__next {
    padding: 14px 16px;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    font-size: 13px; color: var(--text-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-nav__next { text-align: right; }
.post-nav a { color: var(--text-1); font-weight: 500; }
.post-nav a:hover { color: var(--brand); }

/* 相关阅读 */
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related-item {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px; border-radius: var(--radius-sm);
    background: var(--card-2);
}
.related-item:hover { background: var(--brand-soft); opacity: 1; }
.related-item__title {
    font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--text-1);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-item__date { font-size: 11px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   13. 侧边栏模块
   -------------------------------------------------------------------------- */
.side-list { display: flex; flex-direction: column; gap: 12px; }

.side-item { display: flex; gap: 10px; align-items: flex-start; }
.side-item:hover { opacity: 1; }
.side-item__thumb {
    flex: 0 0 80px; width: 80px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-xs); overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.side-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-item__thumb em { color: #fff; font-style: normal; font-size: 20px; font-weight: 700; }
.side-item__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.side-item__title {
    font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--text-1);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-item:hover .side-item__title { color: var(--brand); }
.side-item__date { font-size: 11px; color: var(--text-3); }

.side-list--rank { gap: 10px; }
.side-rank { display: flex; gap: 10px; align-items: flex-start; }
.side-rank:hover { opacity: 1; }
.side-rank__no { flex: 0 0 18px; font-style: normal; font-size: 14px; font-weight: 700; line-height: 1.6; }
.side-rank__title {
    flex: 1 1 auto; min-width: 0;
    font-size: 13px; line-height: 1.6; color: var(--text-1);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-rank:hover .side-rank__title { color: var(--brand); }

.side-ad {
    display: block; height: 130px; border-radius: var(--radius-sm); overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.side-ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-ad.is-empty {
    display: flex; align-items: center; justify-content: center;
    background: var(--card-2); border: 1px dashed var(--line);
    color: var(--text-3); font-size: 13px;
}
.side-ad.is-empty:hover { color: var(--brand); border-color: var(--brand-soft-2); opacity: 1; }

.side-search {
    display: flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 12px;
    background: var(--card-2); border: 1px solid transparent; border-radius: var(--radius-xs);
    color: var(--text-3);
}
.side-search:focus-within { border-color: var(--brand-soft-2); }
.side-search input { flex: 1 1 auto; min-width: 0; height: 100%; background: transparent; border: 0; outline: none; font-size: 13px; }

.side-cats li + li, .side-archives li + li { border-top: 1px solid var(--line); }
.side-cats a, .side-archives a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 2px; font-size: 13px; color: var(--text-2);
}
.side-cats a:hover, .side-archives a:hover { color: var(--brand); opacity: 1; }
.side-cats em, .side-archives em {
    font-style: normal; font-size: 11px; color: var(--text-3);
    background: var(--card-2); padding: 1px 7px; border-radius: 8px;
}

.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    padding: 4px 10px; border-radius: var(--radius-xs);
    background: var(--card-2); color: var(--text-2); font-size: 12px;
}
.tag-chip:hover { background: var(--brand-soft); color: var(--brand); opacity: 1; }

.side-profile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.side-profile__avatar {
    width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
}
.side-profile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-profile__avatar em { font-style: normal; color: #fff; font-size: 24px; font-weight: 700; }
.side-profile__name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.side-profile__desc { font-size: 12.5px; line-height: 1.7; color: var(--text-2); }

.side-comments { display: flex; flex-direction: column; gap: 10px; }
.side-comment { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-comment:last-child { border-bottom: 0; padding-bottom: 0; }
.side-comment strong { font-size: 12.5px; color: var(--brand); }
.side-comment span {
    font-size: 12.5px; line-height: 1.6; color: var(--text-2);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.side-html { font-size: 13px; line-height: 1.8; color: var(--text-2); }

/* --------------------------------------------------------------------------
   14. 评论区
   -------------------------------------------------------------------------- */
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item__inner { display: flex; gap: 12px; align-items: flex-start; }
.comment-item__avatar { flex: 0 0 auto; }
.comment-item__avatar img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.comment-item__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment-item__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.comment-item__author { font-size: 13px; font-weight: 600; color: var(--text-1); }
.comment-item__author a { color: var(--text-1); }
.comment-item__time { font-size: 12px; color: var(--text-3); }
.comment-item__waiting {
    padding: 1px 7px; border-radius: 4px;
    background: rgba(245, 158, 11, .14); color: #D97706; font-size: 11px;
}
.comment-item__content { font-size: 13.5px; line-height: 1.85; color: var(--text-2); word-wrap: break-word; }
.comment-item__content p { margin: 0 0 10px; }
.comment-item__content p:last-child { margin-bottom: 0; }
.comment-item__actions { font-size: 12px; }
.comment-item__actions a { color: var(--text-3); }
.comment-item__actions a:hover { color: var(--brand); }
.comment-children { margin-top: 16px; padding-left: 20px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 16px; }

.comment-empty, .comment-closed { font-size: 13px; color: var(--text-3); }

.respond { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.respond__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; font-size: 15px; }
.respond__cancel { font-size: 12px; font-weight: 400; color: var(--text-3); }
.respond__cancel a { color: var(--text-3); }
.comment-form { display: flex; flex-direction: column; gap: 12px; }
.comment-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.comment-form__field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.comment-form__field label { font-size: 12px; color: var(--text-3); }
.comment-form__field label.required::after { content: " *"; color: var(--hot); }
.comment-form__field input.text,
.comment-form__field textarea.textarea {
    width: 100%; padding: 10px 12px;
    background: var(--card-2); border: 1px solid transparent; border-radius: var(--radius-xs);
    outline: none; font-size: 13.5px;
    transition: border-color .18s ease;
}
.comment-form__field input.text:focus,
.comment-form__field textarea.textarea:focus { border-color: var(--brand-soft-2); }
.comment-form__field textarea.textarea { resize: vertical; min-height: 120px; line-height: 1.8; }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.comment-form__tip { font-size: 12px; color: var(--text-3); }
.comment-form__login { font-size: 13px; color: var(--text-2); }

/* --------------------------------------------------------------------------
   15. 404
   -------------------------------------------------------------------------- */
.error-404 {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 64px 24px; text-align: center;
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.error-404__code {
    font-size: 76px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--brand) 0%, #7C3AED 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-404__title { font-size: 20px; }
.error-404__desc { font-size: 13.5px; color: var(--text-2); }
.error-404__search { display: flex; gap: 10px; width: min(420px, 100%); margin: 8px 0 4px; }
.error-404__search input {
    flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 14px;
    background: var(--card-2); border: 1px solid transparent; border-radius: var(--radius-xs); outline: none;
}
.error-404__search input:focus { border-color: var(--brand-soft-2); }

/* --------------------------------------------------------------------------
   16. 页脚
   -------------------------------------------------------------------------- */
.footer {
    margin-top: 8px;
    background: var(--card);
    border-top: 1px solid var(--line);
}
.footer__inner {
    max-width: var(--container); margin: 0 auto;
    padding: 40px 24px 24px;
}
.footer__cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
}
/* 按页脚实际列数自适应：只显示品牌区时占满整行，两列时按 3:2 分配，
   避免隐藏「快捷导航 / 友情链接」后右半边留一片空白 */
.footer__cols--1 { grid-template-columns: 1fr; }
.footer__cols--2 { grid-template-columns: 1.5fr 1fr; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer__brand .brand__icon { color: var(--brand); display: inline-flex; }
.footer__brand-text { font-size: 18px; font-weight: 700; color: var(--brand); }
.footer__about { font-size: 13px; line-height: 1.85; color: var(--text-2); max-width: 420px; }
.footer__uptime {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
    margin-top: 14px; padding: 8px 12px;
    background: var(--brand-soft); border-radius: var(--radius-xs);
    font-size: 12.5px; color: var(--text-2);
}
.footer__uptime strong { color: var(--brand); font-size: 13.5px; }
.footer__uptime-since { color: var(--text-3); }

.footer__title { margin: 0 0 14px; font-size: 14px; color: var(--text-1); }
.footer__friends { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer__friends a { font-size: 13px; color: var(--text-2); }
.footer__friends a:hover { color: var(--brand); opacity: 1; }
.footer__links {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
}
.footer__links li { display: inline-flex; }
.footer__links a { font-size: 13px; color: var(--text-2); }
.footer__links a:hover { color: var(--brand); opacity: 1; }

.footer__declare {
    margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--line);
    font-size: 12.5px; line-height: 1.9; color: var(--text-3);
}
.footer__declare p { margin: 0 0 6px; }

.footer__bottom {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
    font-size: 12.5px; color: var(--text-3);
}
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.footer__meta a { color: var(--text-3); }
.footer__meta a:hover { color: var(--brand); opacity: 1; }

/* 返回顶部 */
.back-top {
    position: fixed; right: 22px; bottom: 26px; z-index: 70;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card); color: var(--text-2);
    border: 1px solid var(--line); border-radius: 50%;
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all .25s ease;
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--brand); color: #fff; border-color: var(--brand); opacity: 1; }

/* --------------------------------------------------------------------------
   17. 自适应：平板（<= 1040px）
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
    :root { --gap: 20px; --hero-h: 280px; }

    .nav { display: none; }
    .navbar__burger { display: inline-flex; }

    .main-wrap,
    .main-wrap.sidebar-left { flex-direction: column; }

    .sidebar { flex: 1 1 auto; width: 100%; }
    .sidebar__inner {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        align-items: start;
    }

    .footer__cols { grid-template-columns: 1fr 1fr; gap: 26px; }
    .footer__cols--1 { grid-template-columns: 1fr; }
    .footer__col--brand { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   18. 自适应：手机（<= 768px）
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root { --gap: 14px; --hero-h: 196px; --nav-h: 56px; --radius: 12px; }

    body { font-size: 13.5px; }

    .container { padding: 0 14px; }
    .navbar__inner { padding: 0 14px; gap: 10px; }
    .navbar__search { padding: 0 14px 12px; }
    .brand__text { font-size: 18px; }
    .navbar__btn { display: none; }

    .main-wrap { padding: 14px 0 32px; }

    .hero__title { left: 16px; right: 16px; bottom: 16px; font-size: 16px; }
    .hero__dots { right: 12px; bottom: 16px; }

    .hotspot { padding: 14px 16px; gap: 10px; }
    .hotspot__title { font-size: 15px; }
    .hotspot__link, .hotspot__rank { font-size: 13.5px; }

    .post-list { gap: 12px; }
    .post-card { padding: 12px; gap: 12px; }
    .post-card__thumb { flex: 0 0 92px; width: 92px; height: 92px; }
    .thumb-letter { font-size: 26px; }
    .post-card__title { font-size: 15px; }
    .post-card__excerpt { font-size: 12.5px; -webkit-line-clamp: 2; }
    .post-card__meta { flex-wrap: wrap; gap: 8px; }

    .sidebar__inner { grid-template-columns: 1fr; }

    .archive-head { padding: 14px 16px; }
    .archive-head__title { font-size: 17px; }

    .post-full { padding: 18px 16px; }
    .post-full__title { font-size: 20px; }
    .post-full__meta { gap: 10px; font-size: 12px; }
    .post-full__content { font-size: 14.5px; line-height: 1.9; }
    .post-full__content pre { padding: 12px; font-size: 12px; margin: 16px -4px; }

    .post-nav { grid-template-columns: 1fr; }
    .post-nav__next { text-align: left; }
    .related-grid { grid-template-columns: 1fr; }

    .comment-form__row { grid-template-columns: 1fr; }
    .comment-children { padding-left: 12px; }

    .error-404 { padding: 44px 18px; }
    .error-404__code { font-size: 58px; }
    .error-404__search { flex-direction: column; }

    .footer__inner { padding: 28px 14px 18px; }
    .footer__cols { grid-template-columns: 1fr; gap: 22px; }
    .footer__links { gap: 8px 16px; }
    .footer__bottom { flex-direction: column; align-items: flex-start; }

    .back-top { right: 14px; bottom: 18px; width: 38px; height: 38px; }
}

/* --------------------------------------------------------------------------
   19. 自适应：小屏手机（<= 380px）
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
    .post-card__thumb { flex: 0 0 76px; width: 76px; height: 76px; }
    .post-card__excerpt { display: none; }
    .hero__dots { display: none; }
}

/* --------------------------------------------------------------------------
   20. 动效降级 & 打印
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

@media print {
    .navbar, .sidebar, .footer, .back-top, .drawer, .drawer-mask, .post-nav, .comments-card { display: none !important; }
    body { background: #fff; }
    .post-full { box-shadow: none; padding: 0; }
}
