.sbc-wrap,
.sbh-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 12px 34px;
    font: inherit;
    color: #22324a;
    box-sizing: border-box;
}

.sbc-wrap *,
.sbc-wrap *::before,
.sbc-wrap *::after {
    box-sizing: border-box;
}

.sbc-hero,
.sbh-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1d6fd6 0%, #4e9af4 52%, #ff5fa2 100%);
    border-radius: 28px;
    padding: 30px 24px;
    box-shadow: 0 16px 42px rgba(29, 111, 214, 0.22);
    color: #ffffff;
}

.sbc-hero::after,
.sbh-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -60px;
    top: -80px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    pointer-events: none;
}

.sbc-hero-content {
    position: relative;
    z-index: 1;
}

.sbc-hero h1,
.sbh-hero h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(2rem, 7vw, 3.4rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sbc-hero p,
.sbh-hero p {
    max-width: 720px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(1rem, 3.4vw, 1.28rem);
    line-height: 1.45;
    font-weight: 650;
}

.sbc-intro-card,
.sbh-intro-card {
    margin: 18px 0;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #cfe7ff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(20, 51, 90, 0.08);
    font-weight: 650;
    color: #22324a;
}

.sbc-intro-card p,
.sbh-intro-card p {
    margin: 0 0 8px;
}

.sbc-intro-card p:last-child,
.sbh-intro-card p:last-child {
    margin-bottom: 0;
}

.sbc-chat-title {
    margin: 0 0 16px;
    color: #14335a;
    font-size: clamp(1.8rem, 5vw, 2.45rem);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-align: left;
}

.sbc-chat-card {
    background: #ffffff;
    border: 1px solid #cfe7ff;
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(20, 51, 90, 0.08);
    padding: 18px;
    text-align: left;
}

.sbc-messages {
    min-height: 220px;
    max-height: 520px;
    overflow-y: auto;
    padding: 18px;
    background: #eef7ff;
    border: 1px solid #cfe7ff;
    border-radius: 20px;
}

.sbc-message {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 0 16px;
    text-align: left;
}

.sbc-message-user {
    align-items: flex-end;
}

.sbc-message-bot {
    align-items: flex-start;
}

.sbc-message-label {
    margin: 0 0 4px;
    color: #52647d;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.sbc-message-user .sbc-message-label {
    color: #14335a;
    padding-right: 6px;
}

.sbc-message-bot .sbc-message-label {
    padding-left: 6px;
}

.sbc-bubble {
    position: relative;
    max-width: min(82%, 640px);
    text-align: left;
    padding: 13px 15px;
    border-radius: 18px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 8px 20px rgba(20, 51, 90, 0.07);
}

.sbc-bubble::after {
    content: "";
    position: absolute;
    bottom: 10px;
    width: 13px;
    height: 13px;
    transform: rotate(45deg);
}

.sbc-message-bot .sbc-bubble {
    margin-left: 0;
    margin-right: auto;
    background: #ffffff;
    border: 1px solid #cfe7ff;
    color: #22324a;
    border-bottom-left-radius: 6px;
}

.sbc-message-bot .sbc-bubble::after {
    left: -5px;
    background: #ffffff;
    border-left: 1px solid #cfe7ff;
    border-bottom: 1px solid #cfe7ff;
}

.sbc-message-user .sbc-bubble {
    margin-left: auto;
    margin-right: 0;
    background: linear-gradient(135deg, #1d6fd6, #ff5fa2);
    color: #ffffff;
    font-weight: 750;
    border-bottom-right-radius: 6px;
}

.sbc-message-user .sbc-bubble::after {
    right: -5px;
    background: #ff5fa2;
}

.sbc-message-thinking .sbc-bubble {
    color: #52647d;
    font-style: italic;
}

.sbc-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.sbc-quick-question {
    appearance: none;
    border: 1px solid #ffd0e4;
    background: #fff1f7;
    color: #b61c63;
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.sbc-quick-question:hover,
.sbc-quick-question:focus {
    filter: brightness(1.03);
    outline: none;
}

.sbc-quick-questions,
.sbc-quick-question {
    display: none !important;
}

.sbc-form {
    margin: 0;
}

.sbc-input-wrap {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.sbc-input {
    width: 100%;
    min-height: 104px;
    padding: 14px;
    border: 1px solid #cfe7ff;
    border-radius: 18px;
    color: #22324a;
    background: #ffffff;
    font: inherit;
    line-height: 1.45;
    resize: vertical;
    box-shadow: inset 0 1px 0 rgba(20, 51, 90, 0.02);
}

.sbc-mic {
    min-width: 132px;
    min-height: 56px;
    align-self: start;
    border: 1px solid #ffd0e4;
    border-radius: 18px;
    background: #fff1f7;
    color: #b61c63;
    font: inherit;
    font-weight: 900;
    padding: 14px 16px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(20, 51, 90, 0.06);
}

.sbc-mic:hover,
.sbc-mic:focus {
    filter: brightness(1.03);
    outline: 3px solid rgba(255, 95, 162, 0.18);
}

.sbc-mic-listening {
    background: linear-gradient(135deg, #1d6fd6, #ff5fa2);
    color: #ffffff;
    border-color: transparent;
}

.sbc-mic-status {
    min-height: 20px;
    margin: 8px 0 0;
    color: #52647d;
    font-size: 0.92rem;
    line-height: 1.35;
}

.sbc-input:focus {
    outline: 3px solid rgba(29, 111, 214, 0.18);
    border-color: #1d6fd6;
}

.sbc-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.sbc-send,
.sbh-open-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d6fd6, #ff5fa2);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(29, 111, 214, 0.2);
    cursor: pointer;
    padding: 12px 18px;
    text-decoration: none;
}

.sbc-send:hover,
.sbc-send:focus,
.sbh-open-button:hover,
.sbh-open-button:focus {
    color: #ffffff;
    filter: brightness(1.04);
    outline: none;
}

.sbc-send:disabled {
    opacity: 0.68;
    cursor: wait;
}

.sbc-clear {
    min-height: 48px;
    border: 1px solid #cfe7ff;
    border-radius: 16px;
    background: #ffffff;
    color: #14335a;
    font: inherit;
    font-weight: 900;
    padding: 12px 16px;
    cursor: pointer;
}

.sbc-note {
    margin: 12px 0 0;
    color: #52647d;
    font-size: 0.94rem;
    line-height: 1.45;
}

.sbc-floating-help {
    position: fixed;
    z-index: 9999;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 13px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d6fd6, #ff5fa2);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(29, 111, 214, 0.28);
}

.sbc-floating-help:hover,
.sbc-floating-help:focus {
    color: #ffffff !important;
    filter: brightness(1.04);
    outline: none;
}

@media (max-width: 720px) {
    .sbc-wrap,
    .sbh-wrap {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sbc-hero,
    .sbh-hero {
        border-radius: 24px;
        padding: 26px 20px;
    }

    .sbc-chat-card {
        padding: 14px;
        border-radius: 22px;
    }

    .sbc-messages {
        min-height: 160px;
        max-height: 420px;
        padding: 10px;
    }

    .sbc-bubble,
    .sbc-message-user .sbc-bubble {
        max-width: 92%;
    }

    .sbc-input-wrap,
    .sbc-actions {
        grid-template-columns: 1fr;
    }

    .sbc-mic,
    .sbc-clear {
        width: 100%;
    }

    .sbc-floating-help {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }
}
