/* ============================================================================
 * StarGreen 站点自定义样式
 * ----------------------------------------------------------------------------
 * ★ 第十轮：本文件由 mu-plugin 的 wp_footer 钩子注入改为**主题源码文件**。
 *
 * 为什么改：
 *   1. 原方案把约 900 行 CSS 内联进每一页 HTML（首页 HTML 因此膨胀到 91KB），
 *      浏览器无法缓存 —— 每次访问都要重传。
 *   2. 现在是一个可缓存的静态文件，改动直接可见、可 grep、可 diff，
 *      不再有"看不见的钩子决定页面长相"的魔法。
 *
 * ⚠️ 主题升级注意：本文件与 stargreen.js 属于"附加在主题里的自定义文件"，
 *    升级 argon-theme-master（重新解压覆盖）会丢失，需要重新拷回。
 *    部署脚本：deploy/theme-src/ 见 README.md。
 *
 * 加载方式：footer.php 在 wp_footer() 之后用 <link> 引入
 *   选择这个位置而不是 <head>，是为了保持与改造前完全一致的层叠顺序：
 *   改造前这些样式在 wp_footer 里输出（DOM 最靠后），
 *   而主题的 <style>#banner:after</style> 是写在 <body> 里的，
 *   一旦把本文件提到 <head>，那些主题内联样式就会反过来压过我们 —— 会出错。
 *
 * 内部顺序（必须与改造前一致，浏览器只做单遍级联）：
 *   1. 侧边栏年度进度条   （原 stargreen-yp-css，      wp_footer 优先级 88）
 *   2. 页脚运行时间徽章   （原 stargreen-badge-css，   wp_footer 优先级 91）
 *   3. 字体系统           （原 stargreen-font-css，    wp_footer 优先级 98）
 *   4. 站点自定义样式     （原 stargreen-custom-css，  wp_footer 优先级 99）
 * ========================================================================== */

/* ==========================================================================
 * 1. 侧边栏年度进度条
 * ========================================================================== */
.stargreen-yp { padding: 10px 4px 4px; }
.stargreen-yp-title {
    font-size: 13px;
    opacity: .85;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.stargreen-yp-title .fa { opacity: .7; }
.stargreen-yp-track {
    height: 8px;
    border-radius: 99px;
    background: rgba(127, 127, 127, .18);
    overflow: hidden;
}
.stargreen-yp-bar {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg,
        rgba(var(--themecolor-rgbstr), .60),
        rgba(var(--themecolor-rgbstr), 1));
    transition: width .8s cubic-bezier(.4,0,.2,1);
}
.stargreen-yp-pct {
    font-size: 11.5px;
    opacity: .58;
    margin-top: 5px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
 * 2. 页脚运行时间徽章
 * ========================================================================== */
.github-badge-big {
    display: inline-block;
    border-radius: 6px;
    text-shadow: none;
    font-size: 13.5px;
    color: #fff;
    line-height: 18px;
    margin: 4px 5px 4px 0;
}
.github-badge-big .badge-subject {
    display: inline-block;
    background-color: rgba(0, 0, 0, .32);
    padding: 4px 7px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.github-badge-big .badge-value {
    display: inline-block;
    padding: 4px 8px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.bg-apricots { background-color: #f7c280 !important; color: #4a3418 !important; }
#footer .stargreen-footer-badges { margin-top: 4px; line-height: 1.7; }

/* ==========================================================================
 * 3. 字体系统
 * ========================================================================== */
/* 自定义正文字体：echo（圆润黑体，与 bleaz 同款调性）
   注：字体文件通过下方 JS 异步注入，此处仅声明 face，避免阻塞渲染 */
@font-face {
    font-family: 'SG-Echo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    /* 本地优先（同机房，最快）→ CDN 兜底（jsdelivr 国内镜像）
       浏览器按 src 顺序逐个尝试，前一个失败才用后一个 */
    src: url('/wp-content/uploads/fonts/13.woff2') format('woff2'),
         url('https://fastly.jsdelivr.net/gh/huangwb8/bloghelper@latest/fonts/13.woff2') format('woff2');
}

/* 字体加载完成后给 <html> 打 .sg-font-ready 标记，用 CSS 平滑过渡
   未加载时完全不应用自定义字体 —— 首屏永远是本地系统字体，零等待 */
.sg-font-ready body,
.sg-font-ready .post-content,
.sg-font-ready .post-content p,
.sg-font-ready article p,
.sg-font-ready .banner-title,
.sg-font-ready .banner-subtitle,
.sg-font-ready .post-title,
.sg-font-ready .leftbar-announcement-content {
    font-family: 'SG-Echo', -apple-system, 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

/* ---------- 排版尺度（对齐 bleaz 的阅读节奏） ---------- */
/* 正文：1.15rem / 行高 1.85，中文长文的舒适区间 */
.post-content p,
.post-content li {
    font-size: 1.15rem;
    line-height: 1.85;
    letter-spacing: .01em;
}
.post-content h2 { font-size: 1.5rem; margin-top: 1.8em; }
.post-content h3 { font-size: 1.28rem; margin-top: 1.5em; }
.post-content h4 { font-size: 1.12rem; margin-top: 1.3em; }

/* 正文颜色：深蓝灰，比纯黑柔和，长时间阅读不刺眼 */
.post-content { color: #364863; }
html.darkmode .post-content { color: #d7dae0; }

/* 代码块不套用自定义字体（保持等宽，利于对齐阅读） */
.sg-font-ready .post-content code,
.sg-font-ready .post-content pre,
.sg-font-ready .post-content kbd,
.sg-font-ready .post-content samp {
    font-family: 'JetBrains Mono', 'Cascadia Code', Consolas,
                 Monaco, 'Courier New', monospace;
}

/* 正文字号缩放的连贯性：移动端略收 */
@media (max-width: 767.98px) {
    .post-content p, .post-content li { font-size: 1.08rem; }
}

/* ---------- 引文：弱主题色底 + 左侧主题色描边（bleaz 同款手法） ---------- */
.post-content blockquote {
    background: rgba(var(--themecolor-rgbstr), .10) !important;
    border-radius: 8px;
    padding: .8em 1.1em;
    margin: 1.2em 0;
}
html.darkmode .post-content blockquote {
    background: rgba(var(--themecolor-rgbstr), .16) !important;
}

/* ---------- 表格：统一边距，避免默认挤在一起 ---------- */
/* ⚠️ 第十七轮 · 十二：必须排除 .hljs-ln —— 开了代码高亮后，Argon 用一张 table.hljs-ln 画行号，
      这条带 !important 的 padding 会压掉主题给代码列留的 padding-left:30px，
      行号就盖住了每行开头的一两个字符（实测 #include 显示成 nclude）。 */
.post-content table:not(.hljs-ln) td,
.post-content table:not(.hljs-ln) th {
    padding: 8px 12px !important;
}

/* ==========================================================================
 * 4. 站点自定义样式
 * ========================================================================== */
/* ---------- 2.1 卡片玻璃（数值统一在 2.8.6 定义，此处只做子元素归零） ---------- */
/* 说明：卡片的背景/模糊/边框/阴影最终由 2.8.6 章节统一控制，
   本节只处理"卡片内部小组件不应叠加背景"的问题，避免透明度叠加变色。 */
.card .widget, html.darkmode .card .widget {
    background-color: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* 侧边栏公告保持主题色渐变 */
#leftbar_announcement {
    background: var(--themecolor-gradient) !important;
}

/* ---------- 2.1.1 Banner：照片壁纸 + 品牌绿纱 ----------
   壁纸（见 2.8.1）是固定定位的照片层，banner 不再自带图片，
   改为叠一层「上深下透」的品牌绿纱：
     · 顶部够深  → 白色标题 / 副标题 / 导航栏有足够对比度
     · 底部全透  → 与页面背景无缝衔接，不产生横向色带接缝
   这样 banner 与整页背景天然是同一张照片，视觉连贯（用户要求"两者用同一张图"）。 */
#banner {
    background: linear-gradient(180deg,
        rgba(14, 40, 30, .78) 0%,
        rgba(20, 56, 40, .60) 20%,
        rgba(30, 90, 64, .36) 44%,
        rgba(44, 130, 92, .14) 68%,
        rgba(58, 166, 117, 0) 100%) !important;
    position: relative;
    overflow: hidden;
}
/* 顶部补一层极淡暗角：照片本身明暗不定，暗角保证导航栏白字始终清晰 */
#banner::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .32) 0%,
        rgba(0, 0, 0, .14) 14%,
        transparent 30%);
}
/* 【关键修复】Argon 自带装饰层 .shape.shape-primary 是一层「不透明紫色渐变」：
     argon_css_merged.css → .section-shaped .shape-style-1.shape-primary{
       background:linear-gradient(150deg,#281483 15%,#8f6ed5 70%,#d782d9 94%) }
   .section-shaped .shape{position:absolute;z-index:-1;top:0;width:100%;height:100%}
   它以 z-index:-1 铺满整个 banner，绘制顺序是
     body::before(照片, z-index:-2) → .shape(紫色, z-index:-1) → #banner 绿纱
   于是照片被紫色完全盖住（实测：把照片层染成品红，banner 区一点品红都看不到）。
   顺带这也解释了此前"副标题显示紫色"的怪现象 —— 紫底透上来了。
   置为透明，让照片真正透出来。
   —— 用户随后要求「背景有那种大圆圈，不要这个东西」。
      那些圆圈不是 .shape 自己的背景，而是它内部 9 个 <span>：
        .section-shaped .shape-style-1 :nth-child(n){ background: rgba(255,255,255,.1) }
      正解是主题自带的开关 argon_banner_background_hide_shapes（见 1.2 节已打开），
      header.php:406 会因此不再输出 shape-style-1 类名，圆圈连样式都不匹配。
      这里再补一条 CSS 兜底，防止选项被缓存/插件干扰而失效。 */
#banner .shape,
#banner .shape.shape-primary,
#banner .shape.shape-style-1 {
    background: transparent !important;
}
#banner .shape > span,
#banner .shape-style-1 > span {
    display: none !important;   /* 装饰大圆圈：彻底不渲染 */
}
/* 暗色下照片整体偏亮，会破坏暗色氛围；加深绿纱把 banner 重新压暗。
   （同样不能压死：首页 banner 改成 mini 后只有 270px 高，
     绿纱太重会让首页顶部变成一块纯色板，照片轮廓全丢。） */
html.darkmode #banner {
    background: linear-gradient(180deg,
        rgba(10, 26, 20, .62) 0%,
        rgba(14, 38, 28, .50) 24%,
        rgba(20, 60, 42, .34) 52%,
        rgba(26, 84, 60, .16) 78%,
        rgba(28, 92, 66, .05) 100%) !important;
}
html.darkmode #banner::after {
    background: linear-gradient(180deg,
        rgba(0, 0, 0, .30) 0%,
        rgba(0, 0, 0, .12) 16%,
        transparent 34%);
}
#banner .banner-title,
#banner .banner-subtitle,
#banner .banner-title-inner {
    position: relative;
    z-index: 2;   /* 高于底部过渡层(z-index:1)，避免被渐变盖住 */
    text-shadow: 0 2px 14px rgba(0, 0, 0, .22);
}
/* 副标题颜色与渐变统一由 2.4 节处理，此处只管透明度 */
#banner .banner-subtitle {
    opacity: .94;
}
/* 顶栏品牌名：白字加轻微投影，在绿色 banner 上足够清晰 */
#banner .navbar-brand,
#banner .navbar-nav .nav-link {
    text-shadow: 0 1px 8px rgba(0, 0, 0, .28);
}
/* 背景图场景下保留原来的覆盖层逻辑 */
#banner[style*="background-image"] {
    background-blend-mode: multiply;
}

/* ---------- 2.2 侧边栏头像交互动效 ---------- */
#leftbar_overview_author_image {
    width: 100px;
    height: 100px;
    margin: auto;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: rgba(127, 127, 127, 0.1);
    overflow: hidden;
    /* ⚠️ 这里原来写了两条绿色柔光 box-shadow，但**从未生效** ——
       Argon 给这个元素带了 Bootstrap 的 .shadow-sm，而 .shadow-sm 是
       `!important`，普通声明压不过它（实测 computed 一直是
       rgba(0,0,0,.075) 0 2px 4px）。已删除，投影交给 .shadow-sm。 */
    transition: transform 0.32s cubic-bezier(.34,1.56,.64,1),
                filter 0.32s ease;
}
#leftbar_overview_author_image:hover {
    transform: scale(1.1);
    filter: brightness(106%);
}
#leftbar_overview_author_name {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}
#leftbar_overview_author_name:hover {
    transform: scale(1.06);
    color: #3aa675;
}
#leftbar_overview_author_description {
    font-size: 13.5px;
    margin-top: -2px;
    opacity: 0.8;
    line-height: 1.6;
}

/* ---------- 2.3 站点概览分隔线更轻 ---------- */
.site-state-item { border-left: 1px solid rgba(127, 127, 127, 0.26) !important; }
.site-friend-links-title { border-top: 1px dotted rgba(127, 127, 127, 0.3) !important; }
#leftbar_tab_tools ul li { padding-top: 3px; padding-bottom: 3px; }

/* ---------- 2.4 Banner 文字 ---------- */
.banner-title .banner-title-inner {
    font-weight: 700;
    letter-spacing: .02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .3);
}
/* 副标题：品牌绿系渐变文字（浅薄荷 → 白 → 淡绿）。
   原为「蓝→紫→橙→金」多彩渐变，与绿色主题割裂，已替换。
   安全性：渐变文字依赖 background-clip:text，若浏览器不支持，
   -webkit-text-fill-color:transparent 会让文字彻底消失。
   因此用 @supports 守卫，不支持时退化为纯色浅绿。 */
