/*
Theme Name: 诗韵
Theme URI: https://github.com/shiyun/theme
Author: 昆昆宋
Author URI: https://github.com/shiyun
Description: 古典中国风 WordPress 博客主题。宣纸纹理背景，诗词卡片布局，适配 Gutenberg 区块编辑器。响应式设计，支持自定义配色。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shiyun
Tags: blog, classic-chinese, poetry, elegant, responsive, accessible-ready, custom-colors, editor-style
*/

/* ========== CSS 变量 ========== */
:root {
    --bg-cream: #fdf7ed;
    --bg-warm: #faf3e6;
    --card-bg: #fffefb;
    --text-primary: #2c2416;
    --text-secondary: #5c4a3a;
    --text-muted: #8a7865;
    --accent: #9b3a3a;
    --accent-soft: #c75b5b;
    --gold: #b8956a;
    --gold-light: #d4b896;
    --ink: #1a1a1a;
    --border-soft: #e5d9c8;
    --shadow-sm: 0 1px 3px rgba(60, 40, 20, 0.06), 0 1px 2px rgba(60, 40, 20, 0.04);
    --shadow-md: 0 4px 20px rgba(60, 40, 20, 0.08), 0 2px 6px rgba(60, 40, 20, 0.04);
    --shadow-lg: 0 12px 40px rgba(60, 40, 20, 0.10), 0 4px 12px rgba(60, 40, 20, 0.05);
    --shadow-xl: 0 20px 60px rgba(60, 40, 20, 0.12), 0 8px 20px rgba(60, 40, 20, 0.06);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========== 重置与全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', 'KaiTi', 'STKaiti', 'Georgia', 'Times New Roman', serif;
    background-color: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.02em;
}

::selection {
    background: #8b2e2e;
    color: #fff;
}
::-moz-selection {
    background: #8b2e2e;
    color: #fff;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--accent-soft);
}
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== 无障碍 ========== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: var(--card-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    clip-path: none;
    color: var(--text-primary);
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    height: auto;
    left: 10px;
    line-height: normal;
    padding: 12px 20px;
    text-decoration: none;
    top: 10px;
    width: auto;
    z-index: 100000;
}

/* 跳过链接 */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 10px;
}

/* ========== 背景装饰层 ========== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(180, 140, 100, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 75%, rgba(160, 120, 80, 0.03) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(200, 170, 130, 0.025) 0%, transparent 70%),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(180, 150, 120, 0.012) 2px,
            rgba(180, 150, 120, 0.012) 2.5px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 40px,
            rgba(160, 130, 100, 0.008) 40px,
            rgba(160, 130, 100, 0.008) 40.5px);
    opacity: 1;
}

/* 浮动光斑 */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.06;
    animation: orbFloat 20s ease-in-out infinite;
}
.bg-orb.orb-1 {
    width: 350px; height: 350px;
    background: #c9a87c;
    top: -8%; left: -5%;
    animation-delay: 0s; animation-duration: 22s;
}
.bg-orb.orb-2 {
    width: 280px; height: 280px;
    background: #b8956a;
    bottom: 15%; right: -6%;
    animation-delay: -7s; animation-duration: 18s;
}
.bg-orb.orb-3 {
    width: 220px; height: 220px;
    background: #d4b896;
    top: 55%; left: 40%;
    animation-delay: -13s; animation-duration: 25s;
}
.bg-orb.orb-4 {
    width: 180px; height: 180px;
    background: #c9a87c;
    top: 25%; right: 20%;
    animation-delay: -5s; animation-duration: 19s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(60px, -40px) scale(1.12); }
    50%  { transform: translate(-20px, 50px) scale(0.92); }
    75%  { transform: translate(-50px, -30px) scale(1.06); }
}

/* 飘散墨点 */
.ink-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(60, 40, 20, 0.04);
    animation: inkDrift 30s linear infinite;
}
.ink-dot.dot-1 { width:6px; height:6px; top:30%; left:8%; animation-delay:0s; animation-duration:28s; }
.ink-dot.dot-2 { width:4px; height:4px; top:65%; left:85%; animation-delay:-10s; animation-duration:32s; }
.ink-dot.dot-3 { width:5px; height:5px; top:12%; left:72%; animation-delay:-18s; animation-duration:26s; }
.ink-dot.dot-4 { width:7px; height:7px; top:78%; left:15%; animation-delay:-5s; animation-duration:34s; }
.ink-dot.dot-5 { width:3px; height:3px; top:45%; left:55%; animation-delay:-22s; animation-duration:30s; }

@keyframes inkDrift {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
    20%  { transform: translate(30px, -25px) scale(1.6); opacity: 0.9; }
    40%  { transform: translate(-15px, -50px) scale(0.7); opacity: 0.3; }
    60%  { transform: translate(-35px, -15px) scale(1.3); opacity: 0.7; }
    80%  { transform: translate(20px, -40px) scale(0.8); opacity: 0.4; }
    100% { transform: translate(0, -60px) scale(1); opacity: 0.5; }
}

