/* =========================================================
   end9.0：古腾堡「文本 / 版式类」区块专属样式
   ---------------------------------------------------------
   背景：主题原先只给「标签级」元素（p / table / code / pre / img）写过样式，
   没有针对区块（.wp-block-*）做任何区分，于是在后台看起来是不同的区块，
   前台却长得一模一样：

     · 引用 / 引文  → HTML 都是 <blockquote>   → 完全一样
     · 代码 / 预格式化 / 诗句 → HTML 都是 <pre> → 完全一样
     · H1–H6 / 列表 / 分隔符 → 主题零样式       → 浏览器默认观感

   本文件的目标：让这些区块在「日记本」里各自有辨识度。
   ⚠️ GA1.0 起本文件还额外承担「正文基准排版」（见下方第 0 节）——
   原先注释里写的"不碰主题已有的标签级规则（book-skin.css 的 .post-content 段）"
   已不再成立：方案 A 需要在受控范围内覆盖 .post-content / .post-content p
   的字号与行高。覆盖是【加规则】而非改 book-skin.css 本体，可随时整段回退。

   ── 生效范围 ──────────────────────────────────────────
   仅 #post_box 内的 .post-content / .entry-content（文章页 / 页面页）。
   首页摘要、归档、搜索、小工具区完全不受影响。

   ── 为什么又是一个新文件（不合并进 blocks.css） ────────
   blocks.css 是 end9.0 上一轮已经交付并可能被 CDN 缓存过的路径；
   本文件是全新路径，CDN 必定回源拉取，避免"改了前台不生效"。
   分工：blocks.css 管「交互组件（按钮）」，blocktypo.css 管「文本版式」。

   ── 与 main.css / post.css 的关系 ─────────────────────
   这两个文件是「普通文件名 + ?ver=」，阿里云 ESA CDN 忽略 ?ver=，
   改它们最长 30 天不生效（主题注已记录该坑），所以一律不改。

   ── 选择器写法说明 ────────────────────────────────────
   `#post_box :is(.post-content, .entry-content)` 是
   `#post_box .post-content, #post_box .entry-content` 的简写，
   特异性完全相同（:is() 取其参数中的最高值），不会额外提升优先级。
   ========================================================= */

/* =========================================================
   0. 正文基准排版（GA1.0「方案 A」· 阅读舒适度）
   ---------------------------------------------------------
   目的：长文阅读不累。仅在 #post_box 内生效 ——
   首页摘要 / 归档 / 搜索 / 小工具区【不受影响】
   （post-excerpt-body 只在 index.php，不在 #post_box 内）。

   改动对照（原值 → 新值）：
     正文基准字号   16px                  → 17px
     段落行高       2em（=32px @16px）      → 1.8824（=32px @17px）
     段间距         padding 1em（16px）     → 12px
     字距           normal                → 0.012em
     首行缩进       2em                   → 2em（不动）
     标题阶梯       1.6/1.35/1.18/1.06/1em/0.95em
                    → 1.8/1.45/1.25/1.12/1em/1em
                    （★ 顺带修掉原 h6=0.95em 比正文还小的「阶梯倒挂」）

   为什么行高写 1.8824 而不是 1.85：
     17 × 1.8824 ≈ 32px —— 与改前【绝对行距完全一致】（观感松紧不变），
     字变大了 ⇒ 相对更密实、更好读；同时落在 8px 基线上，
     标题的 px 间距才能对齐成节奏。
     用不带单位的倍数 ⇒ 字号变化时按比例自动跟随，不会与「大字号」撞车。

   ⚠️ 与「大字号」功能的耦合（必须同步，见 post.css 末尾）：
     post.css 的 body.font-large 必须仍【明显大于】17px，
     否则「A+放大」会因差值过小而视觉失效。
   ⚠️ 本节是对 book-skin.css 里 .post-content / .post-content p 的
     受控覆盖（`:is()` 只取参数中最高特异性，故
      `#post_box :is(.post-content,.entry-content) p` = 1,1,1，
      高于 `.post-content p` = 0,1,1），不改 book-skin.css 本体。
   ========================================================= */
#post_box :is(.post-content, .entry-content) {
    font-size: 17px;
    letter-spacing: 0.012em;
}

/* 段落：行高 / 段间距 / 首行缩进 */
#post_box :is(.post-content, .entry-content) p {
    line-height: 1.8824;   /* = 32px @17px */
    padding: 12px 0;
    text-indent: 2em;
}

