.msg {
    margin-bottom: 14px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: 100%; /* ★ 强制撑满，保证气泡有足够空间 */
}
.msg.user {
    flex-direction: row-reverse;
}

/* ★ 内容容器（时间 + 气泡 + 反馈） */
.msg .msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    max-width: calc(100% - 46px); /* 减去头像的 36px + gap 10px */
}
.msg.user .msg-body {
    align-items: flex-end;
}

/* ★ 圆形头像 */
.msg .msg-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #e6e9ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    user-select: none;
    flex-shrink: 0;
}
.msg .msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.msg.user .msg-avatar   { background: #4f7cff; }


/* ★ 新增：咨询师气泡底色（淡绿色）和头像底色 */
.msg.counselor .bubble {
    background: #f6fbf8;
    border: 1px solid #e2efe8;
    border-top-left-radius: 4px;
    color: #1f2937;
}
.msg.counselor .msg-avatar { background: #10b981; } /* 绿底色 */

/* ★ 这里为了让左右布局不错乱，只要不是 user，其他的都靠左 */
.msg.counselor { flex-direction: row; }

.msg.ai   .msg-avatar   { background: #10a37f; }

.msg .bubble {
    width: auto;
    max-width: 100%;
    word-break: break-word;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14.5px;
    box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
    
    /* ★ 核心修复：强制行高，杜绝多余的空隙 */
    line-height: 1.5;
    display: block;
}

/* ★ 强行清空【用户】气泡内段落的默认 margin，防止被撑高 */
.msg.user .bubble p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit;
}
.msg.user .bubble br {
    display: none; 
}
.msg.user .bubble br:not(:last-child) {
    display: block;
    content: "";
}

/* ★ 针对 AI 和咨询师端的 Markdown 排版恢复（重要） */
.msg.ai .bubble h1,
.msg.ai .bubble h2,
.msg.ai .bubble h3,
.msg.counselor .bubble h1,
.msg.counselor .bubble h2,
.msg.counselor .bubble h3 {
    font-size: 15px;       /* 不要让标题太大，和正文差不多即可 */
    font-weight: 600;
    margin: 12px 0 6px 0;  /* 恢复标题间距 */
    color: #1f2937;
}

/* 恢复段落间距 */
.msg.ai .bubble p,
.msg.counselor .bubble p {
    margin: 6px 0;
    line-height: 1.6;
}

/* ★ 核心修复：如果气泡内只有一个段落（单行文本），强制去掉上下 margin，防止高度撑开 */
.msg .bubble p:only-child {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.5; /* 保持行高紧凑 */
}

/* 清除 Markdown 解析留下的空段落 */
.msg .bubble p:empty {
    display: none !important;
}

.msg.ai .bubble ul,
.msg.ai .bubble ol,
.msg.counselor .bubble ul,
.msg.counselor .bubble ol {
    margin: 6px 0;
    padding-left: 20px;
}

.msg.ai .bubble li,
.msg.counselor .bubble li {
    margin-bottom: 4px;    /* 列表项之间的间距 */
}

/* AI：左上尖角 */
.msg.ai .bubble {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-top-left-radius: 4px;
    color: #232b3d;
}

/* 用户：右上尖角 + 渐变 */
.msg.user .bubble {
    background: linear-gradient(135deg, #4f7cff 0%, #3a63ff 100%);
    color: #fff;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(58, 99, 255, .25);
}

/* ★ 关键修复：反馈条紧紧跟在气泡下方 */
.msg .feedback {
    margin-top: 6px;
    font-size: 12.5px;
    color: #98a2b3;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%; /* 占据 msg-body 的宽度 */
}
.msg.user .feedback { justify-content: flex-end; }
.msg .feedback button {
    border: none;
    background: transparent;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s;
}
.msg .feedback button:hover { background: #eef1f6; }

/* ===== AI 消息里的 Markdown 渲染样式 ===== */
.msg.ai .bubble pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0;
}

.msg.ai .bubble code {
    background: #f1f3f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
    font-family: Consolas, Monaco, "Courier New", monospace;
}

.msg.ai .bubble pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: 13px;
}

/* 表格（AI 有时会用 Markdown 表格） */
.msg.ai .bubble table {
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
    width: 100%;
}
.msg.ai .bubble table th,
.msg.ai .bubble table td {
    border: 1px solid #dee2e6;
    padding: 5px 9px;
}
.msg.ai .bubble table th {
    background: #f8f9fa;
}

/* 引用块 */
.msg.ai .bubble blockquote {
    border-left: 3px solid #0d6efd;
    padding: 4px 12px;
    margin: 8px 0;
    color: #555;
    background: #f8f9fa;
}

/* 列表 */
.msg.ai .bubble ul,
.msg.ai .bubble ol {
    margin: 6px 0;
    padding-left: 22px;
}

/* 段落间距（防止所有内容挤在一起） */
.msg.ai .bubble p {
    margin: 4px 0;
}
.msg.ai .bubble p:first-child { margin-top: 0; }
.msg.ai .bubble p:last-child  { margin-bottom: 0; }

/* 标题 */
.msg.ai .bubble h1,
.msg.ai .bubble h2,
.msg.ai .bubble h3 {
    font-size: 15px;
    margin: 10px 0 6px;
    font-weight: 600;
}

/* 链接 */
.msg.ai .bubble a {
    color: #0d6efd;
    text-decoration: underline;
}

/* 打字光标 */
.typing::after {
    content: '▌';
    animation: blink 1s steps(2, start) infinite;
    color: #0d6efd;
}
@keyframes blink { to { visibility: hidden; } }

/* ===== 知识库来源徽章 ===== */
.msg.ai .bubble .kb-badge {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
    font-size: 12px;
    color: #667085;
}
.msg.ai .bubble .kb-badge span {
    display: inline-block;
    background: #f0f4ff;
    color: #3a63ff;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #dbe5ff;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 系统消息：灰色居中，无气泡 */
.msg.system {
    justify-content: center;
    margin: 8px 0;
}
.msg.system .system-msg {
    display: inline-block;
    font-size: 12px;
    color: #888;
    background: #f1f3f5;
    padding: 4px 12px;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
}
/* 附件气泡 */
.msg .bubble img {
    max-width: 240px;
    max-height: 240px;
    border-radius: 8px;
    display: block;
}
.msg .bubble a[download] {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* 咨询师工作台 - 会话项 active 效果 */
.conv-item-wrap {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.15s;
}
.conv-item-wrap:hover {
    background-color: #f8f9fa;
}
.conv-item-wrap .conv-item.active {
    background-color: #0d6efd;
    color: #fff;
}
.conv-item-wrap .conv-item.active .text-muted,
.conv-item-wrap .conv-item.active small {
    color: #e0e0e0 !important;
}

/* ★★★ 录音状态：兼容所有浏览器的呼吸灯 ★★★ */
/* 同时作用于用户端和咨询师端 */
#btnVoice.recording,
#counselorVoice.recording {
    background-color: #dc3545 !important; 
    color: #fff !important;
    border-color: #dc3545 !important;
    animation: voice-breath-simple 1.2s infinite alternate !important;
}

#btnVoice.recording i,
#counselorVoice.recording i {
    color: #fff !important;
    font-size: 22px !important;
    /* 图标跳动动画 */
    animation: icon-beat-simple 0.5s infinite alternate !important;
}

@keyframes voice-breath-simple {
    0%   { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4), inset 0 0 10px rgba(255,255,255,0.5); background-color: #dc3545; }
    100% { box-shadow: 0 0 0 12px rgba(220, 53, 69, 0), inset 0 0 0 rgba(255,255,255,0); background-color: #e4606d; }
}

@keyframes icon-beat-simple {
    0%   { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* ===== 语音播报按钮 ===== */
.btn-speak {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    padding: 2px 6px;
    vertical-align: middle;
    transition: color 0.15s;
}
.btn-speak:hover {
    color: #0d6efd;
}
.btn-speak[title="停止朗读"] {
    color: #dc3545;
}

.chat-card {
    max-width: 1600px; /* ★ 大屏加宽，不再固定 1200px */
    margin: 0 auto;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 30, 60, .06);
    overflow: hidden;
}

.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid #eef1f6;
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;    /* ★ 小屏时按钮换行到第二行 */
}
.chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2a44;
    flex-shrink: 0;     /* ★ 标题不压缩 */
}

/* ★ 新增：右侧按钮组 */
.chat-header > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.chat-header .btn {
    border-radius: 8px;
    font-size: 13px;
    padding: 5px 12px;
}

.chat-input-bar {
    padding: 12px 16px 16px;
    background: #fff;
    border-top: 1px solid #eef1f6;
}

.chat-input-bar .input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #e6e9ef;
    transition: box-shadow .2s;
    background: #fff;
}
.chat-input-bar .input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(79, 124, 255, .35);
}

