.ray-chat-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 11px 15px;
    color: #f5f4ef;
    background: rgba(17,17,17,.9);
    box-shadow: 0 16px 48px rgba(0,0,0,.3);
    backdrop-filter: blur(18px);
    cursor: pointer;
    font: 600 12px/1 'JetBrains Mono', monospace;
    text-decoration: none;
}
.ray-chat-launcher span:first-child { color: #b8ff5b; }
.ray-chat {
    position: fixed;
    right: 22px;
    bottom: 78px;
    z-index: 1201;
    width: min(410px, calc(100vw - 28px));
    height: min(650px, calc(100vh - 110px));
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 20px;
    color: #ecebe6;
    background: rgba(16,16,16,.97);
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    backdrop-filter: blur(24px);
    transform-origin: bottom right;
}
.ray-chat[hidden] { display: none; }
.ray-chat-header { display: flex; align-items: center; gap: 11px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.ray-chat-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #111; background: #b8ff5b; font-weight: 800; }
.ray-chat-heading { min-width: 0; flex: 1; }
.ray-chat-heading strong, .ray-chat-heading small { display: block; }
.ray-chat-heading strong { font-size: 13px; }
.ray-chat-heading small { margin-top: 3px; color: #9c9c96; font-size: 10px; }
.ray-chat-close { border: 0; color: #aaa; background: transparent; cursor: pointer; font-size: 23px; }
.ray-chat-status { padding: 8px 16px; color: #a9a9a3; background: rgba(255,255,255,.035); font-size: 10px; line-height: 1.45; }
.ray-chat-status[data-state="available"] { color: #b8ff5b; }
.ray-chat-messages { overflow: auto; padding: 16px; scroll-behavior: smooth; }
.ray-chat-message { max-width: 88%; margin: 0 0 13px; }
.ray-chat-message[data-role="user"] { margin-left: auto; }
.ray-chat-bubble { border-radius: 14px 14px 14px 4px; padding: 11px 12px; background: #272725; font: 400 12px/1.55 'JetBrains Mono', monospace; white-space: pre-wrap; }
.ray-chat-message[data-role="user"] .ray-chat-bubble { border-radius: 14px 14px 4px 14px; color: #10110f; background: #b8ff5b; }
.ray-chat-cards { display: grid; gap: 8px; margin-top: 8px; }
.ray-chat-card { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: inherit; background: #20201e; text-decoration: none; }
.ray-chat-card img, .ray-chat-card video { width: 100%; max-height: 180px; display: block; object-fit: cover; background: #090909; }
.ray-chat-card-copy { display: block; padding: 10px; }
.ray-chat-card-copy strong, .ray-chat-card-copy small { display: block; }
.ray-chat-card-copy strong { font-size: 11px; }
.ray-chat-card-copy small { margin-top: 4px; color: #aaa; font-size: 9px; line-height: 1.4; }
.ray-chat-suggestions { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 10px; }
.ray-chat-suggestions button { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 7px 9px; color: #c6c6c0; background: transparent; cursor: pointer; font: 500 9px/1 'JetBrains Mono', monospace; }
.ray-chat-suggestions button:disabled { cursor: not-allowed; opacity: .35; }
.ray-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.ray-chat-form textarea { min-height: 42px; max-height: 110px; resize: none; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 11px; color: #eee; outline: none; background: #20201f; font: 400 11px/1.4 'JetBrains Mono', monospace; }
.ray-chat-form textarea:focus { border-color: #b8ff5b; }
.ray-chat-form textarea:disabled { cursor: not-allowed; opacity: .5; }
.ray-chat-form button { align-self: end; width: 42px; height: 42px; border: 0; border-radius: 12px; color: #111; background: #b8ff5b; cursor: pointer; font-weight: 800; }
.ray-chat-form button:disabled { cursor: wait; opacity: .45; }
@media (max-width: 600px) {
    .ray-chat { right: 7px; bottom: 70px; width: calc(100vw - 14px); height: min(680px, calc(100dvh - 82px)); }
    .ray-chat-launcher { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { .ray-chat-messages { scroll-behavior: auto; } }