.banner-subtitle {
    font-size: 1.05rem;
    color: #d6f5e6;                     /* 默认纯色（降级态） */
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .banner-subtitle {
        background: linear-gradient(94.75deg,
            rgb(190, 240, 214) 0%,
            rgb(255, 255, 255) 46%,
            rgb(168, 228, 199) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
.banner-subtitle {
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .25));
}

/* ---------- 2.5 正文表格 / 引用 / 代码 ---------- */
/* 同上，排除代码高亮的行号表 .hljs-ln：display:block 和单元格内边距会把代码撑成「隔行」那么高 */
article table:not(.hljs-ln) > thead > tr > th,
article table:not(.hljs-ln) > tbody > tr > td,
article table:not(.hljs-ln) > tfoot > tr > td {
    padding: 9px 12px;
    border: 1px solid rgba(127, 127, 127, 0.24);
}
article table:not(.hljs-ln) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

blockquote {
    background: rgba(var(--themecolor-rgbstr), 0.09) !important;
    border-left: 4px solid rgba(var(--themecolor-rgbstr), 0.75) !important;
    border-radius: 0 6px 6px 0;
    padding: 14px 18px !important;
    width: 100%;
}

article pre, article .wp-block-code { border-radius: 8px !important; overflow: hidden; }
article :not(pre) > code {
    background: rgba(var(--themecolor-rgbstr), 0.1);
    color: rgba(var(--themecolor-rgbstr));
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .92em;
}
article h2 { margin-top: 2em; margin-bottom: .7em; }
article h3 { margin-top: 1.6em; margin-bottom: .6em; }
article img {
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    transition: transform .35s ease, box-shadow .35s ease;
}
article img:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.14); }

/* ---------- 2.6 滚动模糊 ---------- */
#content::before {
    transition: filter .35s ease, transform .35s ease !important;
    filter: blur(0px);
    transform: scale(1.02);
}
#content.scrolled::before {
    filter: blur(14px);
    transform: scale(1.05);
}

/* ---------- 2.8 控件圆润化 + 淡蓝背景 + 毛玻璃体系 ----------
   参考 bleaz / xiamuyan 的透明设置，统一圆角语言与玻璃质感。
   Argon 默认：按钮 4px 方角纯白、背景纯灰 #f4f5f7、导航栏无模糊 —— 显廉价。
   本章：建立 8/12/16/99 四档圆角体系 + 淡蓝底 + 高斯模糊玻璃层。 */

/* === 2.8.1 页面背景：照片壁纸 + 柔化薄纱 ===
   三层结构（从下往上）：
     body::before  z-index:-2   照片（固定定位，cover 铺满，不随滚动）
     body::after   z-index:-1   薄纱（压对比度保证可读，同时保留淡蓝调）
     页面内容       正常层
   照片与 banner 共用同一张图（banner 只叠一层绿纱），因此视觉连贯。

   【两个必须踩过的坑 —— 照片被盖住，排查了很久】
   坑 1：Argon 的 .shape.shape-primary 是「不透明紫色渐变」，铺满整个 banner，
         把照片在 banner 区完全盖住（详见 2.1.1 的修复）。
   坑 2：Argon 给 body 设了不透明背景色（#f4f5f7）。
         CSS 绘制顺序是「负 z-index 层 → 块级背景 → ...」，
         所以不透明的 body 背景会整体盖住 body::before 的照片层。
         症状很有迷惑性：整页看起来只是"从深绿到浅蓝的平滑渐变"，
         像"照片没加载"，其实是照片被压在最底下、一点都看不见。
         实测数据（x=1400 纵向采样）：
           未修 body： y=320(156,182,180) → y=380(107,143,148) 单调平滑，无照片细节
           修好 body： 同一位置出现明显起伏，照片的山脊/水纹透出来
         结论：body 必须 transparent，兜底底色交给 html 的 canvas 背景。
   ⚠️ 若日后改背景，务必保持 body 背景为 transparent。 */
html {
    background: #eaf2fb !important;   /* 兜底底色（图片未加载 / 加载失败时可见） */
}
body {
    background-color: transparent !important;   /* 见上文「坑 2」，不可省略 */
}

/* 照片层：移动端用 1280 宽（46KB），桌面换 2560 宽（174KB），按视口宽度切换。

   【坑 3 —— 默认切到暗色模式后才暴露】
   Argon 的暗色样式里有一条**同样叫 body::before** 的全屏遮罩：
       html.darkmode body:before {
           content:""; position:fixed; inset:0;
           background: rgba(0,0,0,.2); z-index: 999999999;
           pointer-events: none; }
   它是「元素 + 类 + 元素」= 特异度 (0,1,2)，而本规则只有 (0,0,1)，
   于是暗色下**照片层被整条覆盖**（background-image 变成 none），
   同时 Argon 那个 z-index:999999999 的遮罩还会盖在所有内容之上。
   症状：暗色下背景照片完全消失，只剩"html 底色 + 薄纱"的纯色渐变。

   为什么用 !important 而不是提特异度：!important 的比较发生在特异度之前，
   一条 !important 就能稳定压过主题里任何非 !important 的同名声明，
   而**每一个属性都要单独加** —— CSS 是逐属性比较的，
   只给 background 加 !important 的话，z-index 仍会被主题的
   999999999 拿走，照片层就会跑到所有内容上面把整页盖住。
   （这就是"同一个伪元素被两处争用"的典型坑：必须整体接管。） */
body::before {
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: -2 !important;
    pointer-events: none !important;
    background: url('/wp-content/uploads/wallpaper/wallpaper-1280.webp') center center / cover no-repeat !important;
}
@media (min-width: 768px) {
    body::before {
        background-image: url('/wp-content/uploads/wallpaper/wallpaper-2560.webp') !important;
    }
}

/* 薄纱层：淡蓝薄纱压住照片对比度。
   alpha 刻意压得"轻"—— 照片要看得见才有意义；
   正文可读性主要靠卡片自身的玻璃底（.card 不透明度 .65）。
   若嫌照片太抢眼，调大 alpha 即可。 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(234, 242, 251, .30) 0%,
        rgba(234, 242, 251, .44) 55%,
        rgba(234, 242, 251, .58) 100%);
}
/* 暗色遮罩：把照片压暗以贴合暗色氛围，但**不能压死**。
   原来是 .52 → .76，实测在默认暗色模式下照片几乎完全看不见 ——
   壁纸是用户明确要的，暗色下也得看得见轮廓，所以降到 .38 → .58。
   正文可读性由卡片自身的不透明度保证（.card 暗色 .48）。 */
html.darkmode body::after {
    background: linear-gradient(180deg,
        rgba(20, 24, 30, .38) 0%,
        rgba(20, 24, 30, .50) 55%,
        rgba(20, 24, 30, .58) 100%);
}
html.darkmode {
    background-color: #1e2229 !important;   /* 暗色兜底底色（同样只给 html，body 保持透明） */
}
html.darkmode body {
    background-color: transparent !important;
}

/* === 2.8.1 无框原则（第七轮）===
   用户反馈「各种按钮不要加框，例如右上角搜索 和发送评论中的」。

   ★ 诊断结论：这些「框」**全部是我们自己在 2.8.3~2.8.5 里加的**
     `border: 1px solid rgba(255,255,255,.5)`（浅色）/
     `rgba(255,255,255,.14)`（暗色），一共 7 处：
       · .input-group-text        → 导航栏右上角放大镜（看起来像"搜索按钮"）
       · .form-control            → 评论表单的昵称/邮箱/验证码/内容框
       · #leftbar_search_container→ 侧边栏搜索框
       · #fabtn_*（6 个）         → 悬浮按钮
       · #fabtn_reading_progress  → 阅读进度胶囊
       · .dropdown-menu / #fabtn_blog_settings_popup / .emotion-keyboard → 弹层
     暗色下 .14 的白在深底上尤其明显，所以用户一眼就看到一圈浅灰描边。

   ★ 处理原则：**玻璃语言不靠描边，靠「半透明底 + 模糊 + 投影」**。
     所有 border 一律去掉（`border: none !important`），
     用稍强的 box-shadow 保证控件在浅色照片上仍有轮廓（投影 ≠ 描边）。
     唯一保留的"框"是**输入框聚焦时的焦点环**（`:focus` 的 box-shadow），
     那是无障碍必需的，且只在聚焦瞬间出现，不影响静态观感。

   ⚠️ 副作用提醒：`border: none` 会让控件的**盒模型少 2px**，
     所以 2.8.3b 里靠 `border-radius` 对齐的图标端与输入框仍能对齐，
     但**不要**再用 `border-color` 做 hover 反馈（没有边框了，改不动），
     hover 一律改成改 background。 */

/* === 2.8.2 圆角体系 ===
   用户反馈「边角要更圆润」，且强调**不要靠加白边来假装圆角** —— 所以：
     · 数值整体上调（原来 8/12/16 偏方）
     · 卡片圆角走 Argon 自己的 --card-radius（由 argon_card_radius 选项生成，
       已在 1 节里把选项值从 12 改成 20），这是"改主题本身"而不是贴外挂
     · 所有描边（border）一律不加 —— 见 2.8.1「无框原则」 */
:root {
    --sg-r-xs: 10px;   /* 徽章、代码块、小标签 */
    --sg-r-sm: 12px;   /* 普通按钮 */
    --sg-r-md: 18px;   /* 输入框、下拉菜单、小面板 */
    --sg-r-lg: 24px;   /* 弹层、大面板 */
    --sg-r-fab: 16px;  /* 悬浮圆形按钮（42px 见方，16px 已是圆润方形） */
    --sg-r-pill: 99px; /* 胶囊按钮、进度条 */
}

/* === 2.8.3 悬浮按钮（fabtn）：圆润 + 真·玻璃虚化 ===
   用户反馈「控件上没有虚化效果」—— 根因是**不透明度太高**：
   原来 background 是 rgba(255,255,255,.72)，72% 的白把背后的照片糊住了，
   backdrop-filter 虽然写着，但视觉上完全看不出来。
   玻璃感的关键是「低不透明度 + 强模糊」：alpha 降到 .40 左右，
   背后的照片会以模糊形态透上来，虚化才看得见。 */
#fabtn_back_to_top,
#fabtn_go_to_comment,
#fabtn_toggle_darkmode,
#fabtn_toggle_sides,
#fabtn_open_sidebar,
#fabtn_toggle_blog_settings_popup {
    border-radius: var(--sg-r-fab) !important;
    background: rgba(255, 255, 255, .32) !important;   /* .72 → .40 → .32，越透虚化越显 */
    backdrop-filter: saturate(180%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    border: none !important;                            /* 无框：轮廓交给投影 */
    box-shadow: 0 6px 20px rgba(38, 71, 110, .20), 0 2px 6px rgba(38, 71, 110, .12) !important;
    transition: transform .25s cubic-bezier(.34,1.4,.64,1),
                box-shadow .25s ease, background .25s ease !important;
}
#fabtn_back_to_top:hover,
#fabtn_go_to_comment:hover,
#fabtn_toggle_darkmode:hover,
#fabtn_toggle_sides:hover,
#fabtn_open_sidebar:hover,
#fabtn_toggle_blog_settings_popup:hover {
    transform: translateY(-3px) scale(1.06);
    background: rgba(255, 255, 255, .62) !important;
    box-shadow: 0 10px 26px rgba(38, 71, 110, .20) !important;
}
html.darkmode #fabtn_back_to_top,
html.darkmode #fabtn_go_to_comment,
html.darkmode #fabtn_toggle_darkmode,
html.darkmode #fabtn_toggle_sides,
html.darkmode #fabtn_open_sidebar,
html.darkmode #fabtn_toggle_blog_settings_popup {
    background: rgba(30, 34, 41, .40) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .46) !important;
}

