/* ============================================
   1. 全局背景：素雅米白主题
   ============================================ */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c1e9e9]"] {
    display: none !important;
}

html, body {
    background: linear-gradient(145deg, #FCFBF9 0%, #F7F5F0 30%, #FDFCF9 70%, #F2EFE9 100%) !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

#root, .app, main {
    background: transparent !important;
}

/* ============================================
   2. 聊天气泡 & 交互元素
   ============================================ */
[class*="bg-gray-100/90"].relative.inline-block {
    background: #FFFFFF !important;
    border-radius: 20px !important;
    border: 1px solid rgba(200, 190, 180, 0.3) !important;
    border-left: 4px solid #D4C4A8 !important; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    padding: 16px !important;
    margin: 12px 0 !important;
    transition: all 0.25s ease !important;
}

.MuiButtonBase-root.MuiButton-root,
.MuiTypography-root.MuiTypography-body2,
.text-orange-500,
[class*="text-orange-500"] {
    color: #8C7A61 !important;
    font-size: 12.5px !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

/* ============================================
   3. 正文排版 (复古实体书质感)
   ============================================ */
.markdown-body {
    color: #3E2C1C !important;
    font-family: Georgia, 'Times New Roman', 'Noto Serif SC', serif !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

/* ============================================
   4. 全局普通折叠面板 (米白+星芒)
   ============================================ */
details {
    border: 1px solid rgba(200, 190, 180, 0.4) !important;
    background: #FDFCF9 !important;
    border-radius: 16px !important;
    margin: 16px 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

details[open] {
    border-color: #D4C4A8 !important;
    background: #FFFFFF !important;
}

summary {
    padding: 12px 16px !important;
    color: #7A6850 !important;
    font-weight: 600 !important;
    font-family: system-ui, sans-serif !important;
    cursor: pointer !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    background: #F7F5F0 !important;
    border-radius: 16px 16px 0 0 !important;
}

summary::before {
    content: "✨" !important;
    font-size: 14px !important;
    margin-right: 8px !important;
    color: #D4C4A8 !important;
}

details[open] summary::before {
    content: "🌟" !important;
}

/* ============================================
   5. 统一档案卡片样式 (适配米白主题)
   ============================================ */
.status-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

/* 顶部情况的网格排版 */
.info-grid {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    color: #5C3D1C;
}

/* 玩家与角色统一的内部面板 */
.profile-card {
    padding: 16px;
    color: #5C3D1C; /* 深褐色文字，适配米白 */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 统一强调色：暖金/琥珀褐 */
.info-grid b,
.profile-card b {
    color: #A1702D;
    font-weight: 600;
}

/* 角色面板：上图下文布局 */
.char-layout {
    display: block; 
    margin-bottom: 15px;
}
.char-layout img {
    width: 250px; 
    display: block; 
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(161, 112, 23, 0.15); /* 暖色阴影 */
    margin: 0 0 15px 0; 
    border: 1px solid rgba(212, 154, 62, 0.2);
}
.char-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
/* 优雅的虚线分割 */
.char-info p {
    border-bottom: 1px dashed rgba(212, 154, 62, 0.3);
    padding-bottom: 6px;
    margin: 0;
    font-size: 0.95em;
}
.char-info p:last-child {
    border-bottom: none;
}

/* 内部嵌套的折叠面板 (如身体状态)，微调边距和背景 */
.profile-card details {
    margin: 8px 0 0 0 !important;
    background: #F7F5F0 !important;
    box-shadow: none !important;
}
.profile-card details[open] {
    background: #FCFBF9 !important;
}
.profile-card summary {
    background: transparent !important;
    padding: 8px 12px !important;
    font-size: 0.9em !important;
}