/* =========================================================
   1. 标题 H1–H6
   主题此前一行都没写，现在是浏览器默认字号字重。
   统一：不首行缩进、标题字体、按层级递减字号 + 各自的装饰。
   GA1.0：字号阶梯改为等比；行高 1.5→1.4；上下间距改用 px 落在 4px 网格上。
   ========================================================= */
#post_box :is(.post-content, .entry-content) :is(h1, h2, h3, h4, h5, h6) {
    text-indent: 0;
    font-family: "微软雅黑", Helvetica, Arial, sans-serif;
    font-weight: 600;
    line-height: 1.4;          /* GA1.0：1.5 → 1.4，标题更紧凑 */
    color: var(--text-primary);
    /* 段落是 padding 无 margin，标题用 margin 拉开层次。
       GA1.0：由 em 改为 px，落在 4px 网格上，全书垂直节奏统一。 */
    margin: 32px 0 12px;
}

#post_box :is(.post-content, .entry-content) h1 {
    font-size: 1.8em;          /* GA1.0：1.6em → 1.8em ⇒ 30.6px @17px */
    text-align: center;
    letter-spacing: 0.02em;
    margin: 40px 0 16px;       /* GA1.0：em → px 网格 */
    padding-bottom: 0.45em;
    border-bottom: 1px dashed var(--line-primary);
}

#post_box :is(.post-content, .entry-content) h2 {
    font-size: 1.45em;         /* GA1.0：1.35em → 1.45em ⇒ 24.65px @17px */
    color: var(--accent-brown);
    padding-left: 0.62em;
    border-left: 4px solid var(--accent-gold);
}

#post_box :is(.post-content, .entry-content) h3 {
    font-size: 1.25em;         /* GA1.0：1.18em → 1.25em ⇒ 21.25px @17px */
    color: var(--accent-brown);
}

#post_box :is(.post-content, .entry-content) h4 {
    font-size: 1.12em;         /* GA1.0：1.06em → 1.12em ⇒ 19.04px @17px */
    color: var(--text-body);
    margin: 24px 0 8px;        /* 四级起收紧一档，与 h1/h2/h3 拉开层次 */
}

#post_box :is(.post-content, .entry-content) h5 {
    font-size: 1em;            /* 与正文同大，靠字重/颜色区分 */
    color: var(--text-secondary);
    margin: 24px 0 8px;
}

#post_box :is(.post-content, .entry-content) h6 {
    font-size: 1em;            /* ★ GA1.0：0.95em → 1em
                                  修掉「h6 比正文还小」的阶梯倒挂 */
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin: 24px 0 8px;
}

/* =========================================================
   2. 列表 ul / ol
   主题此前零样式，项目符号用浏览器默认。
   改为：金色圆点 / 金色序号，行高与正文节奏对齐。
   ========================================================= */
#post_box :is(.post-content, .entry-content) :is(ul, ol) {
    margin: 0.7em 0;
    padding-left: 2em;
    text-indent: 0;
    list-style: none;
}

#post_box :is(.post-content, .entry-content) li {
    text-indent: 0;
    line-height: 1.8824;       /* GA1.0：1.95 → 1.8824，与段落同节奏（均为 32px @17px） */
    margin: 8px 0;             /* GA1.0：0.28em（≈4.8px）→ 8px，落 4px 网格 */
}

#post_box :is(.post-content, .entry-content) ul > li {
    position: relative;
}

#post_box :is(.post-content, .entry-content) ul > li::before {
    content: "";
    position: absolute;
    left: -1.05em;
    top: 0.82em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-gold);
}

#post_box :is(.post-content, .entry-content) ol {
    counter-reset: diary-ol;
}

#post_box :is(.post-content, .entry-content) ol > li {
    position: relative;
    counter-increment: diary-ol;
}

#post_box :is(.post-content, .entry-content) ol > li::before {
    content: counter(diary-ol) ".";
    position: absolute;
    left: -1.7em;
    top: 0;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.95em;
}

/* =========================================================
   3. 引用 / 引文 / 诗句 —— 三者必须一眼分得清
   ---------------------------------------------------------
   引用 Quote      → <blockquote>           保留主题既有竖线卡片
   引文 Pullquote  → <figure><blockquote>   改为居中 + 上下金线 + 引号
   诗句 Verse      → <pre class="wp-block-verse">   去掉代码块的深色底
   ========================================================= */

/* 3.1 引用（Quote）：沿用 book-skin 的绿色竖线卡片，只修掉内部段落的
       首行缩进与 1em 上下内边距（否则引用里的每段都被强行缩进两格） */
