/* HOME BASE · full-screen comms overlay (Rober chat). Loaded after style.css. */
.chat-root{position:fixed;inset:0;z-index:65;display:grid;place-items:center;padding:clamp(0px,2.5vh,26px);background:radial-gradient(90% 75% at 50% 0,#3a1c2088,#07050de8 72%);backdrop-filter:blur(7px)}
.chat-root[hidden]{display:none}
.chat{position:relative;display:flex;flex-direction:column;width:min(1060px,100%);height:min(90vh,880px);overflow:hidden;border:2px solid #ffffff24;border-radius:28px;background:linear-gradient(155deg,#211326f7,#120a14fc 60%);box-shadow:0 34px 90px #000b,0 0 0 1px #ffffff0a inset;animation:chat-in .28s cubic-bezier(.2,.9,.3,1)}
@keyframes chat-in{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}
.chat::before{content:'';position:absolute;inset:0 auto auto 0;width:100%;height:2px;background:linear-gradient(90deg,transparent,var(--dust),var(--sky),transparent);opacity:.75}
.chat-top{display:flex;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid #ffffff16;background:#ffffff06}
.chat-id{display:flex;align-items:center;gap:12px;min-width:0}
.chat-face{display:block;width:46px;flex:0 0 46px;filter:drop-shadow(0 4px 8px #0008)}
.chat-face svg{display:block;width:100%}
.chat-id b{display:block;font-size:19px;letter-spacing:.12em;line-height:1.1}
.chat-id small{display:flex;align-items:center;gap:6px;font-size:11px;letter-spacing:.08em;opacity:.68;white-space:nowrap}
.chat-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#5fe3a1;box-shadow:0 0 9px #5fe3a1}
.chat-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.chat-voice,.chat-x{padding:7px 12px;border:2px solid #ffffff2a;border-radius:999px;background:#ffffff0d;font-size:12px;transition:background .2s,border-color .2s,color .2s}
.chat-voice:hover,.chat-x:hover{background:#ffffff1c}
.chat-voice.on{border-color:#5fe3a188;background:#5fe3a11a;color:#b9ffd9}
.chat-x{width:36px;height:36px;padding:0;font-size:15px;line-height:1}
.chat-body{flex:1 1 0;min-height:0;display:grid;grid-template-columns:255px minmax(0,1fr)}
.chat-rail{display:flex;flex-direction:column;gap:14px;padding:20px;border-right:1px solid #ffffff12;overflow:auto;background:#0d070f4d}
.chat-portrait{padding:14px;border-radius:22px;background:radial-gradient(80% 80% at 50% 20%,#e8935a2e,#ffffff08);border:1px solid #ffffff1a}
.chat-portrait svg{display:block;width:100%;filter:drop-shadow(0 8px 12px #0009)}
.chat-quip{margin:0;padding:10px 12px;border-left:3px solid var(--dust);border-radius:0 12px 12px 0;background:#ffffff0b;font-size:13px;font-style:italic;line-height:1.5;opacity:.9}
.chat-meta{display:grid;gap:3px;padding:12px;border-radius:16px;border:1px solid #7fd4ff33;background:#7fd4ff0f;font-size:12px}
.chat-meta span{font-size:10px;letter-spacing:.14em;color:var(--sky);opacity:.8}
.chat-meta small{opacity:.62;line-height:1.4}
.chat-credit{margin:auto 0 0;font-size:10px;line-height:1.4;opacity:.42}
.chat-main{display:flex;flex-direction:column;min-height:0;min-width:0}
.chat-log{flex:1 1 0;min-height:0;overflow:auto;padding:20px 22px 8px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.msg{display:flex;align-items:flex-end;gap:9px;max-width:min(86%,720px);animation:msg-in .2s ease-out}
@keyframes msg-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.msg.user{align-self:flex-end;flex-direction:row-reverse}
.msg .avatar{display:block;width:32px;flex:0 0 32px;filter:drop-shadow(0 2px 4px #0008)}
.msg .avatar svg{display:block;width:100%}
.msg-body{min-width:0}
.msg .who{display:block;margin:0 0 3px;font-size:10px;letter-spacing:.13em;text-transform:uppercase;opacity:.52}
.msg.user .who{text-align:right}
.msg .bubble{margin:0;padding:10px 14px;border:1px solid #ffffff1c;border-radius:16px 16px 16px 5px;background:#ffffff0e;font-size:14px;line-height:1.48;white-space:pre-wrap;overflow-wrap:anywhere}
.msg.rober .bubble{border-color:#e8935a66;background:#e8935a12}
.msg.user .bubble{border-color:#7fd4ff59;border-radius:16px 16px 5px 16px;background:#7fd4ff14}
.msg.typing .bubble{display:flex;gap:5px;align-items:center;padding:13px 15px}
.msg.typing .bubble i{display:block;width:6px;height:6px;border-radius:50%;background:var(--dust);animation:typing 1s ease-in-out infinite}
.msg.typing .bubble i:nth-child(2){animation-delay:.15s}.msg.typing .bubble i:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.msg.control{max-width:100%;display:flex;align-items:flex-start;gap:10px;padding:10px 13px;border-left:3px solid var(--sky);border-radius:0 14px 14px 0;background:linear-gradient(90deg,#7fd4ff12,#7fd4ff03)}
.msg.control .radio-mark{display:block;width:16px;height:12px;flex:0 0 16px;margin-top:3px;border:2px solid var(--sky);border-radius:3px;opacity:.8;position:relative}
.msg.control .radio-mark::before{content:'';position:absolute;left:3px;right:3px;top:50%;height:1px;background:var(--sky);box-shadow:0 -3px 0 var(--sky),0 3px 0 var(--sky)}
.msg.control .who{color:var(--sky);opacity:.8}
.msg.control .bubble{padding:0;border:0;background:none;font-size:13px;font-style:italic;opacity:.9}
.chat-quick{display:flex;gap:7px;padding:4px 18px 10px;overflow-x:auto;scrollbar-width:thin}
.chat-quick button{flex:0 0 auto;padding:6px 12px;border:1px solid #ffffff26;border-radius:999px;background:#ffffff08;font-size:12px;transition:background .18s,border-color .18s,transform .18s}
.chat-quick button:hover{background:#ffffff16;border-color:var(--dust);transform:translateY(-1px)}
.chat-form{display:flex;align-items:flex-end;gap:9px;padding:11px 16px;border-top:1px solid #ffffff14;background:#0b060d66}
.chat-form textarea{flex:1 1 auto;min-height:44px;max-height:110px;resize:none;padding:11px 14px;border:2px solid #ffffff24;border-radius:16px;background:#00000033;color:var(--cream);font:inherit;font-size:14px;line-height:1.4;outline:none;transition:border-color .2s,background .2s}
.chat-form textarea:focus{border-color:#7fd4ff88;background:#00000055}
.chat-form textarea::placeholder{opacity:.4}
.chat-send{width:46px;height:46px;flex:0 0 46px;border:2px solid #ffc89c;border-radius:50%;background:var(--dust);color:#2a1210;font-size:18px;font-weight:700;transition:transform .15s,filter .15s}
.chat-send:hover{filter:brightness(1.08)}
.chat-send:active{transform:scale(.95)}
.chat-send:disabled{opacity:.45;cursor:not-allowed}
.chat-note{margin:0;padding:0 18px 11px;font-size:10px;line-height:1.4;opacity:.42}
.chat-busy .chat-quick button{opacity:.55}
/* side-panel launcher fallback */
.chat-launch{display:grid;gap:12px;justify-items:start}
.chat-launch-face{display:block;width:86px;filter:drop-shadow(0 5px 8px #0008)}
.chat-launch-face svg{display:block;width:100%}
.chat-launch b{font-size:17px}
.chat-launch p{margin:4px 0 0;font-size:13px;line-height:1.5;opacity:.75}
.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:820px){
  .chat-root{padding:0}
  .chat{width:100%;height:100%;border:0;border-radius:0}
  .chat-body{grid-template-columns:1fr}
  .chat-rail{display:none}
  .chat-log{padding:14px 14px 6px}
  .msg{max-width:94%}
  .chat-top{padding:11px 13px}
  .chat-form{padding:9px 12px calc(9px + env(safe-area-inset-bottom))}
  .chat-note{padding:0 13px 8px}
  .chat-quick{padding:2px 13px 8px}
}
@media(max-height:560px){.chat-face,.chat-portrait{display:none}.chat-top{padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.chat,.msg{animation:none}.msg.typing .bubble i{animation:none}.chat-log{scroll-behavior:auto}}