/* ========== 主内容容器 ========== */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1260px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ---- 三栏布局：左栏 + 主内容 + 右栏 ---- */
.content-area {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.site-main {
    flex: 1;
    min-width: 0;
}

.widget-area {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 50px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.widget-area:hover {
    scrollbar-color: var(--border-soft) transparent;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
    letter-spacing: 0.06em;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.widget ul li:last-child {
    margin-bottom: 0;
}

.widget ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.widget ul li a:hover {
    color: var(--accent);
}

.widget select {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    font-size: 0.8rem !important;
    padding: 3px 10px;
    margin: 0 4px 6px 0;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.widget_tag_cloud .tagcloud a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(155, 58, 58, 0.04);
}

/* ---- 诗韵搜索小工具 ---- */
.shiyun-search-form {
    position: relative;
}

.shiyun-search-inner {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: var(--card-bg);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.shiyun-search-inner:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(155, 58, 58, 0.08);
}

.shiyun-search-field {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    letter-spacing: 0.04em;
}

.shiyun-search-field::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.shiyun-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.shiyun-search-submit:hover {
    color: var(--accent);
    background: rgba(155, 58, 58, 0.05);
}

/* ---- 无侧边栏时保持原始宽度 ---- */
.content-area:has(.site-main:only-child) {
    max-width: 780px;
    margin: 0 auto;
}

/* ---- 侧边栏响应式 ---- */
@media (max-width: 1100px) {
    .main-container {
        max-width: 780px;
    }
    .content-area {
        flex-direction: column;
        gap: 24px;
        align-items: stretch;
    }
    .site-main {
        width: 100%;
    }
    .widget-area {
        width: 100%;
        position: static;
        max-height: none;
        min-height: auto;
        overflow: visible;
        overflow-y: visible;
        -webkit-overflow-scrolling: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    .widget-area > .widget {
        flex: 0 0 calc(50% - 8px);
        min-width: 0;
        padding: 16px;
    }
    .widget-title {
        font-size: 0.88rem;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    .widget ul li {
        font-size: 0.82rem;
        margin-bottom: 6px;
    }
    .widget_tag_cloud .tagcloud a {
        font-size: 0.75rem !important;
        padding: 2px 8px;
        margin: 0 3px 5px 0;
    }
}

@media (max-width: 480px) {
    .widget-area {
        flex-direction: column;
        gap: 12px;
    }
    .widget-area > .widget {
        flex: 0 0 100%;
        padding: 14px;
    }
    .widget-title {
        font-size: 0.85rem;
    }
    .widget ul li {
        font-size: 0.8rem;
    }
}

/* ========== 页眉 ========== */
.site-header {
    text-align: center;
    padding: 50px 20px 30px;
    position: relative;
}

.header-ornament-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 18px;
}
.header-ornament-top .line {
    width: 50px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    border-radius: 1px;
}
.header-ornament-top .diamond {
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
    border-radius: 1px;
    opacity: 0.7;
    animation: diamondPulse 3s ease-in-out infinite;
}
@keyframes diamondPulse {
    0%, 100% { opacity: 0.5; transform: rotate(45deg) scale(1); }
    50% { opacity: 1; transform: rotate(45deg) scale(1.3); }
}

.site-logo {
    margin-bottom: 12px;
}
.site-logo .custom-logo-link {
    display: inline-block;
}
.site-logo .custom-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

.site-title {
    font-family: 'Ma Shan Zheng', 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', cursive, serif;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.12em;
    margin: 0;
    line-height: 1.2;
    display: inline-block;
    position: relative;
}
.site-title a {
    color: inherit;
    text-decoration: none;
}
.site-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-soft), var(--gold), var(--accent-soft), transparent);
    border-radius: 2px;
}

.site-subtitle {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    margin-top: 18px;
    font-weight: 300;
}

/* ========== 导航菜单 ========== */
.main-navigation {
    margin-top: 22px;
}
.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.nav-menu li {
    position: relative;
}
.nav-menu a {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    font-weight: 400;
    border-radius: 20px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--accent);
    background: rgba(180, 150, 110, 0.08);
    border-color: var(--border-soft);
}
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    color: var(--accent);
    background: rgba(180, 150, 110, 0.1);
    border-color: var(--border-soft);
}

/* 子菜单 */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px 0;
    z-index: 10;
}
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    display: block;
}
.nav-menu .sub-menu li {
    display: block;
}
.nav-menu .sub-menu a {
    display: block;
    padding: 8px 18px;
    border-radius: 0;
    border: none;
    white-space: nowrap;
}

/* ========== 内容类型筛选面板 ========== */
.type-filter-bar {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 28px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
    flex-wrap: wrap;
}

.type-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.type-filter-btn::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: width var(--transition-fast);
}

.type-filter-btn:hover {
    color: var(--accent);
    text-decoration: none;
}

.type-filter-btn.is-active {
    color: var(--accent);
    font-weight: 500;
}

.type-filter-btn.is-active::after {
    width: 60%;
}

.type-filter-cards {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========== 诗歌卡片通用样式 ========== */
.poem-card {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px 44px 36px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    border: 1px solid var(--border-soft);
    animation: cardReveal 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    cursor: default;
    margin-bottom: 36px;
}
.poem-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}
.poem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 85% 10%, rgba(180, 140, 100, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 85%, rgba(160, 120, 80, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.poem-card > * {
    position: relative;
    z-index: 1;
}

/* 卡片装饰边 */
.poem-card .card-border-accent {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 50%;
    background: linear-gradient(to bottom, transparent, var(--accent), var(--gold), var(--accent), transparent);
    border-radius: 0 3px 3px 0;
    opacity: 0.5;
    z-index: 0;
    transition: opacity var(--transition), height var(--transition);
}
.poem-card:hover .card-border-accent {
    opacity: 0.8;
    height: 60%;
}

/* 文章特色图 */
.post-thumbnail {
    margin: -40px -44px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    position: relative;
    z-index: 0;
    aspect-ratio: 16 / 9;
}
.post-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity var(--transition-slow);
}
.poem-card:hover .post-thumbnail img {
    opacity: 1;
}

/* 卡片动画延迟 */
.card-delay-0 { animation-delay: 0.1s; }
.card-delay-1 { animation-delay: 0.25s; }
.card-delay-2 { animation-delay: 0.4s; }
.card-delay-3 { animation-delay: 0.55s; }
.card-delay-4 { animation-delay: 0.7s; }
.card-delay-5 { animation-delay: 0.85s; }

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 置顶文章 */
.poem-card.sticky {
    border-color: var(--gold-light);
}
.poem-card.sticky .card-border-accent {
    background: linear-gradient(to bottom, transparent, var(--gold), var(--accent), var(--gold), transparent);
}

/* ========== 卡片标题区域 ========== */
.poem-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
}
.poem-card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
}
.poem-title {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.06em;
    line-height: 1.3;
    margin: 0;
}
.poem-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.poem-title a:hover {
    color: var(--accent);
}
.poem-author {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.poem-author .author-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.poem-author .author-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.poem-author a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.poem-author a:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.poem-dynasty {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-left: 4px;
    padding: 2px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: rgba(180, 150, 110, 0.06);
}
.poem-card-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.poem-card-meta .byline {
    font-weight: 500;
    color: var(--text-secondary);
}
.poem-card-meta .posted-on time {
    color: var(--text-muted);
}

/* ========== 移动菜单按钮 ========== */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
    margin: 0 auto;
}
.menu-toggle:hover {
    border-color: var(--gold-light);
    color: var(--accent);
}
.menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.menu-toggle-icon {
    display: inline-block;
    width: 16px;
    height: 2px;
    background: currentColor;
    position: relative;
    vertical-align: middle;
    margin-right: 6px;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s ease;
}
.menu-toggle-icon::before { top: -5px; }
.menu-toggle-icon::after  { top: 5px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
    background: transparent;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    transform: translateY(5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding-top: 10px;
    }

    .nav-menu.is-active {
        display: flex;
    }

    .nav-menu .sub-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        text-align: center;
    }
}