#post_box :is(.post-content, .entry-content) blockquote {
    text-indent: 0;
}

#post_box :is(.post-content, .entry-content) blockquote p {
    text-indent: 0;
    padding: 0.25em 0;
}

#post_box :is(.post-content, .entry-content) blockquote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.85em;
    font-style: normal;
    color: var(--text-secondary);
}

#post_box :is(.post-content, .entry-content) blockquote cite::before {
    content: "— ";
}

#post_box :is(.post-content, .entry-content) .wp-block-quote.is-style-large {
    font-size: 1.08em;
    border-left-width: 5px;
}

/* 3.2 引文（Pullquote）：与引用彻底区分 —— 居中、上下金线、大引号 */
#post_box :is(.post-content, .entry-content) .wp-block-pullquote {
    margin: 1.7em 0;
    padding: 1.2em 1.4em;
    background: transparent;
    border-top: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    color: var(--accent-brown);
    text-align: center;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote {
    margin: 0;
    padding: 0;
    border-left: 0;
    background: transparent;
    color: var(--accent-brown);
    font-size: 1.15em;
    line-height: 1.95;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote::before {
    content: "\201C";
    display: block;
    margin-bottom: 0.15em;
    font-size: 2em;
    line-height: 1;
    color: var(--accent-gold);
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote p {
    text-indent: 0;
    padding: 0.2em 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote cite {
    display: block;
    margin-top: 0.6em;
    font-size: 0.85em;
    font-style: normal;
    color: var(--text-secondary);
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote cite::before {
    content: "";
}

/* 编辑器的「实心底色」变体：给个米色底，避免露出 WP 默认黑底 */
#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color {
    background: var(--bg-soft);
    border-top-color: var(--accent-brown);
    border-bottom-color: var(--accent-brown);
    border-radius: 10px;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color blockquote {
    color: var(--accent-brown);
}

/* 3.3 诗句（Verse）：<pre> 但绝不是代码 —— 去掉深色底、等宽字体，
       换成正文字体 + 左侧虚线，保留原本的换行与空格 */
#post_box :is(.post-content, .entry-content) .wp-block-verse {
    margin: 1.3em 0;
    padding: 0.5em 0 0.5em 1.2em;
    background: transparent;
    border: 0;
    border-left: 2px dashed var(--line-primary);
    border-radius: 0;
    box-shadow: none;
    color: var(--text-body);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 2.1;
    letter-spacing: 0.02em;
    white-space: pre-wrap;
    overflow: visible;
}

/* =========================================================
   4. 代码 / 预格式化 —— 同样是 <pre>，也要分开
   代码（Code）      → 保留深色代码块（book-skin 既有观感）
   预格式化（Preformatted）→ 米色纸感，表示"纯文本"而非"程序"
   ========================================================= */

/* 4.1 代码：修掉「<pre><code> 被当成行内代码」的既有观感问题
   —— book-skin 的 .post-content code:not([class]) 会给无 class 的 <code>
      套上浅色底 + 边框，在深色代码块里就是一块突兀的浅色方块。 */
#post_box :is(.post-content, .entry-content) .wp-block-code code,
#post_box :is(.post-content, .entry-content) pre > code {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* 4.2 预格式化：米色纸感，与深色代码块区分 */
#post_box :is(.post-content, .entry-content) .wp-block-preformatted {
    background: var(--bg-soft);
    border: 1px dashed var(--line-primary);
    box-shadow: none;
    color: var(--text-body);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13.5px;
}

/* =========================================================
   5. 分隔符（Separator / hr）
   主题没写过 hr，现在是浏览器默认的一条 1px 灰线。
   改成虚线，宽度贴齐书页；点线变体保留 WordPress 核心的三点效果。
   ========================================================= */
#post_box :is(.post-content, .entry-content) hr,
#post_box :is(.post-content, .entry-content) .wp-block-separator:not(.is-style-dots) {
    height: 0;
    margin: 1.8em auto;
    border: 0;
    border-top: 1px dashed var(--line-primary);
    background: transparent;
}

#post_box :is(.post-content, .entry-content) .wp-block-separator.is-style-dots {
    border-top: 0;
}

/* =========================================================
   6. 分组（Group）
   此前完全没有样式。给一层极淡的卡片，让它有"被框起来"的语义。
   后台若单独设了背景色，内联样式优先级更高，不会被这里盖掉。
   ========================================================= */
