/* KageMux conversation polish. One reading surface, one scroll region, compact controls. */
body.kc-chat-page {
  height:100dvh; min-height:0; overflow:hidden;
  background:#070b09; --kc-bg:#070b09; --kc-panel:#111713; --kc-muted:#9da99f;
}
body.kc-chat-page main,
body.kc-chat-page #chat.kc-section {height:100%;min-height:0;margin:0;padding:0}
body.kc-chat-page .kc-chat-shell {
  height:100dvh;min-height:0;max-height:100dvh;display:flex;flex-direction:column;
  border:0;border-radius:0;background:#070b09;overflow:hidden;
}
body.kc-chat-page .kc-chat-header,
body.winner-home.kc-home #chat .kc-chat-header {
  flex:0 0 auto;display:flex;flex-wrap:nowrap;align-items:center;gap:12px;
  min-height:60px;padding:7px 20px;border-bottom:1px solid #ffffff0b;background:#080d0a;
}
body :is(.kc-chat-heading-group,.kc-chat-header-actions) {flex-wrap:nowrap;min-width:0}
body .kc-chat-heading-group {flex:1;gap:8px}
body .kc-chat-header-actions {flex:0 0 auto;gap:8px}
body .kc-chat-header .kc-icon-btn {width:44px;height:44px;flex:0 0 44px}
body .kc-chat-header .kc-account-trigger {
  display:inline-flex;min-height:40px;font-size:13px;font-weight:500;
  padding:8px 13px;border-radius:10px;background:transparent;border-color:#ffffff16;
}
body .kc-chat-header #kc-model {
  display:block;opacity:1;flex:0 1 260px;width:auto;min-width:0;max-width:260px;
  min-height:40px;font-size:14px;padding:8px 28px 8px 11px;
  background:#111812;border:1px solid #ffffff12;border-radius:10px;color:#e1e9dd;
}
body .kc-chat-header .kc-mini-brand {font-size:17px;letter-spacing:-.3px}
body.kc-chat-page:has(#kc-chat-tools) .kc-demo-banner,
body.winner-home.kc-home:has(#kc-chat-tools) #chat .kc-demo-banner {display:none}
body .kc-demo-banner {min-height:0;padding:6px 20px;gap:8px;font-size:12px;line-height:1.4}
body .kc-demo-banner>span:not(.kc-status-dot) {flex-basis:auto}
body.kc-chat-page .kc-scroller {
  flex:1 1 0;height:auto;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;
  padding:24px max(20px,calc((100% - 820px)/2)) 28px;background:transparent;
  overscroll-behavior-y:contain;scroll-padding-block:24px;scrollbar-gutter:stable;
}
body.kc-chat-page .kc-scroller:has(.kc-welcome:not([hidden])) {display:flex;flex-direction:column;justify-content:center}
body.kc-chat-page .kc-welcome {width:100%;max-width:740px;margin:auto;padding:24px 0}
body.kc-chat-page .kc-welcome h3 {font-size:clamp(27px,3vw,36px);font-weight:550;line-height:1.25;letter-spacing:-.8px}
body.kc-chat-page .kc-messages {max-width:820px;width:100%;margin:0 auto}
body :is(.kc-message,.kc-message-body,.kc-message-text) {min-width:0}
body.kc-chat-page .kc-message,
body.winner-home.kc-home #chat .kc-message {margin:0 0 32px;gap:11px;background:transparent}
body.kc-chat-page .kc-message-avatar {display:none}
body.kc-chat-page .kc-message .kc-message-body,
body.kc-chat-page .kc-message.kc-assistant .kc-message-body {
  flex:1 1 auto;max-width:100%;padding:0!important;background:transparent!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
body.kc-chat-page .kc-message.kc-user .kc-message-body {flex:0 1 auto;width:fit-content;max-width:92%;margin-left:auto}
body.kc-chat-page .kc-message .kc-message-meta,
body.winner-home.kc-home #chat .kc-message .kc-message-meta {
  font-size:12px;line-height:1.5;font-weight:500;color:#96a496;margin:0 0 7px;letter-spacing:0;
}
body.kc-chat-page .kc-message .kc-message-text,
body.winner-home.kc-home #chat .kc-message .kc-message-text {
  font-size:16px;line-height:1.7;color:#eef2ec;overflow-wrap:anywhere;word-break:normal;
}
body.kc-chat-page .kc-compose-area,
body.winner-home.kc-home #chat .kc-compose-area {
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"tools tools" "limit limit" "files files" "form form" "status status" "retry retry" "note foot" "disclaimer disclaimer";
  align-items:center;gap:0 10px;flex:0 0 auto;width:100%;max-width:880px;
  margin:0 auto;padding:0 20px max(8px,env(safe-area-inset-bottom));background:#070b09;
}
body #kc-chat-tools {
  grid-area:tools;display:flex;align-items:center;gap:8px;min-width:0;min-height:42px;
  padding:0 3px 7px;margin:0;color:#99a99a;font-size:12px;line-height:1.4;
}
body #kc-chat-tools button {
  display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;
  max-width:62%;min-width:0;padding:6px 10px;background:transparent;border:1px solid #ffffff12;
  border-radius:9px;color:#cad5c8;font:500 12px/1.4 var(--readable-font,system-ui);
  cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body #kc-chat-tools button:hover {background:#ffffff06;border-color:#c5ff3540}
