.chat-content{max-width:none;height:100vh;padding:0;overflow:hidden;background:#fff}.chat-page{display:flex;flex-direction:column;width:min(940px,100%);height:100vh;margin:0 auto;padding:0 34px}.chat-scroll{flex:1;min-height:0;overflow-y:auto;padding:58px 0 28px;scrollbar-width:thin}.chat-thread{width:min(820px,100%);margin:0 auto}.chat-message{display:flex;gap:17px;color:#26364f;font-size:17px;line-height:1.65}.chat-message+.chat-message{margin-top:28px}.chat-avatar{display:grid;place-items:center;flex:none;width:31px;height:31px;margin-top:2px;border-radius:9px;background:#172642;color:#fff;font-size:14px}.chat-response,.chat-bubble{min-width:0}.chat-response>p:first-child{margin-top:0}.chat-response p{margin:0 0 18px}.chat-response ul{margin:0 0 17px;padding-left:25px}.chat-response li{margin:8px 0}.chat-response h2{margin:18px 0 12px;color:#172642;font-size:18px}.chat-code{overflow:hidden;margin:24px 0;border:1px solid #d9e1ec;border-radius:13px;background:#f8fafc}.chat-code span{display:block;padding:10px 18px;border-bottom:1px solid #e0e6ef;color:#6f7d92;font-size:10px;font-weight:800;letter-spacing:.12em}.chat-code code{display:block;overflow-x:auto;padding:20px 22px;color:#26364f;font:14px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre}.chat-message.user{justify-content:flex-end}.chat-message.user .chat-bubble{max-width:76%;padding:12px 17px;border-radius:20px 20px 5px 20px;background:#eef3fb;color:#26364f}.chat-message.assistant .chat-bubble{flex:1;padding:2px 0}.chat-footer{position:relative;flex:none;width:min(820px,100%);margin:0 auto;padding:10px 0 28px;background:#fff}.chat-footer:before{content:"";position:absolute;right:0;bottom:100%;left:0;height:34px;background:linear-gradient(transparent,#fff)}.chat-reset{display:block;margin:0 0 12px auto;padding:8px 14px;border:1px solid #dce3ec;border-radius:20px;background:#f7f9fc;color:#68778d;cursor:pointer}.chat-reset:hover{background:#edf2f8;color:#26364f}.chat-composer{display:flex;align-items:flex-end;gap:8px;min-height:70px;padding:11px 12px;border:1px solid #d8e0eb;border-radius:35px;background:#fff;box-shadow:0 8px 28px #20345212}.chat-composer textarea{flex:1;align-self:center;min-width:0;max-height:140px;padding:10px 5px;border:0;outline:0;resize:none;color:#172642;font-size:17px;line-height:1.4}.chat-composer textarea::placeholder{color:#8a97a9}.chat-tool,.chat-send{display:grid;place-items:center;flex:none;width:46px;height:46px;padding:0;border:0;border-radius:50%;background:transparent;color:#52647e;cursor:pointer}.chat-tool:hover{background:#f1f4f8}.chat-tool svg,.chat-send svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.chat-send{background:#172642;color:#fff}.chat-send:hover{background:#2768e8}.chat-send:disabled{background:#d7dee8;color:#fff;cursor:default}@media(max-width:800px){.chat-page{padding:0 20px}.chat-scroll{padding-top:35px}.chat-message{font-size:15px}.chat-footer{padding-bottom:18px}.chat-mic{display:none}.chat-composer{min-height:62px}.chat-tool,.chat-send{width:40px;height:40px}}
.chat-page{display:flex;flex-direction:row;width:100%;max-width:none;margin:0;padding:0}.chat-history{position:static;inset:auto;z-index:auto;display:flex;flex-direction:column;width:238px;height:100vh;padding:22px 14px;border:0;border-right:1px solid #e4e9f1;background:#f8fafc}.chat-new{display:flex;align-items:center;gap:9px;width:100%;padding:11px 13px;border:1px solid #d8e1ed;border-radius:9px;background:#fff;color:#2f415c;font-weight:700;cursor:pointer}.chat-new:hover{border-color:#b8c8de;background:#f4f7fc}.chat-new span{font-size:19px;font-weight:400}.chat-history-list{margin-top:17px;overflow-y:auto}.chat-history-list>p{padding:15px 9px;color:#8491a4;font-size:12px}.chat-history-row{display:flex;align-items:center;border-radius:8px}.chat-history-row.active{background:#eaf1fd}.chat-history-row>button:first-child{display:block;min-width:0;flex:1;padding:10px;border:0;background:transparent;color:#53647d;text-align:left;cursor:pointer}.chat-history-row b,.chat-history-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-history-row b{font-size:12px}.chat-history-row small{margin-top:3px;color:#8995a6;font-size:10px}.chat-history-row.active b{color:#245ec4}.chat-delete{display:none;width:26px;height:26px;margin-right:5px;border:0;border-radius:6px;background:transparent;color:#7b899d;cursor:pointer}.chat-history-row:hover .chat-delete,.chat-history-row.active .chat-delete{display:block}.chat-delete:hover{background:#fff;color:#b3263a}.chat-main{display:flex;min-width:0;flex:1;flex-direction:column;height:100vh;padding:0 34px}.chat-bubble p{margin:0 0 14px}.chat-bubble p:last-child{margin-bottom:0}.chat-bubble pre{overflow:auto;padding:16px;border-radius:10px;background:#f4f6f9;color:#24364f;font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace}.chat-bubble>code,.chat-bubble p code{padding:2px 5px;border-radius:5px;background:#f0f3f7;font:13px ui-monospace,SFMono-Regular,Menlo,monospace}.chat-attachment{display:block;margin-top:8px;color:#6b7c93}.chat-failure .chat-avatar{background:#b82f43}.chat-failure .chat-bubble{padding:14px 16px;border:1px solid #efc0c7;border-radius:11px;background:#fff5f6;color:#922438}.chat-failure .chat-bubble p{margin:5px 0 0}.chat-steps{margin:0 0 10px;padding:8px 12px;border:1px solid #e1e7f0;border-radius:11px;background:#fafbfd;color:#60718a;font-size:12px}.chat-steps summary{display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:700}.chat-steps ol{margin:9px 0 2px;padding:0 0 0 8px;list-style:none}.chat-steps li{display:flex;align-items:flex-start;gap:8px;margin:7px 0}.chat-steps li>span,.step-pulse{display:block;flex:none;width:8px;height:8px;margin-top:3px;border:2px solid #aab7c9;border-radius:50%}.chat-steps li.completed>span{border-color:#3972ed;background:#3972ed}.chat-steps li.failed>span,.step-pulse.failed{border-color:#c9364b;background:#c9364b}.chat-steps li.running>span,.step-pulse.running{border-color:#3972ed;animation:chat-pulse 1s infinite}.chat-steps li div{min-width:0}.chat-steps li small{display:block;margin-top:3px;color:#b3263a;line-height:1.35;overflow-wrap:anywhere}.chat-image-previews{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}.chat-image-previews:empty{display:none}.chat-image-previews span{display:flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #dae3ef;border-radius:8px;background:#f7f9fc;color:#586a82;font-size:11px}.chat-image-previews button{padding:0;border:0;background:none;color:#8996a8;cursor:pointer}.chat-error{margin:18px 0 0 48px;padding:11px 14px;border:1px solid #f0c6c9;border-radius:9px;background:#fff5f5;color:#a12636}.chat-send.is-stop{background:#cf4054}.chat-tool:disabled{cursor:default;opacity:.45}@keyframes chat-pulse{50%{transform:scale(1.3);opacity:.5}}@media(max-width:950px){.chat-history{width:190px}.chat-main{padding:0 22px}}@media(max-width:700px){.chat-history{display:none}.chat-main{padding:0 16px}}
.chat-table-wrap{max-width:100%;margin:16px 0;overflow-x:auto;border:1px solid #dbe3ed;border-radius:10px}.chat-bubble table{width:100%;border-collapse:collapse;background:#fff;font-size:14px;line-height:1.45}.chat-bubble th,.chat-bubble td{padding:10px 13px;border-right:1px solid #e4e9f0;border-bottom:1px solid #e4e9f0;text-align:left;vertical-align:top;white-space:nowrap}.chat-bubble th:last-child,.chat-bubble td:last-child{border-right:0}.chat-bubble tbody tr:last-child td{border-bottom:0}.chat-bubble th{background:#f5f7fa;color:#34465f;font-size:12px;font-weight:750}.chat-bubble tbody tr:nth-child(even){background:#fafbfd}.chat-bubble .align-right{text-align:right}.chat-bubble .align-center{text-align:center}.chat-bubble blockquote{margin:14px 0;padding:4px 0 4px 15px;border-left:3px solid #b9c7db;color:#65758c}
.chat-svg-preview{display:grid;place-items:center;max-width:100%;margin:16px 0}.chat-svg-preview img{display:block;width:auto;max-width:100%;height:auto;max-height:620px;margin:auto}.chat-svg-preview figcaption{width:100%;padding-top:7px;color:#7a889c;font-size:10px;text-align:left}.chat-svg-error{margin:14px 0;padding:11px 13px;border:1px solid #efc0c7;border-radius:9px;background:#fff5f6;color:#a12636;font-size:13px}
.chat-run-history{width:calc(100% - 48px);margin:22px 0 24px 48px;padding:0;overflow:hidden}.chat-run-history>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:11px 13px;list-style:none;border-bottom:1px solid transparent}.chat-run-history[open]>summary{border-bottom-color:#e1e7f0}.chat-run-history>summary::-webkit-details-marker,.chat-step>details>summary::-webkit-details-marker{display:none}.chat-run-copy{display:block;min-width:0}.chat-run-copy small,.chat-run-copy strong{display:block}.chat-run-copy small{color:#7a899d;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.chat-run-copy strong{margin-top:2px;overflow:hidden;color:#40526c;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.chat-run-count{color:#7a899d;font-size:10px;white-space:nowrap}.chat-run-chevron,.chat-step-chevron{color:#8a97a8;transition:transform .12s ease}.chat-run-history[open]>summary .chat-run-chevron,.chat-step>details[open]>summary .chat-step-chevron{transform:rotate(90deg)}.chat-run-history>ol{display:grid;margin:0;padding:5px 12px 9px;list-style:none}.chat-step{margin:0!important}.chat-step>details>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:9px;padding:8px 4px;cursor:pointer;list-style:none}.chat-step-marker{display:grid!important;width:17px!important;height:17px!important;margin:0!important;border:1px solid #b5c1d1!important;border-radius:50%!important;background:#fff!important}.chat-step.completed .chat-step-marker{border-color:#3972ed!important;background:#3972ed!important}.chat-step.completed .chat-step-marker:after{content:'✓';place-self:center;color:#fff;font-size:9px;font-weight:900}.chat-step.failed .chat-step-marker{border-color:#c9364b!important;background:#c9364b!important}.chat-step.failed .chat-step-marker:after{content:'!';place-self:center;color:#fff;font-size:10px;font-weight:900}.chat-step.running .chat-step-marker{border-color:#3972ed!important;animation:chat-pulse 1s infinite}.chat-step-copy{display:block;min-width:0}.chat-step-copy strong,.chat-step-copy small{display:block}.chat-step-copy strong{overflow:hidden;color:#455873;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.chat-step-copy small{margin-top:2px;color:#8390a2!important;font-size:9px}.chat-step time{color:#8794a5;font-size:9px}.chat-step-details{margin:0 0 7px 26px;padding:0 0 4px 11px;border-left:2px solid #e1e7ef}.chat-step-details section+section{margin-top:9px}.chat-step-details h4{margin:0 0 4px;color:#687990;font-size:9px;letter-spacing:.07em;text-transform:uppercase}.chat-step-details pre{max-height:260px;margin:0;overflow:auto;padding:9px 10px;border-radius:7px;background:#f1f4f8;color:#3d4f68;font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:700px){.chat-run-history{width:100%;margin-left:0}.chat-run-count{display:none}}
.chat-step.cancelled .chat-step-marker{border-color:#8a97a8!important;background:#8a97a8!important}.chat-step.cancelled .chat-step-marker:after{content:'–';place-self:center;color:#fff;font-size:11px;font-weight:900}
.chat-run-history{width:100%;margin-left:0}.chat-error{margin-left:0}
.chat-history-list{min-height:0;flex:1}.chat-model-picker{position:relative;flex:none;margin-top:12px;border-top:1px solid #dfe6ef;padding-top:12px}.chat-model-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border-radius:8px;color:#53647d;cursor:pointer;list-style:none}.chat-model-picker>summary::-webkit-details-marker{display:none}.chat-model-picker>summary:hover{background:#eef3f9}.chat-model-picker>summary span{min-width:0}.chat-model-picker>summary small,.chat-model-picker>summary strong{display:block}.chat-model-picker>summary small{color:#8995a6;font-size:8px;font-weight:800;letter-spacing:.1em}.chat-model-picker>summary strong{margin-top:3px;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.chat-model-picker>summary>b{font-size:12px;transition:transform .12s ease}.chat-model-picker[open]>summary>b{transform:rotate(180deg)}.chat-model-picker>div{position:absolute;right:0;bottom:calc(100% + 5px);left:0;z-index:5;max-height:290px;overflow-y:auto;padding:6px;border:1px solid #d9e2ee;border-radius:9px;background:#fff;box-shadow:0 10px 30px #253b5f20}.chat-model-picker>div button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border:0;border-radius:6px;background:transparent;color:#53647d;text-align:left;cursor:pointer}.chat-model-picker>div button:hover{background:#f1f5fb}.chat-model-picker>div button.active{background:#eaf1fd;color:#245ec4;font-weight:700}.chat-model-picker>div button span{overflow:hidden;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.chat-model-picker>div button b{font-size:10px}
.chat-run-history>summary{grid-template-columns:minmax(0,1fr) 88px auto auto}.chat-step-progress{display:block;width:88px;height:28px;color:#a5b1c1}.chat-step-progress svg{display:block;width:100%;height:100%;overflow:visible}.chat-progress-track,.chat-progress-connector{fill:none;stroke:#d5dce6;stroke-width:1.5;stroke-linecap:round}.chat-progress-connector.completed{stroke:#86a9ee}.chat-progress-connector.running{stroke:#3972ed;stroke-dasharray:3 3;animation:chat-progress-flow .7s linear infinite}.chat-progress-connector.failed{stroke:#d65b6c}.chat-progress-dot{fill:#fff;stroke:#aebac9;stroke-width:1.4}.chat-progress-node.completed .chat-progress-dot{fill:#3972ed;stroke:#7ca4f2}.chat-progress-node.running .chat-progress-dot{fill:#eaf1fd;stroke:#3972ed}.chat-progress-node.failed .chat-progress-dot{fill:#c9364b;stroke:#e17b89}.chat-progress-node.cancelled .chat-progress-dot{fill:#8996a8;stroke:#aeb8c5}.chat-progress-glyph{fill:none;stroke:#fff;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}.chat-progress-core,.chat-progress-runner{fill:#2768e8;filter:drop-shadow(0 0 3px #6d98ee)}.chat-progress-pulse{fill:none;stroke:#3972ed;stroke-width:1.2;transform-box:fill-box;transform-origin:center;animation:chat-progress-pulse 1.35s ease-out infinite}@keyframes chat-progress-flow{to{stroke-dashoffset:-6}}@keyframes chat-progress-pulse{0%{opacity:.8;transform:scale(.65)}75%,100%{opacity:0;transform:scale(1.55)}}@media(prefers-reduced-motion:reduce){.chat-progress-connector.running,.chat-progress-pulse{animation:none}.chat-progress-runner{display:none}}@media(max-width:700px){.chat-run-history>summary{grid-template-columns:minmax(0,1fr) 72px auto}.chat-step-progress{width:72px}.chat-run-chevron{display:none}}
app-chat { display:block; height:100dvh; color:#334155; background:#fff; }
app-chat .chat-page, app-chat .chat-history { height:100%; }
app-chat .chat-main { min-width:0; }
app-chat button, app-chat textarea { font:inherit; }
@media(max-width:700px) { app-chat { height:calc(100dvh - 60px); } app-chat .chat-page { flex-direction:column; } app-chat .chat-history { display:flex; width:100%; height:auto; max-height:160px; padding:8px 12px; border-right:0; border-bottom:1px solid #e4e9f1; } app-chat .chat-history-list { overflow:auto; } app-chat .chat-model-picker { margin-top:4px; padding-top:4px; } app-chat .chat-main { flex:1; min-height:0; } }
@media(max-width:700px) {
  app-chat .chat-history { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; max-height:150px; }
  app-chat .chat-new { padding:8px 10px; }
  app-chat .chat-model-picker { grid-column:2; grid-row:1; margin:0; padding:0; border:0; }
  app-chat .chat-model-picker>div { top:100%; bottom:auto; }
  app-chat .chat-history-list { grid-column:1 / -1; margin:0; min-height:42px; max-height:52px; }
  app-chat .chat-history-row>button:first-child { padding:4px 8px; }
}

/* Use the email workspace palette and compact controls throughout chat. */
app-chat {
  --chat-bg: #fff;
  --chat-panel: #f5f7fa;
  --chat-border: #d8e0e9;
  --chat-text: #26364f;
  --chat-muted: #65758c;
  --chat-selected: #eaf1fd;
  --chat-accent: #4388f4;
  font-size: 14px;
  background: var(--chat-bg);
  color: var(--chat-text);
}
body.dark-mode app-chat {
  --chat-bg: #1b2025;
  --chat-panel: #252d36;
  --chat-border: #363d46;
  --chat-text: #edf0f5;
  --chat-muted: #aab6c5;
  --chat-selected: #24344c;
  --chat-accent: #70adff;
  color-scheme: dark;
}
app-chat .chat-page { border: 1px solid var(--chat-border); border-left: 0; }
app-chat .chat-history { width:238px; flex-shrink:0; padding:12px; background:var(--chat-bg); border-color:var(--chat-border); }
app-chat .chat-main { height:100%; padding:0; }
app-chat .chat-heading { display:flex; align-items:center; height:62px; flex:0 0 62px; padding:0 23px; border-bottom:1px solid var(--chat-border); }
app-chat .chat-heading h1 { margin:0; color:var(--chat-text); font-size:21px; font-weight:700; letter-spacing:-.025em; }
app-chat .chat-scroll { padding:24px; }
app-chat .chat-thread, app-chat .chat-footer { width:min(860px,100%); }
app-chat .chat-message { color:var(--chat-text); font-size:14px; line-height:1.6; }
app-chat .chat-message+.chat-message { margin-top:20px; }
app-chat .chat-bubble, app-chat .chat-response, app-chat .chat-response h2 { color:var(--chat-text); }
app-chat .chat-bubble p, app-chat .chat-response p { margin-bottom:10px; }
app-chat .chat-bubble li { margin:4px 0; }
app-chat .chat-message.user .chat-bubble { padding:10px 14px; border:1px solid var(--chat-border); border-radius:7px; background:var(--chat-selected); color:var(--chat-text); }
app-chat .chat-new { min-height:38px; padding:7px 12px; border-radius:7px; border-color:#4388f4; background:#4388f4; color:#fff; font-size:14px; font-weight:500; }
app-chat .chat-new:hover { background:#5696f7; border-color:#6ba3fb; }
app-chat .chat-history-row { border-radius:7px; }
app-chat .chat-history-row:hover, app-chat .chat-model-picker>summary:hover { background:var(--chat-panel); }
app-chat .chat-history-row.active, app-chat .chat-model-picker>div button.active { background:var(--chat-selected); }
app-chat .chat-history-row b { color:var(--chat-text); font-size:13px; font-weight:500; }
app-chat .chat-history-row.active b { color:var(--chat-accent); }
app-chat .chat-history-row small { color:var(--chat-muted); font-size:11px; }
app-chat .chat-model-picker { border-color:var(--chat-border); }
app-chat .chat-model-picker strong, app-chat .chat-model-picker>div button { color:var(--chat-text); font-size:12px; }
app-chat .chat-model-picker small, app-chat .chat-model-picker>summary, app-chat .chat-history-list>p { color:var(--chat-muted); }
app-chat .chat-model-picker>div { border-color:var(--chat-border); border-radius:7px; background:var(--chat-panel); box-shadow:0 12px 24px #0003; }
app-chat .chat-model-picker>div button:hover { background:var(--chat-selected); }
app-chat .chat-delete { color:var(--chat-muted); }
app-chat .chat-delete:hover { background:var(--chat-panel); color:#ed6b73; }
app-chat .chat-history-row:focus-within .chat-delete { display:block; }
app-chat .chat-footer { padding:12px 24px 20px; background:var(--chat-bg); }
app-chat .chat-footer:before { display:none; }
app-chat .chat-composer { min-height:48px; padding:6px; border:1px solid var(--chat-border); border-radius:7px; background:var(--chat-panel); box-shadow:none; }
app-chat .chat-composer:focus-within { border-color:var(--chat-accent); }
app-chat .chat-composer textarea { padding:7px 8px; color:var(--chat-text); background:transparent; font-size:14px; }
app-chat .chat-composer textarea::placeholder { color:var(--chat-muted); }
app-chat .chat-send { width:34px; height:34px; border-radius:7px; background:#4388f4; color:#fff; }
app-chat .chat-send:hover { background:#5696f7; }
app-chat .chat-send:disabled { background:var(--chat-selected); color:var(--chat-muted); }
app-chat .chat-send.is-stop { background:#b94550; }
app-chat .chat-send svg { width:19px; height:19px; }
app-chat .chat-steps { background:var(--chat-panel); border-color:var(--chat-border); border-radius:7px; color:var(--chat-muted); }
app-chat .chat-run-history { margin:16px 0 20px; }
app-chat .chat-run-history>summary { padding:9px 12px; }
app-chat .chat-run-history[open]>summary { border-color:var(--chat-border); }
app-chat .chat-run-copy strong, app-chat .chat-step-copy strong { color:var(--chat-text); font-weight:500; }
app-chat .chat-run-copy small, app-chat .chat-run-count, app-chat .chat-step time, app-chat .chat-step-details h4 { color:var(--chat-muted); }
app-chat .chat-step-copy small { color:var(--chat-muted)!important; }
app-chat .chat-step-details, app-chat .chat-code, app-chat .chat-code span, app-chat .chat-table-wrap { border-color:var(--chat-border); }
app-chat .chat-step-details pre, app-chat .chat-bubble pre, app-chat .chat-code, app-chat .chat-bubble code { background:var(--chat-panel); color:var(--chat-text); border-radius:7px; }
app-chat .chat-code code { color:var(--chat-text); }
app-chat .chat-code span { color:var(--chat-muted); }
app-chat .chat-bubble table { background:var(--chat-bg); color:var(--chat-text); }
app-chat .chat-bubble th, app-chat .chat-bubble tbody tr:nth-child(even) { background:var(--chat-panel); color:var(--chat-text); }
app-chat .chat-bubble th, app-chat .chat-bubble td { border-color:var(--chat-border); white-space:normal; }
app-chat .chat-bubble blockquote { border-color:var(--chat-border); color:var(--chat-muted); }
app-chat .chat-error, app-chat .chat-failure .chat-bubble, app-chat .chat-svg-error { background:var(--chat-panel); color:#ed6b73; border-color:#994550; border-radius:7px; }
app-chat button:focus-visible, app-chat summary:focus-visible { outline:2px solid var(--chat-accent); outline-offset:2px; }
@media(max-width:700px) {
  app-chat .chat-history { width:100%; padding:8px 12px; }
  app-chat .chat-heading { height:48px; flex-basis:48px; padding:0 16px; }
  app-chat .chat-heading h1 { font-size:18px; }
  app-chat .chat-scroll { padding:16px; }
  app-chat .chat-footer { padding:8px 12px 12px; }
  app-chat .chat-message.user .chat-bubble { max-width:90%; }
}

app-chat .chat-generated-image { margin:16px 0; max-width:480px; }
app-chat .chat-generated-image img { display:block; max-width:100%; max-height:420px; border:1px solid var(--chat-border); border-radius:7px; }
app-chat .chat-generated-image figcaption { margin-top:8px; font-size:12px; color:var(--chat-muted); }
app-chat .chat-generated-image a { color:var(--chat-accent); }

app-chat .chat-message.user .chat-bubble { overflow-wrap:anywhere; }
app-chat .chat-failure { margin:20px 0; }
app-chat .chat-message.assistant.chat-failure .chat-bubble { flex:1; padding:16px 18px; border:1px solid #a94e5b; border-radius:8px; background:#a72d3d12; overflow-wrap:anywhere; font-size:14px; line-height:1.6; }
app-chat .chat-failure .chat-bubble > strong { display:block; margin-bottom:8px; color:#e9828e; font-size:15px; }
app-chat .chat-failure .chat-bubble p { margin:0; white-space:pre-wrap; }


.chat-continuation { margin: 12px 0 24px; }
.chat-continuation button {
  min-height: 44px; padding: 10px 18px; border: 1px solid #4285f4;
  border-radius: 12px; background: #4285f4; color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
}
.chat-continuation button:hover { background: #3478e5; }
.chat-continuation button:disabled { opacity: .5; cursor: default; }
.chat-continuation button:focus-visible { outline: 2px solid #8ab4f8; outline-offset: 3px; }
