/* ==========================================================================
   Global Resets (全局重置)
   ========================================================================== */
:root {
    --post-font-size-body: var(--blog-font-body);
    --post-font-size-small: var(--blog-font-small);
    --post-font-size-heading: var(--blog-font-heading);
    --post-font-size-subheading: var(--blog-font-subheading);
}

h1, h2, h3, h4, h5, h6 {
    all: unset;
    display: block;
}

hr#meta-info-separator {
    width: 63%;
    margin: 16px auto;
    border: none;
    border-top: 1px solid #666666;
}

/* ==========================================================================
   Component: Post Header (文章头部组件)
   ========================================================================== */
/* 注意：已修正原代码中“博客中展示图片的样式”的错误注释 */
.post-header__title {
    /* 1. Box Model & Layout (盒模型与布局) */
    width: 70%;
    margin: 37px auto 23px;

    /* 2. Typography (排版) */
    font-family: "Georgia Custom", Times, serif;
    font-size: 1.0625rem;
    text-align: center;

    /* 3. Visuals (视觉效果) */
    color: var(--heading-color);
}

/* ==========================================================================
   Component: Meta Group (元数据组件)
   ========================================================================== */
.meta-group__item {
    font-size: var(--post-font-size-small);
    text-align: center;

    & ul {
        list-style: none;
    }

    /* 修复了原代码中的作用域泄漏 Bug */

    & ul,
    & li {
        display: inline-block;
    }

    & a {
        color: var(--link-color);
        text-decoration: none;

        /* 将 hover 状态优雅嵌套，保持上下文一致性 */

        &:hover {
            color: var(--link-hover-color);
        }
    }
}

.meta-group__separator {
    color: #666666;
}

/* --- Modifiers (修饰符状态) --- */
.meta-group__item--tags {
    margin: 2px 0;
}

.meta-group__item--stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 30px;
    row-gap: 4px;
}

/* ==========================================================================
   Table of Contents (TOC) Component
   ========================================================================== */

/* 1. 容器主样式 */
.toc {
    position: relative;
    background: rgba(250, 250, 250);
    padding: 7px 15px 7px 18px;
    border-radius: 5px;
    font-size: var(--post-font-size-body);
    /*line-height: 1.4;*/
    color: #2d2d2d;
    margin-bottom: 2rem;
}

.toc::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(8, 109, 177, 0.6);
    pointer-events: none;
}

/* 2. 标题容器：清除原生 h2 的默认内外边距 */
.toc__title-wrapper {
    margin: 0;
    padding: 0;
    font-size: var(--post-font-size-heading);
    font-weight: normal;
}

/* 3. 交互按钮：重置原生样式，采用 Flex 布局完美对齐图文 */
.toc__toggle-btn {
    all: unset; /* 清除所有浏览器默认按钮样式 */
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0.25rem 0;
}

/* 键盘无障碍焦点指示器 */
.toc__toggle-btn:focus-visible {
    outline: 2px solid rgba(8, 109, 177, 0.8);
    outline-offset: 4px;
    border-radius: 4px;
}

/* 4. 图标容器与旋转动画 */
.toc__icon-wrapper {
    display: flex;
    align-items: center;
    color: #444;
    margin-right: 8px;
}