#msgInput {
    border: none !important;
    background: #fff !important;
    box-shadow: none !important;
    resize: none;
}
#msgInput:focus { outline: none; box-shadow: none !important; }

#btnAttach, #btnVoice {
    border: none !important;
    background: #f7f8fb !important;
    color: #475467;
    width: 48px;
}

#btnAttach:hover, #btnVoice:hover { background: #eef1f6 !important; }

#sendBtn {
    border: none !important;
    background: linear-gradient(135deg, #4f7cff 0%, #3a63ff 100%) !important;
    color: #fff;
    font-weight: 600;
}
#sendBtn:hover { filter: brightness(1.05); }

/* ===== navbar 菜单 hover 明显化 ===== */

/* 1) 顶部菜单项：悬停加半透明白底 + 白色文字 + 圆角 */
.navbar .navbar-nav .nav-link {
    border-radius: 8px;
    padding: 6px 12px;
    margin: 0 2px;
    transition: background-color .18s, color .18s, transform .18s;
    color: rgba(255, 255, 255, .78);
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, .18);
    color: #fff;
    transform: translateY(-1px);
}

/* 2) 当前激活项：更亮 + 下划线 */
.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .nav-link[aria-current="page"] {
    color: #fff;
    background-color: rgba(255, 255, 255, .14);
    box-shadow: inset 0 -2px 0 0 #ffd166;
}

