.chat-fab {
    position: fixed;
    right: 24px;
    bottom: 100px;
    z-index: 1001;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #0b1320;
    color: #e8c75a;
    box-shadow: 0 4px 14px rgba(7, 11, 20, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-fab svg { width: 34px; height: 34px; display: block; }
.chat-fab svg path,
.chat-fab svg circle { fill: currentColor; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-panel {
    position: fixed;
    right: 24px;
    bottom: 172px;
    z-index: 1001;
    width: min(380px, calc(100vw - 32px));
    height: min(480px, calc(100vh - 200px));
    background: #fff;
    color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(7, 11, 20, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #0b1320;
    color: #fff;
}
.chat-panel__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
.chat-panel__log {
    flex: 1;
    overflow-y: auto;
    padding: 0.9rem;
    background: #f8fafc;
}
.chat-msg {
    margin: 0 0 0.7rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    line-height: 1.45;
    font-size: 0.92rem;
}
.chat-msg--bot { background: #fff; border: 1px solid #e2e8f0; }
.chat-msg--note {
    background: #fff8e8;
    border: 1px solid #ead7a1;
    color: #5c4a1f;
    font-size: 0.82rem;
}
.chat-msg--status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #526074;
}
.chat-dots { display: inline-flex; gap: 4px; }
.chat-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cba864;
    animation: chat-dot 1s infinite ease-in-out;
}
.chat-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}
.chat-caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    background: #0b1320;
    vertical-align: text-bottom;
    animation: chat-caret 0.8s steps(1) infinite;
}
@keyframes chat-caret {
    50% { opacity: 0; }
}
.chat-panel__form button:disabled,
.chat-panel__form input:disabled { opacity: 0.65; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
    .chat-dots i, .chat-caret { animation: none; }
}
.chat-msg--user { background: #0b1320; color: #fff; margin-left: 2rem; }
.chat-msg a { display: block; margin-top: 0.35rem; color: #9a7b2f; }
.chat-panel__form {
    display: flex;
    gap: 0.4rem;
    padding: 0.7rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
.chat-panel__form input {
    flex: 1;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.65rem 0.7rem;
    font: inherit;
}
.chat-panel__form button {
    border: none;
    border-radius: 8px;
    background: #d4af37;
    color: #0b1320;
    font-weight: 700;
    padding: 0 0.9rem;
    cursor: pointer;
}
@media (max-width: 768px) {
    .chat-fab { right: 20px; bottom: 86px; width: 54px; height: 54px; }
    .chat-panel { right: 16px; bottom: 152px; }
}