.toc__chevron-icon {
    width: 23px;
    height: 23px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 状态驱动动画：当按钮折叠时 (aria-expanded="false")，箭头向右旋转 -90度 */
.toc__toggle-btn[aria-expanded="false"] .toc__chevron-icon {
    transform: rotate(-90deg);
}

.toc__title-text {
    font-family: "Georgia Custom", Times, serif;
    font-size: var(--post-font-size-heading);
    letter-spacing: 0;
}

/* ==========================================================================
   TOC List
   ========================================================================== */

/* 1. 列表基础样式：清除默认圆点和缩进，初始化计数器 */
.toc__list {
    list-style: none;
    padding: 0;
    /*margin: 1rem 0 0 0;*/
}

/* 嵌套子列表的缩进 */
.toc__list--nested {
    padding-left: 24px;
    /*margin-top: 0.5rem;*/
}

/* 当 TOC 折叠时隐藏列表 */
.toc__list[aria-hidden="true"],
.toc__list.is-hidden {
    display: none;
}

.toc__item {
    /*margin-bottom: 0.5rem;*/
    /*line-height: 1.6;*/
}

/* 2. 链接样式 */
.toc__link {
    text-decoration: none;
    color: rgba(8, 109, 177, 0.9); /* 采用与左侧边框呼应的主题色 */
    transition: color 0.2s ease;
}

.toc__link:hover {
    text-decoration: underline;
    color: #054d7d;
}

/* 3. 真实文本编号，可随目录标题一起选择和复制 */
.toc__item > .toc__link::before {
    content: none;
}

.toc__number {
    color: #666;
    font-variant-numeric: tabular-nums; /* 保证数字等宽，视觉更对齐 */
    font-size: 0.95em;
}

/* * Rotate the chevron when the JS adds the 'is-collapsed' class.
 * Alternatively, you could hook into [aria-expanded="false"]
 */
.toc__toggle-btn.is-collapsed .toc__chevron-icon {
    transform: rotate(-90deg);
}

/*============================================================*/
table {
    margin: 18px auto;
    border-collapse: collapse;
    width: 100%;
    font-family: inherit;
    font-size: var(--post-font-size-small);
}

th, td {
    font-weight: normal;
    padding: 2px 0;
    text-align: center;
    /*border: none; !* 先取消所有竖线 *!*/
    border: 1px solid cornflowerblue;
}

th {
    font-family: inherit;
}

table caption {
    caption-side: top;
    padding-bottom: 10px;
    font-size: var(--post-font-size-small);
    color: green;
    text-align: center;
}

.post-content__table-caption-text,
.post-content__figcaption-text {
    display: inline-block;
    max-width: 100%;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
}

/* 去掉表格最左侧边框 */
tr > *:first-child {
    border-left: none;
}

/* 去掉表格最右侧边框 */
tr > *:last-child {
    border-right: none;
}

/* 表格第一行（thead 顶部加粗） */
thead tr:first-child {
    border-top: 2px solid cornflowerblue;
}

/* 表格最后一行（tbody 底部加粗） */
tbody tr:last-child {
    border-bottom: 2px solid cornflowerblue;
}

/*.post-content__math {*/
/*    color: var(--heading-color);*/
/*}*/

span.katex {
    color: var(--heading-color);
}

.post-content__figure {
    border-radius: 5px;
    border: 1px solid #aaaaaa;
    padding: 4px;
    margin: 18px 0;
    text-align: center;

    & img {
        /* 禁止用户拖拽图片（但某些浏览器不一定完全禁） */
        -webkit-user-drag: none;
        user-select: none;
        display: block; /* 去掉默认的 inline baseline 空白 */
        width: 100%;
        height: auto;
        /* 图片的圆角弧度要和外部的 figure 保持一致 */
        border-radius: 5px;
    }

    & figcaption {
        color: var(--heading-color);
        padding: 2px 0;
        /* 这里的 margin 大小要和 figure 的 padding 数值一致 */
        margin-top: 4px;
        border-top: 1px solid #aaaaaa;
        font-size: var(--post-font-size-small);
        text-align: center;
    }
}

/* 1. 容器保持相对定位，作为滚动条的定位基准 */
.code-container {
    --code-block-background: #ffffff;
    --code-block-border-width: 1px;
    --code-spacing: 0.51rem;
    --code-gutter-width: 3.06rem;
    --code-separator-width: var(--code-spacing);
    position: relative;
    margin: 18px 0;
}

pre.shiki {
    padding: 10px var(--code-spacing) 10px 0;
    /* 底部 padding 稍微加大一点，给悬浮滚动条留点呼吸空间 */
    border: var(--code-block-border-width) solid #aaaaaa;
    border-radius: 5px;
    font-size: var(--post-font-size-body);
    overflow-x: hidden;
    line-height: normal;
}

code {
    counter-reset: step;
    display: block;
    overflow-x: auto;
    width: 100%;
    /* 隐藏原生滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* 确保代码文本不会稍微被底部的 padding 裁剪 */
    /*padding-bottom: 5px;*/
}

code::-webkit-scrollbar {
    display: none;
}

/* 行号样式 */
code .line::before {
    content: counter(step);
    counter-increment: step;

    position: sticky;
    display: inline-block;
    left: 0;
    /* 宽度与 pre 的 padding-left 配合 */
    width: var(--code-gutter-width);
    padding-right: var(--code-spacing);
    text-align: right;
    color: rgba(115, 138, 148, 0.4);
    border-right: var(--code-separator-width) solid var(--code-block-background);
    box-shadow: inset -1px 0 0 0 #aaaaaa;
    background: var(--code-block-background);
    background-clip: border-box;
    z-index: 2;
}

.code-custom-scrollbar {
    /* 绝对定位，实现悬浮 */
    position: absolute;

    /* 浏览器会自动计算 left 和 right 之间的宽度，从而只覆盖代码区 */
    bottom: 2px; /* 定位到底部，并避开边框 1px */
    /* 从代码块边框内缘延伸到行号分隔线。 */
    left: calc(
        var(--code-block-border-width)
        + var(--code-gutter-width)
        - var(--code-separator-width)
    );
    right: 1px; /* 右侧设为 1px，避开右边框 */

    height: 7px; /* 稍微做细一点，没那么突兀 */
    border-radius: 3px; /* 圆角半径为 height 的一半 */
    z-index: 10; /* 确保浮在代码上方 */

    display: flex;
    align-items: center;
    user-select: none;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    pointer-events: none;
}

/* 鼠标悬停在代码容器上时，稍微显示出轨道背景，方便交互 */
.code-container:hover .code-custom-scrollbar.visible {
    background-color: rgba(0, 0, 0, 0.05);
}

.code-custom-scrollbar.visible {
    opacity: 1;
    pointer-events: auto;
}

.code-custom-scrollbar__track {
    position: relative;
    width: 100%;
    height: 100%;
    /* 轨道背景透明，实现“悬浮”感 */
    background-color: transparent;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.code-custom-scrollbar__thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    /* 滑块颜色稍微加深一点，提高对比度 */
    background-color: rgba(144, 164, 174, 0.6);
    border-radius: 4px;
    width: 0;
    transition: background-color 0.2s;
    cursor: grab;
}

.code-custom-scrollbar__thumb:hover,
.code-custom-scrollbar__thumb.active {
    background-color: rgba(96, 125, 139, 0.9);
}

.code-custom-scrollbar__thumb.active {
    cursor: grabbing;
}

/* 1. 按钮容器基础样式 */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;

    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;

    /* 默认背景色：浅灰色 */
    background-color: rgba(0, 0, 0, 0.05);
    /* 边框：防抖动占位 */
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;

    font-size: 13px;
    line-height: 1;
    color: #607D8B; /* 默认文字颜色 */

    z-index: 10;
    transition: all 0.2s ease;
}

