.assistant-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 50%;
    background: linear-gradient(180deg, #d4af37, #aa8c2c);
    color: #1a1008;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 22px rgba(212, 175, 55, 0.22);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 22px;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.assistant-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 26px rgba(212, 175, 55, 0.3);
}

.assistant-fab[hidden],
.assistant-float-host[hidden] {
    display: none;
}

body.assistant-drawer-open .assistant-fab {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.assistant-float-host {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 46;
    width: min(760px, calc(100vw - 20px));
    height: 72px;
    transform: translateX(-50%);
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: hidden;
    pointer-events: none;
}

.assistant-reply {
    position: fixed;
    left: 18px;
    bottom: 22px;
    z-index: 45;
    width: min(380px, calc(100vw - 100px));
    max-height: min(42vh, 420px);
    display: flex;
    flex-direction: column;
    padding: 12px 14px 14px;
    border-radius: 16px;
    border: 1px solid rgba(232, 214, 188, 0.16);
    background: rgba(18, 14, 13, 0.94);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
    color: #f4ece0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 280ms ease, transform 280ms ease;
}

.assistant-reply.is-on {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.assistant-reply[hidden] {
    display: none;
}

.assistant-reply-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #d4af37;
}

.assistant-reply-close {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9d9184;
    cursor: pointer;
}

.assistant-reply-close:hover {
    color: #f4ece0;
}

.assistant-reply-think {
    max-height: 7.2em;
    overflow: auto;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(232, 214, 188, 0.1);
    color: #9d9184;
    font-size: 12px;
    line-height: 1.45;
    font-style: italic;
    white-space: pre-wrap;
}

.assistant-reply-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.assistant-reply-chip {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(212, 175, 55, 0.08);
    color: #d4af37;
    font-size: 11px;
}

.assistant-reply-chip.running {
    border-color: rgba(245, 158, 11, 0.45);
}

.assistant-reply-chip.error {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

.assistant-reply-body {
    min-height: 0;
    overflow: auto;
    font-size: 14px;
    line-height: 1.5;
}

.assistant-reply-body p {
    margin: 0 0 0.6em;
}

.assistant-reply-body p:last-child {
    margin-bottom: 0;
}

.assistant-reply.is-live .assistant-reply-kicker span::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
    vertical-align: middle;
}

@media (max-width: 640px) {
    .assistant-reply {
        left: 10px;
        bottom: 88px;
        width: calc(100vw - 20px);
    }
}

.assistant-float-host iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color-scheme: dark;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .assistant-float-host {
        width: calc(100vw - 12px);
        bottom: 10px;
    }
}
