        :root {
            --brand-red: #DA251D;
            --brand-red-dark: #B91C1C;
            --brand-red-light: #FCE8E7;
            --brand-teal: #19ADB2;
            --brand-teal-light: #E0F5F5;
            --bg-page: #F5F7FA;
            --bg-chat: #FFFFFF;
            --bg-messages: #F7F8FA;
            --text-primary: #1A1A1A;
            --text-secondary: #666666;
            --text-tertiary: #999999;
            --border-light: #EEEEEE;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
            background: transparent;
            pointer-events: none; /* 页面内容不拦截点击，穿透到下方 */
        }

        /* 只有实际UI元素可以接收点击 */
        .chat-fab,
        .chat-window {
            pointer-events: auto;
        }

        /* === 聊天浮窗 === */
        .chat-fab {
            position: fixed;
            bottom: 32px;
            right: 32px;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: var(--brand-red);
            box-shadow: 0 4px 20px rgba(218, 37, 29, 0.35);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .chat-fab:hover {
            transform: scale(1.08);
            box-shadow: 0 6px 28px rgba(218, 37, 29, 0.45);
        }

        .chat-fab svg {
            width: 28px;
            height: 28px;
            fill: #fff;
        }

        .chat-fab .badge {
            position: absolute;
            top: 2px;
            right: 2px;
            width: 18px;
            height: 18px;
            background: var(--brand-teal);
            border-radius: 50%;
            font-size: 11px;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #fff;
        }

        /* === 聊天窗口 === */
        .chat-window {
            position: fixed;
            bottom: 32px;
            right: 32px;
            width: 400px;
            height: 600px;
            background: var(--bg-chat);
            border-radius: 20px;
            box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
            display: none;
            flex-direction: column;
            overflow: hidden;
            z-index: 9999;
            animation: chatIn 0.3s ease;
        }

        @keyframes chatIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .chat-window.active {
            display: flex;
        }

        /* 头部 */
        .chat-header {
            background: var(--brand-red);
            color: #fff;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
        }

        .chat-header-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .chat-header .avatar {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            font-weight: 600;
            color: var(--brand-red);
        }

        .chat-header .info h3 {
            font-size: 15px;
            font-weight: 600;
        }

        .chat-header .info .status {
            font-size: 12px;
            color: rgba(255,255,255,0.9);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .chat-header .status .dot {
            width: 8px;
            height: 8px;
            background: var(--brand-teal);
            border-radius: 50%;
            box-shadow: 0 0 0 2px rgba(25, 173, 178, 0.3);
        }

        .chat-header .close-btn,
        .chat-header .clear-btn {
            width: 32px;
            height: 32px;
            border: none;
            background: rgba(255,255,255,0.12);
            border-radius: 50%;
            color: #fff;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .chat-header .close-btn:hover,
        .chat-header .clear-btn:hover {
            background: rgba(255,255,255,0.22);
        }

        .chat-header .clear-btn svg {
            width: 16px;
            height: 16px;
            fill: #fff;
        }

        .header-actions {
            display: flex;
            gap: 8px;
        }

        /* 历史恢复提示 */
        .history-notice {
            text-align: center;
            font-size: 12px;
            color: var(--brand-teal);
            padding: 8px 16px;
            background: var(--brand-teal-light);
            margin-bottom: 8px;
            border-radius: 8px;
        }

        /* 消息区域 */
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            background: var(--bg-messages);
            scroll-behavior: smooth;
        }

        .chat-messages::-webkit-scrollbar {
            width: 4px;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: #ddd;
            border-radius: 4px;
        }

        .message {
            display: flex;
            margin-bottom: 16px;
            animation: msgIn 0.3s ease;
        }

        @keyframes msgIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .message.bot {
            justify-content: flex-start;
        }

        .message.user {
            justify-content: flex-end;
        }

        .message .bubble {
            max-width: 78%;
            padding: 12px 16px;
            border-radius: 16px;
            font-size: 14px;
            line-height: 1.6;
            word-break: break-word;
        }

        .message.bot .bubble {
            background: #fff;
            color: var(--text-primary);
            border: 1px solid var(--border-light);
            border-top-left-radius: 4px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        }

        .message.user .bubble {
            background: var(--brand-red);
            color: #fff;
            border-top-right-radius: 4px;
        }

        .message .bubble strong {
            color: var(--brand-red);
        }

        .message.user .bubble strong {
            color: #fff;
            font-weight: 600;
        }

        /* === 段落间距 === */
        .message .bubble p {
            margin: 0 0 10px 0;
            line-height: 1.8;
        }
        .message .bubble p:last-child {
            margin-bottom: 0;
        }
        /* 纯标题段落（整段仅 <strong> 包裹，无其他文本）→ 放大为小标题 */
        .message .bubble p.kb-title strong {
            display: block;
            font-size: 15px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-light);
            margin-bottom: 8px;
        }

        /* === 报价卡片 === */
        .quote-card {
            background: #fff;
            border: 1px solid var(--border-light);
            border-radius: 12px;
            overflow: hidden;
            margin: 4px 0;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }
        .quote-price-box {
            text-align: center;
            padding: 16px 16px 12px;
            border-bottom: 1px dashed var(--border-light);
        }
        .quote-price-box .price-main {
            font-size: 28px;
            font-weight: 700;
            color: var(--brand-red);
            line-height: 1.2;
        }
        .quote-price-box .price-unit {
            font-size: 14px;
            font-weight: 400;
            color: var(--text-tertiary);
            margin-left: 2px;
        }
        .quote-price-box .price-label {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-right: 4px;
        }
        .quote-price-box .price-secondary {
            font-size: 13px;
            color: var(--text-tertiary);
            margin-top: 6px;
        }
        .quote-attr-grid {
            padding: 12px 16px 8px;
        }
        .quote-attr-grid .attr-row {
            display: flex;
            align-items: baseline;
            padding: 4px 0;
            font-size: 13px;
            line-height: 1.5;
        }
        .quote-attr-grid .attr-label {
            color: var(--text-tertiary);
            width: 56px;
            flex-shrink: 0;
        }
        .quote-attr-grid .attr-value {
            color: var(--text-primary);
            font-weight: 500;
            flex: 1;
        }
        .quote-tip-box {
            padding: 10px 16px;
            background: var(--brand-teal-light);
            font-size: 12px;
            color: #0F6E56;
            line-height: 1.6;
            border-top: 1px solid #C8ECEC;
        }
        .quote-rounding-note {
            padding: 10px 16px;
            background: var(--brand-teal-light);
            font-size: 13px;
            color: #0F6E56;
            line-height: 1.6;
            border-radius: 10px;
            margin-bottom: 8px;
            border: 1px solid #C8ECEC;
        }

        /* === 内联提示框 === */
        .tip-note {
            display: block;
            background: var(--brand-teal-light);
            border-left: 3px solid var(--brand-teal);
            padding: 8px 12px;
            border-radius: 0 6px 6px 0;
            font-size: 13px;
            color: #0F6E56;
            margin: 6px 0;
            line-height: 1.6;
        }

        /* 打字指示器 */
        .typing-indicator {
            display: flex;
            gap: 4px;
            padding: 14px 16px;
        }

        .typing-indicator span {
            width: 8px;
            height: 8px;
            background: var(--brand-teal);
            border-radius: 50%;
            animation: typing 1.4s infinite;
        }

        .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
        .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

        @keyframes typing {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
            30% { transform: translateY(-6px); opacity: 1; }
        }

        /* 快捷问题 */
        .quick-replies {
            padding: 10px 16px 6px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            background: var(--bg-messages);
            flex-shrink: 0;
        }

        .quick-reply {
            background: #fff;
            border: 1px solid var(--brand-red);
            color: var(--brand-red);
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .quick-reply:hover {
            background: var(--brand-red);
            color: #fff;
        }

        /* 输入区域 */
        .chat-input {
            padding: 12px 16px;
            border-top: 1px solid var(--border-light);
            background: #fff;
            display: flex;
            gap: 10px;
            flex-shrink: 0;
        }

        .chat-input input {
            flex: 1;
            border: 1px solid var(--border-light);
            border-radius: 24px;
            padding: 10px 16px;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
            background: var(--bg-messages);
        }

        .chat-input input:focus {
            border-color: var(--brand-red);
            box-shadow: 0 0 0 3px rgba(218, 37, 29, 0.08);
        }

        .chat-input button {
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            background: var(--brand-red);
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: transform 0.2s, background 0.2s;
        }

        .chat-input button:hover {
            transform: scale(1.05);
            background: var(--brand-red-dark);
        }

        .chat-input button svg {
            width: 18px;
            height: 18px;
            fill: #fff;
        }

        /* 底部品牌标识 */
        .chat-footer {
            text-align: center;
            padding: 6px;
            font-size: 11px;
            color: var(--text-tertiary);
            background: #fff;
            border-top: 1px solid var(--border-light);
        }

        /* 响应式 */
        @media (max-width: 480px) {
            .chat-window {
                width: 100%;
                height: 100%;
                bottom: 0;
                right: 0;
                border-radius: 0;
            }

            .chat-fab {
                bottom: 20px;
                right: 20px;
            }
        }
