/* ===== 沉木古卷 · 主线故事专用美化 ===== */
/* 风格：深棕木质 · 暗金纹饰 · 仿古纸底 · 沉稳大气 */

details {
    background: #f5f0e6;                /* 仿古纸底 */
    border: 2px solid #5a4a3a;
    border-radius: 4px 12px 4px 4px;    /* 微微不对称，仿木牍 */
    margin: 16px 0;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(30, 20, 10, 0.3),
        inset 0 0 20px rgba(80, 60, 30, 0.08);
    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 3px,
        rgba(140, 110, 70, 0.04) 3px,
        rgba(140, 110, 70, 0.04) 6px
    );
    pointer-events: none;
    z-index: 0;
}

/* 角落暗金纹样 */
details::after {
    content: "¤";
    position: absolute;
    bottom: 12px; right: 16px;
    font-size: 1.4rem;
    color: #8a7a5a;
    opacity: 0.4;
    font-family: serif;
    pointer-events: none;
    z-index: 0;
    transform: rotate(10deg);
}

details[open] {
    border-color: #4a3a2a;
    box-shadow:
        0 6px 16px rgba(30, 20, 10, 0.4),
        inset 0 0 30px rgba(80, 60, 30, 0.1);
}

summary {
    cursor: pointer;
    padding: 16px 24px;
    font-size: 0.95rem;
    color: #e8dcc8;
    user-select: none;
    list-style: none;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
    border-bottom: 2px solid #6a5a4a;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 4px rgba(0,0,0,0.6);
    text-transform: uppercase;
}

/* 标题栏木纹光泽 */
summary::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #8a7a5a, transparent);
    opacity: 0.6;
}

summary:hover {
    background: linear-gradient(180deg, #5a4a3a 0%, #4a3a2a 100%);
    color: #f0e8d0;
    text-shadow: 0 0 6px rgba(200, 180, 120, 0.5);
}

summary::-webkit-details-marker { display: none; }

summary::before {
    content: "🏮";                      /* 沉稳灯笼 */
    font-size: 1rem;
    filter: drop-shadow(0 0 3px rgba(200,160,80,0.5));
}

details[open] summary {
    border-bottom-color: #7a6a5a;
}

/* ---------- 故事内容区 ---------- */
details div, details .panel, details .story-content {
    color: #3a2a1a;
    padding: 22px 24px;
    line-height: 1.9;
    font-size: 0.9rem;
    background: rgba(245, 240, 230, 0.9);
    backdrop-filter: blur(2px);
    border-top: 1px dashed #8a7a6a;
    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: 8px;
    color: #6a5a3a;
    font-weight: bold;
}

/* 强调文字 —— 赭石色 */
.story-em {
    color: #8a5a3a;
    font-style: italic;
    border-bottom: 1px dotted #9a8a6a;
}

/* 分割线 —— 仿铜线 */
.divider-story {
    height: 2px;
    background: linear-gradient(90deg, transparent, #6a5a4a, #9a8a6a, #6a5a4a, transparent);
    margin: 18px 0;
    position: relative;
}
.divider-story::after {
    content: "◆";
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    color: #6a5a4a;
    font-size: 0.8rem;
    background: #f5f0e6;
    padding: 0 8px;
}

/* 标记 —— 仿落款 */
.story-meta {
    font-size: 0.75rem;
    color: #7a6a5a;
    text-align: right;
    margin-top: 12px;
    font-style: italic;
    border-top: 1px solid #b0a090;
    padding-top: 8px;
}