:root {
    --nfcb-primary: #0073aa;
    --nfcb-bg: #ffffff;
    --nfcb-text: #333333;
    --nfcb-light: #f0f2f5;
    --nfcb-radius: 12px;
}
.nfcb-toggle {
    position: fixed; bottom: 24px; right: 24px;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--nfcb-primary); color: #fff;
    border: none; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 99999; display: flex;
    align-items: center; justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 28px; line-height: 1;
}
.nfcb-toggle--left {
    right: auto;
    left: 24px;
}
.nfcb-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.nfcb-toggle-icon {
    width: 30px;
    height: 30px;
    display: block;
}
.nfcb-window {
    position: fixed; bottom: 100px; right: 24px;
    width: 380px; max-height: 560px;
    background: var(--nfcb-bg);
    border-radius: var(--nfcb-radius);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    z-index: 99998; display: none;
    flex-direction: column; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Yu Gothic", sans-serif;
}
.nfcb-window--left {
    right: auto;
    left: 24px;
}
.nfcb-window.open { display: flex; }
.nfcb-header {
    background: var(--nfcb-primary); color: #fff;
    padding: 16px 20px; display: flex;
    align-items: center; justify-content: space-between;
}
.nfcb-header-title { font-size: 16px; font-weight: 600; }
.nfcb-header-close {
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; opacity: 0.8;
    padding: 0; line-height: 1;
}
.nfcb-header-close:hover { opacity: 1; }
.nfcb-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    min-height: 300px; max-height: 380px;
}
.nfcb-message { margin-bottom: 12px; display: flex; }
.nfcb-message.bot { justify-content: flex-start; }
.nfcb-message.user { justify-content: flex-end; }
.nfcb-bubble {
    max-width: 80%; padding: 10px 14px;
    border-radius: 16px; font-size: 14px;
    line-height: 1.6; word-wrap: break-word; white-space: pre-wrap;
}
.nfcb-message.bot .nfcb-bubble {
    background: var(--nfcb-light); color: var(--nfcb-text);
    border-bottom-left-radius: 4px;
}
.nfcb-message.user .nfcb-bubble {
    background: var(--nfcb-primary); color: #fff;
    border-bottom-right-radius: 4px;
}
.nfcb-typing { display: none; padding: 0 16px 8px; }
.nfcb-typing-dots { display: inline-flex; gap: 4px; }
.nfcb-typing-dots span {
    width: 6px; height: 6px; background: #999;
    border-radius: 50%; animation: nfcb-blink 1.4s infinite;
}
.nfcb-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.nfcb-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes nfcb-blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}
.nfcb-input-area {
    display: flex; padding: 12px 16px;
    border-top: 1px solid #e8e8e8; gap: 8px;
}
.nfcb-input {
    flex: 1; border: 1px solid #ddd; border-radius: 20px;
    padding: 10px 16px; font-size: 14px; outline: none;
    transition: border-color 0.2s;
}
.nfcb-input:focus { border-color: var(--nfcb-primary); }
.nfcb-send-btn {
    background: var(--nfcb-primary); color: #fff; border: none;
    border-radius: 50%; width: 40px; height: 40px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: opacity 0.2s; flex-shrink: 0;
}
.nfcb-send-btn:hover { opacity: 0.9; }
.nfcb-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 480px) {
    .nfcb-window {
        width: calc(100vw - 16px); right: 8px; bottom: 90px;
        max-height: calc(100vh - 120px);
    }
}