/* 3) 下拉菜单（系统设置）悬停项：浅灰底 + 深色文字 + 左边蓝条 */
.navbar .dropdown-menu {
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(20, 30, 60, .12);
    padding: 6px;
    min-width: 200px;
}

.navbar .dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    color: #232b3d;
    transition: background-color .15s, color .15s, padding-left .15s;
    position: relative;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: #eef4ff;   /* 浅蓝底 */
    color: #3a63ff;
    padding-left: 18px;          /* 右移一点，动感 */
}

.navbar .dropdown-menu .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: #3a63ff;
    opacity: 0;
    transition: opacity .15s;
}
.navbar .dropdown-menu .dropdown-item:hover::before,
.navbar .dropdown-menu .dropdown-item:focus::before {
    opacity: 1;
}

/* 4) 下拉展开时，触发按钮本身也高亮 */
.navbar .nav-item.dropdown.show > .nav-link {
    background-color: rgba(255, 255, 255, .22);
    color: #fff;
}

/* 5) 用户头像那块悬停也明显一点 */
.navbar .nav-link img {
    transition: transform .18s;
}
.navbar .nav-link:hover img {
    transform: scale(1.08);
}

/* 6) 小屏：toggler 按钮悬停 */
.navbar .navbar-toggler {
    transition: background-color .18s, box-shadow .18s;
    border-radius: 8px;
}
.navbar .navbar-toggler:hover {
    background-color: rgba(255, 255, 255, .18);
}

/* 强制 btn-sm 字号生效（覆盖 .btn 默认 1rem） */
.btn.btn-sm,
.btn-group-sm > .btn {
    --bs-btn-font-size: 0.875rem !important;
    --bs-btn-padding-y: 0.25rem !important;
    --bs-btn-padding-x: 0.5rem !important;
    --bs-btn-border-radius: 0.2rem !important;
    font-size: 0.875rem !important;
    padding: 0.25rem 0.5rem !important;
    line-height: 1.5 !important;
    height: auto !important;
}