/* ========== 文章内容区 ========== */
.poem-content {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', serif;
    font-size: 1.2rem;
    line-height: 2.4;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    padding: 4px 0;
    position: relative;
}
.poem-content-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}
.poem-content p {
    margin: 0 0 0.5em;
    position: relative;
    z-index: 2;
}
.poem-content p:last-child {
    margin-bottom: 0;
}
.poem-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    position: relative;
    z-index: 3;
}

/* ========== 分类标签 ========== */
.poem-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px dotted var(--border-soft);
}
.poem-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(180, 150, 110, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}
.poem-tag:hover,
.poem-tag:focus-visible {
    background: rgba(180, 140, 100, 0.16);
    color: var(--text-secondary);
    border-color: var(--border-soft);
}

/* ========== 分页导航 ========== */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.nav-links a,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-links .page-numbers.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

/* 文章前后导航：左右分散对齐 */
.post-navigation .nav-links {
    justify-content: space-between;
    gap: 16px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    max-width: 48%;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
    min-width: auto;
    height: auto;
    padding: 10px 18px;
    white-space: normal;
    text-align: left;
}

@media (max-width: 420px) {
    .post-navigation .nav-links {
        gap: 10px;
    }
    .post-navigation .nav-previous a,
    .post-navigation .nav-next a {
        padding: 8px 14px;
    }
}

/* ========== 单篇文章 ========== */
.single-article .poem-card-header {
    margin-bottom: 28px;
}
.entry-content {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', serif;
    font-size: 1.15rem;
    line-height: 2.2;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}
.entry-content h2 {
    font-family: 'LxgwWenKai', 'Noto Serif SC', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin: 1.8em 0 0.6em;
    letter-spacing: 0.06em;
}
.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin: 1.5em 0 0.5em;
}
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.2em 0 0.4em;
}
.entry-content p {
    margin: 0 0 1em;
    position: relative;
}
.entry-content p:last-child {
    margin-bottom: 0;
}
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(180, 150, 110, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.entry-content blockquote p {
    margin: 0;
}
.entry-content ul,
.entry-content ol {
    margin: 1em 0;
    padding-left: 1.5em;
}
.entry-content li {
    margin-bottom: 0.3em;
}
.entry-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.entry-content hr {
    border: none;
    border-top: 1px solid var(--border-soft);
    margin: 2em 0;
}
.entry-content img {
    border-radius: var(--radius-md);
    margin: 1.5em auto;
}
.entry-content figure {
    margin: 1.5em 0;
}
.entry-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5em;
}

/* ========== 代码块 ========== */

/* 行内代码 */
.entry-content :not(pre) > code,
.poem-content :not(pre) > code,
.comment-content :not(pre) > code {
    font-family: 'Cascadia Code', 'Fira Code', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    background: rgba(180, 150, 110, 0.12);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 500;
}

/* 代码块外层容器 */
.code-block-wrapper {
    position: relative;
    margin: 1.8em 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #1f1d17;
    border: 1px solid rgba(180, 150, 110, 0.15);
    box-shadow: var(--shadow-sm);
}

/* 代码块头部（语言标示 + 复制按钮） */
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    background: rgba(180, 150, 110, 0.06);
    border-bottom: 1px solid rgba(180, 150, 110, 0.1);
}

.code-block-lang {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.7rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    font-weight: 600;
    user-select: none;
}

.code-block-copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(180, 150, 110, 0.12);
    border-radius: 14px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
    white-space: nowrap;
    user-select: none;
}

.code-block-copy:hover {
    color: #e3dccb;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold-light);
}

.code-block-copy:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.code-block-copy.is-copied {
    color: #6bbf6b;
    border-color: rgba(107, 191, 107, 0.3);
    background: rgba(107, 191, 107, 0.08);
}

.code-block-copy svg {
    flex-shrink: 0;
}

/* 代码块内容区 */
.code-block-wrapper pre {
    margin: 0;
    padding: 20px 24px;
    background: transparent;
    border-radius: 0;
    overflow-x: auto;
    font-family: 'Cascadia Code', 'Fira Code', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    font-size: 0.86rem;
    line-height: 1.75;
    color: #e3dccb;
    tab-size: 4;
    -moz-tab-size: 4;
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 150, 110, 0.18) transparent;
}

.code-block-wrapper pre::-webkit-scrollbar {
    height: 5px;
}

.code-block-wrapper pre::-webkit-scrollbar-track {
    background: transparent;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb {
    background: rgba(180, 150, 110, 0.18);
    border-radius: 3px;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 150, 110, 0.3);
}

.code-block-wrapper pre code {
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-weight: inherit;
}

/* 未包裹的纯 pre（向后兼容） */
.entry-content pre:not(.code-block-wrapper pre),
.poem-content pre:not(.code-block-wrapper pre),
.comment-content pre:not(.code-block-wrapper pre) {
    font-family: 'Cascadia Code', 'Fira Code', 'Source Code Pro', 'Consolas', 'Courier New', monospace;
    font-size: 0.88rem;
    background: rgba(180, 150, 110, 0.06);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    overflow-x: auto;
    margin: 1.5em 0;
    line-height: 1.7;
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}

