.ku-ai-chatbot {
    --ku-ai-blue: #00AEEF;
    --ku-ai-blue-dark: #087FAE;
    --ku-ai-orange: #F58220;
    --ku-ai-ink: #15384B;
    --ku-ai-muted: #6E8491;
    --ku-ai-border: #E5EDF2;
    --ku-ai-surface: #FFFFFF;
    --ku-ai-soft: #F4FAFD;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99990;
    font-family: "Public Sans", "Roboto", Arial, sans-serif;
    color: var(--ku-ai-ink);
    line-height: 1.45;
}
.ku-ai-chatbot[hidden],
.ku-ai-panel[hidden],
.ku-ai-greeting[hidden] { display: none !important; }
.ku-ai-launcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 0 19px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ku-ai-blue), var(--ku-ai-blue-dark));
    color: #fff;
    box-shadow: 0 12px 34px rgba(0, 117, 166, .28);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ku-ai-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0,117,166,.34); }
.ku-ai-launcher-spark { font-size: 23px; color: #FFE3C7; }
.ku-ai-launcher-label { font-size: 14px; letter-spacing: .1px; }
.ku-ai-launcher-pulse {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ku-ai-orange);
    box-shadow: 0 0 0 4px rgba(245,130,32,.17);
}
.ku-ai-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    display: flex;
    flex-direction: column;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: min(620px, calc(100vh - 125px));
    min-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(21,56,75,.10);
    border-radius: 20px;
    background: var(--ku-ai-surface);
    box-shadow: 0 22px 70px rgba(12,43,59,.22);
}
.ku-ai-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 17px;
    background: linear-gradient(120deg, #087FAE, #00AEEF);
    color: #fff;
}
.ku-ai-header-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 13px;
    background: rgba(255,255,255,.15);
    color: #FFE2C6;
    font-size: 23px;
}
.ku-ai-header-copy { display: flex; flex-direction: column; min-width: 0; }
.ku-ai-header-copy strong { font-size: 14px; font-weight: 750; }
.ku-ai-header-copy span { margin-top: 2px; color: rgba(255,255,255,.86); font-size: 10px; }
.ku-ai-online-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: #B8F4D2;
}
.ku-ai-panel-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}
.ku-ai-trust-note {
    padding: 8px 14px;
    border-bottom: 1px solid var(--ku-ai-border);
    background: #F8FCFE;
    color: #6C8290;
    font-size: 10px;
    text-align: center;
}
.ku-ai-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding: 15px 13px;
    background: #FBFDFE;
}
.ku-ai-welcome-card {
    margin: auto 0;
    padding: 17px 13px;
    border: 1px solid #E6F0F5;
    border-radius: 15px;
    background: #fff;
    text-align: center;
}
.ku-ai-welcome-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0 auto 9px;
    border-radius: 13px;
    background: #E9F8FE;
    color: var(--ku-ai-blue-dark);
    font-size: 22px;
}
.ku-ai-welcome-card strong { display: block; color: var(--ku-ai-ink); font-size: 14px; }
.ku-ai-welcome-card p { margin: 6px auto 13px; max-width: 285px; color: var(--ku-ai-muted); font-size: 11px; }
.ku-ai-quick-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ku-ai-quick-prompts button {
    padding: 7px 9px;
    border: 1px solid #D9EDF6;
    border-radius: 999px;
    background: #F5FBFE;
    color: #176A8D;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}
.ku-ai-message {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.55;
}
.ku-ai-message-user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    background: #E4F5FC;
    color: #164C66;
}
.ku-ai-message-assistant {
    align-self: flex-start;
    border: 1px solid #E7EEF2;
    border-bottom-left-radius: 5px;
    background: #fff;
    color: #294858;
}
.ku-ai-message-error { border-color: #F4D6C4; background: #FFF9F5; }
.ku-ai-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #EDF2F5;
}
.ku-ai-source-link,
.ku-ai-source-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border: 1px solid #DCECF3;
    border-radius: 7px;
    background: #F6FBFD;
    color: #087FAE;
    font-size: 9px;
    text-decoration: none;
}
.ku-ai-source-link:hover { color: #075E82; background: #EAF7FC; }
.ku-ai-typing { display: inline-flex; align-items: center; gap: 4px; min-width: 49px; }
.ku-ai-typing span { width: 5px; height: 5px; border-radius: 50%; background: #8BA5B2; animation: ku-ai-bounce .9s infinite ease-in-out; }
.ku-ai-typing span:nth-child(2) { animation-delay: .12s; }
.ku-ai-typing span:nth-child(3) { animation-delay: .24s; }
@keyframes ku-ai-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-4px); opacity: 1; } }
.ku-ai-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 11px 7px;
    border-top: 1px solid var(--ku-ai-border);
    background: #fff;
}
.ku-ai-composer textarea {
    display: block;
    flex: 1;
    min-width: 0;
    max-height: 105px;
    resize: none;
    padding: 10px 11px;
    border: 1px solid #DDE8EE;
    border-radius: 12px;
    outline: none;
    background: #FAFCFD;
    color: var(--ku-ai-ink);
    font: inherit;
    font-size: 12px;
    line-height: 1.4;
}
.ku-ai-composer textarea:focus { border-color: var(--ku-ai-blue); box-shadow: 0 0 0 3px rgba(0,174,239,.10); }
.ku-ai-composer button {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border: 0;
    border-radius: 12px;
    background: var(--ku-ai-blue-dark);
    color: #fff;
    cursor: pointer;
}
.ku-ai-composer button:disabled { opacity: .5; cursor: not-allowed; }
.ku-ai-composer button svg { width: 19px; height: 19px; fill: currentColor; }
.ku-ai-footer-note { padding: 0 12px 9px; background: #fff; color: #9AAAB2; font-size: 9px; text-align: center; }
.ku-ai-greeting {
    position: absolute;
    right: 0;
    bottom: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: min(310px, calc(100vw - 36px));
    padding: 11px 12px;
    border: 1px solid #DCECF3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(12,43,59,.15);
    color: #315366;
    font-size: 11px;
}
.ku-ai-greeting-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--ku-ai-orange); }
.ku-ai-greeting-close { margin-left: 4px; border: 0; background: transparent; color: #8296A0; font-size: 18px; cursor: pointer; }
.ku-ai-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 520px) {
    .ku-ai-chatbot { right: 13px; bottom: 13px; }
    .ku-ai-launcher { min-height: 52px; padding: 0 15px; }
    .ku-ai-panel { right: -2px; bottom: 64px; width: calc(100vw - 26px); max-width: calc(100vw - 26px); height: min(74vh, 610px); min-height: 350px; border-radius: 17px; }
}