/* 设置弹层 / 表情键盘：大圆角 + 玻璃（同样无框） */
#fabtn_blog_settings_popup,
.emotion-keyboard {
    border-radius: var(--sg-r-lg) !important;
    background: rgba(255, 255, 255, .74) !important;
    backdrop-filter: saturate(170%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(170%) blur(24px) !important;
    border: none !important;
    box-shadow: 0 16px 48px rgba(38, 71, 110, .22) !important;
}
html.darkmode #fabtn_blog_settings_popup,
html.darkmode .emotion-keyboard {
    background: rgba(32, 36, 43, .86) !important;
}

/* === 2.8.3b 控件补漏 ===
   用脚本把页面上所有可见控件（button / input / .input-group-text / .card …）
   的圆角与虚化扫了一遍，发现 5 处漏网。逐个补齐，理由写在每段上面。 */

/* ① 输入组（导航栏搜索 / 评论表单的昵称·邮箱·验证码·网址）
   ────────────────────────────────────────────────────────────────
   ★ 第十一轮重做。原来把"玻璃底"**分别**画在 .input-group-text（图标端）
     和 .form-control（输入框）上，于是同一个胶囊里出现两块不同颜色的底：
       · 暗色下 .input-group-text = rgba(38,43,51,.44) 深灰
         .form-control            = rgba(255,255,255,.10) 浅灰
       · 两个 18px 圆角并排，接缝处还会露一个缺口
     用户截图里说的「搜索的黑边」「这些黑边」就是那两块深灰圆角块。

   做法：**把底提到整组上，两个子元素一律透明** → 视觉上是一条连续胶囊。
     圆角只留在最左/最右两端，**所以不需要 overflow:hidden** ——
     评论区的验证码/网址框靠 :before 在 top:-35px 处弹提示（"http(s)://"、
     "11 - 7 ="），一旦 overflow:hidden 就会被整个裁掉，这是必须避开的坑。 */
.input-group-alternative {
    background: rgba(255, 255, 255, .40) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border-radius: var(--sg-r-md) !important;
    box-shadow: none !important;
    transition: background .25s ease, box-shadow .25s ease;
}
html.darkmode .input-group-alternative {
    background: rgba(255, 255, 255, .10) !important;
}
/* 子元素：无底、无虚化（虚化已由整组承担）、无自带阴影。
   ⚠️ 必须把 `html.darkmode ...` 的版本也显式写出来 ——
      文件后面还有 `html.darkmode input.form-control`（特异性 0,2,2），
      高于这里的 (0,2,0)。不显式覆盖的话，暗色下输入框会自己再叠一层 10% 白，
      和整组的 10% 白叠成 19%，接缝处就能看到一道浅色断层。
      （聚焦态的同类冲突更麻烦，单独用 `.form-control.form-control:focus` 处理，见下） */
.input-group-alternative > .input-group-prepend > .input-group-text,
.input-group-alternative > .input-group-append > .input-group-text,
.input-group-alternative > .form-control,
html.darkmode .input-group-alternative > .input-group-prepend > .input-group-text,
html.darkmode .input-group-alternative > .input-group-append > .input-group-text,
html.darkmode .input-group-alternative > .form-control {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}
/* 圆角只给两端：左端＝图标块，右端＝输入框（Argon 的输入组里输入框恒为最后一个子元素） */
.input-group-alternative > .input-group-prepend > .input-group-text,
.input-group-alternative > .input-group-append > .input-group-text {
    border-radius: var(--sg-r-md) 0 0 var(--sg-r-md) !important;
}
.input-group-alternative > .form-control:last-child {
    border-radius: 0 var(--sg-r-md) var(--sg-r-md) 0 !important;
}
.input-group-alternative > .form-control:only-child {
    border-radius: var(--sg-r-md) !important;
}
/* 焦点环挪到整组上。原来它挂在输入框上，只圈住输入框那一段，
   和左边的图标块错位，看起来像"半个框"。 */
.input-group-alternative:focus-within {
    background: rgba(255, 255, 255, .74) !important;
    box-shadow: 0 0 0 3px rgba(var(--themecolor-rgbstr), .38) !important;
}
html.darkmode .input-group-alternative:focus-within {
    background: rgba(255, 255, 255, .18) !important;
}
/* 聚焦时输入框自己不要上色 —— 底色与焦点环统一由整组的 :focus-within 提供。
   ⚠️ 这里必须把类计数抬到 4：`.form-control.form-control` 的重复是**刻意**的。
      文件后面（2.8.3b ①之后）还有两条同样带 !important 的规则：
          input.form-control:focus              → (0,2,1)
          html.darkmode input.form-control:focus → (0,3,2)
      两边都有 !important 时，胜负只看**特异性**（再才轮到源码顺序）。
      不抬计数就会被它们压回去 —— 实测暗色下输入框聚焦后自己变成 18% 白，
      叠在整组的 10% 白上，接缝处立刻冒出一道浅色块。 */
.input-group-alternative > .form-control.form-control:focus {
    background: transparent !important;
    box-shadow: none !important;
}

/* ①a 兜底：万一有 .input-group-text 不在 .input-group-alternative 里
   （主题升级/插件可能引入），仍按旧的"独立玻璃块"处理，
   不至于退回原生白底方角。（本条特异性低于上面的子选择器，不会打架） */
.input-group-text {
    border-radius: var(--sg-r-md) !important;
    background: rgba(255, 255, 255, .40) !important;
    border: none !important;
}
html.darkmode .input-group-text {
    background: rgba(255, 255, 255, .10) !important;
}

/* ①b Argon 的 .input-group-alternative / .form-control-alternative 自带一条外阴影
      `rgba(50,50,93,.15) 0 1px 3px`（画在输入框外，读起来像一圈外框边），
      以及 .input-group 包装层 4px 的圆角。全部清掉，避免和我们的玻璃语言打架。 */
.input-group,
.form-control-alternative {
    border-radius: var(--sg-r-md) !important;
    box-shadow: none !important;
}

/* ② 移动端菜单键 .navbar-toggler
   问题：Argon 默认 border-radius: .25rem = 4px，在 46×31 的按钮上几乎是直角。
   做法：跟普通按钮统一到 --sg-r-sm。 */
.navbar-toggler {
    border-radius: var(--sg-r-sm) !important;
}

/* ③ 验证码刷新键 .pcr-button
   问题：Argon 默认 .15rem ≈ 2.4px，是页面上最"方"的一个控件。
   做法：小控件统一到 --sg-r-xs。 */
.pcr-button {
    border-radius: var(--sg-r-xs) !important;
}

/* ④ 评论表情键 #comment_emotion_btn
   问题：它是 42×42 的方形图标键，却沿用普通按钮的 12px，
         和旁边同尺寸的悬浮按钮（16px）不是一套。
   做法：对齐悬浮按钮。 */
#comment_emotion_btn {
    border-radius: var(--sg-r-fab) !important;
}

/* ⑤ 阅读进度键 #fabtn_reading_progress
   问题：其它悬浮按钮都是 .40 白 + blur(20px) 的玻璃，只有它是
         **不透明白底**（rgb(255,255,255)）且没有任何模糊 —— 一眼就是"另一个系统"。
   注意：它是胶囊形（内部有进度条 #fabtn_reading_progress_bar 和百分比），
        所以圆角必须保留 --sg-r-pill，不能套 --sg-r-fab，否则胶囊会被切成方块。 */
#fabtn_reading_progress {
    border-radius: var(--sg-r-pill) !important;
    background: rgba(255, 255, 255, .32) !important;
    backdrop-filter: saturate(180%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(38, 71, 110, .20) !important;
}
html.darkmode #fabtn_reading_progress {
    background: rgba(30, 34, 41, .40) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .46) !important;
}

/* === 2.8.4 导航栏：主题自带的整体毛玻璃 ===
   实测事实（勿凭猜测）：
     · Argon 导航栏元素是 #navbar-main.navbar，position:fixed（吸顶）
     · .navbar-transparent 是常驻类，不随滚动增删
     · 滚动时 Argon 用 **内联 !important** 写 background-color，样式表压不掉
     · 但该声明引用 CSS 变量 --toolbar-color，且该变量定义在
       #navbar-main 元素上（不是 :root）→ 改变量即可控制颜色

   ★ 本轮（第五轮后续）用户明确要求：「任务栏移动下方时候是整体虚化，
     不是完整的透明，而是只有一点点阴影」。
     → 这正是 Argon 自带的 argon_toolbar_blur 开关（见 1.2 节已打开）：
       argontheme.js 的 changeToolbarTransparency() 读到 toolbar-blur 后会
         · 顶部：background-color alpha 0 + backdrop-filter: blur(0px)
         · 滚动后：background-color alpha **0.65** + backdrop-filter: blur(16px)
       也就是"往下滚才整块虚化"，而且**不是**全透明。
     → 所以本节的职责收缩为三件事：
         ① 决定 0.65 那个白/灰是什么颜色（--toolbar-color）
         ② 给滚动后的状态加"一点点"阴影（主题会把 inline box-shadow 清空，
            正好把控制权让给样式表）
         ③ 文字颜色随玻璃深浅切换
     ⚠ 千万别再写 backdrop-filter: none —— 那会把主题的 blur(16px) 压掉，
       用户要的"整体虚化"就没了。
   —— 选择器统一用 #navbar-main（ID）而不是 .navbar-main（类）：
      主题里 #navbar-main 唯一（header.php:280），用 ID 可以稳定压过
      主题/其它样式块里任何 .navbar-main 或 #navbar-main 规则。 */
#navbar-main {
    transition: background .3s ease, box-shadow .3s ease,
                backdrop-filter .3s ease, -webkit-backdrop-filter .3s ease !important;
}

/* 关键：改写 Argon 导航栏的取色变量。
   白天→白玻璃；暗色→深灰玻璃。alpha 由 Argon 自己控制
   （顶部 0 / 滚动 0.65），所以顶部自然透明，无需额外干预。 */
html:not(.darkmode) #navbar-main { --toolbar-color: 255, 255, 255; }
html.darkmode       #navbar-main { --toolbar-color: 32, 36, 43; }

/* 顶部：不画分割线、不加阴影，观感完全交给 banner */
html:not(.sg-scrolled) #navbar-main {
    border-bottom: none !important;
    box-shadow: none !important;
    background-image: none !important;
    /* 兜底：Argon 的 .headroom--not-top 规则带
       background-color: #172b4d !important（深藏青实色底），
       平时被它自己写的内联 !important 压着看不见；一旦那段内联没了
       （主题升级、JS 报错），导航栏会突然变成一条藏青横条。
       这里用更高特异度(1,2,1) + !important 钉死为透明。 */
    background-color: transparent !important;
}
/* 滚动后：主题负责虚化（blur(16px) + alpha .65），本样式表只补「一点点阴影」。
   阴影故意做得很轻（负 spread + 短距离），符合用户"只有一点点阴影"的描述：
   既让导航栏与内容分层，又不至于在下方压出一条深色带。 */
html.sg-scrolled #navbar-main {
    border-bottom: none !important;
    background-image: none !important;
    background-color: transparent !important;   /* 兜底，见上 */
    box-shadow: 0 3px 12px -6px rgba(20, 40, 60, .20) !important;
}
html.darkmode.sg-scrolled #navbar-main {
    box-shadow: 0 3px 12px -6px rgba(0, 0, 0, .34) !important;
}
/* 滚动后导航栏压在浅色玻璃上，文字需从白色转为深色 */
html.sg-scrolled:not(.darkmode) #navbar-main .nav-link,
html.sg-scrolled:not(.darkmode) #navbar-main .navbar-brand {
    color: #3a4a5c !important;
}
html.sg-scrolled:not(.darkmode) #navbar-main .navbar-toggler {
    color: #3a4a5c !important;
}

/* === 2.8.4b 导航栏搜索：图标颜色跟着"整组底色"走（第十一轮重写）===
   ★ 第七轮的原问题仍然成立：导航栏的放大镜图标是**白色**（继承导航栏文字色），
     底色一变浅就「白图标压白底」→ 图标完全看不见。

   ★ 第十一轮的变化：玻璃底从 .input-group-text 挪到了 .input-group-alternative
     （见 2.8.3b ①），所以这里不再给图标块单独上色，只负责**图标自身的颜色**：
       浅色模式 → 整组是 rgba(255,255,255,.40) 浅玻璃 → 图标转深
       暗色模式 → 整组是 rgba(255,255,255,.10) 压暗底   → 图标保持白
     于是不管在顶部（导航栏文字白）还是滚动后（文字转深），搜索框都是
     同一套「浅玻璃 + 深图标」，不会再冒出一块突兀的深灰方块。
     —— 这也顺带干掉了原来"顶部要深底、滚动后要浅底"两条互相打架的规则。 */
html:not(.darkmode) #navbar-main .input-group-text i {
    color: #3a4a5c !important;
}

/* === 2.8.5 按钮：圆润化 === */
.btn, button.btn, input[type=submit], .wp-block-button__link {
    border-radius: var(--sg-r-sm) !important;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover, button.btn:hover, input[type=submit]:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

/* === 2.8.5b outline 按钮去框（第七轮）===
   用户说「各种按钮不要加框」。Argon 的 `.btn-outline-*` 是**描边按钮** ——
   评论区的「回复」、输入框下方的展开箭头、设置弹层的字体/阴影切换都是它，
   每一个都顶着一圈 1px 主题色描边。改成「玻璃底 + 无描边」的 ghost 风格。

   ★ 坑：这些按钮的**选中态不是 `.active` 类**，而是 Argon 用 ID + html 类写的：
       html:not(.use-serif) #blog_setting_font_sans_serif { background: var(--themecolor) }
     如果只写一条 `.btn-outline-* { background: ... !important }`，
     会把选中态的实色底一起压掉（`!important` 赢过没有 `!important` 的 ID 规则）
     → 设置弹层里"当前选中的字体/阴影"就看不出是哪个了。
     所以下面**第二条规则把选中态原样钉回来**，两条必须成对出现。 */
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success,
.btn-outline-danger, .btn-outline-warning, .btn-outline-info,
.btn-outline-default, .btn-outline-light, .btn-outline-dark {
    border: none !important;
    background: rgba(255, 255, 255, .40) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    transition: background .2s ease, box-shadow .2s ease;
}
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-success:hover,
.btn-outline-danger:hover, .btn-outline-warning:hover, .btn-outline-info:hover,
.btn-outline-default:hover, .btn-outline-light:hover, .btn-outline-dark:hover {
    background: rgba(255, 255, 255, .62) !important;
    box-shadow: 0 6px 16px rgba(38, 71, 110, .16) !important;
}
html.darkmode .btn-outline-primary, html.darkmode .btn-outline-secondary,
html.darkmode .btn-outline-success, html.darkmode .btn-outline-danger,
html.darkmode .btn-outline-warning, html.darkmode .btn-outline-info,
html.darkmode .btn-outline-default, html.darkmode .btn-outline-light,
html.darkmode .btn-outline-dark {
    background: rgba(255, 255, 255, .10) !important;
}
html.darkmode .btn-outline-primary:hover, html.darkmode .btn-outline-secondary:hover,
html.darkmode .btn-outline-success:hover, html.darkmode .btn-outline-danger:hover,
html.darkmode .btn-outline-warning:hover, html.darkmode .btn-outline-info:hover,
html.darkmode .btn-outline-default:hover, html.darkmode .btn-outline-light:hover,
html.darkmode .btn-outline-dark:hover {
    background: rgba(255, 255, 255, .20) !important;
}
/* ★ 选中态钉回（与上面成对，勿单独删）：Argon 的 ID 规则 + Bootstrap 的 .active */
html:not(.use-serif) #blog_setting_font_sans_serif,
html.use-serif #blog_setting_font_serif,
html:not(.use-big-shadow) #blog_setting_shadow_small,
html.use-big-shadow #blog_setting_shadow_big,
.btn-outline-primary.active,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show > .btn-outline-primary.dropdown-toggle {
    background: var(--themecolor) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(var(--themecolor-rgbstr), .32) !important;
}

/* === 2.8.5c 设置弹层「滤镜」色块：选中提示从硬描边换成柔光 + 放大（第七轮）===
   主题 style.css:1766 起给四个滤镜色块写了选中环：
     #blog_setting_filter_off.active       { border: 1px solid var(--themecolor); }
     #blog_setting_filter_sunset.active    { border: 1px solid #6e5a00; }
     #blog_setting_filter_darkness.active  { border: 1px solid #111; }
     #blog_setting_filter_grayscale.active { border: 1px solid #333; }
   这是一圈**硬边** 1px 描边，正是用户说的"框"。但直接删掉用户就分不清
   当前开着哪个滤镜了 —— 所以换成"**放大 + 柔光**"：柔光有衰减、不会被读成边。
   注意 `transform` 不能丢：`.blog-setting-filter-btn` 自带 `transition: all .3s`，
   放大动画会自然播放。 */
#blog_setting_filter_off.active,
#blog_setting_filter_sunset.active,
#blog_setting_filter_darkness.active,
#blog_setting_filter_grayscale.active {
    border: none !important;
    transform: scale(1.14);
    box-shadow: 0 0 10px 4px rgba(var(--themecolor-rgbstr), .55),
                0 6px 16px rgba(0, 0, 0, .28) !important;
}