/* 2. 鼠标悬停优化：加深背景和文字，提供交互反馈 */
.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.1); /* 0.05 -> 0.1 (变深) */
    color: #455A64; /* 稍微变深的蓝灰色 */
}

/* --- 图标通用样式 (无改动) --- */
.copy-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}

/* --- 状态切换逻辑 (无改动) --- */
.copy-btn .icon-success {
    display: none;
}

.copy-btn.copied .icon-copy {
    display: none;
}

.copy-btn.copied .icon-success {
    display: block;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/*============================================================*/

h2.post-content__section-title {
    font-family: "Merriweather", Times, serif;
    color: var(--heading-color);
    font-size: var(--post-font-size-heading);
    margin-top: 22px;
}

h3.post-content__subsection-title {
    font-family: "Merriweather", Times, serif;
    color: var(--heading-color);
    font-size: var(--post-font-size-subheading);
    margin-top: 9px;
}

p.post-content__paragraph {
    font-size: var(--post-font-size-body);
    margin: 20px 0;
    text-align: justify;
    hyphens: auto;
}

.post-content__list {
    padding-left: 20px;
    margin: 18px 0;
}

.post-content__quote {
    position: relative;
    margin: 22px 0;
    padding: 15px 18px 14px 21px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.48);
}

.post-content__quote::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(8, 109, 177, 0.68);
    pointer-events: none;
}

.post-content__quote::before {
    content: open-quote;
    position: absolute;
    top: -6px;
    left: 9px;
    color: rgba(8, 109, 177, 0.22);
    font-family: "Georgia Custom", Times, serif;
    font-size: 2.75rem;
    line-height: 1;
    pointer-events: none;
}

.post-content__quote-text {
    margin: 0;
    color: #222222;
    font-family: "Georgia Custom", Times, serif;
    font-size: var(--post-font-size-subheading);
    font-style: italic;
    line-height: 1.65;
}

.post-content__quote-text p {
    margin: 0;
}

.post-content__quote-source {
    margin-top: 9px;
    color: #555555;
    font-size: var(--post-font-size-small);
    font-style: normal;
    text-align: right;
}

.post-content__quote-source::before {
    content: "- ";
}

.post-content__quote-source cite {
    font-style: normal;
}

/*=================================================*/
.post-footer {
    margin-top: 38px;
}

.post-engagement {
    margin-top: 48px;
}

.comments-app {
    margin-top: 18px;
}

.comments-app--reply {
    margin-top: 0;
}

.comments-app .comment-publisher {
    margin-bottom: 24px;
}

.comments-app--reply .comment-publisher {
    margin-bottom: 0;
}

.comment-tree__list {
    list-style: none;
    padding-left: 0;
}

.comments-title {
    font: inherit;
    color: inherit;
}

.comments-status {
    margin: 0;
    color: #555;
    font-size: var(--post-font-size-small);
}

.comments-status[data-state="error"] {
    color: #9d1c1c;
}

.comments-status[data-state="success"] {
    color: #12662e;
}

.post-meta-separator {
    border-top: 1px solid #cdcdcd;
    border-bottom: 1px solid #666666;
    height: 0;
    margin: 7px 0;
}

/*=================================================*/
.post-info-more {
    display: flex;
    align-items: center;

    & a {
        text-decoration: none;
        color: var(--link-color);
    }

    & a:hover {
        color: var(--link-hover-color);
    }
}

.post-tags {
    font-size: var(--post-font-size-small);
    align-items: center; /* 内部子元素垂直居中 */
}

.post-tags ul {
    list-style: none;
    display: inline-block;
}

.post-tags li {
    /* lists-style: none 写在 li 上是无效的 */
    /*lists-style: none;*/
    display: inline-block;
}

.post-tags i {
    color: #444444;
    font-size: var(--post-font-size-small);
}

/*=================================================*/
.post-footer-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--post-font-size-small);
}

/* 清除 button 默认样式 */
.post-footer-actions__back {
    all: unset; /* 核心：移除所有默认样式 */
    cursor: pointer; /* 恢复鼠标手型 */
    font: inherit; /* 继承字体 */
    line-height: inherit; /* 继承行高 */
    display: inline; /* 和 a 完全一致 */
    color: var(--link-color);
}

.post-footer-actions__back:hover {
    color: var(--link-hover-color);
}

.post-footer-actions__separator {
    width: 2px; /* 分割线的宽度 */
    height: 15px; /* 分割线的高度 */
    background-color: #444;
}

/*=================================================*/
.post-nav {
    display: flex;
    flex-direction: column; /* 让 prev 和 next 垂直排列 */
    gap: 6px; /* 可选：两行之间的间距 */
    margin: 15px 0 30px;
}

.post-prev,
.post-next {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 100%;
    font-family: inherit;
    font-weight: 300;
    color: #444444;
    text-decoration: none;
    font-size: var(--post-font-size-body);
}

.post-nav__icon {
    flex: 0 0 auto;
    font-size: 0.82em;
}

.post-prev {
    /*text-align: left; !* 左对齐 *!*/
    align-self: flex-start; /* 靠左，但宽度由内容决定 */

    &:hover {
        color: var(--link-hover-color);
    }
}

.post-next {
    /*text-align: right; !* 右对齐 *!*/
    align-self: flex-end; /* 靠右，但宽度由内容决定 */
    justify-content: flex-end;
    text-align: right;

    &:hover {
        color: var(--link-hover-color);
    }
}


