/* Chat is a separate full-viewport workspace, never a growing job-page transcript. */
html.tui-chat-open{overflow:hidden}
body #app .chatwrap.tui-chat-entry{padding:0;background:transparent;border:0;box-shadow:none}
.tui-chat-launcher{display:flex;align-items:center;gap:16px;width:100%;padding:20px;border:1px solid #b9d5e3;border-radius:24px;background:#fff;color:#14384d;text-align:left;cursor:pointer;font:inherit}
.tui-chat-launcher img{width:60px;height:60px;border-radius:50%;border:1px solid #47caff}
.tui-chat-launcher span span{display:block;font-size:14px;color:#537080;margin-top:5px}
.tui-chat-launcher strong{font-size:20px}
body #app dialog.tui-chat-page{position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;padding:0;border:0;border-radius:0;background:white;color:#18384b;font:16px/1.5 Inter,system-ui,sans-serif;overflow:hidden}
body #app dialog.tui-chat-page[open]{display:flex;flex-direction:column}
.tui-chat-page::backdrop{background:#071b30aa}
.tui-chat-banner{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:130px;padding:max(20px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 20px max(24px,env(safe-area-inset-left));background:linear-gradient(90deg,#061a30e8,#061a3030),url('/qs-app/tui-header.png') center right/cover;color:white;box-sizing:border-box}
.tui-chat-banner-title>span{color:#92ddf3;font-size:12px;letter-spacing:.18em;font-weight:800}
.tui-chat-banner h1{font:800 clamp(25px,4vw,36px)/1.2 Inter,system-ui,sans-serif;color:#fff;margin:8px 0 0}
.tui-chat-back{border:1px solid #7addff;background:#123c52e8;color:white;border-radius:14px;min-height:44px;padding:10px 20px;font:700 15px Inter,system-ui;cursor:pointer}
.tui-chat-tools{display:flex;flex-wrap:wrap;gap:8px;padding:10px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left));border-bottom:1px solid #dae5eb;background:#f5f9fc;flex:none}
.tui-chat-tool{display:inline-block;border:1px solid #bdd6e4;border-radius:12px;background:#fff;color:#193e53;padding:10px 14px;min-height:44px;box-sizing:border-box;font:600 14px Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer}
.tui-chat-tools>.tui-chat-tool:first-child{color:#b11462;background:#ff258f0c;border-color:#f3bfd5}
.tui-chat-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:22px max(20px,env(safe-area-inset-right)) 22px max(20px,env(safe-area-inset-left));background:#fff}
.tui-chat-conversation,.tui-chat-saved{max-width:920px;margin:0 auto}
body #app .tui-chat-page .tui-chat-log p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.6;margin:16px 0;padding:16px;border-radius:16px;background:#f3f7fa;color:#18384b}
body #app .tui-chat-page .tui-chat-log p:nth-child(odd){background:#fff0f7;border:1px solid #f7d5e5;margin-left:clamp(0px,5vw,80px)}
body #app .tui-chat-page .tui-chat-scheduling section{border:1px solid #b7d7e6;border-radius:18px;padding:18px;margin:16px 0;background:#f4f9fc;color:#193e53;overflow-wrap:anywhere}
.tui-chat-page .tui-chat-scheduling button{margin:5px;min-height:44px}
.tui-chat-composer{flex:none;border-top:1px solid #d7e4eb;background:#fff;padding:12px max(20px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));box-shadow:0 -4px 20px #18384b08}
body #app .tui-chat-page .chatinput{display:flex;max-width:920px;margin:0 auto;gap:10px}
body #app .tui-chat-page .chatinput[hidden],.tui-chat-page [hidden]{display:none!important}
body #app .tui-chat-page .chatinput .tui-chat-message{min-width:0;flex:1;background:#fff;color:#18384b;border:1px solid #b9cfdb;border-radius:16px;padding:11px 14px;font:16px/22px Inter,system-ui;box-sizing:border-box;min-height:46px;max-height:112px;resize:none;overflow-y:auto;appearance:none;-webkit-appearance:none;box-shadow:none;outline:none}
body #app .tui-chat-page .chatinput .send{background:#ff238d;color:white;border:0;border-radius:18px;padding:12px 22px;font:700 16px Inter,system-ui;min-height:48px}
body #app .tui-chat-page .tui-chat-status,body #app .tui-chat-page .tui-chat-archive-status{max-width:920px;margin:6px auto 0;color:#4d6d7f;font-size:13px}
.tui-chat-page button:disabled{opacity:.5;cursor:wait}
.tui-chat-page button:focus-visible,.tui-chat-page a:focus-visible{outline:3px solid #18a4c6;outline-offset:3px}
.tui-chat-archive-card{padding:18px;border:1px solid #cadfe8;border-radius:18px;margin:14px 0;overflow-wrap:anywhere}
.tui-chat-archive-card h3{font:700 18px Inter,system-ui;color:#193e53;margin:0 0 10px}
.tui-chat-archive-card .tui-chat-tool{margin:4px}
.tui-chat-transcript{white-space:pre-wrap;overflow-wrap:anywhere;font:15px/1.6 Inter,system-ui;color:#18384b;padding:14px;background:#f5f9fb;border-radius:12px;max-height:60dvh;overflow:auto}
@media(max-width:500px){.tui-chat-banner{min-height:108px;padding:16px}.tui-chat-tools{padding:8px 12px;gap:6px}.tui-chat-tool{padding:10px;font-size:13px}.tui-chat-scroll{padding:14px}.tui-chat-composer{padding:10px 12px max(10px,env(safe-area-inset-bottom))}body #app .tui-chat-page .tui-chat-log p{padding:12px}.tui-chat-back{padding:10px 14px}}

/* Keep a clear, compact composer without the browser's large default field outline. */
body #app .tui-chat-page .chatinput{align-items:flex-end}
body #app .tui-chat-page .chatinput .tui-chat-message:focus{border-color:#198cab;outline:2px solid #198cab44;outline-offset:1px;box-shadow:none}
body #app .tui-chat-page .chatinput .send{min-height:46px;height:46px;padding:10px 18px;border-radius:16px;flex:none}
body #app .tui-chat-page .tui-chat-status:empty,body #app .tui-chat-page .tui-chat-archive-status:empty{display:none}