/* 搜索框：胶囊式圆角（99px），比大圆角更适配窄高比，不显臃肿。
   同样降不透明度 + 加模糊，让它和卡片/悬浮按钮是同一套玻璃语言。
   ★ 第七轮：去掉 1px 描边，hover 反馈从 border-color 改成 background。 */
button#leftbar_search_container,
#leftbar_search_container {
    border-radius: var(--sg-r-pill) !important;
    background: rgba(255, 255, 255, .40) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(38, 71, 110, .12) !important;
    transition: background .25s ease, box-shadow .25s ease;
}
button#leftbar_search_container:hover {
    background: rgba(255, 255, 255, .62) !important;
    box-shadow: 0 8px 22px rgba(38, 71, 110, .18) !important;
}

/* === 2.8.3c 侧边栏搜索：点开后让按钮文案让位给输入框（第十一轮）===
   ★ 用户反馈：「搜索框点了文字不消失」。

   ★ 机制：Argon 把「🔍 搜索」和真正的 <input> 放在**同一个 <button>** 里
     （见主题 sidebar.php）：
         <button id="leftbar_search_container">
             <i class="fa fa-search"></i> 搜索
             <input id="leftbar_search_input" class="form-control …">
         </button>
     input 用 position:absolute 铺满整个按钮，平时 opacity:0（完全看不见）；
     点一下由 argontheme.js 给父级 .leftbar-search-button 加 .open →
     input 变 opacity:1、按钮高度 30px → 45px。
     **原设计是让 input 的实色背景把按钮文案整个盖住。**
     而我们在 2.8.3b 里把 input 换成了 10% 白的玻璃 →
     「🔍 搜索」从底下透出来，和占位符「搜索什么…」**并排显示**，
     用户看到的就是「点了以后文字没消失」。

   ★ 做法：点开后把按钮自身的文字与图标隐藏。
     这里用 font-size:0 而不是 color:transparent ——
     因为「搜索」是**裸文本节点**，没有标签可以选中它；
     font-size:0 能让文字和 <i> 图标一起彻底不占位。
     ★ 不会误伤输入框：Bootstrap 给 .form-control 显式设了 font-size:.875rem，
       它不继承父级，所以输入框里的字仍然正常。 */
.leftbar-search-button.open #leftbar_search_container {
    font-size: 0 !important;
}
/* 点开后占位符也一起退场（用户要的「点了文字就消失」）。
   只在**聚焦时**隐藏，失焦后自动恢复 —— 未聚焦时它仍然是那句提示。 */
#leftbar_search_input:focus::placeholder {
    color: transparent !important;
}
/* ★ 第七轮：输入框去框（评论表单的昵称/邮箱/验证码/内容框就是这里）。
   Argon 的 .form-control-alternative 自带外阴影，一并清掉 —— 否则去掉 border 后
   那圈阴影仍会被看成"框"。轮廓改由 2.8.6 的卡片/投影体系提供。 */
input.form-control,
textarea.form-control,
select.form-control {
    border-radius: var(--sg-r-md) !important;
    background: rgba(255, 255, 255, .46) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: none !important;
    box-shadow: none !important;
    transition: background .25s ease, box-shadow .25s ease;
}
/* 输入框改成半透明玻璃后，底下的照片会透上来，默认灰占位符对比度不够。
   显式指定占位符颜色，保证在照片背景上仍清晰可读。 */
input.form-control::placeholder,
textarea.form-control::placeholder {
    color: #6f8199 !important;
    opacity: 1;
}
/* 唯一保留的"框"：聚焦时的焦点环（无障碍必需，且只在聚焦瞬间出现）。
   没有 border 之后焦点反馈只能靠 box-shadow，所以这里把环加粗到 3px。 */
input.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
    background: rgba(255, 255, 255, .9) !important;
    box-shadow: 0 0 0 3px rgba(var(--themecolor-rgbstr), .38) !important;
}
html.darkmode button#leftbar_search_container,
html.darkmode input.form-control,
html.darkmode textarea.form-control,
html.darkmode select.form-control {
    background: rgba(255, 255, 255, .10) !important;
}
html.darkmode input.form-control:focus,
html.darkmode textarea.form-control:focus,
html.darkmode select.form-control:focus {
    background: rgba(255, 255, 255, .18) !important;
}
html.darkmode input.form-control::placeholder,
html.darkmode textarea.form-control::placeholder {
    color: #9aa6b6 !important;
}

/* 下拉菜单 / 卡片内小控件（无框，靠投影分层） */
.dropdown-menu {
    border-radius: var(--sg-r-md) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(38, 71, 110, .20) !important;
    overflow: hidden;
}
.dropdown-item:first-child { border-radius: var(--sg-r-md) var(--sg-r-md) 0 0; }
.dropdown-item:last-child  { border-radius: 0 0 var(--sg-r-md) var(--sg-r-md); }

/* 侧边栏菜单项：圆角 + 悬停底色 */
.leftbar-menu-item > a {
    border-radius: var(--sg-r-sm) !important;
    transition: background .2s ease, transform .2s ease !important;
}
.leftbar-menu-item > a:hover,
.leftbar-menu-item.current > a {
    background: rgba(var(--themecolor-rgbstr), .1) !important;
    transform: translateX(2px);
}

/* 侧边栏标签页导航 */
.leftbar-tab-item, .nav-tabs .nav-link {
    border-radius: var(--sg-r-sm) !important;
}
#leftbar_tab_overview, #leftbar_tab_tools {
    border-radius: 0 0 var(--sg-r-md) var(--sg-r-md);
}

/* 归档 / 分类时间线卡片 */
#post_content .argon-timeline-card,
.bg-gradient-secondary {
    border-radius: var(--sg-r-md) !important;
}

/* 分页 / 标签胶囊 */
.page-link, .post-meta-detail-tag, .tag, .badge {
    border-radius: var(--sg-r-pill) !important;
}

/* 头像：正圆 + 无描边。
   ⚠️ 第八轮修正：上一版这里写的是 `border-radius: 24%` + `2px solid 白描边`
      （注释还写着"圆角方形比正圆更现代"）—— 用户直接把这块指为「奇怪的框」。
      头像一旦带硬边、又不是正圆，读起来就是「App 图标 / 空框」，不是头像。
      Argon 本来给的就是 rounded-circle（50%），我们只需要清掉描边，
      体积感交给下面 2.2 节里那圈柔光投影（box-shadow）承担。 */
#leftbar_overview_author_image {
    border-radius: 50% !important;
    border: none !important;
}

/* 阅读进度条：胶囊端 */
#fabtn_reading_progress_bar,
#fabtn_reading_progress {
    border-radius: var(--sg-r-pill) !important;
}

/* === 2.8.6 卡片玻璃升级 ===
   不透明度一路降下来：.65 → .55 → **.45**，模糊 20 → 26 → **32px**。
   用户反馈"控件上没有虚化效果"，根因就是白色太厚把背后照片糊住了 ——
   虚化要看得见，前提是背景足够透。alpha 越低、模糊越大，玻璃感越强。
   同时**去掉原来那条 1px 白色描边**（用户明确说不要"大白边"），
   圆角改由 Argon 的 --card-radius 提供（已通过选项调到 20px）。 */
.card {
    background: rgba(255, 255, 255, .45) !important;
    backdrop-filter: saturate(180%) blur(32px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(32px) !important;
    border: none !important;
    box-shadow: 0 10px 34px rgba(38, 71, 110, .10), 0 2px 8px rgba(38, 71, 110, .05) !important;
}
html.darkmode .card {
    background: rgba(38, 43, 51, .48) !important;
    border: none !important;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .42) !important;
}
/* 页脚：保留主题色渐变 + 白字（Argon 原生观感），只加圆角与柔光，
   不改成白底 —— 否则白字会消失。 */
#footer {
    background: var(--themecolor-gradient) !important;
    color: #fff !important;
    border: none !important;
    /* 用 Argon 自己的 --card-radius（由 argon_card_radius 选项生成，现值 20px），
       让页脚与卡片用同一套圆角；原来写死 --sg-r-md(18px) 会与卡片差 2px，
       并排看会"不齐"。var() 带兜底值，万一 Argon 没定义也不会失效。 */
    border-radius: var(--card-radius, 20px) !important;
    box-shadow: 0 6px 24px rgba(38, 71, 110, .12) !important;
    opacity: .94;
}
/* 暗色下 --themecolor-gradient 会退化成灰阶，页脚变成"灰盒子"、丢掉品牌感。
   这里显式给一个深绿渐变，保证暗色也维持绿色识别度。 */
html.darkmode #footer {
    background: linear-gradient(150deg,
        #1c3529 0%,
        #234b39 55%,
        #2a6349 100%) !important;
    color: #d9f2e6 !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .34) !important;
    opacity: 1;
}
#footer, #footer a { color: #fff !important; }

/* 同一问题也出现在侧边栏顶部横幅（.leftbar-banner）与侧边栏公告（#leftbar_announcement）：
   两者都用 var(--themecolor-gradient)，暗色下会退化成 rgb(85,85,85) 的灰块。
   实测：light → linear-gradient(150deg, rgb(81,194,143), rgb(58,166,117)…)
         dark  → rgb(85,85,85)          ← 品牌绿彻底丢失
   统一补一个显式深绿渐变。 */
html.darkmode .leftbar-banner,
html.darkmode #leftbar_announcement {
    background: linear-gradient(150deg,
        #1c3529 0%,
        #234b39 55%,
        #2a6349 100%) !important;
}

/* === 2.8.7 性能退路：不支持 backdrop-filter 时用实色 === */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, #navbar, #footer, #fabtn_back_to_top {
        background: rgba(255, 255, 255, .96) !important;
    }
    html.darkmode .card, html.darkmode #navbar, html.darkmode #footer {
        background: rgba(48, 53, 62, .97) !important;
    }
}
/* 移动端减弱模糊半径，省 GPU（照片层不再额外模糊，可读性交给薄纱层）
   ⚠ 这里**绝不能**把 #navbar-main 写进 backdrop-filter 规则，原因有两条：
     ① 导航栏是 position:fixed 的矩形，backdrop-filter 只在该矩形内生效，
        下沿会出现「模糊区 vs 清晰区」的分界线 —— 但用户明确要的就是
        "整体虚化"，所以导航栏的模糊**必须**交给主题的 argon_toolbar_blur
        开关（见 1.2 节）统一控制，不能在这里单独插手。
     ② 本样式块（priority 99）在 2.8.4 所在块（priority 98）之后输出，
        而 #navbar-main 是 ID 选择器，特异度 (1,0,0) 高于
        html.sg-scrolled .navbar-main 的 (0,2,1)。一旦在这里写 !important，
        就会把 2.8.4 或主题写的 backdrop-filter 反向压掉。
        —— 这不是假设，是真实踩过的坑：移动端导航栏曾被这里的
           blur(10px) 反向压成"永远模糊"，导致需求反复修不掉。 */
@media (max-width: 767.98px) {
    .card {
        backdrop-filter: saturate(180%) blur(18px) !important;
        -webkit-backdrop-filter: saturate(180%) blur(18px) !important;
    }
}

/* ---------- 2.7 细节 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(127,127,127,.32); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(127,127,127,.5); }
::selection { background: rgba(var(--themecolor-rgbstr), .24); }
.navbar-brand { letter-spacing: .01em; }
.navbar-brand img { height: 32px; }
html { scroll-behavior: smooth; }

/* ---------- 2.8 移动端降级 ---------- */
/* 注意：这里**不要**再写 .card { backdrop-filter: none }。
   上面的「移动端减弱模糊半径」媒体查询已经用 !important 给 .card 加了
   blur(10px)，无 !important 的同名声明只会被压掉 —— 属于死代码，
   还会误导后来人以为"移动端卡片没有虚化"。 */
@media (max-width: 768px) {
    .banner-subtitle { font-size: .95rem; }
}

/* ---------- 2.9 无障碍：尊重减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
 * 3. 404 页（第十二轮）
 * ============================================================
 * 模板 404.php 已从「独立裸 HTML」改成标准结构
 * （get_header / get_sidebar / get_footer），所以导航栏、页脚、
 * 暗色模式、玻璃卡片这些**全都自动继承**，这里只补 404 自己的部分。
 * 用 body.error404 精准定位 —— WP 核心的 body_class() 会给 404 页加这个类。
 */

/* ---------- 3.1 隐藏 banner + 修正内容区偏移 ---------- */
/* 404 页顶着 71.8vh 的 banner，访客要滚一屏才看到「页面不存在」，
   而 banner 的内容（站名 + 每日一言）对迷路的访客没有帮助。
   导航栏是 sticky 的，隐藏 banner 不会让顶部失去导航。 */
body.error404 #banner {
    display: none !important;
}

/* ⚠️ 隐藏 banner 后**必须**同时修正 #content 的 margin-top，否则整块内容
   会被拉到视口上方。Argon 的原生规则是：

       #content { margin-top: -30vh; }              ← 默认（full banner 时用负边距
                                                      把内容拉上来与 banner 重叠）
       html.no-banner #content { margin-top: 85px; }
       html.banner-mini #content,
       html.is-home.banner-as-cover #content { margin-top: unset; }

   404 页的 html 类只有 banner-as-cover、**没有 is-home**（is-home 由 JS 只给首页加），
   三条规则一条都不匹配 → 保持 -30vh（本例 860px 视口下正好是 -258px），
   内容整体被推出视口上方。这里按 no-banner 的取值补回来。 */
body.error404 #content {
    margin-top: 85px !important;
}

/* ---------- 3.2 卡片内边距 ---------- */
body.error404 .sg-404-card .card-body {
    padding: 56px 40px 48px;
    text-align: center;
}

