/* ===== 角色聊天 - 侧边面板 & 角色卡片 ===== */
/* 侧边面板 */
.side-panel {
    position: fixed; top: 0; right: -380px;
    width: 380px; height: 100vh; background: var(--bg2);
    border-left: 1px solid var(--border); z-index: 100;
    transition: right 0.3s ease; display: flex; flex-direction: column;
}
.side-panel.open { right: 0; }
.side-panel .panel-header { display: flex; align-items: center; }
.side-panel .panel-header .btn-sm {
    padding: 4px 10px; font-size: 0.8rem; min-height: 28px;
}
.side-panel .panel-header h3 { font-size: 1rem; }
.side-panel .panel-body { flex: 1; overflow-y: auto; padding: 16px; }

/* 遮罩层 */
.overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
}
.side-panel.open + .overlay,
.overlay.active { display: block; }

/* 角色卡片 */
.char-card {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px; margin-bottom: 12px;
    transition: border-color 0.2s;
}
.char-card.active {
    border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary);
}
.char-card-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.char-card-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg2); display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; overflow: hidden; flex-shrink: 0;
}
.char-card-avatar img {
    width: 48px; height: 48px; object-fit: cover; border-radius: 50%;
    display: block; flex-shrink: 0; max-width: 48px; max-height: 48px;
}
.char-card-name { font-weight: 700; font-size: 0.95rem; }
.char-card-expand {
    font-size: 0.75rem; color: var(--text-dim); cursor: pointer;
    margin-top: 4px; user-select: none;
}
.char-card-expand:hover { color: var(--primary); }
.char-card-details {
    display: none; border-top: 1px solid var(--border);
    padding-top: 10px; margin-top: 8px;
}
.char-card-details.open { display: block; }
.char-card-info { margin-bottom: 10px; }
.info-row {
    font-size: 0.8rem; color: var(--text-dim); margin-bottom: 3px;
}
.info-row.locked { color: var(--text-dim); opacity: 0.4; font-style: italic; }
.info-row.unlocked { color: var(--text); }

/* 新发现通知 */
.new-discovery {
    background: rgba(139,92,246,0.15); border: 1px solid var(--primary);
    border-radius: 8px; padding: 8px 10px; margin-bottom: 10px;
    font-size: 0.78rem; color: var(--text);
}
.new-discovery-title {
    font-size: 0.72rem; color: var(--accent); margin-bottom: 4px; font-weight: 600;
}

/* 情感指标 */
.stat-row { margin-bottom: 14px; }
.stat-label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 4px; }
.stat-bar { height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.stat-bar .fill { height: 100%; border-radius: 4px; transition: width 0.4s; }
.stat-bar .fill.high { background: var(--success); }
.stat-bar .fill.mid { background: var(--accent); }
.stat-bar .fill.low { background: var(--danger); }

/* 系统消息 */
.sys-msg {
    text-align: center; font-size: 0.75rem; color: var(--text-dim); padding: 4px 0;
}