/* 语法高亮辅助类（与常见高亮库兼容） */
.code-block-wrapper .hljs-keyword,
.code-block-wrapper .token.keyword { color: #c75b5b; }

.code-block-wrapper .hljs-string,
.code-block-wrapper .token.string  { color: #c9a87c; }

.code-block-wrapper .hljs-number,
.code-block-wrapper .token.number  { color: #d4b896; }

.code-block-wrapper .hljs-function,
.code-block-wrapper .token.function { color: #b8956a; }

.code-block-wrapper .hljs-comment,
.code-block-wrapper .token.comment  { color: #6b6152; font-style: italic; }

.code-block-wrapper .hljs-operator,
.code-block-wrapper .token.operator { color: #8a7865; }

.code-block-wrapper .hljs-built_in,
.code-block-wrapper .token.builtin  { color: #c75b5b; }

.code-block-wrapper .hljs-attr,
.code-block-wrapper .token.attr-name { color: #d4b896; }

.code-block-wrapper .hljs-selector-class,
.code-block-wrapper .token.class-name { color: #b8956a; }

.code-block-wrapper .hljs-punctuation,
.code-block-wrapper .token.punctuation { color: #8a7865; }

.code-block-wrapper .hljs-tag,
.code-block-wrapper .token.tag { color: #c75b5b; }

/* ========== 归档/分类/搜索页眉 ========== */
.archive-header,
.search-header {
    text-align: center;
    padding: 24px 20px 30px;
    margin-bottom: 12px;
}
.archive-title,
.search-title {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.archive-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

/* ========== 分隔装饰 ========== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 30px;
    opacity: 0.5;
}
.section-divider .divider-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gold);
}
.section-divider .divider-line {
    width: 40px;
    height: 1px;
    background: var(--border-soft);
}

/* ========== 评论 ========== */
.comments-area {
    margin-top: 48px;
}
.comments-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.2rem;
    color: var(--ink);
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list .comment {
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}
.comment-list .comment.bypostauthor {
    border-color: var(--gold-light);
}
.comment-list .children {
    list-style: none;
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px solid var(--border-soft);
}
.comment-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.comment-meta .fn {
    font-weight: 600;
    color: var(--text-secondary);
}
.comment-meta a {
    color: var(--text-muted);
}
.comment-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
}
.comment-content p {
    margin: 0 0 0.6em;
}
.comment-reply-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.06em;
    margin-top: 6px;
    display: inline-block;
}

/* 评论表单 */
.comment-respond {
    margin-top: 30px;
}
.comment-reply-title {
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 16px;
}
.comment-form label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast);
    margin-bottom: 14px;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(155, 58, 58, 0.08);
}
.comment-form .submit {
    padding: 10px 28px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: background var(--transition-fast);
}
.comment-form .submit:hover {
    background: var(--accent-soft);
}

/* ========== 搜索 ========== */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}
.search-form label {
    flex: 1;
}
.search-form .search-field {
    width: 100%;
    padding: 10px 16px;
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    transition: border-color var(--transition-fast);
}
.search-form .search-field:focus {
    outline: none;
    border-color: var(--accent);
}
.search-form .search-submit {
    padding: 10px 20px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: background var(--transition-fast);
}
.search-form .search-submit:hover {
    background: var(--accent-soft);
}

/* ========== 404 页面 ========== */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}
.error-404 .page-title {
    font-family: 'Ma Shan Zheng', cursive, serif;
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 10px;
}
.error-404 .page-content {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.06em;
}

/* ========== 搜索结果高亮 ========== */
.hentry .search-highlight {
    background: rgba(180, 150, 110, 0.2);
    padding: 0 2px;
    border-radius: 2px;
}

/* ========== 页脚 ========== */
.site-footer {
    text-align: center;
    padding: 40px 20px 30px;
    position: relative;
    z-index: 1;
}
.footer-ornament {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.footer-ornament .fo-line {
    width: 35px;
    height: 1px;
    background: var(--border-soft);
}
.footer-ornament .fo-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-light);
    background: transparent;
}
.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    font-weight: 300;
}

.footer-icp {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.footer-icp a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-icp a:hover {
    color: var(--accent);
}

/* ========== WordPress 对齐 ========== */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}
.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}
.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.alignfull {
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}
.alignfull img {
    width: 100%;
}

/* ========== Gutenberg 区块样式 ========== */
.wp-block-button__link {
    padding: 10px 24px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    border-radius: 20px;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
}
.wp-block-button__link:hover {
    opacity: 0.9;
}

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}
.wp-block-table td,
.wp-block-table th {
    border: 1px solid var(--border-soft);
    padding: 8px 14px;
}

.wp-block-pullquote {
    border-top: 3px solid var(--accent);
    border-bottom: 3px solid var(--accent);
    padding: 24px 0;
    margin: 2em 0;
    font-size: 1.2rem;
    color: var(--text-secondary);
}
.wp-block-pullquote cite {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wp-block-separator {
    border: none;
    border-top: 1px solid var(--border-soft);
    margin: 2em auto;
    max-width: 120px;
}
.wp-block-separator.is-style-wide {
    max-width: 100%;
}
.wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    line-height: 1;
}
.wp-block-separator.is-style-dots::before {
    content: "···";
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 0.6em;
}

.wp-block-verse {
    font-family: 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.15rem;
    line-height: 2.2;
    white-space: pre-wrap;
}

.wp-block-gallery {
    gap: 12px !important;
}
.wp-block-gallery .blocks-gallery-item img {
    border-radius: var(--radius-sm);
}

.wp-block-cover {
    border-radius: var(--radius-md);
}

/* ========== 日签卡片 ========== */
.riqian-card .riqian-body,
.riqian-single .riqian-body {
    font-family: 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.3rem;
    line-height: 2.4;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    padding: 4px 0;
    position: relative;
}
.riqian-card .riqian-body p,
.riqian-single .riqian-body p {
    margin: 0 0 0.8em;
    position: relative;
    z-index: 2;
}
.riqian-card .riqian-body p:last-child,
.riqian-single .riqian-body p:last-child {
    margin-bottom: 0;
}
.riqian-body-excerpt {
    margin-bottom: 0;
}
.riqian-excerpt-text {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-secondary);
    margin: 0;
}
.riqian-single .poem-card-header {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

/* 日签图片容器 */
.riqian-image-wrap {
    margin: 24px 0 20px;
    text-align: center;
    background: rgba(180, 150, 110, 0.03);
    border-radius: var(--radius-md);
    padding: 8px;
    border: 1px solid var(--border-soft);
}
.riqian-image {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 8px;
}

/* 日签操作按钮 */
.riqian-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dotted var(--border-soft);
}
.riqian-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    cursor: pointer;
    letter-spacing: 0.08em;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.riqian-btn:hover {
    border-color: var(--gold-light);
    color: var(--accent);
    background: rgba(180, 150, 110, 0.06);
    box-shadow: var(--shadow-sm);
}
.riqian-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.riqian-btn:active {
    transform: scale(0.96);
}
.riqian-btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* 复制提示 Toast */
.riqian-copy-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 32px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    color: #fff;
    background: var(--accent);
    border-radius: 24px;
    letter-spacing: 0.08em;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.riqian-copy-toast.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ========== 诗歌卡片 ========== */
.shige-single .poem-card-header {
    flex-wrap: wrap;
    gap: 12px;
}

.shige-author-avatar {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 2px;
}

.shige-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-soft);
    flex-shrink: 0;
}

