/* 外层总容器 */
ai {
    display: block;
    background: #0f0b1a;
    color: #e0d4f7;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* 折叠面板全局基础 + 左侧彩色侧边条区分模块 */
ai details {
    background: #271c42;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    border: none;
    position: relative;
    box-shadow: 0 0 12px rgba(168, 130, 255, 0.07);
}
/* 给不同模块分配侧边颜色，和截图配色对应 */
ai details.think-block { --side-color: #8690a8; }    /* 思维链：灰蓝 */
ai details:nth-of-type(2) { --side-color: #74b9ff; } /* 当前情况：浅蓝 */
ai details:nth-of-type(3) { --side-color: #ff6b81; } /* 主角信息：红 */
ai details:nth-of-type(4) { --side-color: #c0a0ff; } /* NPC双生女：浅紫 */
ai details:nth-of-type(5) { --side-color: #b07dff; } /* 三十日机制：紫 */
ai details:nth-of-type(6) { --side-color: #ffd369; } /* 脑内剧场：黄 */
ai details:nth-of-type(7) { --side-color: #ff9ed9; } /* 记忆区：粉紫 */
ai details:nth-of-type(8) { --side-color: #76e099; } /* 行动推荐：绿 */

/* 左侧竖条 */
ai details::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--side-color);
}

/* 折叠标题 summary */
ai summary {
    padding: 13px 16px 13px 26px;
    background: #2f224b;
    font-weight: 600;
    color: #e8ddff;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 15px;
    letter-spacing: 0.5px;
}
ai summary::-webkit-details-marker {
    display: none;
}
/* 菱形◆ 前缀，点开旋转90度 */
ai summary::before {
    content: "◆";
    color: var(--side-color);
    margin-right: 9px;
    font-size: 13px;
    display: inline-block;
    transition: transform 0.3s ease;
}
ai details[open] summary::before {
    transform: rotate(90deg);
}
ai details[open] summary {
    border-bottom: 1px solid #3e2d5f;
}

/* hd 顶部场景时间栏 */
ai hd {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    padding: 14px 12px;
    font-size: 16px;
    font-weight: 600;
    color: #f0e6ff;
    letter-spacing: 1px;
    background: linear-gradient(180deg, #2f224b 0%, #271c42 100%);
    margin: 8px 10px;
    border-radius: 10px;
    text-shadow: 0 0 6px rgba(190, 160, 255, 0.2);
}
ai hd span:nth-child(2) {
    color: var(--side-color);
    font-weight: bold;
}

/* article 正文剧情区域 */
ai article {
    padding: 16px 20px;
    background: #271c42;
    border-radius: 10px;
    margin: 10px 0;
    color: #e8ddff;
    line-height: 1.8;
    text-shadow: 0 0 3px rgba(200, 170, 255, 0.1);
}
ai article p {
    margin: 0 0 1em 0;
    text-indent: 2em;
}
ai article p:last-child {
    margin-bottom: 0;
}

/* d 内容行 */
ai d {
    display: block;
    padding: 6px 20px;
    font-size: 14px;
    color: #d9cbf0;
    margin: 4px 0;
}

/* f 标签小框 */
ai f {
    display: inline-block;
    color: #b8a2e0;
    background: #1f1636;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    border: 1px solid #38285a;
}

/* t 区块小标题 */
ai t {
    display: block;
    margin: 12px 20px 6px;
    padding: 3px 0;
    font-size: 14px;
    color: var(--side-color);
    font-weight: 600;
}

/* q 灵魂内心独白 */
ai q {
    display: block;
    margin: 6px 20px 10px;
    padding: 9px 12px;
    background: rgba(180, 140, 255, 0.07);
    border-left: 2px solid var(--side-color);
    border-radius: 0 5px 5px 0;
    font-style: italic;
    color: #d1bfff;
    font-size: 13px;
}

/* n 行动选项按钮 */
ai n {
    display: block;
    padding: 10px 14px;
    margin: 7px 20px;
    background: #2f224b;
    border-radius: 8px;
    border: 1px solid #443366;
    color: #d9cbf0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}
ai n:hover {
    background: #38285a;
    border-color: var(--side-color);
    transform: translateX(3px);
}

/* 分割线 .divider */
ai .divider {
    width: calc(100% - 40px);
    height: 1px;
    background: #443366;
    margin: 12px auto;
}

/* 记忆区表格 */
ai table {
    width: calc(100% - 40px);
    margin: 8px 20px 12px;
    border-collapse: collapse;
    font-size: 13px;
}
ai table th,
ai table td {
    border: 1px solid #443366;
    padding: 8px 10px;
    text-align: left;
    color: #d9cbf0;
}
ai table th {
    background: #2f224b;
    color: #e8ddff;
}
ai table td {
    background: #23193b;
}

/* 高亮加粗 */
ai strong {
    color: var(--side-color);
    font-weight: 600;
}

/* 思维链专属面板微调 */
ai details.think-block summary {
    color: #b4bdd1;
}