/* ---------- 3.3 「404」数字：主题色渐变文字 ---------- */
.sg-404-code {
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.02em;
    background: linear-gradient(135deg,
        rgba(var(--themecolor-rgbstr), .95),
        rgba(var(--themecolor-rgbstr), .42));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ---------- 3.4 标题与说明 ---------- */
.sg-404-title {
    margin: 18px 0 0;
    font-size: 1.5rem;
    font-weight: 600;
}
.sg-404-desc {
    margin: 12px auto 0;
    max-width: 30em;
    font-size: .95rem;
    line-height: 1.75;
    opacity: .68;
}

/* ---------- 3.5 按钮组 ---------- */
.sg-404-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
/* 主题给 .btn 自带 margin-bottom，横排时会顶开间距 */
.sg-404-actions .btn { margin: 0 !important; }

/* ---------- 3.6 站内搜索（复用第十一轮的玻璃输入组） ---------- */
.sg-404-search {
    margin: 34px auto 0;
    max-width: 380px;
}

/* ---------- 3.7 暗色模式下「链接型按钮」的文字色 ---------- */
/* ⚠️ 主题 style.css 有一条：
       html.darkmode a { color: var(--themecolor-light); }
   特异性 (0,1,2)，会**压过** `.btn-primary` 的 (0,1,0) ——
   于是暗色模式下凡是写成 <a class="btn btn-primary"> 的按钮，
   文字都会变成 --themecolor-light（本例 #51C28F 浅绿），
   配在绿色底上几乎读不出来（404 页的「返回上一页」正是如此）。
   这里按按钮语义把文字色补回来。
   ⚠️ 这是**全局**修复，不只作用于 404 页。 */
html.darkmode a.btn-primary,
html.darkmode a.btn-primary:hover,
html.darkmode a.btn-primary:focus {
    color: #fff !important;
}
html.darkmode a.btn-secondary,
html.darkmode a.btn-secondary:hover,
html.darkmode a.btn-secondary:focus {
    color: rgba(255, 255, 255, .92) !important;
}

/* ---------- 3.8 移动端 ---------- */
@media (max-width: 768px) {
    body.error404 .sg-404-card .card-body { padding: 40px 22px 34px; }
    .sg-404-code { font-size: 72px; }
    .sg-404-title { font-size: 1.25rem; }
    .sg-404-actions { flex-direction: column; }
    .sg-404-actions .btn { width: 100%; }
}

/* ============================================================
 * 4. 语义标题 <h1>（第十二轮·补）
 * ============================================================
 * 全站原本**没有任何 <h1>**：banner 标题是 <div>、文章标题是 <a>。
 * h1 是搜索引擎判断页面主题的主要依据，现在补上：
 *   · 非文章页 → banner 标题（站名）用 <h1>（header.php 里动态切换标签）
 *   · 文章 / 页面 → 正文标题包一层 <h1 class="sg-post-title-h1">
 * 下面两条规则负责抹平 <h1> 的**浏览器默认样式**，
 * 保证只加语义、视觉零变化。
 */

/* banner 标题：主题的 .banner-title 已有完整样式（font-size 1.8em、
   position:absolute + top:50% + translateY(-50%) 居中），
   但它**没有定义 margin 和 font-weight** —— 而 h1 默认带
   `margin: .67em 0` 和 `font-weight: bold`，不重置就会：
     · margin 破坏那套绝对定位居中
     · 标题变粗
   其余属性（font-size / position / transform…）由 .banner-title 的类选择器
   正常胜出，不需要管。 */
h1.banner-title {
    margin: 0;
    font-weight: inherit;
}

/* 正文标题外层：只承载语义，视觉全部交给内层 .post-title。
   内层是 26px 的**绝对单位**，所以这里改 font-size 不会影响它。

   ⚠️ margin 必须带 !important —— Argon 的 style.css 里有
        article h1, article h2, … { margin-top: 18px !important; margin-bottom: 15px; }
      这是给**正文里的** h1 留段前距的，但我们的包装层也在 article 里，
      于是凭空多出 18px（文章卡片高 247 → 265）。
      两边都带 !important 时比特异性：`article h1` (0,0,2) 输给
      `.sg-post-title-h1` (0,1,0)，所以这一条能赢。
      判别方法：别猜，让浏览器把命中该元素的规则列出来
      （遍历 document.styleSheets，见 SKILL.md）。 */
.sg-post-title-h1 {
    display: block;
    margin: 0 !important;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
}

/* 4.2 视觉隐藏（screen-reader only）（第十二轮·补 2 / 补 7）
   ------------------------------------------------------------
   用途：打字机模式下 banner 的 <h1> 初始内容是 &nbsp;，搜索引擎读不到站名。
   在 h1 里放一份「SEO 站名」的隐藏文本兜底。

   ⚠️ 补 7 起：打字那个 span **不再挂 aria-hidden**，h1 改用 aria-label
      承担朗读职责。原因见 header.php —— Bing 的 SEO 分析器会执行 JS 且
      只取可见文本，aria-hidden 的节点会被判成隐藏 → h1 判空。

   ⚠️ 必须用 clip/1px 这套标准写法，不能用 display:none 或 visibility:hidden ——
      那两种会被搜索引擎判定为「隐藏文本」而忽略，等于没写。
   ⚠️ 不能省 overflow:hidden —— 少了它 1px 的盒子会把文字溢出去显示出来。 */
.sg-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
 * 5. 导航栏 logo：Gemini 式四角星（第十二轮·补 3）
 * ============================================================
 * Argon 没有「站点 logo」选项，导航栏原本只有文字站名。
 * 星形是一段内联 SVG（见 header.php），这里只负责尺寸 / 对齐 / 光晕。
 *
 * ⚠️ 对齐用 vertical-align 而不是改父元素 display ——
 *    .navbar-title 是主题的类，动它的 display 可能连带影响
 *    导航栏整体布局（尤其移动端折叠态）。
 *    vertical-align 在 inline 父元素下生效；
 *    万一是 flex 父元素，它有固定 width/height + flex:0 0 auto，
 *    也不会被 align-items:stretch 拉变形 —— 两种父元素都安全。
 */
.sg-logo-star {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    margin-right: 8px;
    vertical-align: -4px;
    /* 光晕：让星在暗色导航栏上有"发光"感，和 Gemini 那朵的观感一致。
       ⚠️ 星是蓝色，光晕也必须显式用蓝色 —— 不能用 var(--themecolor-rgbstr)，
          那是主题绿，绿光晕罩在蓝星上会发脏。 */
    filter: drop-shadow(0 0 6px rgba(66, 133, 244, .6));
    transition: filter .25s ease, transform .25s ease;
}

.navbar-title:hover .sg-logo-star {
    filter: drop-shadow(0 0 11px rgba(66, 133, 244, .95));
    transform: scale(1.06);
}

/* 移动端导航栏变窄，星稍微收一点，别把站名挤掉 */
@media (max-width: 575.98px) {
    .sg-logo-star {
        width: 18px;
        height: 18px;
        margin-right: 6px;
        vertical-align: -3px;
    }
}

/* ============================================================
 * 6. 评论 IP 归属地徽章（第十二轮 · 补 6）
 * ============================================================
 *
 * 结构（由 functions.php 的 stargreen_comment_region_badge() 输出）：
 *     <div class="sg-comment-region"><i class="fa fa-map-marker"></i><span>广东 深圳</span></div>
 * 位置在 .comment-name 里、昵称之后，和主题自带的「博主」徽章同一行。
 *
 * 设计：跟站内其它标签一致 —— 不描边，靠极淡的主题色底 + 圆角做体积感。
 * 主题自带的 .badge-primary 是实色块，压在这里太重；这个胶囊「存在感刚好」。
 */
.sg-comment-region {
    display: inline-block;
    margin-left: 6px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: normal;
    line-height: 19px;
    white-space: nowrap;
    vertical-align: 1px;
    border-radius: 100px;
    color: rgba(var(--themecolor-rgbstr), .95);
    background: rgba(var(--themecolor-rgbstr), .12);
    transition: background .25s ease, color .25s ease;
}

.sg-comment-region > i {
    margin-right: 4px;
    font-size: 11px;
    opacity: .8;
}

.comment-item:hover .sg-comment-region {
    background: rgba(var(--themecolor-rgbstr), .2);
}

/* 暗色下淡底会被背景"吃掉"，抬一档透明度才看得出来 */
html.darkmode .sg-comment-region {
    color: var(--themecolor-light);
    background: rgba(var(--themecolor-rgbstr), .2);
}

html.darkmode .comment-item:hover .sg-comment-region {
    background: rgba(var(--themecolor-rgbstr), .32);
}

/* 小屏：昵称 + 博主徽章 + 归属地挤一行容易换行，收一点内边距 */
@media (max-width: 575.98px) {
    .sg-comment-region {
        margin-left: 4px;
        padding: 0 6px;
        font-size: 11px;
    }
}

/* ============================================================
 * 7. 页面特效（第十二轮 · 补 6）
 * ============================================================
 * 配套脚本：stargreen.js 第 4 节。
 *   7.1 卡片滚动入场   7.2 点击烟花（第十七轮）   7.3 背景飘落画布（星星 / 雪花）
 * 原则：宁淡勿浓 —— 特效是给阅读"垫底"的，不能抢正文的注意力。
 */

/* --- 7.1 卡片滚动入场 ---
   脚本只给"首屏之外"的卡片加 .sg-reveal（首屏内的直接给 .sg-revealed），
   所以不会出现一进页面内容闪一下的情况。 */
.sg-reveal {
    opacity: 0;
    transform: translateY(18px);
}

.sg-reveal.sg-revealed {
    opacity: 1;
    transform: none;
    transition: opacity .55s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}

/* --- 7.2 点击烟花（第十七轮：替换原来的「涟漪 + 小星」）---
   全屏 canvas，只在有粒子时才绘制（见 stargreen.js 4.2）。
   z-index 要压过导航栏（1030）和悬浮按钮，pointer-events:none 不拦任何点击。 */
.sg-fireworks {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    pointer-events: none;
}

/* --- 7.3 背景飘落画布 ---
   层级关系（关键）：
     body::before  照片壁纸      z-index:-2
     本画布        飘落粒子      z-index:-1
     body::after   柔化薄纱      z-index:-1（伪元素是 body 的最后一个子节点，树序在本画布之后）
     正文内容                    z-index:auto
   于是粒子"在照片之上、薄纱之下"—— 被薄纱压掉一点对比度，反而更含蓄。

   ⚠️ 必须写 -1。写 0 会盖住正文：z-index:0 属于"定位后代的 0 层"，
      绘制顺序在普通块级内容之上。 */
.sg-falling {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    display: block;
    pointer-events: none;
}

/* 系统开了「减少动态效果」就整块关掉（脚本那边也会提前 return，这里是双保险） */
@media (prefers-reduced-motion: reduce) {
    .sg-reveal { opacity: 1; transform: none; }
    .sg-fireworks { display: none; }
    .sg-falling { display: none; }
}

/* ============================================================
 * 8. 第十七轮：渐变风格 + 新功能样式
 * ============================================================
 * 用户要求：控件稍微优化、整体风格和动效做成「渐变」、参考 POETIZE 的气质
 * （不是照抄布局）。配套脚本：stargreen.js 第 5~13 节。
 *
 * 色板只有一条主渐变：品牌绿 → 青 → 站标蓝。
 *   绿是主题色（#3aa675），蓝是导航栏四角星的颜色（#4c8df6），
 *   两者之间用青色过渡 —— 整站从 logo 到页脚是同一条色带。
 * 暗色模式下同一条色带整体压暗，不换色相（避免上次那种「阴间」的墨绿）。
 *
 *   8.1  色板变量              8.2  Banner：标题流光 / 副标题玻璃框 / 信息胶囊
 *   8.3  （已删除：波浪）       8.4  导航栏菜单
 *   8.5  卡片 / 按钮 / 页脚 / 侧边栏横幅的渐变
 *   8.6  樱花层                8.7  悬浮按钮 / 进度条 / 滚动条
 *   8.8  首页公告栏            8.9  侧边栏倒计时
 *   8.10 AI 摘要               8.11 留言板（整页布局）
 *   8.12 随笔（朋友圈）         8.13 代码复制按钮
 *   8.14 看板娘                8.15 亮色模式 banner 纱层
 */

/* --- 8.1 色板 --- */
:root {
    --sg-c1: #3aa675;   /* 品牌绿 */
    --sg-c2: #34b3b0;   /* 青 */
    --sg-c3: #4c8df6;   /* 站标蓝 */
    --sg-grad: linear-gradient(120deg, var(--sg-c1) 0%, var(--sg-c2) 50%, var(--sg-c3) 100%);
    /* 「流动」用的长色带：首尾同色，background-position 循环移动时不会跳 */
    --sg-grad-flow: linear-gradient(120deg, #3aa675 0%, #34b3b0 25%, #4c8df6 50%, #34b3b0 75%, #3aa675 100%);
    --sg-grad-soft: linear-gradient(135deg, rgba(58, 166, 117, .14) 0%, rgba(52, 179, 176, .10) 50%, rgba(76, 141, 246, .14) 100%);
}
html.darkmode {
    --sg-grad-flow: linear-gradient(120deg, #1f5a43 0%, #1d5560 25%, #284c86 50%, #1d5560 75%, #1f5a43 100%);
    --sg-grad-soft: linear-gradient(135deg, rgba(58, 166, 117, .16) 0%, rgba(52, 179, 176, .10) 50%, rgba(76, 141, 246, .16) 100%);
}
@keyframes sg-flow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* --- 8.2 Banner ---
   ① 标题：白色字上扫过一道「薄荷 → 天蓝」的流光（每 7 秒一次）。
      打字机效果不受影响 —— 流光是背景，打字只改文字内容。
      ⚠️ 渐变文字 = 文字填充透明，原来的 text-shadow 会从透明字里透出来变成一团灰雾，
         所以这里改用 filter: drop-shadow（作用在最终绘制结果上，不会透）。 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #banner .banner-title .banner-title-inner {
        background: linear-gradient(110deg, #fff 0%, #fff 38%, #c6f6e0 46%, #bcd9ff 54%, #fff 62%, #fff 100%);
        background-size: 250% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
        filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .28));
        animation: sg-title-sheen 7s ease-in-out infinite;
    }
}
@keyframes sg-title-sheen {
    0%, 30% { background-position: 100% 0; }
    70%, 100% { background-position: 0% 0; }
}

