/* ===== 墨韵书香 · 主线故事专用美化 ===== */
/* 风格：东方水墨 · 宣纸底 · 毛笔笔触 · 朱砂印章 · 古典叙事 */

details {
    background: #faf6ed;                /* 仿宣纸色 */
    border: 2px solid #3a3a3a;
    /* 毛笔不规则边框模拟 */
    border-image: linear-gradient(
        to right,
        #2a2a2a 0%, #4a4a4a 15%, #333 30%, #555 45%,
        #2a2a2a 55%, #444 70%, #333 85%, #2a2a2a 100%
    ) 1;
    border-radius: 8px 12px 8px 4px;    /* 微微不对称，仿手工纸边缘 */
    margin: 16px 0;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 0 20px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    font-family: 'KaiTi', '楷体', 'STKaiti', 'Georgia', 'Times New Roman', serif;
}

/* 宣纸纤维纹理 */
details::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(180, 160, 120, 0.05) 2px,
        rgba(180, 160, 120, 0.05) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* 角落印章装饰 */
details::after {
    content: "章";
    position: absolute;
    bottom: 10px; right: 14px;
    font-size: 1.2rem;
    color: #c04040;
    opacity: 0.5;
    font-family: 'KaiTi', serif;
    border: 1.5px solid #c04040;
    padding: 2px 5px;
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 0;
}

details[open] {
    border-image: linear-gradient(
        to right,
        #1a1a1a 0%, #3a3a3a 20%, #2a2a2a 40%, #4a4a4a 60%,
        #2a2a2a 70%, #3a3a3a 85%, #1a1a1a 100%
    ) 1;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.05);
}

summary {
    cursor: pointer;
    padding: 16px 24px;
    font-size: 1rem;
    color: #f0e8d8;
    user-select: none;
    list-style: none;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(160deg, #2a2a2a, #1a1a1a);
    /* 毛笔笔触的标题背景 */
    background: #2a2a2a;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 4px rgba(0,0,0,0.5);
    border-bottom: 2px solid #555;
    text-transform: uppercase;
}

/* 标题栏的毛笔飞白效果 */
summary::after {
    content: "";
    position: absolute;
    bottom: 0; left: 5%;
    width: 90%; height: 2px;
    background: linear-gradient(90deg, transparent, #8a8a8a, transparent);
    opacity: 0.6;
}

summary:hover {
    background: #333;
    text-shadow: 0 0 6px rgba(255, 220, 180, 0.6);
}

summary::-webkit-details-marker { display: none; }

summary::before {
    content: "🏮";                      /* 灯笼，中国风 */
    font-size: 1rem;
    filter: drop-shadow(0 0 3px rgba(255,200,100,0.5));
}

details[open] summary {
    border-bottom-color: #666;
}

/* ---------- 故事内容区（宣纸色） ---------- */
details div, details .panel, details .story-content {
    color: #2a2a2a;
    padding: 22px 24px;
    line-height: 1.9;
    font-size: 0.9rem;
    background: rgba(250, 246, 237, 0.85);
    backdrop-filter: blur(2px);
    border-top: 1px dashed #999;
    position: relative;
    z-index: 1;
    text-align: justify;
    text-indent: 2em;
}

details div p:first-child,
details .story-content p:first-child {
    text-indent: 0;
}

/* 首字下沉（墨色） */
.story-dropcap::first-letter {
    font-size: 2.5em;
    float: left;
    line-height: 0.8;
    margin-right: 6px;
    color: #2a2a2a;
    font-weight: bold;
}

/* 强调文字 —— 朱砂色 */
.story-em {
    color: #b03030;
    font-style: italic;
    border-bottom: 1px dotted #999;
}

/* 分割线 —— 仿毛笔线条 */
.divider-story {
    height: 2px;
    background: linear-gradient(90deg, transparent, #555, #999, #555, transparent);
    margin: 18px 0;
    position: relative;
}
.divider-story::after {
    content: "▪";
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    color: #2a2a2a;
    font-size: 0.8rem;
    background: #faf6ed;
    padding: 0 8px;
}

/* 标记 —— 仿落款 */
.story-meta {
    font-size: 0.75rem;
    color: #666;
    text-align: right;
    margin-top: 12px;
    font-style: italic;
    border-top: 1px solid #ccc;
    padding-top: 8px;
}