/*
 * Word.Studio — chatbots: games, teachers, the Assistant.
 *
 * inc/chat.php puts every bot on AI Engine's built-in ChatGPT theme, and this file turns
 * that theme into the site's chat, so it looks the same in any bot and any template.
 *
 * chatgpt.css loads after this file, so rules win on specificity rather than order. Each
 * one starts `body .mwai-chat.mwai-chatgpt-theme` and then repeats the theme's own path,
 * which is always one step more specific. The only !important rules are the two that
 * have to answer one from AI Engine: code block padding and generated image height.
 */

:root { --ws-chat-width: 860px; }

/* The container's 100% height stops text placed under a chat from taking up any room,
 * so it runs out of the tool box. */
body .mwai-chatbot-container { height: auto; }
/* Text under a chat lines up with it when the tool box is wider than the chat. */
body .mwai-chatbot-container ~ p {
	max-width: var(--ws-chat-width);
	margin-inline: auto;
}

body .mwai-chat.mwai-chatgpt-theme {
	width: 100%;
	max-width: var(--ws-chat-width);
	margin-inline: auto;
	font-family: var(--ws-font-sans);
}

/* AI Engine prints each bot's settings as inline variables on .mwai-chat, which a
 * stylesheet can't replace. Declaring them one level down feeds the theme's own rules. */
body .mwai-chat.mwai-chatgpt-theme .mwai-window-box {
	--mwai-spacing: var(--ws-space-4);
	--mwai-fontFamily: var(--ws-font-sans);
	--mwai-fontSize: var(--ws-text-body);
	--mwai-lineHeight: var(--ws-leading-body);
	--mwai-fontColor: var(--ws-text);
	--mwai-linkColor: var(--ws-text-strong);
	--mwai-borderColor: var(--ws-border);
	--mwai-borderRadius: var(--ws-radius-md);
	--mwai-accentColor: var(--ws-gray-900);
	--mwai-surfaceColor: var(--ws-white);
	--mwai-backgroundPrimaryColor: var(--ws-white);
	--mwai-backgroundSecondaryColor: transparent;
	--mwai-errorBackgroundColor: var(--ws-surface-inverse);
	--mwai-errorTextColor: var(--ws-text-on-inverse);
}

/* The chat has no box of its own: it sits on whatever card the template gives it. */
body .mwai-chat.mwai-chatgpt-theme .mwai-body {
	background: transparent;
	border-radius: 0;
	overflow: visible;
}