.shige-single .shige-avatar-img {
    width: 38px;
    height: 38px;
}

.shige-body {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.15rem;
    line-height: 2.2;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: left;
    padding: 10px 0;
    position: relative;
}

.shige-body-text {
    position: relative;
    z-index: 2;
}

/* ---- 诗歌拼音注解 ---- */

/* 拼音开关栏 */
.shige-pinyin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 1px dotted var(--border-soft);
}

.pinyin-bar-label {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
}

.pinyin-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pinyin-toggle-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pinyin-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.pinyin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pinyin-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-soft);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    transition: background 0.3s;
}

.pinyin-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    top: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.3s;
}

.pinyin-toggle input:checked + .pinyin-toggle-slider {
    background: rgba(155, 58, 58, 0.15);
    border-color: var(--accent);
}

.pinyin-toggle input:checked + .pinyin-toggle-slider::before {
    background: var(--accent);
    transform: translateX(16px);
}

/* 拼音行：flex 横向排列每个 ruby，长行自动换行 */
.poem-ruby-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-start;
    row-gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(139, 94, 26, 0.06);
}

.poem-ruby-line:last-child {
    border-bottom: none;
}

/* 空行间距 */
.poem-ruby-line.is-blank {
    min-height: 2rem;
    border-bottom: none;
    padding: 0;
}

/* ruby 基础样式：rt 在字符上方 */
.shige-body ruby {
    display: inline-flex;
    flex-direction: column-reverse;
    align-items: center;
    line-height: 1;
}

.shige-body rt {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 4px;
    text-align: center;
    transition: opacity 0.35s ease;
}

.shige-body ruby span {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1;
    padding: 0 8px;
}

/* 标点符号 */
.shige-body .poem-punct {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1;
    padding: 0 4px;
    align-self: flex-end;
}

/* 拼音隐藏状态（默认） */
.shige-single.pinyin-hidden .shige-body rt {
    opacity: 0;
    pointer-events: none;
}

/* ---- 金句高亮 ---- */

.shige-body p {
    margin: 0 0 0.8em;
    position: relative;
    z-index: 2;
}

.shige-body p:last-child {
    margin-bottom: 0;
}

/* 金句高亮：正文中匹配金句的行 */
.shige-highlight {
    color: var(--accent);
    font-weight: 600;
    background: linear-gradient(180deg, rgba(155, 58, 58, 0.06) 0%, rgba(155, 58, 58, 0.02) 100%);
    padding: 1px 6px;
    border-radius: 3px;
}

/* 拼音重建后的金句高亮行 */
.poem-ruby-line.is-highlight ruby span {
    color: var(--accent);
    font-weight: 600;
}

.poem-ruby-line.is-highlight {
    background: linear-gradient(90deg, rgba(155, 58, 58, 0.08) 0%, rgba(155, 58, 58, 0.02) 60%, transparent 100%);
    border-left: 3px solid var(--accent);
    padding-left: 10px;
    margin-left: -13px;
    border-radius: 0 3px 3px 0;
}

/* 朝代徽章 */
.shige-dynasty-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border: 1px solid var(--accent);
    border-radius: 16px;
    background: rgba(155, 58, 58, 0.06);
    color: var(--accent);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.shige-dynasty-badge a {
    color: inherit;
    text-decoration: none;
}

.shige-dynasty-badge:hover {
    background: rgba(155, 58, 58, 0.12);
    border-color: var(--accent-soft);
}

