#chatLauncher{position:fixed;right:22px;bottom:22px;z-index:199;border:1px solid #c9a16b;border-radius:50px;background:linear-gradient(125deg,#edce9d,#c09358);color:#142034;font-weight:800;padding:14px 22px;box-shadow:0 10px 35px #0009;cursor:pointer}
#chatPanel{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;z-index:200;display:none;flex-direction:column;border:0;border-radius:0;background:#0d1729;box-shadow:none;overflow:hidden;color:#eef3fb}
#chatPanel.open{display:flex}
html.chat-overlay-open,body.chat-overlay-open{overflow:hidden!important}
body.chat-overlay-open #chatLauncher{display:none!important}
#chatPanel.compact{inset:auto;right:20px;bottom:20px;width:min(430px,calc(100vw - 28px));height:min(700px,calc(100dvh - 40px));border:1px solid #a98a59;border-radius:18px;box-shadow:0 25px 80px #000c}
.chat-head{min-height:66px;box-sizing:border-box;padding:13px 30px;background:linear-gradient(110deg,#08766c,#0d625d);display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;border-bottom:1px solid #d0ae76}
.chat-head-title{color:#fff;font-size:20px;letter-spacing:.04em}
.chat-head-actions{display:flex;align-items:center;gap:18px}.chat-brand-banner>.chat-head-actions{position:absolute;right:24px;top:16px;z-index:2}
.chat-head-actions button{display:grid;place-items:center;width:38px;height:38px;border:0;background:transparent;color:#fff;font-size:30px;line-height:1;cursor:pointer;border-radius:8px}
.chat-head-actions button:hover{background:#ffffff20}
.chat-brand-banner{position:relative;padding:24px 140px 26px 40px;background:linear-gradient(110deg,#182d4a,#0e1e35);display:flex;flex-direction:column;gap:5px;flex:0 0 auto}
.chat-brand-banner strong{color:#f2d3a1;font-size:25px;line-height:1.35}
.chat-brand-banner small{color:#aebbd0;font-size:15px;line-height:1.5}
.chat-close{font-family:inherit}
.chat-messages{flex:1 1 auto;min-height:0;overflow:auto;padding:22px 34px;display:flex;flex-direction:column;gap:14px;background:#0e182c}
.chat-bubble{max-width:min(760px,85%);padding:12px 16px;border-radius:14px;background:#20334e;color:#f5f7fb;align-self:flex-start;font-size:15px;line-height:1.6;overflow-wrap:anywhere;border:1px solid #38516d}
.chat-bubble.mine{background:#9d794c;color:#fff;align-self:flex-end;border-color:#c49a61}
.chat-bubble time{display:block;opacity:.75;font-size:11px;margin-top:6px}
.chat-send{display:flex;gap:12px;padding:16px 28px calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid #34445a;background:#101a2d;flex:0 0 auto}
.chat-send textarea{flex:1;resize:none;min-width:0;min-height:76px;max-height:150px;background:#15283f;color:white;border:1px solid #455a73;border-radius:12px;padding:14px 16px;font:inherit;font-size:16px;line-height:1.5}
.chat-send button{background:#d6b27a;color:#0a1422;border:0;border-radius:12px;padding:0 28px;font-size:16px;font-weight:800;cursor:pointer}
.chat-note{font-size:11px;color:#93a5bd;text-align:center;padding:7px 12px}
@media(max-width:700px){.chat-head{min-height:58px;padding:10px 16px}.chat-brand-banner{padding:20px 104px 22px 20px}.chat-brand-banner>.chat-head-actions{right:12px;top:10px}.chat-brand-banner strong{font-size:21px}.chat-brand-banner small{font-size:13px}.chat-messages{padding:14px 14px}.chat-send{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));gap:8px}.chat-send textarea{min-height:58px;padding:10px 12px}.chat-send button{padding:0 18px}.chat-head-actions{gap:8px}}
@media(max-width:600px){#chatPanel.compact{right:10px;bottom:10px;width:calc(100vw - 20px);height:min(72dvh,620px);border-radius:16px}#chatPanel.compact .chat-brand-banner{padding:14px 92px 14px 16px}#chatPanel.compact .chat-brand-banner>.chat-head-actions{right:10px;top:8px}#chatPanel.compact .chat-brand-banner strong{font-size:18px}#chatPanel.compact .chat-brand-banner small{font-size:12px}}



.chat-welcome{padding:10px 14px;font-size:12px;color:#ead4b1;background:#1c2c43;white-space:pre-wrap}.chat-upload{padding:5px 14px;color:#e8c28c;font-size:12px}.chat-upload input{position:absolute;width:1px;height:1px;opacity:0}.chat-upload label{cursor:pointer}

.human-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:9px 13px;background:#101c32;border-top:1px solid #35425d}.human-row button{border:1px solid #d9ae6d;border-radius:8px;background:#a77d3a;color:#fff;font-size:13px;font-weight:700;padding:10px 14px;cursor:pointer}.human-row button:disabled{opacity:.55;cursor:default}.human-row small{color:#c2c9d4;font-size:11px;line-height:1.5;flex:1}

/* V39 - configurable quick questions */
.chat-quick-questions{padding:10px 14px;border-top:1px solid rgba(148,163,184,.22);display:flex;gap:8px;flex-wrap:wrap;align-items:center;max-height:160px;overflow-y:auto}
.chat-quick-questions[hidden]{display:none!important}
.chat-quick-heading{font-size:12px;opacity:.8;width:100%;font-weight:600}
.chat-quick-button{font:inherit;font-size:13px;line-height:1.4;max-width:100%;overflow-wrap:anywhere;border:1px solid #64748b80;border-radius:18px;padding:7px 12px;background:#ffffff10;color:inherit;cursor:pointer}
.chat-quick-button:hover{background:#ffffff24;border-color:#8b9bb4}
.chat-quick-button:disabled{opacity:.55;cursor:wait}

/* V41: quick questions at top-left of conversation */
#chatPanel .chat-quick-questions{flex:0 0 auto;align-self:stretch;order:0;padding:12px 14px 9px;border-top:0;border-bottom:1px solid rgba(148,163,184,.18);background:#101e33;max-height:190px;overflow-y:auto;justify-content:flex-start;align-content:flex-start;color:#e7eef8}
#chatPanel .chat-quick-heading{text-align:left;font-size:12px;line-height:1.5;color:#c7d8ec;font-weight:600;margin-bottom:1px}
#chatPanel .chat-quick-button{display:inline-flex;align-items:center;justify-content:flex-start;min-height:31px;text-align:left;background:#1b304c;color:#e9f2ff;border:1px solid #436383;border-radius:10px;padding:7px 11px;transition:background .15s ease}
#chatPanel .chat-quick-button:hover{background:#294565;border-color:#7aa1cc}
#chatPanel .chat-quick-questions[hidden]{display:none!important}

/* V42: Quick questions are a genuine first item INSIDE the scrolling chat message area */
#chatPanel #chatMessages #chatQuickQuestions{position:static;order:initial;flex:0 0 auto;align-self:stretch;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;justify-content:flex-start;align-content:flex-start;max-height:none;overflow:visible;padding:10px 11px;margin:0 0 4px;background:#182941;border:1px solid #38516d;border-radius:12px;color:#e7eef8}
#chatPanel #chatMessages #chatQuickQuestions[hidden]{display:none!important}
#chatPanel #chatMessages #chatQuickQuestions .chat-quick-heading{width:100%;text-align:left;margin:0 0 1px}
#chatPanel #chatMessages #chatQuickQuestions .chat-quick-button{flex:0 1 auto;max-width:100%;overflow-wrap:anywhere}

/* V43: hide default welcome text, keep quick questions and chat messages */
#chatPanel #chatWelcome{display:none!important}

/* V44 clickable URLs in chat messages */
#chatPanel .chat-bubble .chat-message-link{color:#a9dbff;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;word-break:break-word;cursor:pointer}
#chatPanel .chat-bubble.mine .chat-message-link{color:#ffffff;text-decoration:underline}
#chatPanel .chat-bubble .chat-message-link:hover{opacity:.85}

/* R8.12: compact window remains on the same page; full view is the default. */
#chatPanel.compact .chat-head{min-height:54px;padding:8px 14px}
#chatPanel.compact .chat-head-title{font-size:16px}
#chatPanel.compact .chat-head-actions button{width:32px;height:32px;font-size:24px}
#chatPanel.compact .chat-messages{padding:12px;gap:10px}
#chatPanel.compact .chat-bubble{font-size:13px;padding:9px 11px}
#chatPanel.compact .human-row{padding:8px 10px}
#chatPanel.compact .chat-upload{padding:5px 10px}
#chatPanel.compact .chat-send{padding:9px 10px calc(9px + env(safe-area-inset-bottom,0px))}
#chatPanel.compact .chat-send textarea{min-height:48px;font-size:14px}
#chatPanel.compact .chat-send button{padding:0 16px;font-size:14px}