/*
=============================================================================
=============================================================================
=============================================================================
=============================================================================
*/
/* =========================================
   1. 全局配置与变量 (CSS Variables)
   ========================================= */
:root {
    /* --- 核心变量 --- */
    --font-stack: "Merriweather", Times, serif;
    --font-size-base: var(--post-font-size-body);

    /* --- 尺寸系统 --- */
    --radius-base: 5px;
    --spacing-sm: 8px;
    --spacing-md: 10px;

    /* --- 颜色系统 --- */
    --c-primary: #3366cc; /* 主色/高亮 */
    --c-primary-hover: #254db3; /* 悬停态 */
    --c-danger: #d9534f; /* 警告色 (原 orangered 替换为标准变量) */

    --c-text-main: #2c3e50; /* 主文本 */
    --c-text-sub: #b6b6b6; /* 次要文本/占位符 */

    --c-bg-input: #ffffff; /* 输入框背景 */
    --c-bg-label: rgb(221, 221, 221); /* 标签背景 (保持原样式视觉一致) */
    --c-bg-hover: #f8f9fa; /* 按钮悬停背景 */

    --c-border: #d0d0d0; /* 边框颜色 */
    --c-border-focus: #3366cc; /* 聚焦边框色 */

    /* --- 动效与阴影 --- */
    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-focus: 0 0 0 1px rgba(51, 102, 204, 0.15);
}

/* =========================================
   2. 通用表单容器逻辑 (Form Groups)
   ========================================= */
/* 优化点：提取通用逻辑
   无论是顶部单行输入，还是中间的文本域，都共用此容器逻辑
*/
.comment-publisher .form__group {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 200px;
    background-color: var(--c-bg-input);
    border: 1px solid var(--c-border);
    overflow: hidden; /* 替代 clip，兼容性更好，保证圆角内内容不溢出 */
    transition: var(--transition-base);
}

/* 交互优化：使用 :focus-within
   当组内的 Input 或 Textarea 被聚焦时，高亮整个容器边框
*/
.comment-publisher .form__group:focus-within {
    border-color: var(--c-border-focus);
    box-shadow: var(--shadow-focus);
    z-index: 1; /* 提升层级，防止相邻边框遮挡 */
}

/* 差异化：顶部行容器 (全圆角) */
.comment-publisher .form__row .form__group {
    border-radius: var(--radius-base);
}

/* 差异化：主体区域容器 (上圆角，为了衔接 Footer) */
.comment-publisher .form__body .form__group {
    border-radius: var(--radius-base) var(--radius-base) 0 0;
    /* 移除 min-width，文本域通常占满整行 */
    position: relative;
}

/* =========================================
   3. 顶部表单行布局
   ========================================= */
.comment-publisher .form__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.comment-publisher .form__row[hidden] {
    display: none;
}

/*.comment-tree__item .comment-tree__list .comments-app .comment-publisher .form__row {*/
/*    !*gap: 0;*!*/
/*    !*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),*!*/
/*    !*0 4px 12px rgba(0, 0, 0, 0.12);*!*/
/*    !*border-radius: 5px;*!*/
/*    !*background-color: var(--color-page-bg);*!*/
/*    !*position: relative;*!*/
/*    !*z-index: 3;*!*/
/*    margin-bottom: 0;*/
/*}*/

.comment-publisher .form__label {
    flex: 0 0 auto;
    padding: 5px 6px; /* 微调 padding 以平衡视觉 */
    background-color: var(--c-bg-label);
    color: black;
    /*color: var(--c-text-main);*/
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 300;
    border: none;
    display: flex;
    align-items: center; /* 确保文字垂直居中 */
}

.comment-publisher .form__required {
    color: var(--c-danger); /* 使用变量替换 orangered */
    /*margin-left: 2px;*/
}

.comment-publisher .form__input {
    flex: 1;
    width: 0; /* 解决 flex 子元素溢出问题 */
    padding: 0 6px;
    border: none;
    background: transparent; /* 背景由容器接管 */
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--c-text-main);
}

.comment-publisher .form__input:focus {
    outline: none; /* 聚焦样式由父级 .form__group:focus-within 接管 */
}

.comment-publisher ::placeholder {
    color: var(--c-text-sub);
    font-weight: 300;
    /*opacity: 0.85;*/
    user-select: none;
}

/* =========================================
   4. 文本域区域
   ========================================= */
.comment-publisher .form__body {
    position: relative;
}

.comment-publisher .form__textarea {
    display: block;
    width: 100%;
    min-height: 115px;
    padding: 6px;
    border: none; /* 边框由父级容器接管 */
    background: transparent;
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--c-text-main);
    resize: vertical;
}

.comment-publisher .form__textarea:focus {
    outline: none;
}

/* 字数统计 */
.comment-publisher .form__counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 300;
    color: var(--c-text-sub);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
}

/* =========================================
   5. 底部操作区 (Footer)
   ========================================= */
.comment-publisher .form__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    border: 1px solid var(--c-border);
    border-top: none; /* 紧贴上方的 Textarea 容器 */
    border-radius: 0 0 var(--radius-base) var(--radius-base);
    background-color: var(--c-bg-input);
}

.comment-publisher .form__hint {
    margin: 0;
    color: var(--c-text-main);
    font-size: var(--post-font-size-small);
    font-weight: 300;
}

.comment-publisher .form__actions {
    display: flex;
    gap: 6px;
}