#post_box :is(.post-content, .entry-content) .wp-block-group {
    margin: 1.2em 0;
    padding: 1em 1.2em;
    border: 1px dashed var(--line-secondary);
    border-radius: 10px;
    background: rgba(251, 250, 247, 0.55);
}

/* =========================================================
   7. 分栏（Columns）
   ---------------------------------------------------------
   刻意「只补外边距 + 收一收间距」，不碰 flex 布局本身。
   原因：WordPress 核心对分栏有一套带 !important 的换行规则 ——
     · 默认  flex-wrap: wrap   !important
     · ≥782px flex-wrap: nowrap !important
     · <782px  .wp-block-column { flex-basis: 100% !important }  ← 核心自己就会堆叠
   所以「手机端上下堆叠」核心已经做好了，主题不需要（也不应该）再写
   媒体查询去改 flex-direction —— 写了只会和核心的 !important 打架。
   这里只调整列间距，换行行为完全交回核心。
   ========================================================= */
#post_box :is(.post-content, .entry-content) .wp-block-columns {
    margin: 1.1em 0;
    gap: 20px;
}

#post_box :is(.post-content, .entry-content) .wp-block-column > *:first-child {
    margin-top: 0;
}

/* =========================================================
   8. 嵌入（Embed）—— 视频 / 外站卡片
   ========================================================= */
#post_box :is(.post-content, .entry-content) .wp-block-embed {
    margin: 1.4em 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-embed__wrapper {
    border: 1px solid var(--line-secondary);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
}

/* =========================================================
   9. 媒体和文本（Media & Text）
   ========================================================= */
#post_box :is(.post-content, .entry-content) .wp-block-media-text {
    margin: 1.3em 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-media-text :is(img, video) {
    border-radius: 8px;
}

/* =========================================================
   10. 文件下载（File）
   核心给下载按钮的是深色胶囊；这里改成与按钮区块一致的白字绿底。
   注意：文件名链接（非按钮）保持正文链接的橙色虚下划线，
   只有 .wp-block-file__button 被主题化 —— 选择器带了 3 个类，
   优先级高于 ext-link.css 的 #post_box .post-content a.diary-ext-link，
   因此不会出现"绿底 + 橙色虚线"的冲突。
   ========================================================= */
#post_box :is(.post-content, .entry-content) .wp-block-file {
    margin: 1.2em 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-file .wp-block-file__button {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #099;
    border-radius: 6px;
    background: #099;
    color: #fff;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

#post_box :is(.post-content, .entry-content) .wp-block-file .wp-block-file__button:hover,
#post_box :is(.post-content, .entry-content) .wp-block-file .wp-block-file__button:focus {
    background: #077;
    border-color: #077;
    color: #fff;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* =========================================================
   11. 折叠（Details）
   ========================================================= */
#post_box :is(.post-content, .entry-content) details {
    margin: 1.1em 0;
}

#post_box :is(.post-content, .entry-content) summary {
    padding: 0.35em 0;
    text-indent: 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-brown);
}

/* =========================================================
   12. 图注（图片 / 图库 / 表格的说明文字）
   ========================================================= */
#post_box :is(.post-content, .entry-content) figcaption {
    margin-top: 6px;
    text-indent: 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

/* =========================================================
   ok17.0：7 个文字块的排版升级（统一「B · 书页」风格）
   ---------------------------------------------------------
   ⚠️ 选择器说明（本文件既有约定）：
       `#post_box :is(.post-content, .entry-content)` 是本文件唯一的作用域前缀。
       注意正文容器的真实 class 是 .post-content（连字符），
       不是 .post_content（下划线）—— post.css 里那批 .post_content 规则
       因为 class 名对不上，实际上从未生效过（本次排查发现）。
       ⇒ 本段一律沿用本文件既有前缀，且写在文件末尾 ⇒ 同选择器后写者胜。

   覆盖范围：列表 / 引用 / 引文 / 诗句 / 代码 / 预格式化 / 表格
   其中【表格】是本次新增 —— blocktypo.css 此前没有 table 小节，
   表格走的是浏览器默认观感，与日记本气质差距最大。

   设计语言：纸片、装订线、装饰符号、暖褐细线。
   ========================================================= */

/* ---------- ① 列表：圆点 → ❖ 书卷符号 ---------- */
#post_box :is(.post-content, .entry-content) ul > li::before {
    content: "❖";
    left: -1.15em;
    top: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--accent-gold);
    font-size: 0.8em;
    line-height: inherit;
    opacity: 0.9;
}

#post_box :is(.post-content, .entry-content) ol > li::before {
    color: #B08D5E;
    font-weight: 400;
    font-style: italic;
    left: -1.6em;
}