/* ② 副标题：放进一个深色玻璃框里（POETIZE 首屏那块）。
   框画在 ::before 上 —— 副标题本身的 background 已经被「渐变文字」占用了（见 2.4 节）。
   框宽跟着文字走（width: fit-content），所以打字 / 回删时框会跟着伸缩。
   ::after 是主题的打字光标，不能占用。
   ⚠️ 坑：渐变文字其实是「副标题自己的 background，裁成文字形状」。
      如果副标题自己是层叠上下文，z-index:-1 的 ::before 会画在它自己的 background
      **之上** —— 也就是把文字盖住，实测文字被压暗了三成。
      所以这里必须把副标题身上所有「会建立层叠上下文」的属性都撤掉：
      z-index（2.1.1 节给的 2）、opacity（2.1.1 节的 .94）、filter（2.4 节的 drop-shadow）。
      撤掉后 ::before 归属到外层 .banner-title（它有 transform，自成层叠上下文），
      就会老老实实画在文字下面。opacity / filter 同时也是 backdrop-filter 的「背景根」，
      不撤的话框里的虚化也看不见。 */
#banner .banner-subtitle {
    position: relative;
    z-index: auto;
    opacity: 1;
    filter: none;
    width: fit-content;
    max-width: calc(100% - 48px);
    margin: 22px auto 0;
    padding: 0 4px;
    line-height: 1.7;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #banner .banner-subtitle {
        /* 放进深色框后，原来的薄荷绿渐变偏灰；提亮成「白 → 浅薄荷 → 浅天蓝」 */
        background: linear-gradient(94.75deg, #ffffff 0%, #dcfbea 50%, #d8e9ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}
#banner .banner-subtitle::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -18px;
    bottom: -8px;
    left: -18px;
    z-index: -1;
    border-radius: 14px;
    background: rgba(10, 22, 30, .34);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .16);
}

/* ③ 信息胶囊（日期 / 倒计时 / 去留言）：在标题块下方居中。
   标题块是主题用 absolute + top:50% 居中的，胶囊跟着同一个基准往下偏。 */
.sg-banner-chips {
    position: absolute;
    top: calc(50% + 78px);
    left: 0;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    animation: sg-fade-up .8s .4s both;
}
.sg-banner-chips[hidden] { display: none; }
.sg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #fff !important;
    border-radius: 99px;
    background: rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    text-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    transition: transform .25s ease, background .25s ease;
}
a.sg-chip:hover {
    transform: translateY(-2px);
    background: linear-gradient(120deg, rgba(58, 166, 117, .55), rgba(76, 141, 246, .55));
    text-decoration: none;
}
@keyframes sg-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ④ 下滑箭头：轻轻上下浮动，提示「下面还有内容」 */
.cover-scroll-down {
    z-index: 3;
    animation: sg-bob 2.2s ease-in-out infinite;
}
@keyframes sg-bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* --- 8.3 Banner 底部波浪：第十七轮 · 三 已删除 ---
   用户：「首页打开以后，下面的大黑边删掉，不要了」—— 就是这四层波浪：
   暗色模式下波浪填的是深色半透明，在首屏底部叠成一条宽黑带。
   header.php 里的 SVG 一并删除。只保留下面这条（与波浪无关，仍然需要）：
   #banner 自成层叠上下文，banner 里定位的元素（弹幕舞台等）不会漏到页面根层级。 */
#banner { z-index: 0; }

/* --- 8.4 导航栏菜单：悬停时文字下方长出一条渐变线 --- */
#navbar-main .navbar-nav .nav-link .nav-link-inner--text {
    background-image: var(--sg-grad);
    background-repeat: no-repeat;
    background-position: 50% 100%;
    background-size: 0% 2px;
    padding-bottom: 3px;
    transition: background-size .3s ease;
}
#navbar-main .navbar-nav .nav-link:hover .nav-link-inner--text {
    background-size: 100% 2px;
}

/* --- 8.5 卡片 / 按钮 / 页脚 / 侧边栏横幅 --- */
/* 文章卡片：悬停上浮 + 带一点主题色的投影 */
#main article.post-preview {
    transition: transform .35s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease !important;
}
#main article.post-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(52, 140, 160, .18), 0 4px 10px rgba(38, 71, 110, .08) !important;
}
html.darkmode #main article.post-preview:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(76, 141, 246, .10) !important;
}
/* 列表标题：悬停时变成渐变文字 */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #main article.post-preview .post-title:hover {
        background: var(--sg-grad);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* 主按钮：渐变底，悬停时色带流动 */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active {
    border: none !important;
    background: var(--sg-grad-flow) !important;
    background-size: 200% 100% !important;
    box-shadow: 0 6px 16px rgba(52, 150, 150, .26) !important;
}
.btn-primary:hover {
    animation: sg-flow 2.4s linear infinite;
}

/* 页脚 + 侧边栏顶部横幅 + 侧边栏公告：同一条缓慢流动的色带（20 秒一圈，几乎察觉不到在动）。
   暗色模式下 2.8.6 节写的是一块固定深绿，这里统一换成压暗的同一条色带。 */
#footer,
html.darkmode #footer,
.leftbar-banner,
html.darkmode .leftbar-banner,
#leftbar_announcement,
html.darkmode #leftbar_announcement {
    background: var(--sg-grad-flow) !important;
    background-size: 200% 100% !important;
    animation: sg-flow 20s linear infinite;
}

/* --- 8.6 樱花（第十七轮 · 三：换成网上流传最广的「图片花瓣」canvas 版）---
   脚本自己创建 <canvas id="canvas_sakura">，只写了 position:fixed + pointer-events:none。
   这里补层级：压在正文卡片之上（花瓣从文字前面飘过），低于导航栏（1030）/ 弹窗 / 悬浮按钮。 */
#canvas_sakura {
    z-index: 999;
    pointer-events: none;
}

/* --- 8.7 悬浮按钮 / 进度条 / 滚动条 --- */
/* 悬浮按钮：悬停时整块变成渐变底 + 白图标（原来只是白玻璃变得更白，几乎看不出反馈） */
#fabtn_back_to_top:hover,
#fabtn_go_to_comment:hover,
#fabtn_toggle_darkmode:hover,
#fabtn_toggle_sides:hover,
#fabtn_open_sidebar:hover,
#fabtn_toggle_blog_settings_popup:hover {
    background: var(--sg-grad) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(52, 150, 170, .34) !important;
}
#fabtn_toggle_blog_settings_popup:hover .fa-cog {
    transform: rotate(90deg);
}
.fabtn .fa {
    transition: transform .4s ease;
}
/* 阅读进度条 / 年度进度条 / 顶部加载条：统一走主渐变 */
#fabtn_reading_progress_bar,
.stargreen-yp-bar {
    background: var(--sg-grad) !important;
}
#nprogress .bar {
    height: 3px !important;
    background: linear-gradient(90deg, #3aa675, #34b3b0, #4c8df6, #ff8fab) !important;
    box-shadow: 0 0 10px rgba(76, 141, 246, .5);
}
#nprogress .peg {
    box-shadow: 0 0 10px #4c8df6, 0 0 5px #34b3b0 !important;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(58, 166, 117, .55), rgba(76, 141, 246, .55));
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(58, 166, 117, .85), rgba(76, 141, 246, .85));
}

/* --- 8.8 首页公告栏（参考 POETIZE 的「🔊 欢迎光临」）---
   多条公告叠在同一个位置，只有 .is-active 那条可见；切换时上一条往上淡出、下一条从下淡入。 */
.sg-notice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    margin-bottom: 25px;
}
.sg-notice-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 99px;
    color: #fff;
    background: var(--sg-grad);
    box-shadow: 0 4px 12px rgba(52, 150, 170, .3);
    animation: sg-pulse 2.4s ease-in-out infinite;
}
@keyframes sg-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
.sg-notice-track {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 24px;
    overflow: hidden;
}
.sg-notice-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity .5s ease, transform .5s ease;
}
.sg-notice-item.is-active {
    opacity: 1;
    transform: none;
}
/* 排在当前条后面的从下方进场；前面的（刚被切走的）往上退场 */
.sg-notice-item.is-active ~ .sg-notice-item { transform: translateY(100%); }

/* --- 8.9 侧边栏倒计时 --- */
.sg-cd {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    text-align: left;
    background: var(--sg-grad-soft);
}
.sg-cd-title {
    font-size: 13px;
    opacity: .85;
    margin-bottom: 6px;
}
.sg-cd-title .fa { opacity: .7; margin-right: 3px; }
.sg-cd-hero-name { font-size: 13px; opacity: .8; }
.sg-cd-hero-name b { color: var(--sg-c1); }
html.darkmode .sg-cd-hero-name b { color: #7fd8b0; }
.sg-cd-hero-num {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 2px 0 6px;
    font-variant-numeric: tabular-nums;
}
.sg-cd-d {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sg-cd-hero-num small { font-size: 13px; opacity: .75; }
.sg-cd-hms {
    margin-left: auto;
    font-size: 12px;
    opacity: .55;
}
.sg-cd-today { font-size: 26px; }
.sg-cd-list {
    list-style: none;
    margin: 0;
    padding: 6px 0 0;
    border-top: 1px dashed rgba(127, 127, 127, .25);
    font-size: 12.5px;
}
.sg-cd-list li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    opacity: .8;
}
.sg-cd-list em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    opacity: .8;
}

/* --- 8.10 AI 摘要 --- */
.sg-ai-summary {
    position: relative;
    margin: 0 0 1.6em;
    padding: 14px 18px 12px 22px;
    border-radius: 16px;
    background: var(--sg-grad-soft);
    overflow: hidden;
}
/* 左侧一条竖向渐变色带，代替边框（无框原则：不画描边） */
.sg-ai-summary::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--sg-grad);
}
.sg-ai-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}
.sg-ai-icon { font-size: 15px; }
.sg-ai-title {
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sg-ai-badge {
    margin-left: auto;
    padding: 0 9px;
    font-size: 11.5px;
    font-weight: normal;
    line-height: 20px;
    border-radius: 99px;
    color: #fff;
    background: var(--sg-grad);
}
.sg-ai-text {
    font-size: .95em;
    line-height: 1.85;
}
.sg-ai-text.is-typing::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -2px;
    background: var(--sg-c2);
    animation: sg-caret .8s steps(1) infinite;
}
@keyframes sg-caret { 50% { opacity: 0; } }
.sg-ai-foot, .sg-ai-tip {
    margin-top: 6px;
    font-size: 12px;
    opacity: .55;
}
.sg-ai-tip { opacity: .75; }

/* --- 8.11 留言板（第十七轮 · 二：整页重排）---
   用户指定的布局：
     上：弹幕在页面顶部 banner 区域满屏飘（舞台由 stargreen.js 第 10 节挂进 #banner）
     中：「留言板」卡片就是写留言的表单
     下：大家的留言
   主题输出顺序是「留言列表 → 表单 → 页脚」，这里用 flex 的 order 换成「表单 → 列表 → 页脚」。 */

/* ① 顶部弹幕：留言板页把 banner 标题 / 副标题 / 信息胶囊收起来，整块横幅让给弹幕 */
html.sg-on-guestbook #banner_container,
html.sg-on-guestbook .cover-scroll-down {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}
#banner_container { transition: opacity .4s ease; }
.sg-danmaku-stage {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
    animation: sg-fade-in .6s ease both;
}
@keyframes sg-fade-in { from { opacity: 0; } to { opacity: 1; } }
.sg-dm-item {
    position: absolute;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 70vw;
    padding: 4px 16px 4px 4px;
    white-space: nowrap;
    font-size: 14px;
    color: #fff;
    border-radius: 99px;
    background: rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    will-change: transform;
}
html.darkmode .sg-dm-item { background: rgba(255, 255, 255, .12); }
.sg-dm-item img {
    width: 30px;
    height: 30px;
    border-radius: 99px;
    object-fit: cover;
}
.sg-dm-item span { overflow: hidden; text-overflow: ellipsis; }

/* ② 中间：表单卡片 = 留言板本体。顺序：表单 → 留言列表 → 页脚 */
#main.sg-guestbook {
    display: flex;
    flex-direction: column;
}
#main.sg-guestbook > #post_comment { order: 1; }
#main.sg-guestbook > #comments     { order: 2; }
#main.sg-guestbook > #footer       { order: 3; }
#main.sg-guestbook > #post_comment > .card-body {
    display: flex;
    flex-direction: column;
    padding-top: 30px;
}
#main.sg-guestbook > #post_comment > .card-body > * { order: 2; }
#main.sg-guestbook > #post_comment .post-comment-title {
    order: 0;
    text-align: center;
    margin-bottom: 4px;
}
/* 标题文字来自 msgboard.php 内联样式的 ::after（「留言板」），这里把它做成大号渐变字 */
#main.sg-guestbook > #post_comment .post-comment-title i { display: none; }
#main.sg-guestbook > #post_comment .post-comment-title::after {
    font-size: 28px !important;
    font-weight: 700;
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* 副标题：挂在 card-body::before 上，用 order 排到标题下面 */
#main.sg-guestbook > #post_comment > .card-body::before {
    content: '想说的话、想问的问题、路过的脚印，都可以留在这里 ~';
    order: 1;
    display: block;
    margin-bottom: 22px;
    text-align: center;
    font-size: 14px;
    opacity: .65;
}
html.darkmode #main.sg-guestbook > #post_comment > .card-body::before { opacity: .75; }

/* --- 8.12 随笔（朋友圈式）---
   第十七轮 · 二：封面从「横跨两栏」挪进正文栏，昵称从「压在照片上 + 阴影」
   挪到照片下方，不再需要任何文字阴影。 */