.comment-publisher .form__button {
    padding: 4px 7px;
    font-family: inherit;
    font-size: var(--post-font-size-small);
    font-weight: 300;
    /*background-color: var(--c-bg-input);*/
    background-color: var(--c-bg-label);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: var(--transition-base);
}

.comment-publisher .form__button:hover {
    background-color: var(--c-bg-hover);
    border-color: var(--c-primary); /* 悬停时增加一点互动感 */
}

/* 辅助类 (SR Only) */
.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;
}

/*
====================================================================
====================================================================
====================================================================
*/
.js-preview-container {
    display: none; /* 默认隐藏 */
    padding: 6px;
    background-color: #fff;
    font-size: var(--post-font-size-body);

    /* 边框设计：顶部无边框（或依赖 textarea 的底边框），其余三面闭合 */
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    /*border-top: none;*/

    min-height: 115px;
    word-wrap: break-word;
}

:root {
    /* --- 颜色变量 (Colors) --- */
    --color-page-bg: #FFF5EE;
    --color-tree-line: #bdbdbd;
    --color-tree-line-hover: #888;
    --color-card-bg: rgba(52, 168, 83, 0.6);
    --comment-border-color: rgba(128, 128, 128, 0.45);
    --comment-bg-color: #f7efde;
    --color-author-name: #C80920;
    --color-guest-name: #0929C8;

    /* --- 尺寸与布局 (Dimensions & Layout) --- */
    --layout-line-width: 2px;
    --layout-indent: 20px; /* 子级缩进 */
    --layout-connector-size: 17px; /* 拐角尺寸 */
    --layout-extension-width: 5px; /* 水平延伸线 */
    --layout-connector-offset: 14px; /* 垂直连线起点 */
    --layout-root-margin: 30px;
    --border-radius: 5px;

    /* --- 计算值 (Calculated) --- */
    /* 节点偏移量 = 拐角 + 延伸 - 线宽 */
    --layout-node-offset: calc(var(--layout-connector-size) + var(--layout-extension-width) - var(--layout-line-width));

    /* --- 阴影与微边框 (Shadows & Micro-borders) --- */
    /* 采用双层阴影：第一层为环境弥散光，第二层为底部厚度 */
    --card-shadow-default: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --card-shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
    /* 极细微边框，用于在纯白背景下勾勒边缘，而不产生割裂感 */
    --comment-border-light: rgba(0, 0, 0, 0.03);
}

.post-footer {
    ol, li {
        list-style: none;
    }
}

/* 原有样式保持不变 */
.comment-tree__item {
    position: relative;
    margin-top: 25px; /* 相邻两个评论框之间的垂直间距（非根评论） */
}

/* 覆盖样式：仅针对第一层（根节点）评论增大间距 */
.comment-tree__item {
    scroll-margin-top: 88px;
}

.comment-tree__item--target > .comment-card {
    border-color: rgba(31, 87, 164, 0.75);
    box-shadow: 0 0 0 3px rgba(31, 87, 164, 0.16),
    0 4px 18px rgba(0, 0, 0, 0.14);
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.comment-tree > .comment-tree__item {
    margin-top: var(--layout-root-margin);
}

/* === 新增：针对根节点列表的第一个评论去除上边距 === */
/* 逻辑：只选中 .comment-tree 下的第一个直属 .comment-tree__item */
.comment-tree > .comment-tree__item:first-child {
    margin-top: 0;
}

/* --- 缩进逻辑 --- */
/* 通用子级：需要缩进 + 偏移以避开连线 */
.comment-tree__item > .comment-tree__list {
    display: flex;
    flex-direction: column;
    margin-left: calc(var(--layout-indent) + var(--layout-node-offset));
    border-left: var(--layout-line-width) solid var(--color-tree-line);
}

/* 根节点：只需要标准缩进，不需要偏移 */
.comment-tree > .comment-tree__item > .comment-tree__list {
    margin-left: var(--layout-indent);
}

/* 文章卡片偏移：给连线留出空间 */
.comment-tree__item .comment-tree__list article,
.comment-tree__item .comment-tree__list .comments-app {
    margin-left: var(--layout-node-offset);
}

/* --- 连线绘制 (CSS Painting) --- */
/* 拐角曲线 (L型) */
.comment-tree__item > .comment-tree__list > .comment-tree__item::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: var(--layout-connector-offset);
    left: calc(-1 * var(--layout-line-width));
    width: calc(var(--layout-connector-size) + 10px);
    height: var(--layout-connector-size);
    border-bottom: var(--layout-line-width) solid var(--color-tree-line);
    border-left: var(--layout-line-width) solid var(--color-tree-line);
    border-radius: 0 0 0 12px;
}

/*!* 水平连接短线 (-) *!*/
/*.comment-tree__item > .comment-tree__list > .comment-tree__item::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    top: calc(var(--layout-connector-offset) + var(--layout-connector-size));*/
/*    left: calc(var(--layout-connector-size) - var(--layout-line-width));*/
/*    width: var(--layout-extension-width);*/
/*    height: var(--layout-line-width);*/
/*    background-color: var(--color-tree-line);*/
/*}*/