/* 金句摘录块 */
.shige-quote-block {
    margin: 16px 0 24px;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(180, 150, 110, 0.04) 0%, rgba(180, 150, 110, 0.01) 100%);
    border-left: 3px solid var(--gold-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.shige-quote-text {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.1rem;
    line-height: 2.2;
    letter-spacing: 0.06em;
    color: var(--accent);
    text-align: center;
    margin: 0;
}

.shige-body a {
    text-decoration: underline;
    text-underline-offset: 3px;
    position: relative;
    z-index: 3;
}

/* 诗歌复制按钮 */
.shige-card-actions {
    margin-top: 12px;
}

.shige-detail-actions {
    margin-top: 20px;
    text-align: center;
}

.shige-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.shige-copy-btn:hover {
    border-color: var(--gold-light);
    color: var(--accent);
    background: rgba(180, 150, 110, 0.06);
    box-shadow: var(--shadow-sm);
}

.shige-copy-btn:active {
    transform: scale(0.96);
}

.shige-copy-btn.is-copied {
    border-color: var(--gold-light);
    color: var(--gold);
    background: rgba(180, 150, 110, 0.08);
}

.shige-copy-btn--detail {
    padding: 10px 24px;
    font-size: 0.9rem;
}

/* 诗歌列表卡片正文 */
.shige-body-excerpt {
    margin-bottom: 0;
    text-align: left;
}

.shige-excerpt-text {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.2rem;
    line-height: 2.4;
    color: var(--text-secondary);
}

/* 诗歌卡片头部 */
.shige-card .poem-card-header {
    flex-wrap: wrap;
    gap: 8px;
}

.shige-card .poem-card-meta,
.shige-single .poem-card-meta {
    align-items: center;
}

.shige-card .shige-avatar-img {
    width: 24px;
    height: 24px;
}

/* 诗歌响应式 */
@media (max-width: 768px) {
    .shige-body {
        font-size: 1.05rem;
        line-height: 2;
    }
    .shige-excerpt-text {
        font-size: 1.05rem;
        line-height: 2.2;
    }
    .shige-single .shige-avatar-img {
        width: 30px;
        height: 30px;
    }
    .shige-quote-block {
        padding: 16px 20px;
        margin: 12px 0 18px;
    }
    .shige-quote-text {
        font-size: 0.95rem;
        line-height: 2;
    }
    .shige-copy-btn--detail {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    .shige-body ruby span {
        font-size: 1.1rem;
        padding: 0 6px;
    }

    .shige-body rt {
        font-size: 0.6rem;
    }

    .shige-body .poem-punct {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .shige-body {
        font-size: 0.95rem;
        line-height: 2;
    }
    .shige-excerpt-text {
        font-size: 0.95rem;
        line-height: 2;
    }
    .shige-single .shige-avatar-img {
        width: 26px;
        height: 26px;
    }
    .shige-card .shige-avatar-img {
        width: 20px;
        height: 20px;
    }
    .shige-quote-block {
        padding: 12px 16px;
        margin: 10px 0 14px;
    }
    .shige-quote-text {
        font-size: 0.88rem;
        line-height: 1.9;
    }
    .shige-dynasty-badge {
        font-size: 0.7rem;
        padding: 1px 8px;
    }
    .shige-copy-btn {
        font-size: 0.78rem;
        padding: 6px 14px;
    }
    .shige-copy-btn--detail {
        padding: 8px 18px;
        font-size: 0.8rem;
    }

    .shige-card .poem-card-header {
        gap: 6px;
    }
    .shige-card .poem-card-meta {
        margin-left: 0;
        white-space: normal;
        flex-wrap: wrap;
    }

    .shige-body ruby span {
        font-size: 0.95rem;
        padding: 0 4px;
    }

    .shige-body rt {
        font-size: 0.55rem;
        margin-bottom: 2px;
    }

    .shige-body .poem-punct {
        font-size: 0.85rem;
        padding: 0 2px;
    }
}

/* ========== 自定义文章模板 ========== */

/* ---- 诗歌展示模板 ---- */
.template-poetry-article {
    text-align: center;
}

.template-poetry-article .poetry-thumbnail {
    margin: -40px -44px 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.template-poetry-article .poetry-ornament-top,
.template-poetry-article .poetry-ornament-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 24px 0;
    opacity: 0.5;
}

.poetry-ornament-line {
    width: 36px;
    height: 1px;
    background: var(--border-soft);
}

.poetry-ornament-diamond {
    width: 6px;
    height: 6px;
    background: var(--accent);
    transform: rotate(45deg);
    border-radius: 1px;
    opacity: 0.6;
}

.poetry-ornament-circle {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-light);
    background: transparent;
}

.template-poetry-article .poetry-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}

.template-poetry-article .poetry-subtitle {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    line-height: 1.8;
}

.template-poetry-article .poetry-content {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.35rem;
    line-height: 2.8;
    letter-spacing: 0.08em;
    text-align: center;
}

.template-poetry-article .poetry-content p {
    margin: 0 0 1.2em;
    text-indent: 0;
}

.template-poetry-article .poetry-content p:last-child {
    margin-bottom: 0;
}

.template-poetry-article .poetry-signature {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dotted var(--border-soft);
}

.poetry-author {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
}

.poetry-date {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.template-poetry-article .poem-card-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.template-poetry-article .poem-card-header::after {
    display: none;
}

/* ---- 音频展示模板 ---- */
.audio-cover-wrap {
    position: relative;
    text-align: center;
    margin: -40px -44px 28px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1814 0%, #2d2a20 50%, #1a1814 100%);
    padding: 32px 20px 24px;
}

.audio-cover-image {
    display: block;
    max-width: 260px;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.audio-cover-vinyl {
    position: absolute;
    right: calc(50% - 200px);
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            #1a1814 0%, #1a1814 14%,
            transparent 15%, transparent 18%,
            #2d2a20 18%, #2d2a20 25%,
            transparent 26%, transparent 30%,
            rgba(180, 150, 110, 0.08) 30%, rgba(180, 150, 110, 0.08) 40%,
            transparent 41%, transparent 44%,
            rgba(180, 150, 110, 0.05) 44%, rgba(180, 150, 110, 0.05) 55%,
            transparent 56%, transparent 59%,
            #2d2a20 59%, #2d2a20 63%,
            transparent 64%, transparent 68%,
            #1a1814 68%, #1a1814 72%,
            #2d2a20 72%, #2d2a20 76%,
            transparent 77%);
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.audio-track-info {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border-soft);
}

.audio-track-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.audio-track-meta {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.audio-player-section {
    position: relative;
}

.audio-player-inner {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-primary);
}

.audio-player-inner audio,
.audio-player-inner .wp-block-audio,
.audio-player-inner iframe {
    width: 100%;
    margin: 0 0 20px;
    border-radius: var(--radius-md);
}

.audio-player-inner audio {
    background: var(--card-bg);
}

.template-audio-article .poem-card-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.template-audio-article .poem-card-header::after {
    display: none;
}

/* ---- 视频展示模板 ---- */
.template-video-article {
    padding: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    border: none;
}

.template-video-article:hover {
    transform: none;
    box-shadow: none;
}

.template-video-article .card-border-accent {
    display: none;
}

.video-cinema-frame {
    position: relative;
    background: #0d0d0d;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(180, 150, 110, 0.12);
}

.video-cinema-frame--no-poster {
    padding: 0;
}

.video-poster {
    position: relative;
    max-height: 450px;
    overflow: hidden;
}

.video-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(2px) brightness(0.5);
}

.video-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(13, 13, 13, 0.3) 60%,
        rgba(13, 13, 13, 0.9) 100%);
}

.video-player-area {
    position: relative;
    z-index: 1;
    padding: 24px;
    color: #e3dccb;
}

.video-player-area video,
.video-player-area .wp-block-video,
.video-player-area iframe,
.video-player-area .wp-block-embed {
    width: 100%;
    border-radius: var(--radius-sm);
    display: block;
}

.video-player-area p {
    color: #c4bcab;
}

.video-player-area a {
    color: var(--gold-light);
}

.video-cinema-frame--no-poster .video-player-area {
    padding: 0;
}

