/* ==========================================
   对话聊天样式 v4 - 微信风格单时间线
   ========================================== */

/* ===== 主容器 ===== */
.wechat-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--chat-bg, #ededed);
}

[data-theme="dark"] .wechat-chat {
    --chat-bg: #1a1a1a;
    --chat-bubble-ai: #2a2a2a;
    --chat-bubble-user: #95ec69;
    --chat-bubble-user-text: #1a1a1a;
    --chat-input-bg: #2a2a2a;
    --chat-header-bg: #2a2a2a;
    --chat-border: rgba(255,255,255,0.06);
    --chat-text: #e0e0e0;
    --chat-text-muted: #888;
    --chat-date-bg: rgba(0,0,0,0.15);
    --chat-date-text: #999;
}

[data-theme="light"] .wechat-chat,
.wechat-chat {
    --chat-bg: #ededed;
    --chat-bubble-ai: #ffffff;
    --chat-bubble-user: #95ec69;
    --chat-bubble-user-text: #1a1a1a;
    --chat-input-bg: #f7f7f7;
    --chat-header-bg: #f7f7f7;
    --chat-border: rgba(0,0,0,0.06);
    --chat-text: #1a1a1a;
    --chat-text-muted: #888;
    --chat-date-bg: rgba(0,0,0,0.08);
    --chat-date-text: #999;
}

/* ===== 顶部工具栏 ===== */
.wc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(48px + env(safe-area-inset-top, 0px));
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-border);
    flex-shrink: 0;
    z-index: 10;
}

.wc-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--chat-text);
}

.wc-header-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wc-header-btn:hover {
    background: var(--chat-date-bg);
}

/* ===== 日期栏（默认只显示当天，按日期查询历史） ===== */
.wc-date-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 16px;
    height: 36px;
    background: var(--chat-header-bg);
    border-bottom: 1px solid var(--chat-border);
    flex-shrink: 0;
    z-index: 9;
}

.wc-date-bar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: -8px;
    border-radius: 8px;
    color: var(--chat-text);
    font-size: 13px;
    transition: background 0.2s;
}

.wc-date-bar-btn:hover {
    background: var(--chat-date-bg);
}

.wc-date-bar-icon {
    font-size: 14px;
}

.wc-date-bar-label {
    font-weight: 500;
    color: var(--chat-text);
}

.wc-back-today {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(7, 193, 96, 0.35);
    background: rgba(7, 193, 96, 0.08);
    color: #07c160;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.wc-back-today:hover {
    background: rgba(7, 193, 96, 0.16);
    border-color: #07c160;
}

/* ===== 消息列表 ===== */
.wc-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.wc-loading-init {
    text-align: center;
    padding: 60px 20px;
    color: var(--chat-text-muted);
    font-size: 13px;
}

.wc-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--chat-border);
    border-top-color: #07c160;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: wc-spin 0.8s linear infinite;
}

.wc-spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid var(--chat-border);
    border-top-color: #07c160;
    border-radius: 50%;
    animation: wc-spin 0.8s linear infinite;
}

@keyframes wc-spin {
    to { transform: rotate(360deg); }
}

.wc-load-more {
    text-align: center;
    padding: 12px 0;
}

.wc-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--chat-text-muted);
}

.wc-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.wc-empty-sub {
    font-size: 12px;
    margin-top: 6px;
    color: var(--chat-text-muted);
}

/* ===== 日期分割线 ===== */
.wc-date-sep {
    text-align: center;
    margin: 16px 0 12px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--chat-date-text);
    background: var(--chat-date-bg);
    border-radius: 4px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.wc-date-sep:not(:first-child) {
    margin-top: 20px;
}

/* ===== 消息气泡 ===== */
.wc-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: wc-fadeIn 0.3s ease;
    align-items: flex-start;
}

@keyframes wc-fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wc-msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    background: linear-gradient(135deg, #c4b5ff, #ffb4b4);
    color: #fff;
    overflow: hidden;
}

.wc-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.wc-msg-ai .wc-msg-avatar {
    background: #f0f0f0;
    color: #07c160;
    border: 1px solid var(--chat-border);
}

