/* --- 1. 基础容器：解锁裁剪，开启视野 --- */
details {
    background: rgba(252, 249, 242, 0.9);
    border: 1.5px solid #b4c6a6;
    border-radius: 15px;
    margin: 10px 0;
    padding: 2px;
    /* 核心修改：取消隐藏，防止裁剪掉滑动条或表格边缘 */
    overflow: visible !important; 
    transition: all 0.3s ease;
    box-shadow: 2px 4px 8px rgba(95, 116, 100, 0.08);
}

details[open] {
    background: #ffffff;
    border-color: #8e9775;
}

/* --- 2. 标题栏：清新自然风格 --- */
summary {
    padding: 12px 15px;
    font-weight: 600;
    color: #5f7464;
    cursor: pointer;
    list-style: none;
    outline: none;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(180, 198, 166, 0.2), transparent);
}

summary::-webkit-details-marker { display: none; }
summary::before {
    content: '🌾'; /* 改为麦穗，更田园 */
    font-size: 14px;
    margin-right: 8px;
}

/* --- 3. 核心滑动区：这是能滑动的关键 --- */
.memory-scroll-container {
    width: 100%;
    /* 开启横向滚动，但不影响纵向显示 */
    overflow-x: auto !important; 
    overflow-y: hidden;
    /* 解决移动端滑动生涩问题 */
    -webkit-overflow-scrolling: touch; 
    margin: 8px 0;
    padding-bottom: 5px; /* 给滚动条留点呼吸空间 */
}

/* 强制让表格变长，否则没法滑动 */
.memory-table {
    width: 100%;
    min-width: 450px; /* 重点：手机屏幕一般是375px-414px，设为450px保证必出滚动条 */
    border-collapse: collapse;
    font-size: 12px;
    background: #fdfcf8;
    border: 1px solid #d9c5b2;
    border-radius: 8px;
}

.memory-table th {
    background: #8e9775;
    color: #fff;
    padding: 10px 4px;
    white-space: nowrap; /* 防止表头换行挤死 */
}

.memory-table td {
    border-bottom: 1px dotted #d9c5b2;
    padding: 8px 4px;
    color: #6b5e4f;
    text-align: center;
}

/* --- 4. 数值进度条：森系配色 --- */
.stat-row {
    display: flex;
    align-items: center;
    padding: 6px 15px;
    gap: 10px;
}

.stat-row span {
    font-size: 13px;
    color: #7d6e5d;
    min-width: 60px;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: #e8eadd;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a8c69f, #7fb069);
    transition: width 0.6s ease-in-out;
}

/* 不同属性配色 */
.stat-row:nth-child(1) .progress-fill { background: #e5989b; } /* 好感-落樱 */
.stat-row:nth-child(2) .progress-fill { background: #a2d2ff; } /* 信任-晴空 */
.stat-row:nth-child(3) .progress-fill { background: #b5838d; } /* 欲望-晚霞 */

/* 文本修饰 */
details p { margin: 8px 15px !important; font-size: 14px; color: #555; }