body #kc-chat-tools button[aria-pressed=true] {color:#d3f6a1}
body #kc-chat-ai-status {flex:1;min-width:0;text-align:right;font-size:11px;color:#98a796;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.kc-chat-page #kc-composer.kc-composer,
body.winner-home.kc-home #chat #kc-composer.kc-composer {
  grid-area:form;display:flex;align-items:flex-end;gap:8px;min-height:64px;height:auto;
  width:100%;margin:0;padding:8px 9px;border:1px solid #ffffff20;border-radius:28px;
  background:#171d19;box-shadow:none;
}
body.kc-chat-page #kc-composer.kc-composer:focus-within,
body.winner-home.kc-home #chat #kc-composer.kc-composer:focus-within {background:#19211b;border-color:#9ab68b}
body.kc-chat-page #kc-composer #kc-prompt,
body.winner-home.kc-home #chat #kc-composer #kc-prompt {
  order:1;display:block;flex:1 1 0;align-self:center;min-width:0;width:100%;
  min-height:44px!important;max-height:145px;padding:10px 2px!important;
  font-size:16px!important;font-weight:400;line-height:1.5!important;letter-spacing:0;
  color:#f1f4ef;background:transparent!important;border:0!important;border-radius:0;resize:none;overflow-y:auto;
}
body #kc-prompt::placeholder {color:#a9b5a7;opacity:1}
body.kc-chat-page #kc-composer .kc-composer-ghost,
body.winner-home.kc-home #chat #kc-composer .kc-composer-ghost {
  order:0;flex:0 0 36px;width:36px;height:44px;align-self:flex-end;margin:0;padding:0;
}
body.kc-chat-page #kc-composer .kc-attach-button,
body.winner-home.kc-home #chat #kc-composer .kc-attach-button {
  order:0;flex:0 0 44px;display:grid;place-items:center;align-self:flex-end;
  width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;
  font-size:26px;font-weight:300;line-height:1;border:0;border-radius:50%;color:#c4d0bf;
}
body.kc-chat-page #kc-composer .kc-send,
body.winner-home.kc-home #chat #kc-composer .kc-send {
  order:2;flex:0 0 44px;width:44px;height:44px;align-self:flex-end;margin:0;padding:0;
}
body .kc-compose-area #kc-form-status {grid-area:status;min-height:0;margin:5px 4px 0;font-size:12px;line-height:1.45;text-align:left}
body .kc-compose-area #kc-form-status:empty {display:none!important}
body .kc-compose-area .kc-context {grid-area:note;align-self:start;width:100%;max-width:none;margin:5px 0 0;padding:0 4px}
body .kc-compose-area .kc-context summary {display:flex;min-height:28px;align-items:center;justify-content:flex-start;gap:4px;font-size:11px;line-height:1.4;color:#8f9f8e}
body .kc-compose-area .kc-context summary span {display:none}
body .kc-compose-area .kc-context[open] {max-width:none;padding-bottom:8px}
body .kc-compose-area #kc-note {margin:5px 0 0;min-height:40px;font-size:14px}
body .kc-compose-area .kc-composer-foot {grid-area:foot;align-self:start;margin:5px 4px 0 0;min-height:28px;align-items:center}
body .kc-compose-area .kc-composer-foot button {font-size:11px;color:#8f9f8e}
body .kc-compose-area .kc-disclaimer {grid-area:disclaimer;margin:0;padding:2px 0;font-size:10px;line-height:1.5;color:#7e8e7e;text-align:center}
body .kc-compose-area .kc-disclaimer a {color:#99ad90}
body .kc-attachments {grid-area:files;max-height:min(250px,35dvh);overflow:auto;margin:0 0 8px;padding:12px 14px;border:1px solid #ffffff18;border-radius:15px;background:#121a14}
body .kc-attachments[hidden],body .kc-attachments [hidden] {display:none!important}
body .kc-attachments-header {display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:550;color:#d8e3d3}
body .kc-attachments-close {display:grid;place-items:center;border:0;background:transparent;color:#a7b7a2;width:32px;height:32px;font-size:23px;cursor:pointer}
body .kc-attachments-note {margin:5px 0 10px;font-size:11px;line-height:1.5;color:#9aab94}
body .kc-attachments-choose {min-height:38px;padding:7px 12px;border:1px solid #6d8b45;border-radius:9px;color:#dff6ba;background:#23301d;font:500 12px/1.5 system-ui;cursor:pointer}
body .kc-attachments-list {margin:7px 0 3px;max-height:130px}
body .kc-attachments-refresh {font-size:11px}
body .kc-attachment-action {min-height:36px}
body .kc-attachments-status {margin:7px 0;font-size:12px}
body #kc-ai-consent .kc-dialog-actions {gap:9px}
@media(max-width:760px) {
  body.kc-chat-page {padding-left:0}
  body.kc-chat-page .kc-chat-header,
  body.winner-home.kc-home #chat .kc-chat-header {min-height:58px;padding:6px 10px;gap:8px}
  body .kc-chat-heading-group {gap:5px}
  body .kc-chat-header .kc-account-trigger {padding:8px 10px;font-size:12px}
  body.kc-chat-page .kc-chat-header #kc-model,
  body.winner-home.kc-home #chat .kc-chat-header #kc-model {
    flex:1 1 0;width:0;max-width:100%;min-width:0;font-size:13px;padding:8px 22px 8px 9px;
  }
  body.kc-chat-page .kc-chat-header .kc-mini-brand,
  body.kc-chat-page .kc-chat-header .kc-membership-link {display:none}
  body.kc-chat-page .kc-scroller {padding:20px 18px 20px;scrollbar-gutter:auto}
  body.kc-chat-page .kc-message {margin-bottom:28px}
  body.kc-chat-page .kc-message.kc-user .kc-message-body {max-width:94%}
  body.kc-chat-page .kc-compose-area,
  body.winner-home.kc-home #chat .kc-compose-area {padding:0 10px max(7px,env(safe-area-inset-bottom));gap:0 6px}
  body.kc-chat-page #kc-composer .kc-composer-ghost,
  body.winner-home.kc-home #chat #kc-composer .kc-composer-ghost {display:none}
  body #kc-chat-tools {gap:6px;padding-bottom:6px;min-height:40px}
  body #kc-chat-tools button {font-size:11px;padding-inline:8px}
  body #kc-chat-model-button {max-width:54%}
  body #kc-chat-ai-status {font-size:10px}
  body .kc-compose-area .kc-context summary,body .kc-compose-area .kc-composer-foot button {font-size:10px}
  body .kc-compose-area .kc-disclaimer {font-size:10px}
  body.kc-chat-page .kc-welcome h3 {font-size:29px}
}
@media(max-height:540px) {
  body.kc-chat-page .kc-chat-header {min-height:52px;padding-block:3px}
  body.kc-chat-page .kc-compose-area .kc-context,
  body.kc-chat-page .kc-compose-area .kc-composer-foot,
  body.kc-chat-page .kc-compose-area .kc-disclaimer {display:none}
  body.kc-chat-page .kc-message {margin-bottom:22px}
}
@media(prefers-reduced-motion:reduce) {body .kc-scroller {scroll-behavior:auto}}

/* The identical license link is available in Account and the model catalogue. */
body.kc-chat-page>aside {display:none}

body #kc-chat-tools[hidden] {display:none!important}
body .kc-compose-area {grid-template-areas:"tools tools" "limit limit" "files files" "form form" "status status" "retry retry" "note foot" "disclaimer disclaimer"}
body .kc-compose-area #kc-ai-retry {grid-area:retry;min-height:34px;margin:6px 0 0;font-size:12px}
