.bb2-public {
    --bb2-bg: #070504;
    --bb2-panel: #150e0a;
    --bb2-card: #22150f;
    --bb2-line: #65432c;
    --bb2-cream: #fff4e5;
    --bb2-muted: #ceb7a1;
    --bb2-red: #ef3b2f;
    --bb2-gold: #e0ad3f;
    color: var(--bb2-cream);
    font-family: inherit;
}
.bb2-public * { box-sizing: border-box; }
.bb2-public--inline {
    background: var(--bb2-bg);
    border: 1px solid var(--bb2-line);
    border-radius: 8px;
    margin: 24px auto;
    max-width: 940px;
    padding: 16px;
}
.bb2-public--widget {
    bottom: 18px;
    position: fixed;
    right: 18px;
    z-index: 99999;
}
.bb2-fab {
    background: var(--bb2-cream);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .35);
    color: #090705;
    cursor: pointer;
    display: grid;
    font-weight: 900;
    min-width: 118px;
    padding: 12px 16px;
    text-transform: uppercase;
}
.bb2-fab small { color: var(--bb2-red); font-size: 11px; }
.bb2-public__panel {
    background: var(--bb2-bg);
    border: 1px solid var(--bb2-line);
    border-radius: 8px;
    box-shadow: 0 18px 70px rgba(0, 0, 0, .42);
    overflow: hidden;
}
.bb2-public--widget .bb2-public__panel {
    bottom: 68px;
    display: none;
    max-height: min(820px, calc(100vh - 96px));
    max-height: min(820px, calc(100dvh - 96px));
    position: absolute;
    right: 0;
    width: min(430px, calc(100vw - 32px));
}
.bb2-public--widget.is-open .bb2-public__panel {
    display: grid;
    grid-template-rows: auto minmax(110px, 1fr) auto auto auto;
}
.bb2-public__head {
    align-items: flex-start;
    background: linear-gradient(115deg, #441713, #23170d 65%);
    border-bottom: 1px solid var(--bb2-line);
    display: flex;
    justify-content: space-between;
    padding: 16px;
}
.bb2-public__head span { color: var(--bb2-gold); display: block; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.bb2-public__head strong { color: var(--bb2-cream); display: block; font-size: 25px; line-height: 1; margin-top: 5px; }
.bb2-public__head small { color: var(--bb2-muted); }
.bb2-public__head button { background: rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--bb2-cream); cursor: pointer; height: 34px; width: 34px; }
.bb2-log {
    display: grid;
    gap: 10px;
    max-height: 390px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}
.bb2-public--widget .bb2-log { max-height: none; min-height: 110px; }
.bb2-log::-webkit-scrollbar { width: 9px; }
.bb2-log::-webkit-scrollbar-thumb {
    background: rgba(224, 173, 63, .45);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}
.bb2-message { border-radius: 8px; line-height: 1.45; max-width: 92%; padding: 11px 12px; }
.bb2-message.is-bot { background: var(--bb2-panel); border: 1px solid var(--bb2-line); justify-self: start; }
.bb2-message.is-user { background: var(--bb2-red); color: #fff; justify-self: end; }
.bb2-message.is-loading { color: var(--bb2-muted); }
.bb2-quick { border-top: 1px solid var(--bb2-line); display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.bb2-quick button { background: var(--bb2-card); border: 1px solid var(--bb2-line); border-radius: 999px; color: var(--bb2-cream); cursor: pointer; font-size: 13px; font-weight: 800; padding: 8px 10px; }
.bb2-form { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px 8px; }
.bb2-fields { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 14px; }
.bb2-public input, .bb2-public textarea, .bb2-public select {
    background: #0f0b08;
    border: 1px solid var(--bb2-line);
    border-radius: 6px;
    color: var(--bb2-cream);
    min-height: 42px;
    padding: 10px;
    width: 100%;
}
.bb2-public textarea { min-height: 92px; }
.bb2-public button[type="submit"], .bb2-voice {
    background: var(--bb2-red);
    border: 1px solid var(--bb2-red);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    min-height: 42px;
    padding: 10px 14px;
}
.bb2-audio-controls {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
}
.bb2-audio-toggle, .bb2-audio-stop {
    background: var(--bb2-card);
    border: 1px solid var(--bb2-line);
    border-radius: 6px;
    color: var(--bb2-cream);
    cursor: pointer;
    font-weight: 900;
    min-height: 42px;
    padding: 10px 12px;
}
.bb2-audio-toggle.is-muted {
    background: #3a2116;
    border-color: var(--bb2-gold);
    color: var(--bb2-gold);
}
.bb2-audio-stop:active { transform: translateY(1px); }
.bb2-voice { grid-column: 1 / -1; }
.bb2-note { color: var(--bb2-muted); font-size: 12px; line-height: 1.35; margin: 0; padding: 0 14px 14px; }
.bb2-ai-voice-disclosure { display: block; margin-top: 4px; }
@media (max-width: 560px) {
    .bb2-public--widget { bottom: 12px; right: 12px; }
    .bb2-public--widget .bb2-public__panel {
        bottom: 62px;
        max-height: calc(100vh - 82px);
        max-height: calc(100dvh - 82px);
    }
    .bb2-public__head strong { font-size: 22px; }
    .bb2-form { grid-template-columns: minmax(0, 1fr) auto; }
    .bb2-audio-controls { grid-template-columns: 1fr 1fr; }
}