/*!* 遮罩逻辑：遮盖最后一个节点的垂直长尾线 *!*/
/*.comment-tree__list:not(.comment-tree) > .comment-tree__item:last-child > .comment-card::before {*/
/*    content: "";*/
/*    position: absolute;*/
/*    z-index: 1;*/
/*    left: calc(-1 * var(--layout-line-width));*/
/*    width: var(--layout-line-width);*/
/*    top: var(--layout-connector-offset);*/
/*    bottom: 0;*/
/*    background-color: var(--color-page-bg);*/
/*}*/
.comment-tree__list:not(.comment-tree) > .comment-tree__item:last-child::after {
    content: "";
    position: absolute;
    z-index: 1; /* 位于拐角连线(z-index:2)之下，主干线之上 */
    /* 坐标完全贴合父级 Item 的左边缘 */
    left: calc(-1 * var(--layout-line-width));
    width: calc(var(--layout-line-width));
    /* 从连线起点开始，一直遮到最底部 */
    top: var(--layout-connector-offset);
    bottom: 0;
    background-color: var(--color-page-bg);
}

/* ==========================================================================
   5. 评论卡片组件 (Comment Card Component)
   ========================================================================== */
article.comment-card {
    /* 这里合并了通用的 article 样式 */
    border-radius: var(--border-radius);
    border: 1px solid var(--comment-border-color);
    /*background-color: var(--comment-bg-color);*/
    /* 之前的 min-height 只有一行，此处保留 */
    min-height: 70px;
    /* box-shadow: 水平偏移 垂直偏移 模糊半径 颜色; */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 3;
    background-color: var(--color-page-bg);
}

.comment-tree__item .comment-tree__list .comments-app {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 5px;
    background-color: var(--color-page-bg);
    position: relative;
    z-index: 3;
}

/* --- 头部与底部共用布局 --- */
.comment-card__header,
.comment-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 10px;
}

.badge-author {
    background: #A2F4FD; /* 浅灰 */
    color: darkred; /* 深灰 */
    font-size: var(--post-font-size-body);
    padding: 1px 3px;
    border-radius: 5px;
    /*cursor: pointer;*/
}

.comment-card__header {
    border-bottom: 1px solid var(--comment-border-color);
}

.comment-card__footer {
    border-top: 1px solid var(--comment-border-color);
}

/* --- 角色样式 (Author vs Guest) --- */
/* 共用的名字字体样式 */
.comment-card__name {
    font-family: "Georgia Custom", Times, serif;
    font-size: var(--post-font-size-body);
}

.comment-card--author .comment-card__name {
    color: var(--color-author-name);
}

.comment-card--guest .comment-card__name {
    color: var(--color-guest-name);
}

/*!* 背景渐变 - 作者 *!*/
/*.comment-card--author {*/
/*    background-image: radial-gradient(*/
/*            ellipse at 75% 10%,*/
/*            rgba(255, 69, 0, 0.11) 0%,*/
/*            rgba(255, 69, 0, 0.01) 40%,*/
/*            rgba(255, 69, 0, 0.0) 70%,*/
/*            rgba(255, 69, 0, 0.0) 100%*/
/*    );*/
/*}*/

/*!* 背景渐变 - 访客 *!*/
/*.comment-card--guest {*/
/*    background-image: radial-gradient(*/
/*            ellipse at 75% 10%,*/
/*            rgba(0, 127, 255, 0.15) 0%,*/
/*            rgba(0, 127, 255, 0.01) 40%,*/
/*            rgba(0, 127, 255, 0.0) 70%,*/
/*            rgba(0, 127, 255, 0.0) 100%*/
/*    );*/
/*}*/
/* 背景渐变 - 作者 */
.comment-card--author {
    background-image: radial-gradient(
            ellipse at 75% 10%,
            rgba(255, 186, 120, 0.28) 0%,
            rgba(255, 186, 120, 0.10) 38%,
            rgba(255, 186, 120, 0.02) 70%,
            rgba(255, 186, 120, 0.0) 100%
    );
    background-color: #fff7ef;
}

/* 背景渐变 - 访客 */
.comment-card--guest {
    background-image: radial-gradient(
            ellipse at 75% 10%,
            rgba(0, 127, 255, 0.12) 0%,
            rgba(0, 127, 255, 0.03) 40%,
            rgba(0, 127, 255, 0.0) 70%,
            rgba(0, 127, 255, 0.0) 100%
    );
    background-color: #f7fbff;
}


/* --- 卡片内容 --- */
.comment-card__body {
    padding: 13px 8px;
}

.comment-card__body p {
    text-align: justify;
    hyphens: auto;
}

/* --- 元信息 (时间、图标) --- */
.comment-card__meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.comment-card__time {
    font-size: var(--post-font-size-small);
    color: #444;
}

/* ==========================================================================
   6. 按钮与交互 (Buttons & Actions)
   ========================================================================== */
.comment-card__btn {
    border: none;
    background: none;
    font: inherit;
    user-select: none;
    cursor: pointer;
    color: #444;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.comment-card__btn:hover {
    color: var(--navbar-hover-color, #086db1);
}

.comment-card__citation-number {
    color: #666;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.comment-card__citation-number[hidden] {
    display: none;
}

.comment-citation-link {
    color: var(--color-guest-name);
    font-weight: 600;
    text-decoration: none;
}

.comment-citation-link:hover {
    text-decoration: underline;
}

.comment-card__icon-box {
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 图标尺寸管理 */
.icon--default,
.icon--liked,
.icon-reply {
    width: 16px;
    height: 16px;
}

.icon-cite {
    width: 12px;
    height: 12px;
}

.icon--liked {
    display: none;
}

.comment-card__btn--like[aria-pressed="true"] {
    color: #0b63ce;
    font-weight: 600;
}

.comment-card__btn--like[aria-pressed="true"] .icon--default {
    display: none;
}

.comment-card__btn--like[aria-pressed="true"] .icon--liked {
    display: block;
}

.comment-card__btn--like[aria-pressed="true"] .comment-card__count {
    color: #0b63ce;
}

.comment-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid #b6b6b6;
    border-radius: 4px;
    color: #444;
    background: #f4f4f4;
    font-size: 12px;
    line-height: 1;
}

.comment-status-badge--pending {
    border-color: #c2a04a;
    color: #6f4f00;
    background: #fff7d7;
}

.comment-status-badge--hidden {
    border-color: #aaa;
    color: #555;
    background: #eee;
}

.comment-admin-actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 24px;
    min-height: 26px;
}