/* ---------- ② 引用：青绿竖线 → 暖褐纸片 + 大引号 ---------- */
#post_box :is(.post-content, .entry-content) blockquote {
    position: relative;
    margin: 1.45em 0;
    padding: 16px 20px 16px 24px;
    border: 1px solid color-mix(in srgb, var(--accent-gold) 40%, var(--line-primary));
    border-left: 4px solid var(--accent-brown);
    border-radius: 3px 12px 12px 3px;
    background: #FCFAF5;
    box-shadow: 0 6px 18px rgba(110, 79, 47, 0.055);
    color: var(--text-body);
    text-indent: 0;
}

#post_box :is(.post-content, .entry-content) blockquote::before {
    content: "\201C";
    position: absolute;
    left: 9px;
    top: 2px;
    display: block;
    margin: 0;
    font-size: 34px;
    line-height: 1;
    color: color-mix(in srgb, var(--accent-gold) 55%, transparent);
    font-family: Georgia, "Times New Roman", serif;
}

#post_box :is(.post-content, .entry-content) blockquote p {
    text-indent: 0;
    padding: 0.15em 0;
}

/* 嵌套引用压平，避免套娃装饰 */
#post_box :is(.post-content, .entry-content) blockquote blockquote {
    margin: 0.8em 0 0;
    padding: 2px 0 2px 14px;
    border: 0;
    border-left: 2px solid var(--line-primary);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

/* 大号引用变体：随正文放大，不再单纯加粗竖线 */
#post_box :is(.post-content, .entry-content) .wp-block-quote.is-style-large {
    font-size: 1.08em;
    border-left-width: 4px;
    padding: 18px 22px 18px 26px;
}

/* ---------- ③ 引文 pullquote：细线 + ❧ 花纹 + 斜体 ---------- */
#post_box :is(.post-content, .entry-content) .wp-block-pullquote {
    margin: 2em 0;
    padding: 20px 8px;
    background: none;
    border-top: 1px solid var(--line-primary);
    border-bottom: 1px solid var(--line-primary);
    text-align: center;
    color: var(--text-body);
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote::before,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote::after {
    content: "\2767";          /* ❧ */
    display: block;
    color: var(--accent-gold);
    font-size: 0.85em;
    line-height: 1;
    margin-bottom: 12px;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote::after {
    margin: 12px 0 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--accent-brown);
    font-size: 1.24em;
    line-height: 1.8;
    font-style: italic;
    text-align: center;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote::before {
    content: "";
    display: none;              /* 花纹已由 figure 承担，避免双引号叠两层 */
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote p {
    text-indent: 0;
    padding: 0.15em 0;
    font-style: italic;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote cite,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote .wp-block-pullquote__citation {
    display: block;
    margin-top: 0.7em;
    font-size: 0.72em;
    font-style: normal;
    color: #8C8477;
    letter-spacing: 0.1em;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote cite::before,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote .wp-block-pullquote__citation::before {
    content: "— ";
}

/* 实心底色变体：去掉 WP 默认黑底，改为暖褐渐变 */
#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color {
    background: linear-gradient(135deg, #6E4F2F, #8A6440);
    border-top: 0;
    border-bottom: 0;
    border-radius: 12px;
    padding: 24px 20px;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color blockquote,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color blockquote p {
    color: #FBF6EC;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color cite,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color .wp-block-pullquote__citation {
    color: #E8D9C2;
}

#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color::before,
#post_box :is(.post-content, .entry-content) .wp-block-pullquote.is-style-solid-color::after {
    color: #E8D9C2;
}

/* ---------- ④ 诗句 verse：虚线 → 双线 + 渐隐底 ---------- */
#post_box :is(.post-content, .entry-content) .wp-block-verse {
    margin: 1.6em 0;
    padding: 18px 22px 18px 30px;
    background: linear-gradient(90deg, #FCFAF5, transparent 70%);
    border: 0;
    border-left: 3px double var(--accent-gold);
    border-radius: 0 8px 8px 0;
    box-shadow: none;
    color: #443B33;
    font-family: var(--font-main);
    font-size: 1em;
    line-height: 2.15;
    letter-spacing: 0.05em;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

/* ---------- ⑤ 代码块：深色底 → 浅纸底 + 左侧装订线 ---------- */
#post_box :is(.post-content, .entry-content) pre:not(.wp-block-verse):not(.wp-block-preformatted),
#post_box :is(.post-content, .entry-content) pre[class*="language-"]:not(.wp-block-verse):not(.wp-block-preformatted) {
    margin: 1.5em 0;
    padding: 15px 18px 15px 22px;
    background: #FBF8F2;
    border: 0;
    border-left: 3px solid var(--accent-gold);
    border-radius: 4px;
    box-shadow: inset 6px 0 0 -5px #fff, 0 3px 12px rgba(110, 79, 47, 0.06);
    color: #413A32;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.75;
    letter-spacing: 0;
    overflow: auto;
}

/* 外层窗口（Prism code-toolbar）：原先"浅窗 + 深色代码区"，统一为浅纸片 */
#post_box :is(.post-content, .entry-content) div.code-toolbar {
    border: 1px solid color-mix(in srgb, var(--accent-gold) 34%, var(--line-primary));
    background: #FBF8F2;
    box-shadow: 0 6px 18px rgba(110, 79, 47, 0.06);
}

#post_box :is(.post-content, .entry-content) div.code-toolbar > pre,
#post_box :is(.post-content, .entry-content) div.code-toolbar > pre[class*="language-"] {
    margin: 0;
    padding: 14px 18px 16px 22px;
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--accent-gold) 28%, var(--line-primary));
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: #413A32;
}