[data-theme="dark"] .wc-msg-ai .wc-msg-avatar {
    background: #333;
}

.wc-msg-bubble-wrap {
    max-width: 65%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 气泡小三角 */
.wc-msg-bubble-wrap::before {
    content: '';
    position: absolute;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
}

.wc-msg-ai .wc-msg-bubble-wrap::before {
    left: -6px;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--chat-bubble-ai) transparent transparent;
}

.wc-msg-user .wc-msg-bubble-wrap::before {
    right: -6px;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent var(--chat-bubble-user);
}

.wc-msg-bubble {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wc-msg-ai .wc-msg-bubble {
    background: var(--chat-bubble-ai);
    color: var(--chat-text);
}

.wc-msg-user {
    flex-direction: row-reverse;
}

.wc-msg-user .wc-msg-bubble-wrap {
    align-items: flex-end;
}

.wc-msg-user .wc-msg-bubble {
    background: var(--chat-bubble-user);
    color: var(--chat-bubble-user-text);
}

.wc-msg-time {
    font-size: 11px;
    color: var(--chat-text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.wc-msg-user .wc-msg-time {
    text-align: right;
}

/* 消息高亮（搜索跳转） */
.wc-msg-highlight {
    animation: wc-highlight 2s ease;
}

@keyframes wc-highlight {
    0%, 30% { background: rgba(255, 200, 0, 0.2); border-radius: 8px; }
    100% { background: transparent; }
}

/* Skill标记 */
.wc-skill-badge {
    display: inline-block;
    font-size: 11px;
    color: #576b95;
    background: rgba(87, 107, 149, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* 任务拆解 */
.wc-task-plan {
    background: rgba(7, 193, 96, 0.06);
    border-left: 3px solid #07c160;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 4px;
}

/* Skill结果 */
.wc-skill-result {
    background: rgba(87, 107, 149, 0.06);
    border-left: 3px solid #576b95;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 8px;
}

/* 代码块 */
.wc-code-block {
    background: rgba(0,0,0,0.06);
    padding: 10px 14px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    margin: 6px 0;
    font-family: "SF Mono", "Fira Code", monospace;
}

[data-theme="dark"] .wc-code-block {
    background: rgba(255,255,255,0.06);
}

.wc-inline-code {
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: "SF Mono", "Fira Code", monospace;
}

[data-theme="dark"] .wc-inline-code {
    background: rgba(255,255,255,0.06);
}

/* 流式光标 */
.wc-typing-cursor {
    display: inline-block;
    width: 6px;
    height: 16px;
    background: #07c160;
    animation: wc-blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes wc-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* TTS按钮 */
.wc-tts-btn {
    background: transparent;
    border: none;
    color: var(--chat-text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    align-self: flex-start;
    transition: all 0.2s;
}

.wc-tts-btn:hover {
    background: var(--chat-date-bg);
    color: #07c160;
}

.wc-tts-btn.playing {
    color: #07c160;
    background: rgba(7, 193, 96, 0.1);
    animation: wc-tts-pulse 1.5s ease infinite;
}

@keyframes wc-tts-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* AI消息操作按钮容器（朗读 + 引用） */
.wc-msg-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 2px;
}

/* 引用按钮 */
.wc-quote-btn {
    background: transparent;
    border: none;
    color: var(--chat-text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    align-self: flex-start;
    transition: all 0.2s;
}

.wc-quote-btn:hover {
    background: var(--chat-date-bg);
    color: #576b95;
}

/* 消息内引用块（用户消息引用了AI回复） */
.wc-msg-reply {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    background: rgba(87, 107, 149, 0.08);
    border-left: 3px solid #576b95;
    border-radius: 4px;
    padding: 5px 10px;
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--chat-text-muted);
    cursor: default;
}

.wc-msg-reply-label {
    font-weight: 600;
    color: #576b95;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-msg-reply-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .wc-msg-reply {
    background: rgba(87, 107, 149, 0.18);
}

/* ===== 输入栏顶部引用条 ===== */
.wc-reply-bar {
    display: flex;
    align-items: center;
    background: var(--chat-input-bg);
    padding: 6px 0 2px;
}

.wc-reply-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 100%;
    background: rgba(87, 107, 149, 0.10);
    border: 1px solid rgba(87, 107, 149, 0.25);
    border-radius: 8px;
    padding: 6px 10px;
}

.wc-reply-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wc-reply-label {
    font-size: 11px;
    font-weight: 600;
    color: #576b95;
}

.wc-reply-text {
    font-size: 12px;
    color: var(--chat-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc-reply-cancel {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--chat-text-muted);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wc-reply-cancel:hover {
    background: rgba(250, 81, 81, 0.15);
    color: #fa5151;
}

/* ===== 底部输入栏 ===== */
.wc-input-bar {
    background: var(--chat-input-bg);
    border-top: 1px solid var(--chat-border);
    padding: 8px 16px 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}

.wc-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.wc-input-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.wc-input-btn:hover {
    background: var(--chat-date-bg);
}

.wc-input-btn.active {
    background: rgba(7, 193, 96, 0.1);
}

.wc-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--chat-border);
    border-radius: 6px;
    background: var(--chat-bubble-ai);
    color: var(--chat-text);
    font-size: 15px;
    resize: none;
    max-height: 120px;
    min-height: 36px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.wc-input:focus {
    outline: none;
    border-color: #07c160;
}

.wc-input::placeholder {
    color: var(--chat-text-muted);
}

.wc-send-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #07c160;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
    transition: all 0.2s;
}

.wc-send-btn:hover {
    background: #06ad56;
}

.wc-send-btn:active {
    transform: scale(0.96);
}

/* 附件预览 */
.attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--chat-date-bg);
    border-radius: 4px;
    font-size: 12px;
}

.attachment-item .remove {
    cursor: pointer;
    color: #fa5151;
}

/* 录音指示器 */
.recording-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(250, 81, 81, 0.1);
    border-radius: 6px;
    color: #fa5151;
    font-size: 13px;
    margin-bottom: 6px;
}

/* 消息合并等待指示器 */
.wc-debounce-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--chat-date-bg, rgba(0,0,0,0.04));
    color: var(--chat-text-muted, #888);
    font-size: 12px;
    text-align: center;
    justify-content: center;
    flex-shrink: 0;
}

.wc-debounce-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #07c160;
    animation: wc-pulse 1.5s infinite;
}

.recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fa5151;
    animation: wc-pulse 1.5s infinite;
}

@keyframes wc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 任务进度更新通知（对话中内联展示） */
.wc-task-update-notice {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px 0 8px 0;
    background: rgba(7, 193, 96, 0.1);
    border-left: 3px solid #07c160;
    border-radius: 4px;
    font-size: 13px;
    color: #07c160;
    line-height: 1.5;
}

/* ===== 日历面板 ===== */
.wc-calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-calendar-panel {
    background: var(--bg-secondary, #fff);
    border-radius: 16px;
    padding: 20px;
    width: 340px;
    max-width: 90vw;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.wc-calendar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.wc-cal-nav {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary, rgba(0,0,0,0.04));
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary, #1a1a1a);
    transition: background 0.2s;
}

.wc-cal-nav:hover {
    background: var(--bg-hover, rgba(0,0,0,0.08));
}

.wc-cal-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.wc-cal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted, #888);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-cal-close:hover {
    background: var(--bg-hover, rgba(0,0,0,0.08));
}

.wc-cal-today-btn {
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(7, 193, 96, 0.12);
    color: #07c160;
    font-size: 12px;
    font-weight: 600;
    padding: 0 10px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.wc-cal-today-btn:hover {
    background: rgba(7, 193, 96, 0.22);
}

.wc-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.wc-calendar-weekdays span {
    font-size: 12px;
    color: var(--text-muted, #888);
    padding: 6px 0;
}

.wc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.wc-cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary, #1a1a1a);
    position: relative;
    transition: background 0.2s;
}

.wc-cal-empty {
    visibility: hidden;
}

.wc-cal-future {
    color: var(--text-muted, #ccc);
}

.wc-cal-has-msg {
    cursor: pointer;
    font-weight: 600;
    color: #07c160;
}

.wc-cal-has-msg:hover {
    background: rgba(7, 193, 96, 0.1);
}

.wc-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #07c160;
    position: absolute;
    bottom: 4px;
}

.wc-cal-today {
    background: #07c160;
    color: #fff !important;
}

.wc-cal-today .wc-cal-dot {
    background: #fff;
}

.wc-cal-today:hover {
    background: #06ad56;
}

/* ===== 搜索面板 ===== */
.wc-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.wc-search-panel {
    background: var(--bg-secondary, #fff);
    border-radius: 16px;
    width: 500px;
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.wc-search-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--chat-border);
}

.wc-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--chat-border);
    border-radius: 8px;
    background: var(--chat-bubble-ai, #fff);
    color: var(--chat-text, #1a1a1a);
    font-size: 14px;
    font-family: inherit;
}

.wc-search-input:focus {
    outline: none;
    border-color: #07c160;
}

.wc-search-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted, #888);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wc-search-close:hover {
    background: var(--bg-hover, rgba(0,0,0,0.06));
}

