/* ===== 思维链锁定 - 用户无法打开 ===== */
details:has(> summary:first-child > .think-lock),
details:has(think) {
    pointer-events: none;
    user-select: none;
}
details summary:has(~ think),
details:has(think) > summary {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
    font-style: italic;
}
details:has(think) > summary::after {
    content: " 🔒";
}

/* ===== 顶部氛围栏 ===== */
top {
    display: block;
    text-align: center;
    padding: 8px 16px;
    margin: 8px 0 12px 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,105,135,0.12), rgba(180,100,255,0.12));
    border: 1px solid rgba(255,105,135,0.25);
    font-size: 0.85em;
    color: #ffb6c1;
    letter-spacing: 0.5px;
}

/* ===== 正文区域 ===== */
text {
    display: block;
    line-height: 1.85;
    padding: 4px 0;
    font-size: 1em;
    color: #e8e8e8;
}
text p {
    text-indent: 2em;
    margin: 0.6em 0;
}

/* ===== 状态面板通用 ===== */
.status-panel {
    padding: 10px 14px;
    font-size: 0.88em;
    line-height: 1.7;
    color: #d4d4d4;
}
.status-panel strong {
    color: #ffb6c1;
    font-size: 0.9em;
}

/* ===== 身体状况面板 ===== */
.body-status {
    border-left: 3px solid rgba(255,105,135,0.4);
    padding-left: 16px;
}

/* ===== Details/Summary 通用样式 ===== */
details {
    margin: 6px 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(30,30,40,0.6);
    backdrop-filter: blur(4px);
}
details summary {
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    color: #ffc1e3;
    background: linear-gradient(90deg, rgba(255,105,135,0.08), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}
details summary:hover {
    background: linear-gradient(90deg, rgba(255,105,135,0.18), transparent);
}
details[open] summary {
    border-bottom: 1px solid rgba(255,105,135,0.2);
}

/* ===== 记忆区表格 ===== */
.memory-panel {
    padding: 10px 8px;
    overflow-x: auto;
}
.memory-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
    color: #ccc;
}
.memory-panel th {
    background: rgba(255,105,135,0.15);
    color: #ffb6c1;
    padding: 6px 8px;
    text-align: left;
    font-size: 0.85em;
    border-bottom: 2px solid rgba(255,105,135,0.3);
}
.memory-panel td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
}
.memory-panel tr:hover td {
    background: rgba(255,105,135,0.05);
}
.memory-panel hr {
    border: none;
    border-top: 1px dashed rgba(255,105,135,0.3);
    margin: 10px 0;
}

/* ===== 推荐行动 ===== */
.actions {
    margin: 12px 0 4px 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(100,180,255,0.06), rgba(180,100,255,0.06));
    border: 1px solid rgba(100,180,255,0.15);
    font-size: 0.88em;
    color: #b8d4ff;
}
.actions strong {
    color: #8ecfff;
}

/* ===== 亮色模式适配（网页端） ===== */
@media (prefers-color-scheme: light) {
    top {
        background: linear-gradient(135deg, rgba(255,105,135,0.08), rgba(180,100,255,0.08));
        color: #c44569;
    }
    text {
        color: #2d2d2d;
    }
    .status-panel {
        color: #444;
    }
    .status-panel strong {
        color: #c44569;
    }
    details {
        background: rgba(255,255,255,0.7);
        border-color: rgba(0,0,0,0.08);
    }
    details summary {
        color: #c44569;
        background: linear-gradient(90deg, rgba(255,105,135,0.05), transparent);
    }
    .memory-panel table {
        color: #555;
    }
    .memory-panel th {
        background: rgba(255,105,135,0.1);
        color: #c44569;
    }
    .actions {
        background: linear-gradient(135deg, rgba(100,180,255,0.04), rgba(180,100,255,0.04));
        color: #3a6fa5;
        border-color: rgba(100,180,255,0.12);
    }
    .actions strong {
        color: #2980b9;
    }
}