/* 滚动条浅底适配（原先按深底调的） */
#post_box :is(.post-content, .entry-content) pre[class*="language-"] {
    scrollbar-width: thin;
    scrollbar-color: rgba(110, 79, 47, 0.34) rgba(110, 79, 47, 0.08);
}

#post_box :is(.post-content, .entry-content) pre[class*="language-"]::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#post_box :is(.post-content, .entry-content) pre[class*="language-"]::-webkit-scrollbar-track {
    background: rgba(110, 79, 47, 0.08);
    border-radius: 999px;
}

#post_box :is(.post-content, .entry-content) pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: rgba(110, 79, 47, 0.34);
    border-radius: 999px;
}

/* 行号浅底适配 */
#post_box :is(.post-content, .entry-content) .line-numbers .line-numbers-rows {
    border-right: 1px solid color-mix(in srgb, var(--accent-gold) 30%, transparent);
    background: transparent;
}

#post_box :is(.post-content, .entry-content) .line-numbers-rows > span::before {
    color: color-mix(in srgb, var(--accent-brown) 42%, transparent);
}

/* ★ 浅底版语法高亮 —— prism.css 是【深色主题】配色（token 是亮色：
   tag #e2777a / string #7ec699 / function #f08d49 / keyword #cc99cd），
   放到浅纸底上会亮到看不清 ⇒ 这里换成暖褐系深色 token。 */
#post_box :is(.post-content, .entry-content) .token.comment,
#post_box :is(.post-content, .entry-content) .token.block-comment,
#post_box :is(.post-content, .entry-content) .token.prolog,
#post_box :is(.post-content, .entry-content) .token.doctype,
#post_box :is(.post-content, .entry-content) .token.cdata {
    color: #8C857D;
    font-style: italic;
}

#post_box :is(.post-content, .entry-content) .token.punctuation {
    color: #A69B8D;
}

#post_box :is(.post-content, .entry-content) .token.tag,
#post_box :is(.post-content, .entry-content) .token.attr-name,
#post_box :is(.post-content, .entry-content) .token.namespace,
#post_box :is(.post-content, .entry-content) .token.deleted {
    color: #A6493C;
}

#post_box :is(.post-content, .entry-content) .token.function,
#post_box :is(.post-content, .entry-content) .token.function-name,
#post_box :is(.post-content, .entry-content) .token.number,
#post_box :is(.post-content, .entry-content) .token.boolean {
    color: #B07D2B;
}

#post_box :is(.post-content, .entry-content) .token.keyword,
#post_box :is(.post-content, .entry-content) .token.selector,
#post_box :is(.post-content, .entry-content) .token.atrule,
#post_box :is(.post-content, .entry-content) .token.builtin,
#post_box :is(.post-content, .entry-content) .token.important {
    color: #6E4F2F;
    font-weight: 600;
}

#post_box :is(.post-content, .entry-content) .token.string,
#post_box :is(.post-content, .entry-content) .token.attr-value,
#post_box :is(.post-content, .entry-content) .token.char,
#post_box :is(.post-content, .entry-content) .token.regex,
#post_box :is(.post-content, .entry-content) .token.variable {
    color: #4F7A45;
}

#post_box :is(.post-content, .entry-content) .token.class-name,
#post_box :is(.post-content, .entry-content) .token.constant,
#post_box :is(.post-content, .entry-content) .token.property,
#post_box :is(.post-content, .entry-content) .token.symbol {
    color: #8A5A2B;
}