.comment-admin-toggle {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #222;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: rotate(0deg) scale(1);
    transform-origin: center;
    transition: opacity 160ms ease, transform 180ms ease, visibility 160ms ease;
}

.comment-admin-toggle:hover,
.comment-admin-toggle[aria-expanded="true"] {
    color: #0b63ce;
}

.comment-admin-actions.is-open .comment-admin-toggle {
    opacity: 0;
    visibility: hidden;
    transform: rotate(90deg) scale(0.5);
    pointer-events: none;
}

.comment-admin-menu {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 20;
    opacity: 0;
    transform: translateX(18px) scale(0.96);
    transform-origin: right center;
    pointer-events: none;
    transition: opacity 180ms ease, transform 200ms ease;
}

.comment-admin-menu[hidden] {
    display: none;
}

.comment-admin-actions.is-open .comment-admin-menu {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.comment-admin-action {
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #444;
    font: inherit;
    font-size: var(--font-size-base);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 180ms ease, transform 200ms ease, color 160ms ease;
}

.comment-admin-action:hover {
    color: #0b63ce;
}

.comment-admin-actions.is-open .comment-admin-action {
    opacity: 1;
    transform: translateX(0);
}

.comment-admin-actions.is-open .comment-admin-action:nth-child(1) {
    transition-delay: 20ms;
}

.comment-admin-actions.is-open .comment-admin-action:nth-child(2) {
    transition-delay: 45ms;
}

.comment-admin-actions.is-open .comment-admin-action:nth-child(3) {
    transition-delay: 70ms;
}

.comment-admin-actions.is-open .comment-admin-action:nth-child(4) {
    transition-delay: 95ms;
}

.comment-admin-icon {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) saturate(100%) invert(25%) sepia(0%) saturate(0%) hue-rotate(167deg) brightness(91%) contrast(88%);
}

.comment-admin-toggle .comment-admin-icon {
    width: 20px;
    height: 20px;
}

.comment-admin-action:hover .comment-admin-icon,
.comment-admin-toggle:hover .comment-admin-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(1958%) hue-rotate(199deg) brightness(93%) contrast(91%);
}

.blog-toast-container {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 320px;
    height: 70px;
    pointer-events: none;
    z-index: 9999;
    overflow: visible;
}

.blog-toast {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 17px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(100px) scale(0.85);
    transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1), opacity 0.35s ease;
}

.blog-toast.show {
    opacity: 1;
}

.blog-toast.hide {
    opacity: 0 !important;
    transform: translateY(100%) scale(0.9) !important;
    transition: transform 0.5s ease-in, opacity 0.5s ease-out;
}

.blog-toast.hide-behind {
    opacity: 0 !important;
    transition: opacity 0.35s ease-out;
}

.blog-toast__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.blog-toast__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.blog-toast__text {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
}

/*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
*/
/*h1, h2, h3, h4, h5, h6, button {*/
/*    all: unset;*/
/*    box-sizing: border-box;*/
/*}*/

:root {
    --bg: #f4eee1;
    --page: #d8d4cb;
    --fg: #111;
    --muted: rgba(17, 17, 17, .65);
    --accent: #7db1ff;
    --accent-strong: #3b82f6;

    --radius: 14px;
    --pill: 14px;
    --shadow: 0 14px 30px rgba(0, 0, 0, .12);
    --border: rgba(0, 0, 0, .10);

    --font-serif: "Merriweather", Times, serif;
    --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

.comments-header button {
    all: unset;
    box-sizing: border-box;
}

.comments-header {
    margin: 25px 0 15px;
    padding: 8px 0;
    /*background: #fff;*/
    /*border-radius: 5px;*/
    /*border: 1px solid #d0d0d0;*/
    font-size: var(--post-font-size-heading);
    font-family: "Georgia Custom", Times, serif;

    display: flex;
    align-items: center;
    justify-content: space-between;
    /*gap: 16px;*/
}

.comments-count {
    /*font-family: "Georgia Custom", Times, serif;*/
    /*font-weight: bold;*/
    white-space: nowrap;
    letter-spacing: 0;
}

.comments-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    /*min-width: 360px;*/
    justify-content: flex-end;
}

.sort-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.sort-label {
    /*font-weight: bold;*/
    white-space: nowrap;
    letter-spacing: 0;
}

.dropdown {
    position: relative;
}

.comments-header .dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 4px 5px;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.comments-header .dropdown-button:hover {
    border-color: rgba(59, 130, 246, .55);
    /*background: rgba(255, 255, 255, .72);*/
}

.comments-header .dropdown-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
}

/* --- 新的 SVG 图标样式 --- */
.comments-header .chevron-icon-svg {
    width: 17px; /* Icon size, from example */
    height: 17px;
    color: var(--muted); /* Inherit color from theme, can use var(--muted) from original */
    margin-left: 2px;

    /* 添加过渡动画，保持原来那个贝塞尔曲线，可以更平滑 */
    transition: transform 0.3s ease;
}

