
    /* === Chat Widget Isolation === */
    #fpsChatWidget, #fpsChatWidget *, #fpsChatWidget *::before, #fpsChatWidget *::after {
        box-sizing: border-box !important;
    }
    #fpsChatWidget button {
        margin: 0 !important;
        text-transform: none !important;
        -webkit-appearance: button !important;
        appearance: button !important;
    }
    #fpsChatWidget textarea {
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    #fpsChatWidget img {
        border: none !important;
        max-width: 100% !important;
    }

    /* === Chat Button === */
    #fpsChatBtn:hover { transform: scale(1.1) !important; box-shadow: 0 6px 24px rgba(0,112,186,0.5) !important; }
    #fpsChatBtn:active { transform: scale(0.95) !important; }

    /* === Chat Window === */
    #fpsChatWindow { animation: fpsChatSlideUp 0.3s ease; }
    @keyframes fpsChatSlideUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* === Media Button Hover === */
    #fpsChatWidget button[title="上傳圖片"]:hover {
        background: #f0f4ff !important;
        border-color: #0070ba !important;
        color: #0070ba !important;
    }
    #fpsChatWidget button[title="發送"]:hover {
        opacity: 0.88;
    }

    /* === Messages === */
    .fps-msg { max-width: 80%; display: flex; flex-direction: column; }
    .fps-msg.user { align-self: flex-end; align-items: flex-end; }
    .fps-msg.cs { align-self: flex-start; align-items: flex-start; }
    .fps-bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; position: relative; word-break: break-word; }
    .fps-msg.user .fps-bubble { background: linear-gradient(135deg, #0070ba, #003087); color: #fff; border-bottom-right-radius: 4px; }
    .fps-msg.cs .fps-bubble { background: #fff; color: #333; border: 1px solid #e8e8e8; border-bottom-left-radius: 4px; }
    .fps-bubble img { max-width: 200px; border-radius: 8px; cursor: pointer; display: block; margin-bottom: 4px; }
    .fps-bubble .fps-retracted { font-style: italic; color: #999; font-size: 12px; }
    .fps-bubble .fps-retract-btn { position: absolute; top: -6px; right: -6px; background: #dc3545; color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; }
    .fps-msg.user:hover .fps-retract-btn.fps-show-retract { display: flex; }
    .fps-time { font-size: 10px; color: #bbb; margin-top: 2px; }
    .fps-system-msg { text-align: center; font-size: 12px; color: #aaa; padding: 4px 0; }