.sg-moments-cover {
    overflow: hidden;
    padding: 0 !important;
    margin-bottom: 25px;
}
.sg-moments-cover-img {
    height: 190px;
    background: url('/wp-content/uploads/wallpaper/wallpaper-1280.webp') center 62% / cover no-repeat;
}
.sg-moments-info {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 24px 18px;
}
.sg-moments-avatar {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    margin-top: -34px;           /* 头像一半压在封面上 —— 朋友圈的标志性构图 */
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 18px rgba(38, 71, 110, .18);
}
.sg-moments-meta { flex: 1 1 auto; min-width: 0; padding-top: 12px; }
.sg-moments-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}
.sg-moments-desc { margin: 2px 0 0; font-size: 13.5px; opacity: .65; }
.sg-moments-count {
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 12.5px;
    line-height: 24px;
    border-radius: 99px;
    color: #fff;
    background: var(--sg-grad);
}
/* 每条随笔：隐藏主题原来的日期胶囊，换成「头像 + 昵称 + 时间」的头部 */
.shuoshuo-container .shuoshuo-meta { display: none; }
.shuoshuo-container .shuoshuo-main { border-top-left-radius: var(--card-radius, 20px) !important; }
.sg-moment-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.sg-moment-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 12px rgba(38, 71, 110, .16);
}
.sg-moment-who { display: flex; flex-direction: column; line-height: 1.35; }
.sg-moment-name { font-weight: 700; color: var(--sg-c1); }
html.darkmode .sg-moment-name { color: #7fd8b0; }
.sg-moment-time { font-size: 12.5px; opacity: .55; }
.sg-moment-pin {
    margin-left: auto;
    padding: 0 10px;
    font-size: 12px;
    line-height: 22px;
    border-radius: 99px;
    color: #fff;
    background: var(--sg-grad);
}
/* 正文与昵称左对齐（朋友圈的排版） */
.shuoshuo-container .shuoshuo-title,
.shuoshuo-container .shuoshuo-content,
.shuoshuo-container .shuoshuo-comments,
.shuoshuo-container .shuoshuo-operations {
    margin-left: 56px;
}
@media (max-width: 575.98px) {
    .sg-moments-cover-img { height: 140px; }
    .sg-moments-avatar { width: 60px; height: 60px; margin-top: -26px; }
    .sg-moments-info { padding: 0 16px 14px; gap: 12px; }
    .sg-moments-title { font-size: 19px; }
    .shuoshuo-container .shuoshuo-title,
    .shuoshuo-container .shuoshuo-content,
    .shuoshuo-container .shuoshuo-comments,
    .shuoshuo-container .shuoshuo-operations { margin-left: 0; }
}

/* --- 8.13 代码复制按钮 --- */
#post_content pre { position: relative; }
.sg-code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
    border: none;
    border-radius: 99px;
    background: rgba(255, 255, 255, .16);
    opacity: 0;
    cursor: pointer;
    transition: opacity .2s ease, background .2s ease;
}
#post_content pre:hover .sg-code-copy,
.sg-code-copy:focus { opacity: 1; }
.sg-code-copy:hover, .sg-code-copy.is-done { background: var(--sg-grad); }
/* 双保险：被 Argon 代码高亮接管的代码块（.hljs-codeblock，自带复制）不显示这个按钮 */
.hljs-codeblock .sg-code-copy { display: none; }

/* --- 8.14 看板娘 ---
   组件默认贴左下角。本站左下角没有别的固定元素，位置不动，
   只把对话气泡换成玻璃质感、工具图标悬停换主题色，融进站点风格。 */
#waifu {
    z-index: 998 !important;             /* 低于樱花层(999)，高于正文 */
    /* 默认 300px 宽，1440 屏上会盖住侧边栏下半截；缩到 0.8 倍，以左下角为原点缩放 */
    transform: scale(.8);
    transform-origin: left bottom;
}
#waifu-tips {
    border: none !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .78) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 26px rgba(38, 71, 110, .18) !important;
    color: #3a4a5c !important;
}
html.darkmode #waifu-tips { background: rgba(30, 34, 41, .82) !important; color: #e6ecf2 !important; }
#waifu-tool svg { fill: #6f8199 !important; transition: fill .2s ease; }
#waifu-tool span:hover svg { fill: var(--sg-c2) !important; }

/* --- 8.15 亮色模式的 banner 纱层 ---
   第十七轮起暗色模式改为「跟随系统」，亮色访客会看到亮色 banner。
   2.1.1 节原来那层顶部 .78 的深绿纱是按「始终暗色」调的，亮色下显得压抑。
   这里换成：顶部一层轻薄的深青（保证白字可读）+ 一层斜向的绿→蓝极淡色调。
   暗色模式保持 2.1.1 节的数值不变，只叠同一层斜向色调。 */
html:not(.darkmode) #banner {
    background:
        linear-gradient(120deg, rgba(58, 166, 117, .16) 0%, rgba(52, 179, 176, .06) 50%, rgba(76, 141, 246, .14) 100%),
        linear-gradient(180deg,
            rgba(16, 40, 52, .46) 0%,
            rgba(22, 60, 70, .30) 30%,
            rgba(30, 90, 90, .14) 62%,
            rgba(58, 166, 117, 0) 100%) !important;
}
html.darkmode #banner {
    background:
        linear-gradient(120deg, rgba(58, 166, 117, .10) 0%, rgba(52, 179, 176, .04) 50%, rgba(76, 141, 246, .10) 100%),
        linear-gradient(180deg,
            rgba(10, 26, 20, .62) 0%,
            rgba(14, 38, 28, .50) 24%,
            rgba(20, 60, 42, .34) 52%,
            rgba(26, 84, 60, .16) 78%,
            rgba(28, 92, 66, .05) 100%) !important;
}

@media (prefers-reduced-motion: reduce) {
    #banner .banner-title .banner-title-inner,
    .cover-scroll-down,
    .sg-notice-icon,
    #footer, .leftbar-banner, #leftbar_announcement { animation: none !important; }
    .sg-danmaku-stage { display: none; }
    #canvas_sakura { display: none; }
}

/* ============================================================
 * 9. 第十七轮 · 二：用户反馈修正 + 音乐
 * ============================================================
 *   9.1 归档时间线    9.2 表情面板向上弹    9.3 高考倒计时
 *   9.4 （已删除：音乐页）  9.5 迷你播放器（音乐的全部功能）+ 悬浮按钮里的「♪」
 *   9.6 友链页（第十七轮 · 三）   9.7 页脚萌备案号   9.8 评论点赞小爱心（第十七轮 · 九）
 *   9.9 Markdown 思维导图 [markmap]（第十七轮 · 十三）
 */

/* --- 9.1 归档时间线：节点和文字分开 ---
   用户：「归档的黑框和文字是要分开的」。
   根因：2.8.6 节给所有 .card 上了玻璃底（!important），而 Argon 的归档时间线
   每个节点（年份行、月份行、文章行）都是 .card —— 主题原本给它们写的是
   background: transparent（style.css .archive-timeline-title），被我们压掉了：
     · 年份 / 月份行变成了一个个**空白的框**（暗色下是黑框），文字却在框外左边
     · 文章行的框 padding 是 0，标题紧贴着框的左边缘
   处理：年份 / 月份行恢复透明；只有文章行保留玻璃框，并给足内边距，
   标题和框边、框和左侧圆点都拉开距离。 */
.archive-timeline .archive-timeline-title,
html.darkmode .archive-timeline .archive-timeline-title {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
.archive-timeline .archive-timeline-title:not(.archive-timeline-year + .archive-timeline-title):not(.archive-timeline-month + .archive-timeline-title) {
    height: auto;
    padding: 10px 18px !important;
    margin-left: 10px;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .42) !important;
    box-shadow: 0 4px 14px rgba(38, 71, 110, .08) !important;
    transition: transform .25s ease, box-shadow .25s ease;
}
html.darkmode .archive-timeline .archive-timeline-title:not(.archive-timeline-year + .archive-timeline-title):not(.archive-timeline-month + .archive-timeline-title) {
    background: rgba(255, 255, 255, .07) !important;
    box-shadow: none !important;
}
.archive-timeline .archive-timeline-title:not(.archive-timeline-year + .archive-timeline-title):not(.archive-timeline-month + .archive-timeline-title):hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(52, 140, 160, .16) !important;
}
/* 文章行的框往右挪了 10px，它左边的时间线圆点跟着补回去，保持对齐在竖线上
   （只动文章行；年份 / 月份行没挪，圆点也不动） */
.archive-timeline .archive-timeline-title:not(.archive-timeline-year + .archive-timeline-title):not(.archive-timeline-month + .archive-timeline-title)::before {
    left: -44px;
}

/* --- 9.2 表情面板：改成向上弹出 ---
   主题默认在表情按钮**下方**展开（transform: translateY(100%)），
   而表情按钮在表单最底部 —— 面板被下面的卡片 / 页脚挡住，下半截看不见。
   改成以按钮为底边向上展开；层级抬高，保证压在上方的输入框之上。 */
.emotion-keyboard {
    top: auto !important;
    bottom: calc(100% + 10px) !important;
    transform: translateY(8px) scale(.96) !important;
    transform-origin: bottom right !important;
    z-index: 20 !important;
}
#comment_emotion_btn.comment-emotion-keyboard-open + .emotion-keyboard {
    transform: none !important;
}
/* 向上弹出后会盖在输入框上，玻璃太透会和底下的文字叠在一起；这里加厚（覆盖 2.8.3 节的 .74） */
.emotion-keyboard { background: rgba(255, 255, 255, .94) !important; }
html.darkmode .emotion-keyboard { background: rgba(32, 36, 43, .96) !important; }

/* --- 9.3 高考倒计时（置顶在倒计时卡片最上面）--- */
.sg-cd-gk {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #fff;
    background: var(--sg-grad-flow);
    background-size: 200% 100%;
    animation: sg-flow 12s linear infinite;
    box-shadow: 0 6px 16px rgba(52, 150, 170, .25);
}
.sg-cd-gk-label { font-size: 13px; opacity: .92; }
.sg-cd-gk-num {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}
.sg-cd-gk-d { font-size: 28px; font-weight: 700; line-height: 1.25; }
.sg-cd-gk-num small { font-size: 13px; opacity: .9; }
.sg-cd-gk-hms { margin-left: auto; font-size: 12px; opacity: .85; }
.sg-cd-gk-on { font-size: 18px; font-weight: 700; padding: 4px 0; }

/* --- 9.4 音乐页：第十七轮 · 七 已删除 ---
   用户：「音乐别单独做一页了，功能简化整合进小控件里」。music.php 与它的样式一并删除，
   功能收进下面 9.5 节的迷你播放器。 */
@keyframes sg-spin { to { transform: rotate(360deg); } }

/* --- 9.5 迷你播放器 + 悬浮按钮里的「♪」 ---
   按钮由 stargreen.js 14.2 插进 #float_action_buttons，复用 2.8.3 节的悬浮按钮玻璃样式；
   播放中把音符换成旋转的封面小圆片。 */
#fabtn_music {
    border-radius: var(--sg-r-fab) !important;
    background: rgba(255, 255, 255, .32) !important;
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    backdrop-filter: saturate(180%) blur(24px) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(38, 71, 110, .20), 0 2px 6px rgba(38, 71, 110, .12) !important;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .25s ease, background .25s ease !important;
}
html.darkmode #fabtn_music {
    background: rgba(30, 34, 41, .40) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .46) !important;
}
#fabtn_music:hover {
    transform: translateY(-3px) scale(1.06);
    background: var(--sg-grad) !important;
    color: #fff !important;
}
.sg-fab-disc {
    display: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    animation: sg-spin 8s linear infinite;
}
#fabtn_music.is-playing .sg-fab-disc[src] { display: block; }
#fabtn_music.is-playing .btn-inner--icon > i { display: none; }
#fabtn_music.is-playing .btn-inner--icon { display: flex; align-items: center; justify-content: center; }

/* 卡片本体：上（封面 + 信息 + 进度）/ 中（控制）/ 下（可展开的播放列表） */
.sg-mini-player {
    position: fixed;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: 320px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(170%) blur(24px);
    backdrop-filter: saturate(170%) blur(24px);
    box-shadow: 0 16px 40px rgba(38, 71, 110, .22);
    opacity: 0;
    transform: translateX(10px) scale(.96);
    transform-origin: right bottom;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
html.darkmode .sg-mini-player { background: rgba(32, 36, 43, .9); color: #e6ecf2; }
.sg-mini-player.is-open { opacity: 1; transform: none; pointer-events: auto; }

.sg-mp-main { display: flex; align-items: center; gap: 12px; }
/* 封面做成小唱片：圆形 + 一圈深色边，播放时转 */
.sg-mp-disc {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, #2a2d33 0%, #111317 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    animation: sg-spin 12s linear infinite;
    animation-play-state: paused;
}
.sg-mini-player.is-playing .sg-mp-disc { animation-play-state: running; }
.sg-mp-cover {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sg-grad);
}
.sg-mp-body { flex: 1 1 auto; min-width: 0; }
.sg-mp-name, .sg-mp-lrc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-mp-name { font-size: 14px; font-weight: 600; }
.sg-mp-lrc {
    margin-top: 2px;
    font-size: 12.5px;
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sg-mp-bar {
    position: relative;
    height: 4px;
    margin: 9px 0 4px;
    border-radius: 99px;
    background: rgba(127, 127, 127, .2);
    cursor: pointer;
    touch-action: none;
}
/* 进度条的可点区域比看到的粗：上下各多 6px，手指好点 */
.sg-mp-bar::before { content: ''; position: absolute; top: -6px; bottom: -6px; left: 0; right: 0; }
.sg-mp-fill { width: 0; height: 100%; border-radius: 99px; background: var(--sg-grad); }
.sg-mp-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: .55;
    font-variant-numeric: tabular-nums;
}

.sg-mp-ctrl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 6px;
}
.sg-mp-ctrl button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    font-size: 13px;
    color: inherit;
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, color .2s ease;
}
.sg-mp-ctrl button:hover { background: rgba(127, 127, 127, .14); }
.sg-mp-ctrl button:focus { outline: none; }
.sg-mp-ctrl button:focus-visible { box-shadow: 0 0 0 3px rgba(var(--themecolor-rgbstr), .45); }
.sg-mp-ctrl .sg-mp-play {
    width: 44px;
    height: 44px;
    font-size: 16px;
    color: #fff;
    background: var(--sg-grad);
    box-shadow: 0 6px 16px rgba(52, 150, 170, .32);
}
.sg-mp-ctrl .sg-mp-play:hover { background: var(--sg-grad); transform: scale(1.06); }
.sg-mp-play .fa-play { margin-left: 2px; }    /* 播放三角形视觉居中 */
.sg-mini-player.is-list .sg-mp-listbtn { color: var(--sg-c2); background: rgba(127, 127, 127, .12); }