/* 依赖 ARIA 状态控制翻转 (2D rotation is correct for this symmetric icon) */
.comments-header .dropdown-button[aria-expanded="true"] .chevron-icon-svg {
    transform: rotate(180deg);
}

.comments-header .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100; /* <--- 新增这一行：提高层级，防止被下方元素遮挡 */

    min-width: 180px;
    padding: 8px;

    list-style: none;
    border-radius: 8px;
    background-color: #fff;
    /*background: rgba(255, 255, 255, .94);*/
    border: 1px solid var(--border);
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}

.comments-header .dropdown-button[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.comments-header .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    padding: 7px;
    border-radius: 8px;
    font-size: var(--post-font-size-body);

    /*font-size: 1rem;*/
    cursor: pointer;
    color: var(--fg);
}

.comments-header .dropdown-item:hover {
    background: rgba(59, 130, 246, .10);
}

.comments-header .dropdown-item[aria-checked="true"] {
    background: rgba(59, 130, 246, .14);
}

.comments-header .check {
    opacity: 0;
    color: var(--accent-strong);
}

.comments-header .dropdown-item[aria-checked="true"] .check {
    opacity: 1;
}

.comments-header .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 参考文献 */
/* 参考文献区域的基础设置：顶部留白和分隔线 */
.post-content__references h2 {
    margin-bottom: 15px;
    /*margin-top: 3rem;*/
    /*border-top: 1px solid #eaeaea;*/
    /*padding-top: 1.5rem;*/
    /* 推荐使用衬线字体以匹配学术感，如果你的全局已有设置可忽略此行 */
    /*font-family: Georgia, 'Times New Roman', serif;*/
}

/* 列表容器：重置默认样式并初始化计数器 */
.post-content__reference-list {
    list-style-type: none; /* 必须隐藏默认的 1. 2. 3. */
    padding-left: 0;
    /*margin: 0;*/
    counter-reset: ref-counter; /* 命名一个计数器，供子元素使用 */
    /*font-size: 0.95em; !* 附属信息，字号略小于正文 *!*/
    color: #444; /* 颜色稍微弱化 */
    /*line-height: 1.6;*/
}

/* 列表项：使用 Flexbox 实现悬挂缩进 */
.post-content__reference-item {
    display: flex; /* 关键：让编号和文本成为横向的 Flex 子项 */
    align-items: flex-start; /* 顶部对齐 */
    margin-bottom: 10px;
    /*margin-bottom: 1.2rem; !* 每条文献之间的间距 *!*/
    counter-increment: ref-counter; /* 每次遇到该类名，计数器 +1 */

    text-align: justify;
    hyphens: auto;
}

/*.post-content__reference-item > *:first-child {*/
/*    margin-top: 15px;*/
/*}*/

/* 伪元素：自定义方括号编号 [1], [2] */
.post-content__reference-item::before {
    content: "[" counter(ref-counter) "]"; /* 调用计数器 */
    min-width: 2.5rem; /* 固定编号区域的宽度。如果你预计文献超过 100 篇，可增加到 3rem */
    flex-shrink: 0; /* 关键：防止编号区域在空间不足时被挤压变形 */
    text-align: left;
    color: #666;
    /*font-family: system-ui, -apple-system, sans-serif; !* 编号通常使用无衬线体更清晰 *!*/
}

.post-content__citation {
    padding: 0 1px;
    text-decoration: underline;
    /*color: var(--link-color);*/
    color: var(--link-hover-color);
    /*color: blue;*/
}

.post-content__citation:hover {
    text-decoration: none;
    color: var(--link-hover-color);
    /*color: blue;*/
}


/*!* 容器负责提供括号，并继承正文的颜色（黑色/深灰） *!*/
/*.post-content__cite-group {*/
/*    color: #333; !* 与正文文本颜色保持一致，逗号也会是这个颜色 *!*/
/*    white-space: nowrap; !* 核心细节：防止 [35, 2, 5] 在逗号处被丑陋地折行 *!*/
/*}*/

/*!* 利用容器的伪元素统一生成包裹外围的方括号 *!*/
/*.post-content__cite-group::before {*/
/*    content: "[";*/
/*}*/

/*.post-content__cite-group::after {*/
/*    content: "]";*/
/*}*/

/*!* 内部的超链接负责跳转和高亮 *!*/
/*.post-content__cite-group a {*/
/*    color: #2b7bb9; !* 学术蓝 *!*/
/*    text-decoration: none;*/
/*    !* 交互优化（Fitts's Law）：利用 padding 稍微撑大单个数字的点击热区，但不影响视觉排版 *!*/
/*    padding: 0 0.15em;*/
/*}*/

/*.post-content__cite-group a:hover {*/
/*    text-decoration: underline;*/
/*}*/

.post-content__reference-backlink {
    font-size: var(--post-font-size-small);
}

/* 语义化标签的细节处理 */
.post-content__reference-item cite {
    font-style: italic; /* 作品标题保持斜体 */
}

/* 链接处理：防止长 URL 破坏排版 */
.post-content__reference-item a {
    color: #2b7bb9; /* 匹配你博客的主题蓝 */
    text-decoration: none;
    word-break: break-all; /* 强制长链接在任意字符处换行，防止撑破容器 */
}

.post-content__reference-item a:hover {
    text-decoration: underline;
}

.post-content__main {
    margin-bottom: 75px;
}