.wc-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.wc-search-hint {
    text-align: center;
    padding: 40px 20px;
    color: var(--chat-text-muted, #888);
    font-size: 14px;
}

.wc-search-loading {
    text-align: center;
    padding: 30px;
}

.wc-search-item {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.wc-search-item:hover {
    background: var(--bg-hover, rgba(0,0,0,0.04));
}

.wc-search-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.wc-search-item-role {
    font-size: 13px;
    font-weight: 600;
    color: #07c160;
}

.wc-search-item-time {
    font-size: 12px;
    color: var(--chat-text-muted, #888);
}

.wc-search-item-snippet {
    font-size: 13px;
    color: var(--chat-text, #1a1a1a);
    line-height: 1.5;
}

.wc-highlight {
    background: rgba(255, 200, 0, 0.3);
    border-radius: 2px;
    padding: 0 2px;
}

/* ===== 声音选择面板 ===== */
.wc-voice-list {
    padding: 8px 0;
}

.wc-voice-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--chat-border, #e5e5e5);
    transition: background 0.15s;
    gap: 12px;
}

.wc-voice-item:hover {
    background: var(--chat-date-bg, rgba(0,0,0,0.03));
}

.wc-voice-item.wc-voice-active {
    background: rgba(7, 193, 96, 0.08);
}

.wc-voice-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.wc-voice-info {
    flex: 1;
}

.wc-voice-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--chat-text, #1a1a1a);
}

.wc-voice-desc {
    font-size: 12px;
    color: var(--chat-text-muted, #888);
    margin-top: 2px;
}

.wc-voice-check {
    color: #07c160;
    font-size: 18px;
    font-weight: bold;
}

.wc-voice-test {
    padding: 4px 12px;
    border-radius: 14px;
    border: 1px solid var(--chat-border, #ddd);
    background: transparent;
    color: #07c160;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.wc-voice-test:hover {
    background: rgba(7, 193, 96, 0.1);
}

.wc-voice-test:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .wc-messages {
        padding: 8px 12px;
    }

    .wc-msg-bubble-wrap {
        max-width: 75%;
    }

    .wc-msg-bubble {
        font-size: 14px;
    }

    .wc-msg-avatar {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .wc-input-bar {
        padding: 6px 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .wc-input {
        font-size: 14px;
    }

    .wc-calendar-panel {
        width: 90vw;
        padding: 16px;
    }

    .wc-search-panel {
        width: 90vw;
    }
}

/* 兼容微信内置浏览器 */
@media (max-width: 480px) {
    .wc-msg-bubble-wrap {
        max-width: 80%;
    }

    .wc-header {
        padding: 0 10px;
        height: 44px;
    }

    .wc-header-title {
        font-size: 15px;
    }

    .wc-input-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .wc-send-btn {
        padding: 6px 16px;
        font-size: 13px;
    }
}