#post_box :is(.post-content, .entry-content) .token.operator,
#post_box :is(.post-content, .entry-content) .token.entity,
#post_box :is(.post-content, .entry-content) .token.url {
    color: #7A7166;
}

#post_box :is(.post-content, .entry-content) .token.inserted {
    color: #4F7A45;
}

/* ---------- ⑥ 预格式化：沿用米色纸感，微调边框与内距 ---------- */
#post_box :is(.post-content, .entry-content) .wp-block-preformatted {
    margin: 1.5em 0;
    padding: 14px 18px;
    background: #FCFAF5;
    border: 1px dashed var(--line-primary);
    border-radius: 6px;
    box-shadow: none;
    color: #524A41;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

/* ---------- ⑦ 表格：★ 本次新增（本文件此前没有 table 小节）---------- */
#post_box :is(.post-content, .entry-content) table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    border: 1px solid var(--line-primary);
    border-radius: 9px;
    background: #FCFAF7;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(110, 79, 47, 0.05);
}

/* GA3.0 修复：表格区块整体居中（编辑器里选「居中」= figure.aligncenter）。
   ─────────────────────────────────────────────────────────────
   原来 figure.aligncenter 只会让【容器】居中，而 table 自身 width:100%，
   于是容器被撑满、margin 归零 —— 表现是「选了居中，表格反而比不选时更宽」
   （实测：740px → 820px），完全不是用户要的「表格居中收窄」。

   正确行为：居中时表格按内容宽度收缩并左右居中，观感 = 居中卡片。
   :where() 用来保持与上一条同样的低特异性，避免压掉用户其它显式设置。 */
#post_box :where(.post-content, .entry-content) figure.aligncenter > table {
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 右对齐 / 左对齐同理：都用内容宽度，只改水平位置 */
#post_box :where(.post-content, .entry-content) figure.alignleft > table {
    width: auto;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
}

#post_box :where(.post-content, .entry-content) figure.alignright > table {
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: 0;
}

/* 固定布局（has-fixed-layout）在居中场景下同样要能收缩：
   它原本 table-layout:fixed + width:100%，会把两列硬拉成各半屏。
   居中时改为 auto，让列宽跟随内容，才谈得上「居中」。 */
#post_box :where(.post-content, .entry-content) figure.aligncenter > table.has-fixed-layout,
#post_box :where(.post-content, .entry-content) figure.alignleft > table.has-fixed-layout,
#post_box :where(.post-content, .entry-content) figure.alignright > table.has-fixed-layout {
    table-layout: auto;
}

#post_box :is(.post-content, .entry-content) thead {
    background: linear-gradient(#F3EDE1, #EDE5D6);
}

/* GA3.0 修复：th/td 的 text-align 收敛为「只在用户没表态时兜底」。
   ─────────────────────────────────────────────────────────────
   原写法 `text-align: left` 直接落在 (1,1,1) 的规则上，把用户在编辑器里
   选的居中/右对齐【整条压掉】—— 因为核心的
       .has-text-align-center { text-align: center }   特异性 (0,1,0)
   永远赢不过 #post_box :is(...) th  的 (1,1,1)。
   实测：td.has-text-align-center 的 computed text-align 仍是 left。
   用户看得到「居中」按钮已按下，但表格里的字纹丝不动。

   改法：用 :where() 把兜底选择器的特异性压到 (0,0,0)，
   于是「用户显式选的类」自然胜出；没选时仍落到 left（观感与原来一致）。
   :where() 在 Chrome 88+/Safari 14+/Firefox 78+ 支持，与本主题既定基线相符。 */
#post_box :where(.post-content, .entry-content) th,
#post_box :where(.post-content, .entry-content) td {
    padding: 11px 13px;
    border-right: 1px solid var(--line-secondary);
    border-bottom: 1px solid var(--line-secondary);
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.68;
    text-indent: 0;
    text-align: left;
    vertical-align: top;
}

/* 显式对齐：提高特异性确保生效（不依赖核心样式的加载顺序） */
#post_box :is(.post-content, .entry-content) :is(th, td).has-text-align-left {
    text-align: left;
}

#post_box :is(.post-content, .entry-content) :is(th, td).has-text-align-center {
    text-align: center;
}

#post_box :is(.post-content, .entry-content) :is(th, td).has-text-align-right {
    text-align: right;
}