.video-info {
    margin-top: 24px;
    padding: 28px 32px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

.video-title {
    font-size: 1.45rem;
    margin-bottom: 8px;
}

.video-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ---- 模板响应式 (平板) ---- */
@media (max-width: 768px) {
    .template-poetry-article .poetry-content {
        font-size: 1.15rem;
        line-height: 2.4;
    }

    .template-poetry-article .poetry-title {
        font-size: 1.4rem;
    }

    .audio-cover-wrap {
        margin: -28px -22px 20px;
        padding: 24px 16px 18px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .audio-cover-image {
        max-width: 180px;
    }

    .audio-cover-vinyl {
        right: calc(50% - 150px);
        width: 140px;
        height: 140px;
    }

    .video-cinema-frame {
        border-radius: var(--radius-md);
    }

    .video-info {
        margin-top: 18px;
        padding: 20px 20px;
        border-radius: var(--radius-md);
    }

    .video-player-area {
        padding: 16px;
    }
}

/* ---- 模板响应式 (手机) ---- */
@media (max-width: 420px) {
    .template-poetry-article .poetry-content {
        font-size: 1.05rem;
        line-height: 2.2;
    }

    .template-poetry-article .poetry-title {
        font-size: 1.25rem;
    }

    .template-poetry-article .poetry-ornament-top,
    .template-poetry-article .poetry-ornament-bottom {
        margin: 16px 0;
        gap: 10px;
    }

    .audio-cover-wrap {
        margin: -22px -16px 16px;
        padding: 20px 12px 14px;
        border-radius: 10px 10px 0 0;
    }

    .audio-cover-image {
        max-width: 140px;
    }

    .audio-cover-vinyl {
        display: none;
    }

    .audio-track-title {
        font-size: 1.2rem;
    }

    .video-info {
        margin-top: 14px;
        padding: 16px 16px;
        border-radius: 10px;
    }

    .video-title {
        font-size: 1.15rem;
    }

    .video-player-area {
        padding: 12px;
    }
}

/* ========== 成语卡片 ========== */

/* ---- 米字格书法展示区 ---- */
.chengyu-calligraphy {
    text-align: center;
    padding: 36px 0 16px;
    margin-bottom: 28px;
    position: relative;
}

.chengyu-char-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chengyu-char-cell {
    position: relative;
    width: 88px;
    height: 108px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background:
        /* 米字格线条 */
        linear-gradient(to right, var(--border-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-soft) 1px, transparent 1px),
        /* 对角线 */
        linear-gradient(45deg, transparent calc(50% - 0.5px), rgba(180, 150, 110, 0.25) calc(50% - 0.5px), rgba(180, 150, 110, 0.25) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
        linear-gradient(135deg, transparent calc(50% - 0.5px), rgba(180, 150, 110, 0.25) calc(50% - 0.5px), rgba(180, 150, 110, 0.25) calc(50% + 0.5px), transparent calc(50% + 0.5px));
    background-color: rgba(180, 150, 110, 0.03);
    border: 1.5px solid var(--border-soft);
    border-radius: 4px;
}

.chengyu-char-pinyin {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.chengyu-char {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--ink);
    position: relative;
    z-index: 2;
    line-height: 1;
    user-select: none;
}

/* ---- 拼音声调独立定位系统 ---- */

/* 拼音文本容器（卡片行内展示） */
.pinyin-text {
    line-height: 1.65;
}

/* 单个音节：inline-flex 保持字母紧密排列 */
.py-syl {
    display: inline-flex;
    align-items: flex-end;
    white-space: nowrap;
    position: relative;
}

/* 普通辅音字母 */
.py-char {
    display: inline-block;
    position: relative;
    z-index: 0;
}

/* 含声调的元音：作为声调标记的定位锚点 */
.py-vowel {
    position: relative;
    display: inline-block;
}

/* 声调标记：绝对定位在元音正上方 */
.py-tone {
    position: absolute;
    top: -0.01em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.80em;
    line-height: 1;
    font-weight: 600;
    color: inherit;
    z-index: 3;
    pointer-events: none;
}

/* 元音基字 */
.py-base {
    position: relative;
    z-index: 1;
}

/* 四个声调符号：用 CSS 渲染，不依赖字体 */
.py-vowel.t1 .py-tone::after { content: '\02C9'; } /* ˉ 阴平 */
.py-vowel.t2 .py-tone::after { content: '\02CA'; } /* ˊ 阳平 */
.py-vowel.t3 .py-tone::after { content: '\02C7'; } /* ˇ 上声 */
.py-vowel.t4 .py-tone::after { content: '\02CB'; } /* ˋ 去声 */

/* 音节间空格 */
.py-space {
    display: inline-block;
    width: 0.32em;
}

/* 米字格内拼音垂直空间 */
.chengyu-char-pinyin {
    line-height: 1.5;
    min-height: 1.15em;
}

.chengyu-pinyin {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

/* ---- 释义/出处/示例/故事区块 ---- */
.chengyu-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dotted var(--border-soft);
}

.chengyu-section:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.chengyu-section-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chengyu-section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    transform: rotate(45deg);
    border-radius: 1px;
    flex-shrink: 0;
}

.chengyu-section-content {
    font-family: 'Noto Serif SC', 'STSong', 'Songti SC', serif;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.chengyu-example {
    font-style: italic;
    color: var(--text-secondary);
    padding: 12px 18px;
    background: rgba(180, 150, 110, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold-light);
}

.chengyu-story {
    line-height: 2.2;
    text-indent: 2em;
}

/* ---- 首页成语卡片 ---- */
.chengyu-card .poem-card-header {
    flex-wrap: wrap;
    gap: 6px;
}

.chengyu-card .chengyu-pinyin {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-feature-settings: "kern" 1;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
}

.chengyu-card-excerpt {
    font-family: 'LxgwWenKai', 'Noto Serif SC', 'STKaiti', 'KaiTi', serif;
    font-size: 1.2rem;
    line-height: 2.4;
    color: var(--text-secondary);
    padding: 4px 0;
}

.chengyu-card-excerpt p {
    margin: 0;
}

/* 成语卡片操作区 */
.chengyu-card-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chengyu-detail-actions {
    margin-top: 12px;
    text-align: center;
}

.chengyu-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chengyu-copy-btn:hover {
    border-color: var(--gold-light);
    color: var(--accent);
    background: rgba(180, 150, 110, 0.06);
    box-shadow: var(--shadow-sm);
}

.chengyu-copy-btn:active {
    transform: scale(0.96);
}

.chengyu-copy-btn.is-copied {
    border-color: var(--gold-light);
    color: var(--accent);
    background: rgba(180, 150, 110, 0.08);
}

.chengyu-copy-btn svg {
    flex-shrink: 0;
}

/* ---- 成语响应式 ---- */
@media (max-width: 768px) {
    .chengyu-char-cell {
        width: 72px;
        height: 92px;
    }
    .chengyu-char {
        font-size: 2.2rem;
    }
    .chengyu-calligraphy {
        padding: 24px 0 12px;
        margin-bottom: 20px;
    }
    .chengyu-section-content {
        font-size: 0.9rem;
        line-height: 1.9;
    }
}

@media (max-width: 420px) {
    .chengyu-char-cell {
        width: 60px;
        height: 80px;
    }
    .chengyu-char {
        font-size: 1.8rem;
    }
    .chengyu-char-grid {
        gap: 8px;
    }
    .chengyu-calligraphy {
        padding: 18px 0 10px;
        margin-bottom: 16px;
    }
    .chengyu-section-content {
        font-size: 0.85rem;
        line-height: 1.8;
    }
}

/* ========== 响应式 (平板) ========== */
@media (max-width: 768px) {
    .main-container {
        padding: 28px 16px 60px;
        max-width: 100%;
    }
    .site-header {
        padding: 30px 10px 20px;
    }
    .site-title {
        font-size: clamp(2rem, 7vw, 2.8rem);
        letter-spacing: 0.08em;
    }
    .site-subtitle {
        font-size: 0.82rem;
        letter-spacing: 0.14em;
    }

    .nav-menu {
        gap: 2px;
    }
    .nav-menu a {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .poem-card {
        padding: 28px 22px 26px;
        border-radius: var(--radius-md);
        margin-bottom: 24px;
    }
    .poem-card .card-border-accent {
        width: 2px;
        height: 40%;
        left: 0;
    }
    .post-thumbnail {
        margin: -28px -22px 18px;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .poem-title {
        font-size: 1.3rem;
    }
    .poem-author {
        font-size: 0.8rem;
    }
    .poem-dynasty {
        font-size: 0.7rem;
        padding: 2px 7px;
    }
    .poem-content {
        font-size: 1.05rem;
        line-height: 2.2;
        letter-spacing: 0.03em;
    }
    .poem-card-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    .type-filter-bar {
        margin: 16px 0 20px;
        gap: 1px;
    }
    .type-filter-btn {
        font-size: 0.74rem;
        padding: 5px 10px;
    }
    .entry-content {
        font-size: 1.05rem;
        line-height: 2;
    }

    .section-divider {
        margin: 14px 0 22px;
        gap: 8px;
    }
    .section-divider .divider-line {
        width: 28px;
    }
    .header-ornament-top .line {
        width: 32px;
    }

    .bg-orb.orb-1 { width:180px; height:180px; top:-10%; left:-10%; }
    .bg-orb.orb-2 { width:150px; height:150px; bottom:10%; right:-8%; }
    .bg-orb.orb-3 { width:120px; height:120px; }
    .bg-orb.orb-4 { width:100px; height:100px; }

    .code-block-wrapper pre {
        padding: 16px 18px;
        font-size: 0.8rem;
    }
    .code-block-header {
        padding: 6px 14px;
    }
    .code-block-lang {
        font-size: 0.66rem;
    }
    .code-block-copy {
        font-size: 0.66rem;
        padding: 3px 10px;
    }

    .riqian-card .riqian-body,
    .riqian-single .riqian-body {
        font-size: 1.15rem;
        line-height: 2.2;
    }
    .riqian-image-wrap {
        margin: 18px 0 14px;
        padding: 4px;
    }
    .riqian-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
    }
}

/* ========== 响应式 (手机) ========== */
@media (max-width: 420px) {
    .poem-card {
        padding: 22px 16px 20px;
        border-radius: 10px;
        margin-bottom: 18px;
    }
    .poem-card .card-border-accent {
        height: 30%;
    }
    .post-thumbnail {
        margin: -22px -16px 14px;
        border-radius: 10px 10px 0 0;
    }

    .poem-title {
        font-size: 1.15rem;
    }
    .poem-content {
        font-size: 0.95rem;
        line-height: 2;
    }
    .poem-card-header {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
    .poem-card-meta {
        margin-left: 0;
        white-space: normal;
        flex-wrap: wrap;
    }
    .poem-tags {
        gap: 5px;
        margin-top: 12px;
        padding-top: 8px;
    }
    .poem-tag {
        font-size: 0.7rem;
        padding: 3px 9px;
    }
    .entry-content {
        font-size: 0.95rem;
        line-height: 2;
    }

    .type-filter-bar {
        margin: 10px 0 14px;
        gap: 0;
    }
    .type-filter-btn {
        font-size: 0.68rem;
        padding: 4px 8px;
    }
    .type-filter-btn::after {
        bottom: -9px;
    }

    .code-block-wrapper pre {
        padding: 14px 14px;
        font-size: 0.76rem;
        line-height: 1.65;
    }
    .code-block-header {
        padding: 5px 12px;
    }
    .code-block-lang {
        font-size: 0.64rem;
    }
    .code-block-copy {
        font-size: 0.64rem;
        padding: 2px 8px;
    }

    .riqian-card .riqian-body,
    .riqian-single .riqian-body {
        font-size: 1.05rem;
        line-height: 2;
    }
    .riqian-btn {
        padding: 7px 14px;
        font-size: 0.78rem;
        gap: 5px;
    }
    .riqian-copy-toast {
        bottom: 80px;
        padding: 10px 24px;
        font-size: 0.82rem;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .nav-menu a {
        padding: 5px 14px;
        font-size: 0.82rem;
    }

    .comments-area {
        margin-top: 32px;
    }
    .comment-list .comment {
        padding: 14px 16px;
    }

    .nav-links {
        gap: 4px;
    }
    .nav-links .page-numbers {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.78rem;
    }
}

/* ========== 跳转顶部按钮 ========== */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: max(20px, calc(50vw - 445px));
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    pointer-events: none;
}
.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.scroll-to-top:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(180, 150, 110, 0.06);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.scroll-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.scroll-to-top:active {
    transform: translateY(0) scale(0.92);
}
@media (max-width: 960px) {
    .scroll-to-top {
        right: 20px;
    }
}
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        width: 40px;
        height: 40px;
    }
}

/* ========== 阅读统计 ========== */
.reading-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dotted var(--border-soft);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ========== 打印样式 ========== */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    .bg-decoration,
    .bg-orb,
    .ink-dot,
    .main-navigation,
    .post-navigation,
    .comments-area,
    .comment-respond,
    .scroll-to-top,
    .riqian-actions,
    .riqian-copy-toast {
        display: none;
    }
    .poem-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
        animation: none;
    }
    .poem-card:hover {
        transform: none;
        box-shadow: none;
    }
    .main-container {
        max-width: 100%;
        padding: 20px;
    }
    .site-header {
        padding: 20px 0;
    }
}