/* 播放列表：默认收起（高度 0），点「≡」在卡片里展开，卡片向上长 */
.sg-mp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow-y: auto;
    transition: max-height .3s ease, margin .3s ease;
}
.sg-mini-player.is-list .sg-mp-list {
    max-height: 240px;
    margin-top: 10px;
    border-top: 1px solid rgba(127, 127, 127, .16);
    padding-top: 6px;
}
.sg-mp-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    font-size: 13px;
    border-radius: 10px;
    cursor: pointer;
}
.sg-mp-list li:hover { background: rgba(127, 127, 127, .1); }
.sg-mi-no { width: 20px; font-size: 11px; opacity: .45; font-variant-numeric: tabular-nums; }
.sg-mi-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-mi-artist { flex: 0 1 40%; font-size: 12px; opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.sg-mp-list li.is-current { background: var(--sg-grad-soft); }
.sg-mp-list li.is-current .sg-mi-name { font-weight: 600; color: var(--sg-c1); }
html.darkmode .sg-mp-list li.is-current .sg-mi-name { color: #7fd8b0; }
.sg-mp-list li.is-current .sg-mi-no { opacity: 1; color: var(--sg-c2); }
.sg-mp-empty { justify-content: center; opacity: .6; cursor: default !important; }

/* 手机：底部弹层（stargreen.js 14.2 的 place() 在 ≤576px 时加 .is-sheet）。
   整宽贴底、盖住悬浮按钮组，从下往上滑出；按钮放大到手指好点的尺寸（≥40px）。
   点弹层外任意位置收起（脚本里已有）。 */
.sg-mini-player.is-sheet {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 1050;
    width: auto;
    padding: 16px;
    border-radius: 22px;
    transform: translateY(24px);
    transform-origin: center bottom;
    box-shadow: 0 -6px 30px rgba(38, 71, 110, .22);
}
.sg-mini-player.is-sheet.is-open { transform: none; }
.sg-mini-player.is-sheet .sg-mp-name { font-size: 15px; }
.sg-mini-player.is-sheet .sg-mp-ctrl { padding: 0 14px; }
.sg-mini-player.is-sheet .sg-mp-ctrl button { width: 40px; height: 40px; font-size: 15px; }
.sg-mini-player.is-sheet .sg-mp-ctrl .sg-mp-play { width: 50px; height: 50px; font-size: 18px; }
.sg-mini-player.is-sheet.is-list .sg-mp-list { max-height: 45vh; }
.sg-mini-player.is-sheet .sg-mp-list li { padding: 10px 8px; font-size: 14px; }

/* --- 9.6 友链页（第十七轮 · 三，模板 links.php）---
   参考 Butterfly / 安知鱼系博客的友链页：分组标题 + 卡片网格，
   卡片 = 圆角方形图标 + 站名 + 一行简介，悬停上浮、图标转一下、站名变渐变字。 */
.sg-links-hero {
    padding: 30px 28px 26px !important;
    margin-bottom: 25px;
    text-align: center;
    background-image: var(--sg-grad-soft) !important;
}
.sg-links-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sg-links-sub { margin: 0; font-size: 14px; opacity: .7; }

.sg-links-group,
.sg-links-apply {
    padding: 22px 24px 24px !important;
    margin-bottom: 25px;
}
.sg-links-group-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
}
.sg-links-group-title::before {
    content: '';
    align-self: center;
    width: 4px;
    height: 18px;
    border-radius: 99px;
    background: var(--sg-grad);
}
.sg-links-group-title small { font-size: 13px; font-weight: normal; opacity: .6; }

.sg-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.sg-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 16px;
    color: inherit !important;
    background: rgba(255, 255, 255, .42);
    box-shadow: 0 4px 14px rgba(38, 71, 110, .07);
    transition: transform .3s cubic-bezier(.22, .61, .36, 1), box-shadow .3s ease, background .3s ease;
}
html.darkmode .sg-link-card { background: rgba(255, 255, 255, .06); box-shadow: none; }
.sg-link-card:hover {
    text-decoration: none;
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 12px 26px rgba(52, 140, 160, .18);
}
html.darkmode .sg-link-card:hover { background: rgba(255, 255, 255, .11); box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
/* 图标：统一放进 52px 的圆角方块里，原图 16~128px 不等，内边距让小图标别被硬放大 */
.sg-link-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(38, 71, 110, .10);
    overflow: hidden;
    transition: transform .5s ease;
}
.sg-link-avatar img { width: 34px; height: 34px; object-fit: contain; }
.sg-link-card:hover .sg-link-avatar { transform: rotate(-8deg) scale(1.06); }
.sg-link-letter {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background: var(--sg-grad);
}
.sg-link-text { display: flex; flex-direction: column; min-width: 0; }
.sg-link-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sg-link-card:hover .sg-link-name {
    background: var(--sg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sg-link-desc {
    margin-top: 2px;
    font-size: 12.5px;
    opacity: .6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sg-link-empty { background: transparent !important; box-shadow: inset 0 0 0 1.5px rgba(127, 127, 127, .22) !important; }

/* 申请友链：左边本站信息（可一键复制），右边要求 */
.sg-links-apply-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.sg-links-mine {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--sg-grad-soft);
}
.sg-links-mine-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}
.sg-links-copy {
    padding: 2px 12px;
    font-size: 12.5px;
    line-height: 22px;
    border: none;
    border-radius: 99px;
    color: #fff;
    background: var(--sg-grad);
    cursor: pointer;
}
.sg-links-mine dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
}
.sg-links-mine dt { font-weight: normal; opacity: .6; }
.sg-links-mine dd { margin: 0; word-break: break-all; }
.sg-links-rules { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; opacity: .85; }
@media (max-width: 767.98px) {
    .sg-links-apply-body { grid-template-columns: 1fr; }
    .sg-links-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .sg-link-card { padding: 10px; gap: 10px; }
    .sg-link-avatar { width: 42px; height: 42px; border-radius: 12px; }
    .sg-link-avatar img { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-mp-disc, .sg-fab-disc, .sg-cd-gk { animation: none !important; }
}

/* --- 9.7 页脚萌备案号（第十七轮 · 六）--- */
.sg-footer-icp {
    margin-top: 10px;
    font-size: 12.5px;
    opacity: .85;
}
.sg-footer-icp a { color: #fff !important; }
.sg-footer-icp a:hover { opacity: 1; text-decoration: underline; }

/* --- 9.8 评论点赞：小爱心（第十七轮 · 九 / 十）---
   用户：「明确改成小爱心那种，向上这个关掉，爱心得有动画」「赞一次不赞一次你得有反应，再点就是取消」。
   结构（functions.php argon_comment_format）：button.sg-like > .sg-like-heart > svg + .sg-like-num
   · 没赞过：灰色描边空心爱心；悬停变粉、微微放大
   · 点赞：爱心填满粉色并「弹」一下（放大 → 回弹），一圈粉色光环扩散 + 六颗彩色小点四散
   · 再点 = 取消：爱心缩一下变回空心
   · 赞过（.upvoted，服务端按 IP 判断后输出）：实心粉爱心，可以再点取消
   按钮不再带 Argon 的 .comment-upvote 类，所以主题那套胶囊底色 / pointer-events:none 都不再生效。
   点击与请求由 stargreen.js 第 16 节处理。 */
.sg-like {
    /* ★ 第十七轮 · 十一：用户反馈「字再清晰点、位置有点偏」。
       位置：原来是 inline-flex 靠左，在头像下 40px 宽的栏里整体偏左 8px（实测爱心中心 461 vs 头像中心 469）
             → 改成占满整栏宽度、内容居中，爱心正对头像中线
       字：原来 12px 常规字重、用的是正文那套圆体，数字笔画细、发虚
             → 13px 半粗 + 系统 UI 字体（数字更利落），未赞时的灰色也调深一档提高对比度 */
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 8px 0 0;
    padding: 3px 0;
    border: none;
    border-radius: 99px;
    background: transparent;
    color: #7b8797;
    font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.sg-like:focus { outline: none; }
.sg-like:focus-visible { box-shadow: 0 0 0 2px rgba(255, 90, 121, .45); }
.sg-like-heart {
    position: relative;
    display: inline-flex;
    width: 17px;
    height: 17px;
}
html.darkmode .sg-like { color: #aab4c2; }
.sg-like-heart svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    overflow: visible;
    transition: fill .2s ease, stroke .2s ease, transform .2s ease;
}
.sg-like:hover { color: #ff5a79; }
.sg-like:hover .sg-like-heart svg { transform: scale(1.12); }
.sg-like:active .sg-like-heart svg { transform: scale(.85); }
.sg-like.upvoted { color: #ff5a79; }
.sg-like.upvoted .sg-like-heart svg {
    fill: #ff5a79;
    stroke: #ff5a79;
}
.sg-like-num { min-width: 1ch; font-variant-numeric: tabular-nums; }

/* 点赞：弹一下 */
.sg-like-pop .sg-like-heart svg { animation: sg-like-beat .6s cubic-bezier(.17, .89, .32, 1.49); }
@keyframes sg-like-beat {
    0%   { transform: scale(.2); }
    45%  { transform: scale(1.35); }
    70%  { transform: scale(.92); }
    100% { transform: scale(1); }
}
/* 取消：缩一下再回来（空心） */
.sg-like-unpop .sg-like-heart svg { animation: sg-like-shrink .35s ease; }
@keyframes sg-like-shrink {
    0%   { transform: scale(1); }
    40%  { transform: scale(.6); }
    100% { transform: scale(1); }
}
/* 数字换值时轻轻往上滑一下 */
.sg-like-pop .sg-like-num,
.sg-like-unpop .sg-like-num { animation: sg-like-num .3s ease; }
@keyframes sg-like-num {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}
/* 光环：粉色描边圆，从爱心中心扩散后消失 */
.sg-like-heart::before,
.sg-like-heart::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.sg-like-heart::before {
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid #ff8fab;
}
.sg-like-pop .sg-like-heart::before { animation: sg-like-ring .5s ease-out; }
@keyframes sg-like-ring {
    0%   { opacity: .9; transform: scale(.1); border-width: 8px; }
    100% { opacity: 0;  transform: scale(1);  border-width: 0; }
}
/* 小点：一个 3px 的点 + 5 个 box-shadow 副本，围成一圈从半径 5px 飞到 16px */
.sg-like-heart::after {
    width: 3px;
    height: 3px;
    margin: -1.5px 0 0 -1.5px;
    background: transparent;
}
.sg-like-pop .sg-like-heart::after { animation: sg-like-dots .6s ease-out; }
@keyframes sg-like-dots {
    0% {
        opacity: 1;
        box-shadow:
            5px 0 0 #ff5a79,   2.5px 4.3px 0 #34b3b0,  -2.5px 4.3px 0 #ffc35c,
            -5px 0 0 #4c8df6, -2.5px -4.3px 0 #ff8fab,  2.5px -4.3px 0 #3aa675;
    }
    100% {
        opacity: 0;
        box-shadow:
            16px 0 0 #ff5a79,  8px 13.9px 0 #34b3b0,   -8px 13.9px 0 #ffc35c,
            -16px 0 0 #4c8df6, -8px -13.9px 0 #ff8fab,  8px -13.9px 0 #3aa675;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sg-like-pop .sg-like-heart svg, .sg-like-unpop .sg-like-heart svg,
    .sg-like-pop .sg-like-num, .sg-like-unpop .sg-like-num,
    .sg-like-pop .sg-like-heart::before,
    .sg-like-pop .sg-like-heart::after { animation: none !important; }
}

/* --- 9.9 Markdown 思维导图 [markmap]（第十七轮 · 十三）---
   短代码见 stargreen-features.php 第 9 节，脚本见 stargreen.js 第 17 节。
   外框是一块浅色玻璃底，导图铺满；右下角是 markmap 自带工具栏，左下角一行操作提示。 */
.sg-markmap {
    position: relative;
    margin: 1.4em 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--sg-grad-soft);
    box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .10);
}
.sg-markmap .markmap { width: 100%; height: 100%; }
.sg-markmap .markmap > svg { display: block; width: 100%; height: 100%; }
/* 脚本还没加载完时，模板里的 Markdown 原文不要露出来 */
.sg-markmap .markmap > script { display: none; }
.sg-markmap-tip {
    position: absolute;
    left: 14px;
    bottom: 10px;
    font-size: 12px;
    opacity: .5;
    pointer-events: none;
}
.sg-markmap-failed::after {
    content: '思维导图加载失败，刷新试试 ~';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    opacity: .6;
}
/* 节点文字：跟正文同色；==高亮== 用主题的粉色，不用 markmap 默认的黄底 */
.sg-markmap .markmap {
    --markmap-text-color: #3a4a5c;
    --markmap-highlight-bg: rgba(255, 143, 171, .35);
    --markmap-code-bg: rgba(127, 127, 127, .14);
    --markmap-font: 500 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html.darkmode .sg-markmap .markmap {
    --markmap-text-color: #e3e9f0;
    --markmap-highlight-bg: rgba(255, 90, 121, .35);
    --markmap-circle-open-bg: #2a2f37;
}
.sg-markmap .mm-toolbar {
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(38, 71, 110, .12);
}
html.darkmode .sg-markmap .mm-toolbar { background: rgba(40, 46, 56, .8); color: #e3e9f0; }
@media (max-width: 575.98px) {
    .sg-markmap-tip { display: none; }
}