/* ============================================================
 * GA4.0 修复：图片的「左 / 居中 / 右」对齐在编辑器里点了全都没反应
 * ------------------------------------------------------------
 * 与上面表格对齐失效【同源】—— 都是「WP 核心写的是后代选择器，而真实
 * DOM 是两个类挂在同一个元素上」造成的：
 *
 *   WP 核心实际加载的三条（后代选择器，中间有空格）：
 *       .wp-block-image .aligncenter { margin-left:auto; margin-right:auto }
 *       .wp-block-image .alignleft   { float:left;  margin:.5em 1em .5em 0 }
 *       .wp-block-image .alignright  { float:right; margin:.5em 0 .5em 1em }
 *   它们只匹配「aligncenter 在 .wp-block-image 【里面】」的元素；
 *   而编辑器产出的是【同一个元素】带两个类：
 *       <figure class="wp-block-image aligncenter size-full">
 *   ⇒ 上面三条一条都不命中。
 *
 *   唯一命中的是 .wp-block-image.aligncenter { display: table }（同元素选择器），
 *   它把 figure 收缩成图片本身宽度（实测：480 的栏宽里只剩 364px），
 *   却没有把收缩后的它居中 —— 于是三个按钮全部静默失效。
 *
 * 线上实测（/share/6470.html，9 张图）：
 *   带 aligncenter 的图：左留白 0 / 右留白 116（本该 58 / 58）
 *   临时加 alignleft / alignright：float 仍为 none、margin 仍为 0 —— 同样没反应
 *   （另经 REST 检索确认：全站现有文章【没有任何一篇】真正用过
 *     alignleft / alignright 的图片，所以修这两条对既有版式零影响。）
 *
 * 数值与 WP 核心保持一致，行为才可预期。 */
#post_box :is(.post-content, .entry-content) .wp-block-image.aligncenter,
#post_box :is(.post-content, .entry-content) figure.aligncenter {
    margin-left: auto;
    margin-right: auto;
}

#post_box :is(.post-content, .entry-content) .wp-block-image.alignleft,
#post_box :is(.post-content, .entry-content) figure.alignleft {
    float: left;
    margin: 0.5em 1em 0.5em 0;
}

#post_box :is(.post-content, .entry-content) .wp-block-image.alignright,
#post_box :is(.post-content, .entry-content) figure.alignright {
    float: right;
    margin: 0.5em 0 0.5em 1em;
}

#post_box :is(.post-content, .entry-content) th {
    background: linear-gradient(#F3EDE1, #EDE5D6);
    border-bottom: 1.5px solid var(--accent-gold);
    color: var(--accent-brown);
    font-weight: 600;
}

#post_box :is(.post-content, .entry-content) th:last-child,
#post_box :is(.post-content, .entry-content) td:last-child {
    border-right: 0;
}

#post_box :is(.post-content, .entry-content) tbody tr:last-child td {
    border-bottom: 0;
}

#post_box :is(.post-content, .entry-content) tbody tr:nth-child(even) {
    background: #FBF8F2;
}

/* ---------- ⑧ 移动端微调（与既有 mobile.css 的收紧方向一致）---------- */
@media (max-width: 800px) {
    #post_box :is(.post-content, .entry-content) blockquote {
        padding: 13px 15px 13px 19px;
        border-left-width: 3px;
        border-radius: 3px 10px 10px 3px;
    }

    #post_box :is(.post-content, .entry-content) blockquote::before {
        font-size: 28px;
        left: 7px;
    }

    #post_box :is(.post-content, .entry-content) .wp-block-verse {
        padding: 15px 16px 15px 22px;
        letter-spacing: 0.03em;
    }

    #post_box :is(.post-content, .entry-content) pre:not(.wp-block-verse):not(.wp-block-preformatted) {
        font-size: 12px;
        padding: 13px 14px 13px 18px;
    }

    #post_box :is(.post-content, .entry-content) .wp-block-pullquote blockquote {
        font-size: 1.14em;
    }

    #post_box :is(.post-content, .entry-content) th,
    #post_box :is(.post-content, .entry-content) td {
        padding: 9px 10px;
    }
}

@media (max-width: 480px) {
    #post_box :is(.post-content, .entry-content) blockquote {
        padding: 12px 13px 12px 17px;
    }

    #post_box :is(.post-content, .entry-content) th,
    #post_box :is(.post-content, .entry-content) td {
        padding: 8px;
    }

    #post_box :is(.post-content, .entry-content) .wp-block-verse {
        font-size: 0.95em;
        padding: 14px 14px 14px 20px;
    }
}
