/* Ported from agent-cloud-frontend/src/styles.css (WorkspacePage transcript).
   The DOM adapters below retain Webchat's authenticated transport and image limits. */
#conversation { --ws-ink:#202124; --ws-muted:#747984; --ws-blue:#4f6ef7; --ws-line:#e6e8ec; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif; font-synthesis:none; }
.message-feed { position:relative; display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.workspace { height:var(--app-height,100dvh); }
#messages-scroll { height:100%; min-height:0; overflow-y:auto; overflow-x:hidden; padding:38px max(24px,calc((100% - 720px)/2)) 24px; scroll-behavior:auto; overflow-anchor:none; scrollbar-gutter:stable; scroll-padding-top:24px; }
#messages { display:block; width:100%; max-width:none; margin:0; padding:0; }
.message { scroll-margin-block:24px; }
.message-content { min-width:0; }
.message-body { color:#292c31; font-size:15px; font-weight:400; line-height:1.72; letter-spacing:-.006em; text-rendering:optimizeLegibility; text-wrap:pretty; overflow-wrap:anywhere; }

.message-body > :first-child { margin-top:0; }
.message-body > :last-child { margin-bottom:0; }
.message-body p,.message-body ul,.message-body ol,.message-body blockquote { margin:0 0 1em; }
.message-body ul,.message-body ol { padding-left:1.35em; }
.message-body li { padding-left:.15em; }.message-body li + li { margin-top:.32em; }
.message-body h1,.message-body h2,.message-body h3,.message-body h4 { margin:1.55em 0 .62em; color:#1f2227; line-height:1.36; letter-spacing:-.018em; }
.message-body h1 { font-size:1.32em; }.message-body h2 { font-size:1.18em; }.message-body h3,.message-body h4 { font-size:1.04em; }
.message-body strong { color:#202328; font-weight:620; }
.message-body blockquote { padding:.1em 0 .1em 1em; border-left:2px solid #d7dae0; color:#656a73; }
.message-body hr { margin:1.65em 0; border:0; border-top:1px solid #e7e8eb; }
.message-body a { color:#315fd4; text-decoration-thickness:1px; text-underline-offset:3px; }
.message-body code:not(pre code) { padding:.12em .38em; border:1px solid #e2e3e6; border-radius:5px; color:#34383f; background:#f3f3f4; font:0.88em/1.45 "SFMono-Regular",Consolas,"Liberation Mono","IBM Plex Mono",monospace; }
.message-body pre { margin:1.05em 0 1.2em; padding:14px 16px; border:1px solid #e3e5e8; border-radius:9px; color:#30343a; background:#f7f7f8; font:12px/1.68 "SFMono-Regular",Consolas,"Liberation Mono","IBM Plex Mono",monospace; tab-size:2; }
.message-body table { display:block; width:max-content; max-width:100%; margin:1.15em 0 1.35em; overflow-x:auto; border-collapse:collapse; font-size:.9em; line-height:1.55; }
.message-body th,.message-body td { padding:8px 12px; border:0; border-bottom:1px solid #e1e3e6; text-align:left; vertical-align:top; }
.message-body th { color:#555a62; background:#f7f7f8; font-weight:600; }

.composer { width:min(800px,calc(100% - 44px)); margin:0 auto 13px; padding:11px 12px 8px; display:block; border:1px solid #dfe2e7; border-radius:17px; background:#fff; box-shadow:0 12px 38px rgba(41,45,53,.1); }.composer:focus-within { border-color:#b9c3f3; box-shadow:0 12px 38px rgba(41,45,53,.1),0 0 0 3px rgba(79,110,247,.08); }.composer textarea { width:100%; min-height:46px; max-height:160px; padding:3px 4px 8px; resize:none; border:0; outline:0; color:var(--ws-ink); background:transparent; font-size:13px; line-height:1.55; }.composer textarea::placeholder { color:#a3a7ae; }.composer-toolbar,.composer-toolbar > div { display:flex; align-items:center; justify-content:space-between; gap:7px; }.composer-toolbar button { cursor:pointer; }.composer-tool { width:34px; height:34px; display:grid; place-items:center; border:0; border-radius:9px; color:#646a75; background:#f3f4f6; }.composer-tool:hover { color:var(--ws-blue); }.composer-tool .workspace-icon { width:17px; }.model-picker { height:34px; padding:0 7px; display:flex; align-items:center; gap:3px; border-radius:9px; color:#626873; background:#f7f7f8; }.model-picker:hover { background:#f0f1f3; }.model-picker select { max-width:190px; border:0; outline:0; color:inherit; background:transparent; appearance:none; font:500 10px "IBM Plex Mono"; cursor:pointer; }.model-picker .workspace-icon { width:12px; }.model-spark { color:var(--ws-blue); font-size:12px; }.send-button { width:35px; height:35px; display:grid; place-items:center; border:0; border-radius:10px; color:#fff; background:var(--ws-ink); }.send-button:hover { background:var(--ws-blue); }.send-button:disabled { color:#b4b7bd; background:#eceef1; cursor:not-allowed; }.send-button .workspace-icon { width:17px; }.stop-square { width:10px; height:10px; border-radius:2px; background:currentColor; }.composer-note { display:block; margin-top:7px; color:#a2a6ae; font-size:8px; text-align:center; }.attachment-tray { display:flex; gap:7px; padding:0 0 9px; overflow-x:auto; }.attachment-tray > div { position:relative; min-width:130px; max-width:190px; height:48px; padding:6px 25px 6px 7px; display:flex; align-items:center; gap:7px; border:1px solid var(--ws-line); border-radius:9px; background:#fafafa; }.attachment-tray img { width:36px; height:36px; object-fit:cover; border-radius:6px; }.attachment-tray .workspace-icon { width:24px; }.attachment-tray span { min-width:0; display:grid; }.attachment-tray b,.attachment-tray small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.attachment-tray b { font-size:9px; }.attachment-tray small { color:var(--ws-muted); font-size:8px; }.attachment-tray button { position:absolute; top:3px; right:3px; width:19px; height:19px; display:grid; place-items:center; border:0; border-radius:50%; background:#eceef1; }.attachment-tray button .workspace-icon { width:11px; }

.status-dot { width:6px; height:6px; border-radius:50%; background:#37ad83; }
.selection-task-action { position:fixed; z-index:120; transform:translate(-50%,-100%); height:34px; padding:0 12px; display:flex; align-items:center; gap:7px; border:1px solid #d8dbe1; border-radius:10px; color:#30343a; background:#fff; box-shadow:0 8px 28px rgba(28,31,38,.18); cursor:pointer; font-size:11px; font-weight:700; animation:selection-action-in .12s ease-out; }.selection-task-action:hover { color:#4057d6; border-color:#bdc6f2; background:#f8f9ff; }.selection-task-action:focus-visible { outline:3px solid rgba(79,110,247,.2); outline-offset:2px; }.selection-task-action .workspace-icon { width:14px; }.task-quote-tray { margin:0 0 9px; padding:8px; display:grid; gap:6px; border:1px solid #e0e3e8; border-radius:12px; background:#f8f9fb; }.task-quote-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 2px 2px; }.task-quote-heading>span { display:flex; align-items:center; gap:6px; color:#4c535e; font-size:10px; font-weight:700; }.task-quote-heading .workspace-icon { width:13px; color:#5967da; }.task-quote-heading small { color:#989da5; font-size:8px; }.task-quote { min-width:0; height:34px; padding:0 7px; display:grid; grid-template-columns:20px minmax(0,1fr) 24px; align-items:center; gap:7px; border:1px solid #e2e4e8; border-left:3px solid #7d84e8; border-radius:8px; background:#fff; }.task-quote>span { width:18px; height:18px; display:grid; place-items:center; border-radius:50%; color:#646b76; background:#eef0f4; font:700 8px "IBM Plex Mono"; }.task-quote p { margin:0; overflow:hidden; color:#555c66; font-size:9px; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }.task-quote button { width:22px; height:22px; display:grid; place-items:center; border:0; border-radius:50%; color:#858b94; background:transparent; cursor:pointer; }.task-quote button:hover { color:#333941; background:#eceef2; }.task-quote button .workspace-icon { width:11px; }@keyframes selection-action-in { from { opacity:0; transform:translate(-50%,calc(-100% + 5px)); } to { opacity:1; transform:translate(-50%,-100%); } }@media(prefers-reduced-motion:reduce){.selection-task-action{animation:none}}

.chat-history-loading { width:min(760px,100%); margin:18px auto 0; padding-top:10px; display:grid; gap:17px; opacity:.72; }
.chat-history-loading span { display:block; height:14px; border-radius:7px; background:linear-gradient(90deg,#f0f1f3 20%,#f8f8f9 42%,#f0f1f3 64%); background-size:240% 100%; animation:history-shimmer 1.25s ease-in-out infinite; }
.chat-history-loading span:nth-child(1) { width:34%; }.chat-history-loading span:nth-child(2) { width:88%; }.chat-history-loading span:nth-child(3) { width:72%; }.chat-history-loading span:nth-child(4) { width:51%; }
.chat-history-empty { margin:12vh auto 0; color:var(--ws-muted); font-size:13px; text-align:center; }
@keyframes history-shimmer { to { background-position:-120% 0; } }
.jump-to-latest { position:absolute; z-index:4; left:50%; bottom:10px; width:44px; height:44px; min-height:44px; padding:0; display:grid; place-items:center; transform:translateX(-50%); border:0; border-radius:50%; color:#59616d; background:transparent; cursor:pointer; animation:jump-latest-in .16s ease-out; }
.jump-to-latest::before { content:""; position:absolute; inset:4px; border:1px solid #e0e3e8; border-radius:50%; background:#fff; box-shadow:0 2px 8px rgba(35,39,47,.08); transition:background .14s ease,border-color .14s ease,box-shadow .14s ease; }
.jump-to-latest:hover { color:#303741; background:transparent; }
.jump-to-latest:hover::before { border-color:#c9ced6; box-shadow:0 3px 10px rgba(35,39,47,.1); }
.jump-to-latest:active::before { background:#f0f2f5; box-shadow:0 1px 3px rgba(35,39,47,.06); }
.jump-to-latest:focus-visible { outline:3px solid rgba(79,110,247,.2); outline-offset:2px; }
.jump-to-latest .workspace-icon { position:relative; width:18px; height:18px; stroke-width:1.8; pointer-events:none; }
@keyframes jump-latest-in { from { opacity:0; transform:translate(-50%,6px); } to { opacity:1; transform:translate(-50%,0); } }
@media (prefers-reduced-motion:reduce) { .jump-to-latest,.chat-history-loading span { animation:none; }.jump-to-latest::before { transition:none; }.message-list { scroll-behavior:auto; } }

.conversation-context-rail { position:absolute; z-index:3; top:22px; bottom:22px; left:11px; width:15px; padding:2px 0; display:flex; flex-direction:column; justify-content:center; gap:3px; pointer-events:auto; }
.conversation-context-rail button { position:relative; width:15px; min-height:2px; max-height:7px; padding:0; flex:1 1 5px; display:flex; align-items:center; border:0; color:#c9ccd1; background:transparent; cursor:pointer; }
.conversation-context-rail button > i { width:7px; height:2px; display:block; border-radius:2px; background:currentColor; transition:width .14s ease,color .14s ease; }
.conversation-context-rail button:hover,.conversation-context-rail button:focus-visible { color:#8a8f98; outline:none; }
.conversation-context-rail button.active { color:#3f444c; }
.conversation-context-rail button:hover > i,.conversation-context-rail button:focus-visible > i,.conversation-context-rail button.active > i { width:11px; }
.conversation-context-rail button > span { position:absolute; z-index:8; left:20px; top:50%; width:260px; padding:11px 13px; border:1px solid #dedfe3; border-radius:11px; color:#35383e; background:rgba(255,255,255,.98); box-shadow:0 9px 28px rgba(31,35,41,.12); font-size:11px; line-height:1.45; text-align:left; opacity:0; transform:translateY(-50%) scale(.98); transform-origin:left center; pointer-events:none; transition:opacity .12s ease,transform .12s ease; }
.conversation-context-rail button > span b { display:block; overflow:hidden; color:#25282d; font-size:12px; font-weight:650; white-space:nowrap; text-overflow:ellipsis; }
.conversation-context-rail button > span small { display:-webkit-box; margin-top:5px; overflow:hidden; color:#858a93; font-size:10.5px; font-weight:450; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.conversation-context-rail button:hover > span,.conversation-context-rail button:focus-visible > span { opacity:1; transform:translateY(-50%) scale(1); }

.conversation-turn { width:min(720px,100%); margin:0 auto 44px; }
.conversation-turn .message { width:100%; max-width:none; margin:0; display:block; }
.conversation-turn .message-content { min-width:0; padding:0; }
.conversation-turn .message.user { display:flex; justify-content:flex-end; }
.conversation-turn .message.user .message-content { max-width:72%; display:flex; flex-direction:column; align-items:flex-end; }
.conversation-turn .message.user .message-body { width:fit-content; max-width:100%; padding:10px 15px; border-radius:17px; color:#282b30; background:#f1f1f3; font-size:14.5px; line-height:1.62; letter-spacing:-.008em; }
.conversation-turn .message.user .message-attachments { justify-content:flex-end; }
.conversation-turn .message.assistant { margin-top:26px; }
.assistant-answer { max-width:700px; }
.assistant-answer + .assistant-answer { margin-top:1.25em; }
.response-actions { min-height:28px; margin-top:13px; display:flex; align-items:center; gap:3px; color:#8b8f96; opacity:0; transform:translateY(-2px); pointer-events:none; transition:opacity .14s ease,transform .14s ease; }
.message.assistant:hover .response-actions,.message.assistant:focus-within .response-actions { opacity:1; transform:none; pointer-events:auto; }
.response-actions button { width:27px; height:27px; display:grid; place-items:center; padding:0; border:0; border-radius:7px; color:inherit; background:transparent; cursor:pointer; transition:color .12s ease,background .12s ease; }
.response-actions button:hover { color:#30343a; background:#f2f3f5; }
.response-actions button:focus-visible { opacity:1; color:#30343a; outline:2px solid #a8bdfd; outline-offset:1px; }
.response-actions button.selected { color:#315ee7; background:#eef2ff; }
.response-actions .workspace-icon { width:16px; height:16px; stroke-width:1.65; }
.response-actions time { margin-left:5px; color:#999da4; font-size:11.5px; font-variant-numeric:tabular-nums; }
.continue-backdrop { position:fixed; z-index:120; inset:0; display:grid; place-items:center; padding:20px; background:rgba(30,32,36,.16); backdrop-filter:blur(1px); pointer-events:auto; }
.continue-dialog { width:min(430px,calc(100vw - 32px)); padding:22px 14px 14px; border:1px solid rgba(28,30,34,.12); border-radius:24px; color:#202226; background:#fff; box-shadow:0 18px 54px rgba(31,34,40,.18); }
.continue-dialog h2 { margin:0 14px 14px; font-size:21px; line-height:1.25; font-weight:650; letter-spacing:-.025em; }
.continue-dialog > button { width:100%; min-height:82px; display:grid; grid-template-columns:28px minmax(0,1fr); align-items:center; gap:13px; padding:12px 14px; border:0; border-radius:15px; color:#24262a; text-align:left; background:transparent; cursor:pointer; }
.continue-dialog > button:hover { color:#18191c; background:#f3f3f4; }
.continue-dialog > button:focus-visible { outline:2px solid #9eb4fa; outline-offset:1px; }
.continue-dialog > button .workspace-icon { width:20px; height:20px; color:#60646b; stroke-width:1.55; }
.continue-dialog > button span { min-width:0; display:grid; gap:3px; }
.continue-dialog > button b { font-size:16px; line-height:1.3; font-weight:580; }
.continue-dialog > button small { color:#898d94; font-size:13px; line-height:1.4; font-weight:400; }
@media (max-width:600px) { .continue-backdrop { align-items:end; padding:10px; } .continue-dialog { border-radius:22px; } }
.execution-live { max-width:690px; margin:0 0 17px; color:#6d7179; }
.execution-live-heading { margin:0 0 7px; color:#777b82; font-size:12.5px; font-weight:520; }
.execution-steps { position:relative; display:grid; gap:2px; }
.execution-live .execution-steps:before { content:""; position:absolute; top:13px; bottom:13px; left:3px; width:1px; background:#e0e2e6; }
.execution-step { position:relative; min-height:28px; }
.execution-step:empty { display:none; }
.reasoning-live { display:grid; grid-template-columns:8px minmax(0,1fr); gap:11px; align-items:start; padding:5px 0 9px; }
.reasoning-live .activity-dot { margin-top:8px; animation:activity-pulse 1.4s ease-in-out infinite; }
.reasoning-live .message-body { color:#676c75; font-size:13.5px; font-weight:400; line-height:1.68; letter-spacing:-.004em; }
.message-tool-calls { margin:0; }
.message-tool-calls details,.tool-result { padding:7px 0 7px 19px; border:0; }
.message-tool-calls summary,.tool-result summary { min-height:24px; color:#6b7078; font-size:12.5px; font-weight:520; }
.execution-live .message-tool-calls .activity-dot { animation:activity-pulse 1.4s ease-in-out infinite; }
.message-tool-calls pre,.tool-result pre { margin-left:0; }
.tool-result summary small { margin-left:8px; }
.execution-step.thinking { display:flex; align-items:center; gap:11px; padding:7px 0; color:#72767e; font-size:13px; }
.execution-step.thinking .activity-dot { animation:activity-pulse 1.4s ease-in-out infinite; }
.execution-complete { margin:0 0 17px; border-bottom:1px solid #eceef1; color:#777b82; }
.execution-complete > summary { width:max-content; padding:0 0 12px; display:flex; align-items:center; gap:7px; cursor:pointer; list-style:none; font-size:12.5px; font-weight:520; }
.execution-complete > summary::-webkit-details-marker { display:none; }
.execution-complete > summary .workspace-icon { width:13px; transition:transform .16s ease; }
.execution-complete[open] > summary .workspace-icon { transform:rotate(180deg); }
.execution-complete > .execution-steps { margin:-2px 0 13px; padding:2px 0 2px 12px; border-left:1px solid #e3e5e8; }
.streaming-cursor { width:5px; height:15px; margin-top:5px; background:#777b82; }
@keyframes activity-pulse { 50% { opacity:.38; transform:scale(.78); } }


/* Compact composer: one editable surface with a quiet toolbar. */
#conversation .composer { position:relative; z-index:2; flex:none; width:min(720px,calc(100% - 44px)); max-width:720px; margin:0 auto 16px; padding:12px 14px 10px; border:1px solid #e1e3e7; border-radius:22px; background:#fff; box-shadow:0 2px 5px #20242c03,0 8px 24px #20242c06; }
#conversation .composer:focus-within { border-color:#c9cdd5; box-shadow:0 2px 5px #20242c03,0 8px 24px #20242c08; }
#conversation .composer textarea { display:block; width:100%; height:42px; min-height:42px; max-height:176px; margin:0; padding:4px 2px 8px; border:0; border-radius:0; font:inherit; font-size:15px; line-height:1.5; resize:none; overflow:auto; color:#24272c; background:transparent; box-shadow:none; outline:0; }
#conversation .composer textarea::placeholder { color:#a0a4ad; font-weight:400; }
#conversation .composer-toolbar { min-height:36px; margin-top:3px; gap:10px; }
#conversation .composer-tool { width:34px; height:34px; min-height:34px; padding:0; border:0; border-radius:50%; background:transparent; color:#626873; }
#conversation .composer-tool:hover { color:#24272c; background:#f3f4f6; }
#conversation .composer-tool .workspace-icon { width:21px; height:21px; }
#conversation .send-button { width:34px; height:34px; min-height:34px; padding:0; margin:0; border-radius:50%; color:#fff; background:#2861ca; opacity:1; }
#conversation .send-button:hover { background:#2153b0; }
#conversation .send-button:disabled { color:#a9adb6; background:#eef0f3; }
#conversation .send-button[data-action=stop] { background:#34383e; }
#conversation .send-button .workspace-icon { width:18px; height:18px; }
#conversation .composer-send-tools { display:flex; align-items:center; gap:8px; }
.composer-mode { color:#969ba4; font-size:11px; font-weight:400; }
#conversation .composer-stop { width:30px; height:30px; min-height:30px; padding:0; display:grid; place-items:center; border:1px solid #e5e7eb; border-radius:50%; background:#fff; color:#737882; }
#conversation .composer-stop:hover { background:#f3f4f6; color:#252930; }
.composer-stop .stop-square { width:9px; height:9px; background:currentColor; }
#conversation .composer button:focus-visible,.queued-message button:focus-visible { outline:2px solid #9db7ec; outline-offset:2px; }
.conversation-turn .message.user { flex-direction:row; gap:0; }
.conversation-turn .message.user .message-content { width:fit-content; }
.conversation-turn .message-body { min-width:0; }
#conversation .message-attachments { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 9px; max-width:100%; }
.chat-image { display:block; max-width:100%; padding:0; min-height:0; border:1px solid #e6e8ec; border-radius:12px; overflow:hidden; background:#fafafa; cursor:zoom-in; opacity:1!important; }
.chat-image img { display:block; max-width:min(320px,100%); max-height:240px; width:auto; height:auto; object-fit:cover; }
.image-placeholder { display:grid; place-items:center; width:min(260px,65vw); min-height:140px; padding:20px; color:#9095a0; font-size:12px; }
.message-meta { min-height:0; margin-top:7px; font-size:11px; color:#9297a0; }
#previews { flex-wrap:nowrap; padding:0 0 9px; }
#previews:empty { display:none; }
#previews .attachment-card { flex:0 0 auto; }
#previews .attachment-preview { position:static; transform:none; width:36px; height:36px; min-height:0; padding:0; margin:0; border:0; flex:none; overflow:hidden; border-radius:6px; }
#previews .attachment-preview img { display:block; width:36px; height:36px; }
#previews .attachment-card strong { font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#previews .attachment-card small { color:#747984; font-size:8px; }
#previews .remove-attachment { min-height:0; padding:0; margin:0; }
#previews .remove-attachment svg { width:11px; height:11px; }
#composer-status:empty { display:none; }
#task-quotes button { min-height:0; padding:0; }
#conversation .task-quote-heading svg { width:13px; height:13px; }
#selection-quote { min-height:34px; }
.clipboard-field { position:fixed; opacity:0; pointer-events:none; }
.drop-hint { display:none; }
.composer.drag-over { border-style:dashed!important; background:#f4f7fc!important; }
.composer.drag-over .drop-hint { display:grid; position:absolute; inset:0; place-items:center; pointer-events:none; border-radius:20px; background:#f4f7fcf2; color:#536f98; font-size:14px; }
.execution-process { max-width:690px; margin:0 0 17px; color:#777b82; border-bottom:1px solid #eceef1; }
.execution-process > summary { display:flex; align-items:center; gap:7px; width:max-content; max-width:100%; padding:0 0 12px; min-height:28px; cursor:pointer; list-style:none; font-size:12.5px; font-weight:520; }
.execution-process > summary::-webkit-details-marker { display:none; }
.execution-process > summary svg { width:13px; height:13px; transition:transform .16s ease; }
.execution-process[open] > summary svg { transform:rotate(90deg); }
.execution-caption { font-size:11px; color:#999da5; font-weight:400; }
.execution-process ol { list-style:none; margin:-2px 0 13px; padding:2px 0 2px 12px; border-left:1px solid #e3e5e8; }
.execution-process.execution-active { border-bottom:0; }
.execution-step { display:flex; align-items:flex-start; gap:11px; color:#6b7078; font-size:12.5px; font-weight:520; padding:5px 0; overflow-wrap:anywhere; }
.execution-marker { flex:none; width:7px; height:7px; margin-top:7px; border-radius:50%; background:#d6a000; box-shadow:0 0 0 3px #fff5d7; }
.execution-completed .execution-marker { background:#3a9b70; box-shadow:0 0 0 3px #e5f5ed; }
.execution-failed .execution-marker,.execution-blocked .execution-marker { background:#b1907c; box-shadow:none; }
.execution-unconfirmed .execution-marker { background:#a2a8b1; box-shadow:none; }
.execution-state { margin-left:8px; color:#999da5; font-size:11px; font-weight:400; }
.execution-step p { margin:5px 0 0; max-height:280px; overflow:auto; white-space:pre-wrap; font-size:13.5px; font-weight:400; line-height:1.68; color:#676c75; }
.message-body .align-center { text-align:center; }.message-body .align-right { text-align:right; }
.message-body .task-list-item { list-style:none; }.task-list-item > input { width:13px; height:13px; min-height:0; padding:0; margin:0 7px 0 -20px; vertical-align:middle; accent-color:#777f8c; }
#conversation .message-body a { color:#315fd4; }
#conversation-rail { top:22px; bottom:22px; left:11px; }

.image-viewer { width:min(1100px,calc(100vw - 40px)); max-width:none; max-height:calc(100dvh - 40px); padding:0; border-radius:16px; overflow:hidden; }
.image-viewer::backdrop { background:#16191ec9; backdrop-filter:blur(8px); }
.image-viewer header { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:10px 14px 10px 20px; color:#616873; background:#fafafb; border-bottom:1px solid #e4e6ea; font-size:12px; }
#viewer-caption { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.image-canvas { display:flex; align-items:center; justify-content:center; overflow:auto; max-height:calc(100dvh - 110px); padding:16px; background:#f1f2f4; }
.image-canvas img { display:block; max-width:100%; max-height:calc(100dvh - 145px); object-fit:contain; }


@media (hover:none) { .response-actions { opacity:1; transform:none; pointer-events:auto; } }
@media (max-width:720px), (max-width:1000px) and (max-height:500px) {
  #account { position:fixed; inset:auto 0 auto 0; top:var(--app-top,0px); height:var(--app-height,100dvh); }
  #messages-scroll { padding:24px max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left)); overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
  .conversation-context-rail { display:none; }
  .conversation-turn .message.user .message-content { max-width:92%; }
  #conversation .message-body,.conversation-turn .message.user .message-body { font-size:16px; line-height:1.68; }
  .message-body,.message-body * { overflow-wrap:anywhere; word-break:break-word; }
  #conversation .message-body pre { max-width:100%; margin-left:0; overflow-x:auto; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
  .message-body table { width:100%; max-width:100%; table-layout:fixed; }
  #conversation .composer { width:calc(100% - 20px); max-width:100%; margin-bottom:max(8px,env(safe-area-inset-bottom)); }
  #conversation .composer textarea { font-size:16px; line-height:1.55; overflow-wrap:anywhere; word-break:break-word; }
  .composer-note { display:none; }
  .execution-step p { font-size:15px; }
  .composer-status { width:calc(100% - 20px); }
  .image-viewer { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); border-radius:14px; }
  .image-viewer header .icon-button { width:44px; height:44px; }
}
html[data-native-shell=android] #install { display:none!important; }
html[data-overlay=true] .topbar,html[data-overlay=true] .sidebar,html[data-overlay=true] .sidebar-scrim { display:none!important; }
html[data-overlay=true] #messages-scroll { padding:18px 16px 10px; }
html[data-overlay=true] .composer { margin-bottom:10px!important; }
html[data-overlay=true] .composer textarea { height:54px!important; min-height:54px!important; max-height:min(120px,30vh)!important; }
html[data-overlay=true] .composer-note { display:none; }
@media (prefers-reduced-motion:reduce) { .execution-process > summary svg,.response-actions,.conversation-context-rail * { transition:none; } }

.chat-viewport-probe { position:fixed; pointer-events:none; visibility:hidden; width:0; }
.chat-viewport-probe.dynamic { height:100dvh; }.chat-viewport-probe.keyboard-inset { height:env(keyboard-inset-height,0px); }
/* Neutralize inherited workspace-form defaults absent from the reference. */
.response-actions button { min-height:27px; }
#conversation .message-body h1,#conversation .message-body h2,#conversation .message-body h3,#conversation .message-body h4 { font-weight:700; }
.conversation-turn .message.user .message-body { white-space:normal; }
.conversation-empty { width:min(620px,100%); max-width:620px; margin:9vh auto 0; padding:38px; }
.conversation-empty h2 { font-size:clamp(31px,3vw,43px); line-height:1.15; letter-spacing:-.035em; font-weight:420; }
.conversation-empty > p { margin:14px auto 0; font-size:13px; line-height:1.7; }
.conversation-empty .suggestions { display:grid; grid-template-columns:1fr 1fr; width:min(520px,100%); margin:30px auto 0; gap:10px; }
.conversation-empty .suggestions button { min-height:72px; padding:15px; border:1px solid #e6e8ec; border-radius:14px; background:#fff; color:#4f535a; font-size:12px; text-align:left; }
@media (max-width:720px), (max-width:1000px) and (max-height:500px) { .conversation-empty { padding:30px 20px; }.conversation-empty .suggestions { grid-template-columns:1fr; } }

.message-meta .retry-send,.message-meta .abandon-send { min-height:24px; padding:2px 8px; border:1px solid #d4d7dd; border-radius:6px; background:transparent; color:inherit; font:inherit; cursor:pointer; }
.task-supplements { width:min(600px,92%); box-sizing:border-box; margin:12px 0 0 auto; padding:12px 15px; border-left:2px solid #d8dce4; border-radius:0 10px 10px 0; background:#f8f9fb; }
.task-supplements-title { margin-bottom:8px; color:#747b87; font-size:11px; line-height:1.6; }
.conversation-turn .task-supplements .message.user .message-content { width:100%; max-width:100%; align-items:flex-start; }
.conversation-turn .task-supplements .message.user .message-body { padding:0; border-radius:0; background:transparent; font-size:14px; overflow-wrap:anywhere; }
.conversation-turn .task-supplement + .task-supplement { margin-top:12px; padding-top:12px; border-top:1px solid #e6e8ed; }
.task-supplement .message-meta { margin-top:5px; color:#747b87; line-height:1.6; }

/* Queued messages sit behind the input surface, following the Codex reference. */
#conversation .composer-status { position:relative; z-index:1; display:block; flex:none; width:min(696px,calc(100% - 68px)); max-height:176px; margin:0 auto; padding:10px 10px 20px; overflow:auto; border:1px solid #e7e8eb; border-bottom:0; border-radius:18px 18px 0 0; background:#fafafb; }
#conversation .composer-status:empty { display:none; }
#conversation .composer-status:not([hidden]):not(:empty)+.composer { margin-top:-10px; }
.queue-heading { display:flex; justify-content:space-between; gap:10px; padding:0 7px 6px; color:#858b94; font-size:11px; }
.queue-heading small { font-size:10px; color:#a0a5ad; }
.queued-message { display:flex; align-items:center; gap:9px; min-height:36px; padding:4px 5px; color:#41464f; }
.queued-message+.queued-message { border-top:1px solid #eceef0; }
.queue-marker { display:grid; flex:none; place-items:center; color:#a0a5ad; }
.queue-marker .workspace-icon { width:15px; height:15px; }
.queue-preview { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; line-height:1.5; }
.queue-attachments { flex:none; font-size:10px; color:#969ba4; }
#conversation .queue-action { display:grid; place-items:center; flex:none; min-width:28px; min-height:28px; padding:2px 5px; border:0; border-radius:6px; background:transparent; color:#9197a1; font:inherit; font-size:11px; cursor:pointer; }
#conversation .queue-action:hover { background:#eeeff2; color:#303640; }
#conversation .queue-action:disabled { opacity:.4; cursor:wait; }
.queue-action .workspace-icon { width:14px; height:14px; }
.uploaded-attachment { padding:5px 8px; border:1px solid #e7e9ed; border-radius:7px; color:#818793; font-size:11px; }
.execution-elapsed,.tool-elapsed { color:#989ea7; font-size:11px; font-weight:400; font-variant-numeric:tabular-nums; white-space:nowrap; }
.execution-elapsed { margin-left:3px; }
.execution-update-note { margin:2px 0 12px 12px; max-width:560px; color:#9399a3; font-size:12px; line-height:1.6; }
@media(max-width:720px), (max-width:1000px) and (max-height:500px) {
  #conversation .composer-status { width:calc(100% - 36px); max-height:144px; }
  #conversation .composer { padding:10px 12px 8px; border-radius:20px; }
  #conversation .composer-tool,#conversation .send-button { width:38px; height:38px; min-height:38px; }
  #conversation .queue-action { min-width:34px; min-height:34px; }
  .queue-heading small { display:none; }
  .composer-mode { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
  .execution-process > summary { gap:5px; font-size:12px; }
  .execution-elapsed,.execution-caption { font-size:10px; }
}

.composer-direct{padding:8px 12px;border:1px solid var(--border,#dedee4);border-radius:18px;white-space:nowrap;font-size:12px}.queued-message{flex-wrap:wrap}.queue-preview{min-width:80px}.composer-direct[hidden]{display:none}

@media(max-width:720px), (max-width:1000px) and (max-height:500px){.can-steer .composer-mode{display:none}}

.clarification-card{max-width:620px;margin:20px 0;padding:20px;border:1px solid #e2e5eb;border-radius:16px;background:#fafbfc;color:#303640}
.clarification-heading{margin:0 0 10px;color:#737b88;font-size:12px;font-weight:600}.clarification-question{margin:0 0 18px;white-space:pre-wrap;font-size:15px;line-height:1.7}
.clarification-card fieldset{display:grid;gap:8px;min-width:0;margin:0 0 16px;padding:0;border:0}.clarification-card legend{margin-bottom:8px;font-size:12px;color:#727b88}.clarification-card fieldset label{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e4e7ec;border-radius:10px;background:#fff;font-size:14px;cursor:pointer}.clarification-card input{flex:0 0 18px;width:18px;height:18px;min-height:18px;margin:2px 0 0;padding:0;accent-color:#285fc6}.clarification-card fieldset label{margin:0;font-weight:400}.clarification-card fieldset label span{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.5}
.clarification-text-label{display:grid;gap:8px;font-size:12px;color:#727b88}.clarification-card textarea{box-sizing:border-box;width:100%;min-height:70px;padding:10px 12px;resize:vertical;border:1px solid #dfe3ea;border-radius:10px;background:#fff;color:#303640;font:inherit;font-size:14px;line-height:1.6}.clarification-card textarea:focus{outline:2px solid #aabfea;outline-offset:2px}
.clarification-feedback{margin:10px 0;color:#737d8c;font-size:12px;line-height:1.6}.clarification-actions{display:flex;gap:10px}.clarification-actions button{min-height:36px;padding:7px 14px;border:1px solid #dce1ea;border-radius:9px;font:inherit;font-size:13px;cursor:pointer}.clarification-submit{color:#fff;background:#285fc6}.clarification-skip{color:#626e80;background:#fff}.clarification-card button:disabled{opacity:.5;cursor:default}.clarification-card[data-inactive=true]{background:#f8f9fa}.clarification-card textarea:disabled{color:#737b88;background:#f4f5f7}
@media(max-width:720px), (max-width:1000px) and (max-height:500px){.clarification-card{padding:15px;margin:16px 0}.clarification-actions button{min-height:42px}.clarification-card textarea{font-size:16px}}

.clarification-card.clarification-collapsed{padding:6px 10px;margin:12px 0;background:transparent;border-color:#e9ebef}.clarification-summary{display:block;max-width:100%;padding:5px 8px;min-height:30px;border:0;color:#6d7786;background:transparent;font-size:12px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clarification-summary:hover{background:#f1f3f7}

.native-tool-elapsed{color:#989ea7;font-size:11px;font-weight:400;font-variant-numeric:tabular-nums}.execution-issue{margin:3px 0 0;color:#967965;font-size:11px;font-weight:400}.execution-more{margin:4px 0 0 10px;padding:4px 7px;min-height:28px;border:0;color:#8992a1;font-size:11px;background:transparent}

/* Keep keyboard help quiet and touch actions comfortably reachable. */
.composer-shortcut { order:2; color:#747b87; font-size:11px; white-space:nowrap; }
@media(max-width:720px), (max-width:1000px) and (max-height:500px) {
  .composer-shortcut { display:none; }
  #conversation .composer-tool,#conversation .send-button,#conversation .composer-stop { width:44px; height:44px; min-height:44px; flex:none; }
  #conversation .queue-action,.response-actions button { min-width:44px; min-height:44px; }
}

/* Mobile attachments keep preview and removal as distinct touch targets. */
@media(max-width:720px), (max-width:1000px) and (max-height:500px) {
  #previews .attachment-card { min-width:210px; max-width:230px; height:64px; padding:8px 56px 8px 8px; gap:8px; }
  #previews .attachment-preview,#previews .attachment-preview img { width:44px; height:44px; }
  #previews .remove-attachment { top:50%; right:6px; transform:translateY(-50%); width:44px; height:44px; min-height:44px; border-radius:10px; background:#f0f1f4; }
  #previews .remove-attachment svg { width:16px; height:16px; }
  #previews .attachment-card strong { font-size:11px; }
  #previews .attachment-card small { font-size:10px; }
  .queued-message { display:grid; grid-template-columns:minmax(0,1fr) 44px 44px; gap:4px 8px; padding:8px 5px; }
  .queued-message .queue-marker { display:none; }
  .queued-message .queue-preview,.queued-message .queue-attachments { grid-column:1/-1; min-width:0; }
  .queued-message .queue-direct { grid-column:1; grid-row:auto; justify-self:start; }
  .queued-message .queue-edit { grid-column:2; }
  .queued-message .queue-remove { grid-column:3; }
  #conversation .queued-message .queue-action { min-width:44px; min-height:44px; }
  #conversation .composer-direct { min-height:44px; padding-inline:8px; }
}

#previews .attachment-card>span { flex:1; min-width:0; }

/* Keep space for messages and controls when a keyboard reduces usable height. */
@media(max-height:500px) {
  #account .topbar { min-height:56px; padding-block:6px; }
  #conversation .composer textarea { max-height:max(42px,min(176px,calc(var(--app-height,100dvh) * .3))); }
  #conversation .composer { display:flex; flex-direction:column; max-height:55%; overflow:hidden; overscroll-behavior:contain; }
  #conversation .composer textarea { flex:1 1 auto; min-height:42px; }
  #conversation #previews,#conversation #task-quotes { flex:0 1 auto; min-height:0; max-height:64px; overflow:auto; }
  #conversation .composer-toolbar { position:static; flex:none; background:#fff; }
  #conversation .composer-status { max-height:22%; padding-bottom:12px; }
}

@media(max-height:500px) {
  #conversation .composer:has(#previews:not(:empty)) { max-height:75%; }
  #conversation #previews:not(:empty) { flex:none; height:73px; max-height:73px; }
}
