.chat-main{min-height:0}.chat-main .composer{position:relative;right:auto;left:auto;bottom:auto;flex:none;max-height:48vh;overflow:auto;padding:12px max(16px,calc((100% - 820px)/2));background:var(--surface,#0b1c2e)}.chat-main .messages{min-height:0;padding-bottom:20px}.chat-top{flex-shrink:0}.chat-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.chat-tools label{display:flex;align-items:center;gap:5px;font-size:12px}.chat-tools select{max-width:210px;background:transparent;color:inherit;padding:7px;border:1px solid #8296ad55;border-radius:8px}.chat-tools option{background:#fff;color:#17263a}.composer .chat-tools button,.composer #stopResponse,.composer #attachmentPreview button{width:auto;height:auto;font-size:12px;padding:8px 10px;border-radius:8px}.chat-tools button[aria-pressed=true]{background:#1388be;color:white}#attachmentPreview:not([hidden]){display:flex;gap:10px;align-items:center;margin:6px 0;font-size:12px}#attachmentPreview img,.chat-attachment img{max-width:220px;max-height:160px;border-radius:10px;object-fit:contain}#chatStats{font-size:11px;color:#8296ad;min-height:18px}.message .bubble{min-width:0;white-space:normal}.message-content{overflow-wrap:anywhere}.markdown-body{line-height:1.9;white-space:normal}.markdown-body p{margin:0 0 10px}.markdown-body ul,.markdown-body ol{padding-inline-start:24px}.markdown-body h1,.markdown-body h2,.markdown-body h3{line-height:1.5;margin:18px 0 10px}.markdown-body blockquote{border-inline-start:3px solid #20bfe9;padding:8px 14px;margin:10px 0;background:#8296ad18}.markdown-body code{direction:ltr;unicode-bidi:embed;font-family:monospace;background:#8296ad20;padding:2px 5px;border-radius:4px}.markdown-body pre{direction:ltr;text-align:left;overflow:auto;background:#071321;color:#eaf3ff;padding:14px;border-radius:10px;white-space:pre}.markdown-body pre code{background:none;padding:0}.markdown-body table{border-collapse:collapse;display:block;overflow:auto;max-width:100%;margin:12px 0;white-space:normal}.markdown-body th,.markdown-body td{border:1px solid #8296ad55;padding:8px 12px;min-width:80px}.markdown-body th{background:#8296ad18}.markdown-body a{text-decoration:underline;color:#20bfe9}.markdown-body .katex-display{direction:ltr;overflow-x:auto;overflow-y:hidden;padding:8px 0}.markdown-body .katex{direction:ltr;unicode-bidi:isolate}.chat-attachment{display:flex;gap:8px;align-items:center;margin:8px 0;font-size:12px}.chat-attachment a{text-decoration:underline}.copy-actions button{font-size:11px}[hidden]{display:none!important}[data-theme=light] .chat-main .composer{background:#f8fafc}@media(max-width:600px){.chat-main .composer{max-height:55vh}.chat-tools select{max-width:160px}.message .bubble{max-width:92%}.chat-tools{gap:6px}}

.attachment-picker{position:relative;overflow:hidden;cursor:pointer!important}.attachment-picker input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0}

.behavior-choices{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.behavior-choices button{font:inherit;padding:10px 16px;border:1px solid #20bfe988;border-radius:12px;background:#20bfe912;color:inherit;cursor:pointer}.behavior-choices button:hover{background:#20bfe933}.behavior-choices button:disabled{opacity:.5;cursor:wait}

/* More room for desktop answers; mobile rules remain unchanged. */
@media(min-width:1024px){
 .chat-main .messages{padding-inline:max(28px,calc((100% - 1160px)/2));}
 .chat-main .message.assistant .bubble{flex:1;max-width:calc(100% - 44px);min-width:0;}
 .chat-main .composer{padding-inline:max(28px,calc((100% - 1160px)/2));}
}

/* Compact start screen, scoped to an empty conversation. */
.chat-main .messages:has(.welcome){padding-block:10px;display:flex;align-items:center;justify-content:center;}
.chat-main .welcome{width:100%;margin:0 auto;max-width:880px;}
.chat-main .welcome .logo-stage{width:76px;height:76px;box-shadow:0 0 34px #15bce420;}
.chat-main .welcome .logo-stage img{width:88px;height:88px;}
.chat-main .welcome h1{font-size:clamp(20px,2.1vw,28px);margin:12px 0 6px;line-height:1.5;}
.chat-main .welcome>p{font-size:14px;line-height:1.7;margin:6px 0;}
.chat-main .welcome .prompts{margin-top:16px;gap:8px;}
.chat-main .welcome .prompts button{padding:11px 13px;line-height:1.6;font-size:13px;gap:10px;}
.chat-main .welcome svg{width:18px;height:18px;flex:none;}
@media(min-width:901px) and (max-height:760px){.chat-main .welcome .logo-stage{display:none}.chat-main .welcome .eyebrow{font-size:12px}.chat-main .welcome h1{font-size:22px;margin-top:4px}.chat-main .welcome .prompts{margin-top:10px;}.chat-main .welcome .prompts button{padding:8px 12px;}}
@media(max-width:600px){.chat-main .messages:has(.welcome){align-items:flex-start}.chat-main .welcome .logo-stage{width:58px;height:58px}.chat-main .welcome .logo-stage img{width:68px;height:68px}.chat-main .welcome h1{font-size:20px}.chat-main .welcome .prompts{margin-top:10px}.chat-main .welcome .prompts button{padding:9px;font-size:12px;}}
