

        /* ===============================
           根容器
        ================================ */
        ai {
            display: block;
            max-width: 900px;
            margin: 0 auto;
            padding: 18px;
            color: #3b3128;
            font-family: "Noto Serif SC", "Microsoft YaHei", serif;
            background: linear-gradient(135deg, rgba(255,250,240,.95), rgba(235,225,205,.85));
            border-radius: 24px;
        }

        /* ===============================
           隐藏推演链
        ================================ */
        ai details.cot {
            display: none;
        }

        /* ===============================
           时间地点
        ================================ */
        ai hd {
            display: block;
            padding: 14px 20px;
            margin-bottom: 18px;
            border-radius: 16px;
            background: linear-gradient(120deg, rgba(255,255,255,.8), rgba(230,220,200,.6));
            border: 1px solid rgba(120,90,50,.15);
            box-shadow: 0 8px 22px rgba(70,50,30,.08);
            color: #76604a;
        }

        /* ===============================
           正文
        ================================ */
        ai p {
            line-height: 1.9;
            letter-spacing: .04em;
        }

        /* =================================================
           微信模拟区域
        ================================================= */
        ai wx {
            display: block;
            margin: 25px 0;
            padding: 18px;
            border-radius: 22px;
            background: linear-gradient(145deg, rgba(250,248,240,.95), rgba(225,220,205,.75));
            box-shadow: 0 12px 30px rgba(60,45,25,.12);
        }

        ai wxh {
            display: block;
            text-align: center;
            padding-bottom: 15px;
            font-weight: bold;
            color: #594632;
        }

        ai wm {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin: 18px 0;
            animation: msgIn .35s ease-out;
        }

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

        /* 玩家消息：行反向，同时确保头像在右边 */
        ai wm.r {
            flex-direction: row-reverse;
        }

        /* 修正头像与消息的顺序：头像排第一（靠右），消息排第二（靠左） */
        ai wm.r wa {
            order: 1;
        }
        ai wm.r wb {
            order: 2;
        }

        ai wa {
            width: 42px;
            height: 42px;
            flex-shrink: 0;
            border-radius: 50%;
            background-size: cover;
            background-position: center;
            border: 2px solid rgba(255,255,255,.8);
            box-shadow: 0 5px 15px rgba(0,0,0,.15);
        }

        ai wb {
            flex: 1;
            min-width: 0;
        }

        ai wn {
            display: inline-block;
            margin-bottom: 4px;
            color: #94795c;
            font-size: 13px;
        }

        ai wt {
            color: #aaa;
            font-size: 11px;
        }

        ai wc {
            display: block;
            width: fit-content;
            max-width: 90%;
            padding: 12px 15px;
            line-height: 1.75;
            word-break: break-word;
            overflow-wrap: anywhere;
            border-radius: 16px;
            background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(240,232,215,.85));
            box-shadow: 0 5px 18px rgba(70,50,30,.08);
        }

        /* 玩家消息的文字块右对齐（昵称和时间靠右） */
        ai wm.r wb {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        /* 玩家气泡颜色 */
        ai wm.r wc {
            background: linear-gradient(145deg, rgba(220,240,210,.95), rgba(190,220,180,.8));
            text-align: left; /* 气泡内文字仍然左对齐，符合微信习惯 */
        }

        ai wi img {
            max-width: 100%;
            margin-top: 8px;
            border-radius: 15px;
            box-shadow: 0 8px 20px rgba(0,0,0,.15);
        }

        ai ws {
            display: block;
            text-align: center;
            color: #999;
            font-size: 13px;
        }

        /* =================================================
           details 折叠栏
        ================================================= */
        ai details {
            margin: 16px 0;
            overflow: hidden;
            border-radius: 20px;
            border: 1px solid rgba(100,80,50,.15);
            background: linear-gradient(145deg, rgba(255,255,255,.8), rgba(235,225,210,.55));
            box-shadow: 0 12px 25px rgba(70,50,30,.08);
            transition: .3s;
        }

        ai details[open] {
            box-shadow: 0 18px 35px rgba(60,45,25,.12);
        }

        ai details[open] > * {
            animation: detailShow .3s ease;
        }

        @keyframes detailShow {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        ai summary {
            cursor: pointer;
            padding: 16px 20px;
            font-weight: bold;
            color: #4d3928;
            background: linear-gradient(120deg, rgba(255,255,255,.7), rgba(220,210,190,.5));
            list-style: none;
        }
        ai summary::-webkit-details-marker {
            display: none;
        }
        ai summary::after {
            content: "▾";
            float: right;
            opacity: .6;
        }
        ai details[open] summary::after {
            transform: rotate(180deg);
        }

        /* =================================================
           信息条布局
        ================================================= */
        ai d {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 9px 20px;
            line-height: 1.75;
            flex-wrap: wrap;
        }

        ai d b {
            flex: 0 0 82px;
            color: #76583b;
        }

        /* =================================================
           基础状态 f
        ================================================= */
        ai d f {
            display: inline-block;
            padding: 5px 11px;
            border-radius: 10px;
            color: #777;
            background: linear-gradient(135deg, rgba(245,240,225,.85), rgba(225,215,195,.55));
        }

        /* 当前状态 now */
        ai d f.now {
            color: #874d38;
            background: linear-gradient(135deg, rgba(255,230,210,.95), rgba(245,195,165,.7));
            border-left: 3px solid rgba(180,100,60,.5);
        }

        /* =================================================
           主角档案风
        ================================================= */
        ai details:nth-of-type(1) {
            background: linear-gradient(135deg, rgba(255,250,235,.95), rgba(230,215,185,.75));
        }

        ai details:nth-of-type(1) d {
            border-bottom: 1px dashed rgba(130,100,60,.15);
        }

        /* =================================================
           仪表盘
        ================================================= */
        ai details:nth-of-type(2) {
            background: linear-gradient(135deg, rgba(230,245,245,.85), rgba(200,225,220,.65));
        }

        ai bar {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 14px;
            background: linear-gradient(90deg, rgba(255,255,255,.8), rgba(210,220,210,.8));
        }

        /* =================================================
           NPC 卡片
        ================================================= */
        ai p.n {
            padding: 15px;
            border-radius: 18px;
            background: linear-gradient(140deg, rgba(250,245,235,.85), rgba(225,215,200,.65));
        }

        /* =================================================
           记忆区 手账风
        ================================================= */
        ai m {
            position: relative;
            display: block;
            margin: 18px 24px;
            padding: 16px 20px;
            border-radius: 6px;
            background: linear-gradient(135deg, rgba(255,250,220,.95), rgba(240,225,175,.8));
            box-shadow: 5px 8px 20px rgba(70,50,20,.12);
            transform: rotate(-.6deg);
        }

        ai m:nth-child(even) {
            background: linear-gradient(135deg, rgba(220,240,245,.9), rgba(190,220,230,.75));
            transform: rotate(.7deg);
        }

        ai m::before {
            content: "✦";
            position: absolute;
            top: -8px;
            left: 12px;
            color: #b58a52;
        }

        /* =================================================
           推荐区域
        ================================================= */
        ai p.a,
        ai p.b,
        ai p.c,
        ai p.d {
            padding: 15px 22px;
            margin: 12px 18px;
            border-radius: 14px;
            background: linear-gradient(135deg, rgba(255,255,255,.8), rgba(230,225,215,.65));
            box-shadow: 0 8px 18px rgba(60,50,30,.08);
            transition: .25s;
        }

        ai p.a {
            border-left: 3px solid #91a786;
        }

        ai p.b {
            border-left: 3px solid #c29b55;
        }

        ai p.c {
            border-left: 3px solid #b66a68;
        }

        ai p.d {
            border-left: 3px solid #7b82b5;
        }

        ai p.a:hover,
        ai p.b:hover,
        ai p.c:hover,
        ai p.d:hover {
            transform: translateX(8px);
        }

        /* =====================================
           微信手机比例优化
        ===================================== */
        ai wx {
            padding: 12px;
            border-radius: 18px;
        }

        /* 消息行 */
        ai wm {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin: 12px 0;
        }

        /* 头像缩小 */
        ai wa {
            width: 34px;
            height: 34px;
            border-width: 1.5px;
        }

        /* 内容区域 */
        ai wb {
            max-width: 78%;
        }

        /* 昵称 */
        ai wn {
            font-size: 12px;
            margin-bottom: 2px;
        }

        /* 时间 */
        ai wt {
            font-size: 10px;
        }

        /* 气泡 */
        ai wc {
            max-width: 100%;
            padding: 9px 12px;
            border-radius: 14px;
            font-size: 14px;
            line-height: 1.65;
            word-break: break-all;
        }

        /* 玩家消息 */
        ai wm.r {
            flex-direction: row-reverse;
        }

        /* 玩家昵称、时间、气泡靠右（已在前面定义） */
        ai wm.r wb {
            align-items: flex-end;
        }

        /* 玩家气泡 */
        ai wm.r wc {
            text-align: left;
        }

        /* 图片消息 */
        ai wi img {
            max-width: 220px;
        }

        /* 手机进一步压缩 */
        @media(max-width:600px) {
            ai {
                padding: 10px;
            }
            ai wx {
                margin: 15px -4px;
            }
            ai wa {
                width: 32px;
                height: 32px;
            }
            ai wb {
                max-width: 82%;
            }
            ai wc {
                font-size: 13px;
                padding: 8px 11px;
            }
        }

        /* =====================================
           主角档案增强
        ===================================== */
        ai details:nth-of-type(1) {
            background: linear-gradient(145deg, rgba(255,250,235,.96), rgba(235,220,190,.75));
        }

        ai details:nth-of-type(1) > d {
            margin: 0 12px;
            padding: 7px 14px;
            border-radius: 10px;
        }

        /* 字段 */
        ai details:nth-of-type(1) d b {
            color: #806044;
            font-size: 14px;
        }

        /* 内容 */
        ai details:nth-of-type(1) d f {
            font-size: 13px;
        }

        /* 分区标题 */
        ai d.h {
            margin-top: 12px;
            padding: 8px 18px;
            background: linear-gradient(90deg, rgba(180,140,80,.15), transparent);
            border-radius: 8px;
        }

        /* =====================================
           嵌套 details（记忆区子项）
        ===================================== */
        ai details details {
            margin: 6px 0;
            border-radius: 10px;
            border: 1px solid rgba(160,140,100,.2);
            box-shadow: 0 1px 4px rgba(0,0,0,.04);
            background: rgba(252,248,240,.6);
        }
        ai details details summary {
            padding: 8px 14px;
            font-size: 12px;
            font-weight: 500;
            background: rgba(250,245,230,.7);
            color: #6a5530;
            border-bottom: 1px solid rgba(170,150,100,.2);
        }
        ai details details > *:not(summary) {
            padding: 8px 12px;
        }
/* =====================================
   微信图片消息修复
   防止手机端图片撑开聊天框
===================================== */


/* 图片容器 */

ai wi {

    display:block;

    width:100%;

    max-width:240px;

    margin-top:8px;

    overflow:hidden;

    border-radius:14px;

}



/* 图片本体 */

ai wi img {


    display:block;


    width:100%;


    max-width:100%;


    height:auto;


    max-height:260px;



    object-fit:cover;



    border-radius:14px;



    box-shadow:

    0 6px 18px rgba(0,0,0,.12);


}



/* NPC图片 */

ai wm:not(.r) wi {


    margin-right:auto;


}



/* 玩家图片 */


ai wm.r wi {


    margin-left:auto;


}



/* 手机端 */

@media(max-width:600px){


    ai wi {


        max-width:180px;


    }



    ai wi img {


        max-height:180px;


    }


}