/* ── Conversation ──
 * Grows with the game, then scrolls inside itself so the message box stays on screen. */
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation {
	display: flex;
	flex-direction: column;
	gap: var(--ws-space-5);
	max-height: clamp(320px, 60dvh, 640px);
	padding-bottom: var(--ws-space-4);
	scrollbar-color: var(--ws-gray-300) transparent;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation::-webkit-scrollbar-track { background: transparent; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation::-webkit-scrollbar-thumb { background: var(--ws-gray-300); }
/* The jump-to-latest anchor is a zero-height flex child, so it would add a stray gap. */
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-jump-anchor { margin-block-start: calc(var(--ws-space-5) * -1); }

body .mwai-chat.mwai-chatgpt-theme .mwai-reply { padding: 0; }

/* Bot replies are prose, with no box, so a game reads like a story. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai { gap: var(--ws-space-3); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai:has(.mwai-name-text) { gap: var(--ws-space-1); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-name { margin: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-name .mwai-avatar {
	margin: 0;
	border-radius: 50%;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-name .mwai-name-text {
	margin: 0;
	opacity: 1;
	color: var(--ws-text-muted);
	font-size: var(--ws-text-meta);
	font-weight: 600;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-text { max-width: var(--ws-measure); }

/* The visitor's turns: small and solid, so "A" costs one line, not a whole card. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text {
	max-width: min(80%, 56ch);
	padding: 10px var(--ws-space-4);
	background: var(--ws-gray-900);
	color: var(--ws-white);
	border-radius: var(--ws-radius-lg);
	border-end-end-radius: var(--ws-radius-sm);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text ::selection {
	background: var(--ws-white);
	color: var(--ws-gray-900);
}

/* ── Inside a reply ── */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text p { margin: 0 0 var(--ws-space-3); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text p:last-child { margin-bottom: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text strong { color: var(--ws-text-strong); font-weight: 700; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text strong { color: inherit; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text a { text-decoration: underline; text-underline-offset: 2px; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text a:hover { color: var(--ws-black); }

body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(h1, h2, h3, h4, h5, h6) {
	margin: var(--ws-space-5) 0 var(--ws-space-2);
	color: var(--ws-text-strong);
	font-family: var(--ws-font-sans);
	font-weight: 700;
	line-height: var(--ws-leading-snug);
	letter-spacing: -0.02em;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text h1 { font-size: var(--ws-text-h3); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text h2 { font-size: var(--ws-text-h3); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text h3 { font-size: var(--ws-text-h4); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(h4, h5, h6) { font-size: var(--ws-text-body); }

body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(ul, ol) {
	margin: 0 0 var(--ws-space-3);
	padding-inline-start: 22px;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(ul, ol):last-child { margin-bottom: 0; }

body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text blockquote {
	margin: 0 0 var(--ws-space-3);
	padding: 0;
	padding-inline-start: var(--ws-space-4);
	border: 0;
	opacity: 1;
	color: var(--ws-gray-700);
	font-style: italic;
}

body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text table {
	display: block;
	width: fit-content;
	max-width: 100%;
	margin: 0 0 var(--ws-space-3);
	overflow-x: auto;
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-md);
	font-size: var(--ws-text-small);
	font-variant-numeric: tabular-nums;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(th, td) {
	padding: var(--ws-space-2) var(--ws-space-3);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--ws-border);
	font-size: var(--ws-text-small);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text th { color: var(--ws-text-strong); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text thead { background: var(--ws-surface-raised); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text tbody tr:nth-child(even) { background: transparent; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text tbody tr:last-child td { border-bottom: 0; }

/* Code */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(p, li, td, blockquote) > code {
	padding: 2px 6px;
	background: var(--ws-gray-100);
	color: var(--ws-text-strong);
	border-radius: var(--ws-radius-sm);
	font-size: 0.875em;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-block {
	margin: 0 0 var(--ws-space-3);
	border-radius: var(--ws-radius-md);
	background: var(--ws-gray-900);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-block:last-child { margin-bottom: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-header {
	padding: var(--ws-space-1) var(--ws-space-1) var(--ws-space-1) var(--ws-space-3);
	background: var(--ws-gray-800);
	color: var(--ws-gray-300);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-lang { opacity: 1; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-copy {
	padding: 6px var(--ws-space-2);
	background: transparent;
	color: var(--ws-gray-300);
	font-weight: 600;
	opacity: 1;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-copy:hover { background: var(--ws-gray-700); color: var(--ws-white); }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text .mwai-code-copy:focus-visible { outline-color: var(--ws-focus-on-inverse); outline-offset: -2px; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text pre {
	margin: 0;
	padding: 0;
	background: transparent;
	color: var(--ws-gray-100);
	border: 0;
	font-size: var(--ws-text-small);
	line-height: 1.6;
}
/* The theme sets this padding with !important. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text pre code { display: block; padding: var(--ws-space-3) !important; color: inherit; font-size: inherit; }
/* Syntax colors stay in the site's monochrome: weight for keywords, gray for comments. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text pre [class*="hljs-"] { color: inherit; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text pre :is(.hljs-keyword, .hljs-built_in, .hljs-title) { color: var(--ws-white); font-weight: 700; }
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text pre .hljs-comment { color: var(--ws-gray-400); }

/* Pictures from the image bots fill the column, and a tall one still fits on screen. AI
 * Engine sets a 220px limit inline, which only !important can replace. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(img, .mwai-image) {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: clamp(320px, 60dvh, 640px) !important;
	height: auto;
	margin: 0 0 var(--ws-space-3);
	border-radius: var(--ws-radius-md);
	cursor: zoom-in;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply .mwai-text :is(img, .mwai-image):last-child { margin-bottom: 0; }

/* Copy / PDF, under each reply. They appear on hover, and tuck into the gap between
 * replies so a long game isn't striped with icons. Touch screens always show them. */
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-reply-actions {
	margin: 0 0 calc(var(--ws-space-4) * -1) -6px;
	padding-top: var(--ws-space-1);
}
@media (hover: hover) {
	body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-reply-actions.mwai-hidden { opacity: 0; }
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-reply-actions :is(.mwai-copy-button, .mwai-download-button, .mwai-pdf-button) {
	border-radius: var(--ws-radius-sm);
	fill: var(--ws-text-muted);
	color: var(--ws-text-muted);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-reply-actions :is(.mwai-copy-button, .mwai-download-button, .mwai-pdf-button):hover {
	background: var(--ws-gray-100);
	fill: var(--ws-text-strong);
	color: var(--ws-text-strong);
	filter: none;
}

/* ── Message box ──
 * A white field with a Gray 200 hairline, because it has to read on white cards as well
 * as on the Gray 100 panels. Focus matches the tool form fields. Don't make it sticky: it
 * would cover the newest reply, and the page would stop following the conversation. */
body .mwai-chat.mwai-chatgpt-theme .mwai-input {
	align-items: flex-end;
	gap: var(--ws-space-1);
	margin: 0;
	background: var(--ws-white);
	border: 1px solid var(--ws-border);
	border-radius: var(--ws-radius-lg);
	transition: border-color var(--ws-dur-fast) var(--ws-ease-out), box-shadow var(--ws-dur-fast) var(--ws-ease-out);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input:focus-within {
	border-color: var(--ws-gray-900);
	box-shadow: 0 0 0 3px rgb(24 24 26 / 0.12);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-input-text { gap: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-input-text textarea {
	padding: 8px 4px 8px 10px;
	color: var(--ws-text-strong);
	font-family: var(--ws-font-sans);
	font-size: var(--ws-text-body);
	line-height: 24px;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-input-text textarea::placeholder {
	color: var(--ws-text-placeholder);
	opacity: 1;
}

/* Attach and microphone: quiet, with room for a thumb. */
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-file-upload { flex: none; align-self: flex-end; }
body .mwai-chat.mwai-chatgpt-theme .mwai-input :is(.mwai-file-upload-icon, .mwai-input-text .mwai-microphone) {
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--ws-radius-md);
	color: var(--ws-text-muted);
	transition: background-color var(--ws-dur-fast) var(--ws-ease-out), color var(--ws-dur-fast) var(--ws-ease-out);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-input-text .mwai-microphone svg { color: currentColor; opacity: 1; filter: none; }
body .mwai-chat.mwai-chatgpt-theme .mwai-input :is(.mwai-file-upload-icon, .mwai-input-text .mwai-microphone):hover {
	background: var(--ws-gray-100);
	color: var(--ws-text-strong);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-input-text .mwai-microphone[active="true"] {
	background: var(--ws-gray-900);
	color: var(--ws-white);
}

/* Send: waiting, ready, and busy match the tool form's submit button. */
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit {
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	background: var(--ws-gray-700);
	color: rgb(255 255 255 / 0.55);
	border-radius: var(--ws-radius-md);
	font-family: var(--ws-font-sans);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit:hover { background: var(--ws-gray-700); }
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit:is(.mwai-has-content, .mwai-busy) {
	background: var(--ws-gray-900);
	color: var(--ws-white);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-has-content:hover {
	background: var(--ws-black);
	filter: none;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-busy {
	width: auto;
	min-width: 40px;
	padding: 0 10px;
	border-radius: var(--ws-radius-md);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-busy .mwai-timer { color: var(--ws-gray-300); }
/* With nothing typed mid-conversation, AI Engine turns this button into Clear. It keeps
 * the same spot, so it drops to a quiet icon and can't be mistaken for Send. */
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-clear-mode {
	background: transparent;
	color: var(--ws-text-muted);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-clear-mode:is(:hover, :focus-visible) {
	background: var(--ws-gray-100);
	color: var(--ws-text-strong);
}

/* Games have nothing to attach. */
body .toolbox-games .mwai-chat.mwai-chatgpt-theme .mwai-input .mwai-file-upload { display: none; }

/* Disclaimer under the message box */
body .mwai-chat.mwai-chatgpt-theme .mwai-footer {
	padding: var(--ws-space-2) var(--ws-space-1) 0;
	background: transparent;
	border-top: 0;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-footer .mwai-compliance {
	padding: 0;
	opacity: 1;
	color: var(--ws-text-muted);
	font-size: var(--ws-text-meta);
	line-height: 1.5;
}

/* "Conversation cleared. Undo" */
body .mwai-chat.mwai-chatgpt-theme .mwai-undo-clear {
	margin: var(--ws-space-3) 0 0;
	background: var(--ws-gray-100);
	color: var(--ws-text);
	font-size: var(--ws-text-small);
}

/* ── Errors: the ink box tool forms use ── */
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error {
	padding: var(--ws-space-4);
	border: 0;
	border-radius: var(--ws-radius-lg);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-name { display: none; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text { max-width: none; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-retry {
	display: flex;
	width: fit-content;
	align-items: center;
	gap: var(--ws-space-2);
	min-height: var(--ws-control-h-sm);
	margin: var(--ws-space-3) 0 0;
	padding: 0 var(--ws-space-4) 0 var(--ws-space-3);
	background: var(--ws-white);
	color: var(--ws-gray-900);
	border: 0;
	border-radius: var(--ws-radius-md);
	font: 700 var(--ws-text-small)/1 var(--ws-font-sans);
	opacity: 1;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-retry:hover { background: var(--ws-gray-200); }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-retry:focus-visible { outline: 2px solid var(--ws-focus-on-inverse); outline-offset: 3px; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-retry svg { width: 16px; height: 16px; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-reply-actions :is(.mwai-copy-button, .mwai-action-button) {
	width: 32px;
	height: 32px;
	padding: 6px;
	background: transparent;
	color: var(--ws-gray-300);
	fill: var(--ws-gray-300);
	border-radius: var(--ws-radius-sm);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-reply-actions :is(.mwai-copy-button, .mwai-action-button):hover {
	background: var(--ws-gray-700);
	color: var(--ws-white);
	fill: var(--ws-white);
}

/* ── Guest limit wall in a chat ──
 * The wall brings its own surface, so the error box around it steps aside, along with the
 * things that make no sense on it. Everything else about it lives in ai-engine.css, except
 * the button: its styles there only apply inside form output. */
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error:has(.ws-limit-box) {
	padding: 0;
	background: transparent;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error:has(.ws-limit-box) :is(.mwai-retry, .mwai-reply-actions) { display: none; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box h2 {
	margin: 0;
	color: var(--ws-white);
	font: 800 var(--ws-text-h3)/1.2 var(--ws-font-sans);
	letter-spacing: -0.02em;
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box p { margin: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box ul { margin: 0; padding: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box li + li { margin-top: 0; }
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box .ws-limit-cta a {
	display: inline-flex;
	align-items: center;
	min-height: var(--ws-control-h);
	padding: 0 var(--ws-space-5);
	background: var(--ws-white) var(--ws-glow-fill);
	color: var(--ws-gray-900);
	font: 700 var(--ws-text-body)/1 var(--ws-font-sans);
	text-decoration: none;
	border: 1px solid var(--ws-glow-edge);
	border-radius: var(--ws-radius-md);
	box-shadow: var(--ws-glow-rest);
	transition: box-shadow var(--ws-dur-glow) var(--ws-ease-out), transform var(--ws-dur-glow) var(--ws-ease-out);
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box .ws-limit-cta a:hover {
	background-image: var(--ws-glow-fill-hover);
	box-shadow: var(--ws-glow-hover);
	transform: scale(var(--ws-glow-grow));
}
body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box .ws-limit-cta a:focus-visible { outline: 2px solid var(--ws-focus-on-inverse); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	body .mwai-chat.mwai-chatgpt-theme .mwai-conversation .mwai-reply.mwai-error .mwai-text .ws-limit-box .ws-limit-cta a { transition: none; transform: none; }
}

/* ── Assistant pages (template #19646: /chat/ and the image generator) ──
 * The chat fills the card, with the message box along the bottom, like an app. */
body .elementor-19646 .mwai-chat.mwai-chatgpt-theme .mwai-body { height: clamp(440px, calc(100dvh - 190px), 860px); }
body .elementor-19646 .mwai-chat.mwai-chatgpt-theme .mwai-conversation { flex: 1 1 auto; max-height: none; }

/* ── Phones ──
 * The avatar column would take a tenth of the screen from the story. */
@media (max-width: 767px) {
	body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-name:not(:has(.mwai-name-text)) { display: none; }
	body .mwai-chat.mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text { max-width: 88%; }
	body .elementor-19646 .mwai-chat.mwai-chatgpt-theme .mwai-body { height: clamp(420px, calc(100dvh - 110px), 760px); }
}