/* ============================================================
   手机端：会话列表抽屉
   - ≥768px：不生效，PC 保持原样
   - <768px：抽屉 + 遮罩
   ============================================================ */
@media (max-width: 767.98px) {

    /* ---- 左列：抽屉 ---- */
    .conv-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 84%;
        max-width: 320px;
        background: #fff;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 2px 0 12px rgba(0,0,0,.15);
        padding: 12px;
        overflow-y: auto;
        height: 100% !important;
        max-height: 100% !important;
    }
    .conv-sidebar.open {
        transform: translateX(0);
    }

    /* ---- 遮罩 ---- */
    #sidebarMask {
        display: none;
        position: fixed;
        top: 0; right: 0; bottom: 0; left: 0;
        background: rgba(0,0,0,.35);
        z-index: 1040;
    }
    #sidebarMask.show {
        display: block;
    }

    /* ---- 右列：占满整行 ---- */
    .col-md-10.h-100 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 160px) !important;   /* ★ 关键：绕过 flex 的 height:100% 陷阱 */
        min-height: 400px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    /* ---- 咨询师工作台：高度自适应 ---- */
    .container-fluid > .row.g-3 {
        height: auto !important;          /* 手机端让子元素决定高度 */
        min-height: 0 !important;
        overflow: visible !important;
    }
    #counselorMessages {
        top: 50px;
        bottom: 130px;
    }

    /* ---- 用户侧聊天页 #messages ---- */
    #messages {
        height: calc(100vh - 230px);
        min-height: 55vh;
        padding: 12px;
        margin: 8px;
        scroll-behavior: auto;
    }
    .msg .bubble {
        max-width: 86%;
        font-size: 14.5px;
    }
        max-width: 86%;
        font-size: 14.5px;
    }

    /* ---- 用户侧聊天卡片贴边 ---- */
    .chat-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
    .container.py-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
  
	/* 系统消息变体（终极修复） */
	.system-msg-human {
	    color: #0d6efd !important;
	    background: #e7f1ff !important;
	    border: 1px solid #dbe5ff !important;
	    display: inline-block !important;
	}
	
	/* 终极强制上色 */
		.msg.system .system-msg-human {
		    color: #0d6efd !important;
		    background: #e7f1ff !important;
		    border: 1px solid #dbe5ff !important;
		}
		
	.system-msg-online  { color:#198754 !important; background:#d1e7dd !important; display: inline-block !important; }
	.system-msg-offline { color:#fd7e14 !important; background:#ffe5d0 !important; display: inline-block !important; }
	.system-msg-closed  { color:#dc3545 !important; background:#f8d7da !important; display: inline-block !important; }
	
	/* 导航栏“咨询师工作台”红点角标 → 横向小胶囊 */
	#counselorNavBadge {
	    padding: 0 10px !important;       /* 左右各 10px，横向更长 */
	    min-width: 30px !important;       /* 最小宽度加大 */
	    height: 18px !important;          /* 高度压低 = 细 */
	    line-height: 18px !important;     /* 同步高度 */
	    font-size: 11.5px !important;
	    font-weight: 600 !important;
	    text-align: center !important;
	    color: #fff !important;
	    background-color: #dc3545 !important;
	    border-radius: 999px !important;
	    margin-left: 8px !important;
	    vertical-align: middle !important;
	}
	
	/* 消息上方的时间戳 */
	.msg-time {
	    font-size: 11px;
	    color: #98a2b3;
	    margin: 0 4px 4px 4px;
	    line-height: 1;
	}
	
	/* 用户消息（右侧）时间靠右 */
	.msg.user .msg-time {
	    text-align: right;
	}
	
	/* AI/咨询师消息（左侧）时间靠左 */
	.msg.ai .msg-time,
	.msg.counselor .msg-time {
	    text-align: left;
	}
	
	/* 标红：重大风险 */
	.hl-red {
	    color: #d93025 !important; /* 醒目的正红色 */
	    font-weight: bold;
	    background-color: #fce8e6; /* 淡淡的红底，更显眼 */
	    padding: 0 4px;
	    border-radius: 3px;
	}
	
	/* 标橙：需关注的重点 */
	.hl-orange {
	    color: #e37400 !important; 
	    font-weight: bold;
	}
	
	/* 标绿：良好表现 */
	.hl-green {
	    color: #188038 !important;
	    font-weight: bold;
	}
	
	/* =========================================
	   区分 AI 咨询气泡 与 人工咨询师气泡
	   ========================================= */
	
	/* 1. AI 回答（白底 + 左侧蓝色竖线标识） */
	.msg.ai .bubble {
	    background: #ffffff;
	    border: 1px solid #e6e9ef;
	    border-top-left-radius: 4px;
	    color: #232b3d;
	    position: relative;
	    /* ★ 增加左侧的淡蓝色粗边框，作为 AI 的标识 */
	    border-left: 4px solid #4f7cff; 
	    box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
	}
	
	/* 2. 咨询师/人工回答（极其淡雅的灰绿底 + 柔和绿边） */
	body.in-human-mode .msg.ai .bubble,
	body.in-human-mode .msg.counselor .bubble { /* ★ 加上这一行 */
	    background: #f6fbf8;  /* 几乎接近白色的极淡灰绿底 */
	    border: 1px solid #e2efe8; /* 边框也变成很淡的灰绿 */
	    border-left: 3px solid #86efac; /* 左侧标识线变细到 3px，颜色降饱和 */
	    color: #1f2937; /* 文字恢复深灰色，阅读更舒适 */
	    border-top-left-radius: 4px;
	}
	
	/* =========================================
	   全局滚动穿透与体验优化（终极版）
	   ========================================= */
	
	/* 让内层容器滚到底时，自然把滚轮传递给外层页面，且禁用浏览器的强制拦截 */
	#messages, 
	#counselorMessages,
	.chat-card,
	body {
	    overscroll-behavior-y: auto !important; 
	}
	
	/* 确保聊天框内部垂直滚动不受阻 */
	#messages, 
	#counselorMessages {
	    touch-action: pan-y !important; /* 告诉浏览器：垂直手势直接交给滚动条 */
	}
	
	/* 针对移动端的虚拟键盘与安全区 */
	@supports (padding-bottom: env(safe-area-inset-bottom)) {
	    body {
	        padding-bottom: env(safe-area-inset-bottom);
	    }
	    .chat-input-bar,
	    #counselorInputBar {
	        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
	    }
	}
	
	
	/* ============================================================
	   咨询师工作台输入区专属样式
	   ============================================================ */
	
	/* 1. 强制输入框的按钮没有边框，并统一背景色（和 AI 端对齐） */
	#counselorAttach, #counselorVoice {
	    border: none !important;
	    background: #f7f8fb !important;
	    color: #475467;
	    width: 48px;
	}
	#counselorAttach:hover, #counselorVoice:hover {
	    background: #eef1f6 !important;
	}
	
	/* 2. 让输入框本身完全融入，去掉默认蓝框 */
	#counselorInput {
	    border: none !important;
	    background: #fff !important;
	    box-shadow: none !important;
	    resize: none;
	}
	#counselorInput:focus {
	    outline: none; 
	    box-shadow: none !important; 
	}
	
	/* 3. 让咨询师端的发送按钮和 AI 端一样，拥有渐变蓝 */
	#counselorSend {
	    border: none !important;
	    background: linear-gradient(135deg, #4f7cff 0%, #3a63ff 100%) !important;
	    color: #fff;
	    font-weight: 600;
	}
	#counselorSend:hover { 
	    filter: brightness(1.05); 
	}
	
	/* ============================================================
	   ★ 终极修复：AI 咨询页聊天框高度自适应（PC/大屏）
	   ============================================================ */
	#messages {
	    margin: 12px 16px;
	    /* ★ 把 350px 改成 450px，高度会明显降下来 */
	    height: 60vh; /* ★ 固定占屏幕高度的 60% 左右 */
        min-height: 400px;
	    
	    overflow-y: auto;
	    padding: 20px;
	    background: #f7f8fb;
	    border-radius: 12px;
	    scroll-behavior: auto;
	    overscroll-behavior: auto;
	    transition: background-color 0.2s, outline 0.2s;
	    
	    flex: 1 0 auto !important; 
	}
	
	/* 给页面底部留出安全边距，确保版权信息不被遮挡 */
	.container.py-4 {
	    padding-bottom: 20px !important; /* 可以根据需要调整到 50px 或 60px */
	}
	
	
	/* ============================================================
	   ★ 修改输入框 placeholder 的字体大小和颜色
	   ============================================================ */
	
	/* 针对 AI 咨询端 (#msgInput) */
	#msgInput::placeholder {
	    font-size: 14px; /* 这里改大小，比如 13px 或 14px */
	    color: #a0aabf;  /* 文字颜色可以稍微调淡一点，看起来更高级 */
	}
	
	/* 针对 咨询师端 (#counselorInput) */
	#counselorInput::placeholder {
	    font-size: 14px; 
	    color: #a0aabf;  
	}
	
	/* 自定义人工咨询界面会话列表标题颜色 */
	.text-my-green {
	    color: #198754 !important; /* 绿色 */
	    font-weight: bold;
	}
	.text-my-blue {
	    color: #0d6efd !important; /* 蓝色 */
	    font-weight: bold;
	}
	.text-my-brown {
	    color: #8B4513 !important; /* 棕色 */
	    font-weight: bold;
	}
	
		/* ==========================================
	   修复手机端原生弹窗、下拉框和输入框字体过大
	   ========================================== */
	
	/* 1. 修复下拉框 select 字体 */
	select {
	    font-size: 14px !important;
	    -webkit-text-size-adjust: 100% !important; /* 禁止 iOS 自动缩放 */
	    -webkit-appearance: none; /* 去除默认样式，更好地控制 */
	}
	
	/* 2. 修复输入框字体（iOS 的 input 字体如果小于 16px，会自动放大整个页面） */
	input, textarea {
	    font-size: 16px !important; 
	}
	
	/* 3. 如果是某些特定的第三方 UI 库（比如 Bootstrap 的 select），加上这个 */
	.form-select, .form-control {
	    font-size: 14px !important;
	}
	
	/* 4. 终极强制：禁止浏览器自动调整文字大小 */
	html {
	    -webkit-text-size-adjust: 100% !important;
	    text-size-adjust: 100% !important;
	}
	
	/* ★ 加深 Viewer.js 图片预览的背景遮罩 */
	.viewer-backdrop {
	    background-color: rgba(0, 0, 0, 0.65) !important;
	}
	
	
	/* =========================================================
	   ★ 终极修复：强制把咨询师和 AI 的单行气泡高度压平
	   ========================================================= */
	.msg.counselor .bubble,
	.msg.ai .bubble {
	    padding: 8px 14px !important; /* ★ 从 10px 改为 8px，减小上下内边距 */
	}
	
	/* 针对内部只有一行文本的 p 标签，强行清除 margin */
	.msg.counselor .bubble p,
	.msg.ai .bubble p {
	    margin: 4px 0;
	    line-height: 1.4 !important; /* ★ 把行高从 1.5/1.6 压到 1.4，单行会更紧凑 */
	}
	
	.msg.counselor .bubble p:only-child,
	.msg.ai .bubble p:only-child,
	.msg.counselor .bubble p:last-child,
	.msg.ai .bubble p:last-child {
	    margin-top: 0 !important;
	    margin-bottom: 0 !important;
	}
	
	/* 清除 Markdown 解析产生的空 <p> 标签 */
	.msg.counselor .bubble p:empty,
	.msg.ai .bubble p:empty {
	    display: none !important;
	}
	
	/* 针对带有“反馈条”的包裹层，确保不产生额外空隙 */
	.msg.counselor .msg-body,
	.msg.ai .msg-body {
	    line-height: 1;
	}