ai {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #6a4a4f;
    line-height: 1.6;
    font-size: 14px;
}

/* 顶部状态/时间地点 */
ai hd {
    align-self: center;
    background: linear-gradient(135deg, #ffffff, #ffe6ea);
    color: #d46a7e;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.3);
    border: 1px solid #fff0f3;
    letter-spacing: 1px;
}

/* 正文容器：若平台不支持text标签，此处作为容错也可兼容markdown文本块 */
ai text {
    display: block;
    padding: 0 4px;
    text-align: justify;
}

/* 状态栏主容器 */
ai details {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ffd1dc;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(255, 192, 203, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 展开按钮/标题 */
ai summary {
    font-weight: bold;
    color: #e06c81;
    cursor: pointer;
    padding-bottom: 8px;
    border-bottom: 2px dotted #ffc0cb;
    margin-bottom: 10px;
    font-size: 15px;
    outline: none;
    user-select: none;
}

/* 隐藏系统默认的三角形 */
ai summary::-webkit-details-marker {
    display: none;
}

/* 角色与记忆信息块容器 */
ai p {
    margin: 0 0 12px 0;
    padding: 10px;
    background: linear-gradient(120deg, #fffafb, #ffffff);
    border-radius: 8px;
    border-left: 3px solid #ffb6c1;
    position: relative;
}
ai p:last-child {
    margin-bottom: 0;
}

/* 利用伪元素读取属性作为小标题（主角/NPC/记忆） */
ai p::before {
    content: attr(t);
    display: inline-block;
    font-size: 11px;
    color: #ffffff;
    background: #ffb6c1;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 1px 3px rgba(255, 182, 193, 0.5);
}

/* 姓名高亮 */
ai f {
    display: block;
    font-weight: bold;
    color: #d85a73;
    font-size: 15px;
    margin-bottom: 6px;
}

/* 状态字段排版 */
ai d {
    display: inline-block;
    margin: 0 6px 6px 0;
    font-size: 13px;
    color: #8c6a70;
    background: #ffffff;
    border: 1px solid #ffe6ea;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* 记忆区的特殊修饰 */
ai p[t="记忆"] d {
    display: block;
    border: none;
    background: transparent;
    padding: 2px 4px;
    margin-bottom: 4px;
    border-bottom: 1px dashed #ffe6ea;
    border-radius: 0;
}
ai p[t="记忆"] d:last-child {
    border-bottom: none;
}

/* Hover交互微动效 */
ai d:hover {
    background: #fff0f3;
    transform: translateY(-1px);
    border-color: #ffb6c1;
    color: #c44d65;
}