.rda-ai-widget {
    --rda-ai-accent: #b99a5b;
    --rda-ai-bg: #111214;
    --rda-ai-surface: #18191c;
    --rda-ai-line: rgba(255, 255, 255, .09);
    --rda-ai-muted: #a9aaae;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f7f6f2;
    box-sizing: border-box;
}
.rda-ai-widget *, .rda-ai-widget *::before, .rda-ai-widget *::after { box-sizing: border-box; }
.rda-ai-widget button, .rda-ai-widget textarea { font: inherit; }
.rda-ai-launcher {
    min-width: 196px;
    height: 58px;
    padding: 7px 18px 7px 8px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: #111214;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    box-shadow: 0 18px 55px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.06);
    transition: transform .22s ease, border-color .22s ease, opacity .22s ease;
}
.rda-ai-launcher:hover { transform: translateY(-2px); border-color: rgba(185,154,91,.55); }
.rda-ai-launcher:hover,
.rda-ai-launcher:focus,
.rda-ai-launcher:focus-visible,
.rda-ai-launcher:active,
.rda-ai-widget button:hover,
.rda-ai-widget button:focus,
.rda-ai-widget button:focus-visible,
.rda-ai-widget button:active {
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}
.rda-ai-launcher__mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #131313;
    background: linear-gradient(145deg, #d9c18e, var(--rda-ai-accent));
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .08em;
}
.rda-ai-launcher__label { font-size: 14px; font-weight: 650; white-space: nowrap; }
.rda-ai-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: min(404px, calc(100vw - 32px));
    height: min(650px, calc(100vh - 112px));
    min-height: 460px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--rda-ai-bg);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 24px;
    box-shadow: 0 28px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .24s ease, transform .24s ease, visibility .24s;
}
.rda-ai-widget.is-open .rda-ai-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.rda-ai-widget.is-open .rda-ai-launcher { opacity: 0; pointer-events: none; transform: translateY(8px); }
.rda-ai-header {
    flex: 0 0 auto;
    min-height: 80px;
    padding: 16px 16px 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rda-ai-line);
    background: linear-gradient(180deg, rgba(255,255,255,.035), transparent);
}
.rda-ai-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rda-ai-avatar {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #d9c18e, var(--rda-ai-accent));
    color: #111;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    box-shadow: 0 0 0 4px rgba(185,154,91,.10);
}
.rda-ai-identity__text { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.rda-ai-identity__text strong { font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rda-ai-header__actions { display: flex; align-items: center; gap: 3px; }
.rda-ai-icon-button {
    width: 36px;
    height: 36px;
    padding: 9px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b7b7ba;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}
.rda-ai-icon-button:hover { color: #fff; background: rgba(255,255,255,.07); }
.rda-ai-widget svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rda-ai-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 17px 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.17) transparent;
}
.rda-ai-message-row { display: flex; gap: 8px; margin-bottom: 15px; align-items: flex-end; }
.rda-ai-message-row--user { justify-content: flex-end; padding-left: 46px; }
.rda-ai-message-row--assistant { padding-right: 22px; }
.rda-ai-message__badge {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    padding: 5px;
    border-radius: 50%;
    color: #151515;
    background: var(--rda-ai-accent);
}
.rda-ai-message {
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 16px 16px 16px 5px;
    background: var(--rda-ai-surface);
    border: 1px solid rgba(255,255,255,.065);
    color: #efeee9;
    font-size: 13.5px;
    line-height: 1.58;
    box-shadow: 0 8px 24px rgba(0,0,0,.09);
}
.rda-ai-message-row--user .rda-ai-message {
    background: linear-gradient(145deg, #d1b876, var(--rda-ai-accent));
    color: #151515;
    border-color: transparent;
    border-radius: 16px 16px 5px 16px;
    font-weight: 520;
}
.rda-ai-message__content { white-space: pre-wrap; overflow-wrap: anywhere; }
.rda-ai-message__content a { color: #e2c980; text-decoration: underline; text-underline-offset: 2px; }
.rda-ai-message-row--user .rda-ai-message__content a { color: #151515; }
.rda-ai-suggestions { display: grid; gap: 7px; margin-top: 13px; }
.rda-ai-suggestion {
    width: 100%;
    padding: 10px 11px;
    text-align: left;
    color: #dddcd7;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(185,154,91,.25);
    border-radius: 10px;
    cursor: pointer;
    font-size: 12.5px;
    line-height: 1.35;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.rda-ai-suggestion:hover { background: rgba(185,154,91,.10); border-color: rgba(185,154,91,.58); transform: translateX(2px); }
.rda-ai-sources { margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.08); }
.rda-ai-sources summary { color: #c7b47e; cursor: pointer; font-size: 11.5px; font-weight: 650; list-style: none; }
.rda-ai-sources summary::-webkit-details-marker { display: none; }
.rda-ai-sources summary::before { content: '+'; display: inline-block; width: 14px; }
.rda-ai-sources[open] summary::before { content: '–'; }
.rda-ai-sources__list { display: grid; gap: 6px; margin-top: 8px; }
.rda-ai-source {
    position: relative;
    min-height: 43px;
    padding: 7px 30px 7px 9px;
    border-radius: 9px;
    background: rgba(255,255,255,.035);
    color: #e7e5df;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.rda-ai-source small { color: #919194; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.rda-ai-source b { font-size: 10.5px; line-height: 1.3; font-weight: 600; }
.rda-ai-source svg { position: absolute; right: 9px; top: 14px; width: 14px; height: 14px; color: #a6a6a8; }
.rda-ai-source:hover { background: rgba(255,255,255,.065); color: #fff; }
.rda-ai-thinking { display: flex; align-items: center; gap: 5px; min-height: 43px; }
.rda-ai-thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--rda-ai-accent); animation: rda-ai-pulse 1.1s infinite ease-in-out; }
.rda-ai-thinking span:nth-child(2) { animation-delay: .14s; }
.rda-ai-thinking span:nth-child(3) { animation-delay: .28s; }
.rda-ai-thinking em { margin-left: 4px; color: #99999d; font-size: 11px; font-style: normal; }
@keyframes rda-ai-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.rda-ai-composer { flex: 0 0 auto; padding: 12px 14px 13px; border-top: 1px solid var(--rda-ai-line); background: #131416; }
.rda-ai-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 7px 7px 7px 13px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.rda-ai-input-wrap:focus-within { border-color: rgba(185,154,91,.67); box-shadow: 0 0 0 3px rgba(185,154,91,.08); }
.rda-ai-input {
    width: 100%;
    min-height: 34px;
    max-height: 112px;
    padding: 7px 0 5px;
    resize: none;
    overflow-y: auto;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #f5f4ef !important;
    font-size: 13.5px;
    line-height: 1.45;
}
.rda-ai-input::placeholder { color: #747478; }
.rda-ai-send {
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    padding: 9px;
    border: 0;
    border-radius: 11px;
    background: var(--rda-ai-accent);
    color: #131313;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.rda-ai-send:hover { transform: translateY(-1px); filter: brightness(1.08); }
.rda-ai-send:disabled { cursor: default; opacity: .45; transform: none; }
.rda-ai-privacy { margin: 8px 3px 0; color: #707074; font-size: 9.5px; text-align: center; }
.rda-ai-inline-anchor { display: block; min-height: 1px; }
@media (max-width: 600px) {
    .rda-ai-widget { right: 12px; bottom: 12px; }
    .rda-ai-panel {
        position: fixed;
        inset: 10px;
        width: auto;
        height: auto;
        max-height: none;
        min-height: 0;
        border-radius: 20px;
        transform-origin: bottom center;
    }
    .rda-ai-launcher { min-width: 58px; width: 58px; padding: 7px; }
    .rda-ai-launcher__label { display: none; }
    .rda-ai-message-row--assistant { padding-right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
    .rda-ai-widget *, .rda-ai-widget *::before, .rda-ai-widget *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* v1.0.7 — hard reset for theme button hover/focus styles */
.rda-ai-widget button,
.rda-ai-widget button:hover,
.rda-ai-widget button:focus,
.rda-ai-widget button:focus-visible,
.rda-ai-widget button:active {
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.rda-ai-widget button::before,
.rda-ai-widget button::after,
.rda-ai-widget button:hover::before,
.rda-ai-widget button:hover::after,
.rda-ai-widget button:focus::before,
.rda-ai-widget button:focus::after,
.rda-ai-widget button:active::before,
.rda-ai-widget button:active::after {
    content: none !important;
    display: none !important;
}

.rda-ai-launcher,
.rda-ai-launcher:hover,
.rda-ai-launcher:focus,
.rda-ai-launcher:focus-visible,
.rda-ai-launcher:active {
    background: #111214 !important;
    color: #ffffff !important;
    border: 1px solid #111214 !important;
    border-radius: 999px !important;
    box-shadow: 0 18px 55px rgba(0,0,0,.30) !important;
    transform: none !important;
}
.rda-ai-launcher__label,
.rda-ai-launcher:hover .rda-ai-launcher__label,
.rda-ai-launcher:focus .rda-ai-launcher__label,
.rda-ai-launcher:active .rda-ai-launcher__label {
    color: #ffffff !important;
}
.rda-ai-launcher__mark,
.rda-ai-launcher:hover .rda-ai-launcher__mark,
.rda-ai-launcher:focus .rda-ai-launcher__mark,
.rda-ai-launcher:active .rda-ai-launcher__mark {
    border-radius: 50% !important;
}

.rda-ai-icon-button,
.rda-ai-icon-button:hover,
.rda-ai-icon-button:focus,
.rda-ai-icon-button:focus-visible,
.rda-ai-icon-button:active {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 9px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #111214 !important;
    box-shadow: none !important;
    transform: none !important;
}
.rda-ai-icon-button:hover {
    background: #f1f1f1 !important;
}

.rda-ai-send,
.rda-ai-send:hover,
.rda-ai-send:focus,
.rda-ai-send:focus-visible,
.rda-ai-send:active {
    border: 0 !important;
    border-radius: 11px !important;
    background: var(--rda-ai-accent) !important;
    color: #131313 !important;
    box-shadow: none !important;
}
.rda-ai-suggestion,
.rda-ai-suggestion:hover,
.rda-ai-suggestion:focus,
.rda-ai-suggestion:focus-visible,
.rda-ai-suggestion:active {
    border-radius: 10px !important;
    box-shadow: none !important;
    outline: none !important;
}
