/* A small grounded companion; the browser's lower edge is its floor. */
.robot-companion{--robot-width:86px;--robot-height:124px;position:fixed;left:0;bottom:env(safe-area-inset-bottom,0px);width:var(--robot-width);height:var(--robot-height);z-index:34;pointer-events:none;isolation:isolate;color:#f5f5f3;font-family:var(--sans);transform:translate3d(calc(100vw - 124px),0,0)}
.robot-companion [hidden]{display:none!important}
.robot-companion.is-hidden{display:none}
.robot-body{position:absolute;inset:0;pointer-events:none;transform-origin:50% 98%}
.robot-launch{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;pointer-events:auto;touch-action:none;cursor:grab;user-select:none}
.robot-launch:active{cursor:grabbing}
.robot-launch:focus-visible{outline:2px solid #b0d6dc;outline-offset:2px;border-radius:12px}
.robot-canvas,.robot-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.robot-canvas{opacity:0}
.robot-companion.is-live .robot-canvas{opacity:1}
.robot-companion.is-live .robot-poster{opacity:0}
.robot-shadow{position:absolute;bottom:0;left:22%;width:56%;height:5px;border-radius:50%;background:rgba(8,14,18,.5);filter:blur(2px);pointer-events:none}
.robot-invite{position:absolute;bottom:calc(100% + 5px);left:50%;transform:translate(-50%,5px);display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;line-height:1.5;padding:6px 10px;border-radius:18px;background:#1a2025;color:#f5f5f3;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none}
.robot-invite::before{content:'';width:5px;height:5px;border-radius:50%;background:#b0d6dc}
.robot-companion.is-inviting .robot-invite,.robot-companion:focus-within .robot-invite,.robot-companion:hover .robot-invite{opacity:1;transform:translate(-50%,0)}
.robot-companion.is-chatting .robot-invite{opacity:0}
.robot-chat{--chat-ground:#182127;--chat-panel:#202c34;--chat-ink:#f5f5f3;--chat-muted:#c0cdd4;--chat-accent:#b0d6dc;position:fixed;right:22px;bottom:calc(138px + env(safe-area-inset-bottom,0px));width:380px;max-width:calc(100vw - 32px);height:520px;max-height:calc(100dvh - 164px);display:flex;flex-direction:column;z-index:40;background:var(--chat-ground);color:var(--chat-ink);border:1px solid #45515a;border-radius:16px;box-shadow:0 16px 48px rgba(9,15,20,.22);font-family:var(--sans);font-size:14px;line-height:1.6;overflow:hidden;isolation:isolate}
.robot-chat[hidden]{display:none!important}
.robot-chat.is-entering{animation:robotChatIn .22s cubic-bezier(.16,1,.3,1)}
.robot-chat-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 18px 15px;border-bottom:1px solid #39464f;flex-shrink:0}
.robot-chat-identity{display:flex;align-items:center;gap:11px;min-width:0}
.robot-chat-mark{width:32px;height:32px;flex:none;color:var(--chat-accent);fill:none;stroke:currentColor;stroke-width:1.4}
.robot-chat h2{font-size:16px;line-height:1.4;letter-spacing:-.02em}
.robot-chat-subtitle{display:block;font-size:11px;color:var(--chat-muted);margin-top:2px}
.robot-chat-close{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;flex-shrink:0}
.robot-chat-close:hover{background:var(--chat-panel)}
.robot-chat-close svg,.robot-chat-submit svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6}
.robot-chat-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#55636b transparent;padding:22px 18px 16px}
.robot-chat-welcome h3{font-size:27px;line-height:1.2;letter-spacing:-.025em;max-width:280px;margin-bottom:12px}
.robot-chat-welcome p{font-size:13px;line-height:1.7;color:var(--chat-muted);max-width:295px}
.robot-chat-suggestions{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:22px}
.robot-chat-suggestions button{font-size:12px;line-height:1.5;text-align:start;padding:9px 12px;border:1px solid #51606a;border-radius:10px;color:var(--chat-ink)}
.robot-chat-suggestions button:hover{border-color:var(--chat-accent);background:var(--chat-panel)}
.robot-message{margin:0 0 22px;overflow-wrap:anywhere;white-space:pre-wrap;unicode-bidi:plaintext;font-size:14px;line-height:1.8}
.robot-message-user{margin-inline-start:35px;padding:11px 14px;background:#31404a;border-radius:12px 12px 3px 12px}
.robot-message-assistant{padding-inline-end:12px}
.robot-message-label{display:block;font-size:10px;letter-spacing:.025em;line-height:1.4;color:var(--chat-accent);margin-bottom:7px;white-space:normal}
.robot-chat-status{color:var(--chat-muted);font-size:12px;line-height:1.6;min-height:20px}
.robot-chat-status.is-error{color:#ffc6ad}
.robot-chat .robot-chat-footer{display:block;flex-shrink:0;margin:0;padding:12px 14px 13px;background:var(--chat-ground);color:var(--chat-ink);border:0;border-top:1px solid #39464f;font:inherit}
.robot-chat-form{display:flex;align-items:flex-end;gap:10px;padding:10px 8px 8px 12px;background:var(--chat-panel);border:1px solid #55636b;border-radius:12px}
.robot-chat-form:focus-within{border-color:var(--chat-accent)}
.robot-chat-input{font:14px/1.6 var(--sans);min-height:24px;max-height:96px;resize:none;flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--chat-ink);padding:0 0 3px;field-sizing:content}
.robot-chat-input::placeholder{color:var(--chat-muted)}
.robot-chat-submit{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:9px;background:var(--chat-accent);color:var(--chat-ground)}
.robot-chat-submit:disabled{opacity:.45;cursor:default}
.robot-chat-note{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;color:var(--chat-muted);padding:9px 2px 0;line-height:1.4}
.robot-chat-reset{text-decoration:underline;text-underline-offset:3px;font-size:10px;padding:2px 0}
.robot-chat :focus-visible{outline:2px solid var(--chat-accent);outline-offset:3px}
.robot-chat-input:focus-visible{outline:none}
.robot-chat[dir=rtl]{right:auto;left:22px}
.robot-chat[dir=rtl] h2,.robot-chat[dir=rtl] h3{letter-spacing:0;line-height:1.5}
.robot-chat[dir=rtl] .robot-message{line-height:1.9}
.robot-chat[dir=rtl] .robot-message-user{border-radius:12px 12px 12px 3px}
@keyframes robotChatIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){
 .robot-companion{--robot-width:68px;--robot-height:100px}
 .robot-chat,.robot-chat[dir=rtl]{left:12px;right:12px;bottom:calc(110px + env(safe-area-inset-bottom,0px));width:auto;max-width:none;max-height:calc(100dvh - 128px);height:510px;border-radius:14px}
 .robot-chat-header{padding:14px 15px 12px}.robot-chat-scroll{padding:18px 15px 12px}
 .robot-chat-welcome h3{font-size:25px}.robot-chat-input{font-size:16px}
 .robot-chat .robot-chat-footer{padding:10px 12px}.robot-invite{font-size:10px;padding:5px 8px}
}
@media(max-height:540px){.robot-chat,.robot-chat[dir=rtl]{bottom:8px;top:8px;height:auto;max-height:none}.robot-chat-welcome h3{font-size:22px}.robot-chat-header{padding-block:10px}}
.motion-paused .robot-chat.is-entering{animation:none}
@media(prefers-reduced-motion:reduce){.robot-chat.is-entering{animation:none}.robot-invite{transition:none}}
@media print{.robot-companion,.robot-chat{display:none!important}}
