/* Compact actions stay discoverable by keyboard, pointer and touch. */
#notice{position:relative;display:flex;align-items:flex-start;gap:12px;padding-right:8px}
#notice[hidden]{display:none}
#notice>span{flex:1;min-width:0;overflow-wrap:anywhere}
#notice .notice-close{flex:none;width:30px;height:30px;min-height:30px;padding:0;border:0;background:transparent;font-size:23px;line-height:1;color:inherit;border-radius:6px}
#notice .notice-close:hover{background:#0000000b}
.icon-action svg,.turn-more>summary svg{display:block;width:18px;height:18px;pointer-events:none}
.chat-turn-actions{align-items:center;gap:3px;position:relative}
.chat-turn-actions .icon-action,.icon-action{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-height:34px;padding:7px;border:0;border-radius:8px;background:transparent;flex-shrink:0;color:#777}
.chat-turn-actions .icon-action:hover,.icon-action:hover,.turn-more>summary:hover{background:#ededed;color:#222;text-decoration:none}
.chat-turn-actions .icon-action:disabled{opacity:.35;cursor:default}
.turn-more>summary{display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:7px;border-radius:8px}
.turn-more>summary::-webkit-details-marker{display:none}
.turn-menu{top:auto;bottom:calc(100% + 4px);left:auto;right:0;min-width:210px;max-width:calc(100vw - 40px);gap:4px;padding:10px}
.turn-menu button{padding:8px 10px;border-radius:6px;text-align:left}
.turn-menu button:hover{background:#f4f4f4;text-decoration:none}
.turn-menu small{padding:4px 10px;font-size:10px}
.chat-turn.assistant>.chat-turn-label{display:none}
.chat-turn.user{max-width:80%;padding:0;line-height:1.8;background:transparent;border-radius:0}
.chat-turn.user>.chat-user-text,.chat-turn.pending>.chat-user-text{background:#1e1e1e;color:#fff;padding:13px 18px;border-radius:20px}
.chat-turn.pending>.chat-user-text{width:fit-content;max-width:80%;margin:14px 0 20px auto;white-space:pre-wrap}
.chat-turn.pending>.chat-turn-label{display:none}
.chat-turn-time{display:block;text-align:right;font-size:11px;color:#999;margin:0 8px 10px}
.chat-processing-time{font-size:12px;color:#999;margin:0 0 10px}
.chat-turn.user .chat-turn-actions{justify-content:flex-end;margin-top:6px}
.chat-turn.assistant{margin-bottom:26px;padding:10px 4px}
.chat-turn .response-markdown{font-size:15px;line-height:1.85}
.chat-turn .response-markdown p{margin:10px 0}
.response-markdown ul,.response-markdown ol{padding-left:24px;margin:12px 0}.response-markdown li{margin:5px 0}.response-markdown hr{border:0;border-top:1px solid #eee;margin:24px 0}.response-markdown h2{font-size:21px}.response-markdown h3{font-size:18px}.response-markdown h4,.response-markdown h5,.response-markdown h6{font-size:16px;margin:22px 0 10px}
#messages>.chat-live{background:transparent;border:0;border-radius:0;padding:8px 4px;margin:0 0 24px;max-height:none;overflow:visible}
#messages #chatLiveText{max-height:none;overflow:visible}
#chatStreamStatus{display:block;font-size:11px;color:#999;margin:0 0 12px;letter-spacing:0}
.action-dialog{width:min(520px,calc(100vw - 28px));max-height:85dvh;overflow:auto;border:1px solid #ddd;border-radius:16px;padding:22px;color:var(--ink);background:white}
.action-dialog::backdrop{background:#0004}.action-dialog h2{font-size:17px;margin:0}.action-dialog .section-top{align-items:center;gap:12px}
.delete-confirm-dialog{width:min(440px,calc(100vw - 32px));padding:24px;border:0;border-radius:20px;box-shadow:0 20px 70px #0003}
.delete-confirm-dialog p{font-size:13px;line-height:1.8;color:#62656b;margin:16px 0 24px;white-space:pre-line}
.delete-confirm-actions{display:flex;justify-content:flex-end;gap:8px}.delete-confirm-actions button{min-width:76px;padding:10px 18px;border:0;border-radius:12px;font-size:13px}
.delete-confirm-accept{background:#b43c3c;color:white}.delete-confirm-accept:hover{background:#982e2e}
.action-dialog label{display:block;font-size:12px;margin:14px 0}.action-dialog select{width:100%;margin-top:6px}
.source-dialog{width:min(720px,calc(100vw - 28px))}.source-card{padding:16px 0;border-top:1px solid #eee}.source-card h3{font-size:14px;overflow-wrap:anywhere}.source-card blockquote{margin:12px 0;padding:12px 16px;border-left:3px solid #ddd;background:#fafafa;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.8}
.read-aloud-preferences{border-top:1px solid #eee;padding-top:12px;margin-top:16px}.read-aloud-preferences button{font-size:12px}
.read-aloud-player{position:fixed;right:20px;bottom:18px;z-index:18;width:min(380px,calc(100vw - 28px));padding:14px 16px;background:#fff;border:1px solid #ddd;border-radius:16px;box-shadow:0 8px 32px #0002}
.read-aloud-player[hidden]{display:none}.read-aloud-player .section-top{gap:6px;margin:0}.read-aloud-player strong{flex:1;font-size:13px}.read-aloud-player audio{width:100%;height:40px}.read-aloud-player p{margin:6px 0 12px;overflow-wrap:anywhere}
.image-retry-options{display:flex;gap:5px;align-items:center;margin-left:6px}.image-retry-options select{font-size:12px;width:150px;max-width:100%;height:34px;min-height:34px;padding:4px 26px 4px 9px;border-radius:8px;margin:0;background:#fafafa}
body[data-workspace="chat"] #taskHistory .history-item{font-size:13px;font-weight:400;padding:11px 10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;border-radius:8px}
body[data-workspace="chat"] #taskHistory .history-row{position:relative;border-radius:8px;margin:1px 0}
body[data-workspace="chat"] #taskHistory .history-row:has(.selected){background:#ebebeb}
body[data-workspace="chat"] #taskHistory .history-item.selected{background:transparent;font-weight:500}
.history-more{flex:none}.history-more>summary{list-style:none;cursor:pointer;border-radius:6px;padding:7px;color:#777}.history-more>summary::-webkit-details-marker{display:none}.history-more>summary svg{display:block;width:17px;height:17px}
.history-more .turn-menu{position:fixed;bottom:auto;right:auto;left:auto;top:auto;margin:0;min-width:200px;width:240px}
.history-running{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4674ae;margin-left:7px}
body[data-workspace="chat"] #retentionHint{display:none}
body[data-workspace="chat"] #historyCleanup{font-size:10px;margin:0 0 6px;padding:4px 10px;color:#888}
.history-action-popover{position:fixed;inset:auto;margin:0;width:240px;max-width:calc(100vw - 16px);border:1px solid #ddd;border-radius:12px;box-shadow:0 6px 24px #0002;padding:14px;background:#fff;color:#333;font-size:12px}
.history-action-popover strong{display:block;font-size:12px;overflow-wrap:anywhere}.history-action-popover button{font-size:12px;padding:8px 0;color:#a43131}
@media(hover:hover){.history-row .history-more{opacity:0}.history-row:hover .history-more,.history-row:focus-within .history-more{opacity:1}}
@media(hover:hover){.chat-turn.user .chat-turn-actions{opacity:0}.chat-turn.user:hover .chat-turn-actions,.chat-turn.user:focus-within .chat-turn-actions{opacity:1}}
@media(max-width:550px){.chat-turn.user{max-width:92%}.chat-turn-actions{gap:2px}.chat-turn-actions .icon-action,.turn-more>summary{width:36px;height:36px}.read-aloud-player{right:14px;bottom:14px}.action-dialog{padding:16px}.chat-turn .response-markdown{font-size:14px}.image-retry-options{margin-left:0}}
/* One composer, one settings entry, one conversation menu. */
.chat-main>.chat-toolbar{display:none}
body[data-workspace="chat"] main>header{display:none}
body[data-workspace="chat"] #resultsPanel,body[data-workspace="chat"] #manageModelsMobile{display:none}
.chat-main>.section-top>div:first-child{flex:1;min-width:0}
.chat-main #chatTitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;color:#666}
.conversation-management .turn-menu{top:100%;bottom:auto;right:0}
.chat-composer{padding:9px 14px;border-radius:22px;background:#fafafa}
.chat-composer #chatRequest{height:34px;min-height:34px;max-height:34px;resize:none;padding:5px 2px;font-size:15px;line-height:24px;transition:height .15s ease}
.chat-composer:focus-within #chatRequest,.chat-composer:has(#chatRequest:not(:placeholder-shown)) #chatRequest{height:104px;max-height:180px;resize:vertical}
.chat-composer .chat-bottom{margin-top:3px;gap:5px;flex-wrap:nowrap;align-items:center}
.chat-composer .chat-bottom>.hint{display:none}
.chat-composer #chatAttach{border:0;background:transparent;width:32px;min-width:32px;height:32px;min-height:32px;padding:0;font-size:24px;border-radius:50%}
.chat-composer .composer-tools{display:flex;gap:3px;flex:1;min-width:0;flex-wrap:wrap}
.composer-tools>label[for="composeMode"]{font-size:0;gap:0}
.composer-tools #composeMode{width:67px;height:30px;min-height:30px;padding:3px 20px 3px 7px;border:0;font-size:11px}
.composer-tools .composer-model{margin-left:auto!important;max-width:190px}
.composer-tools .composer-model select{width:190px;max-width:100%;height:30px;min-height:30px;padding:3px 22px 3px 7px;border:0;font-size:11px;text-overflow:ellipsis}
.composer-thinking{margin:0!important;font-size:0!important;gap:0!important}
.composer-thinking select{height:30px;min-height:30px;width:86px;padding:3px 22px 3px 7px;border:0;font-size:11px}
.composer-tools [hidden]{display:none!important}
.composer-tools #mediaOptionsToggle{width:30px;height:30px;min-height:30px;padding:6px}
.composer-tools #routeHint{display:none}
.chat-bottom #sendChat{font-size:12px;min-width:64px;min-height:34px;height:34px;padding:5px 10px;border-radius:20px}
.chat-bottom #chatStop{font-size:11px;padding:5px 8px;min-height:34px}
.chat-library{margin-top:3px}.chat-library>summary{padding:5px 2px;font-size:10px;color:#888}
@media(max-width:650px){.chat-composer .composer-tools{gap:0}.composer-tools .composer-model{max-width:135px}.composer-tools .composer-model select{width:135px}.chat-composer .chat-bottom{flex-wrap:wrap}.chat-composer .composer-tools{flex-basis:calc(100% - 42px)}.chat-bottom #sendChat{margin-left:auto}.composer-thinking select{width:80px}}
@media(max-width:850px){body[data-workspace="chat"] #workspaceSwitch{margin-left:42px}}
@media(prefers-reduced-motion:reduce){.chat-composer #chatRequest{transition:none}}
.composer-entry{display:flex;align-items:flex-end;gap:8px}
.composer-entry #chatRequest{flex:1;min-width:0;width:0;margin:0}
.composer-entry #chatAttach{align-self:center}
.composer-entry #sendChat{width:34px;height:34px;min-width:34px;min-height:34px;padding:0;font-size:22px;border-radius:50%;flex-shrink:0;align-self:center}
.composer-entry #chatStop{width:34px;height:34px;min-height:34px;align-self:center}
.chat-composer:focus-within .chat-bottom,.chat-composer:has(#chatRequest:not(:placeholder-shown)) .chat-bottom{margin-top:6px}
body.sidebar-collapsed[data-workspace="chat"] #workspaceSwitch{margin-left:42px}

body.sidebar-collapsed[data-workspace="chat"] #notice{margin-left:42px}
@media(max-width:850px){body[data-workspace="chat"] #notice{margin-left:42px}}
/* Visible response metrics and bounded interactive answer controls. */
.chat-turn-metrics{display:flex;flex-wrap:wrap;gap:5px;margin:14px 0 4px;font-size:10px;color:#777}
.metric-badge{display:inline-flex;align-items:center;border-radius:12px;padding:4px 8px;background:#f5f5f5;line-height:1.3}
.composer-entry #voiceInputButton{width:32px;height:34px;min-height:34px;align-self:center;padding:6px}
.voice-input-actions{display:flex;gap:8px;flex-wrap:wrap}.voice-input-actions button{padding:9px 13px;font-size:13px}.voice-input-dialog #voiceInputStatus{font-size:13px;line-height:1.8;min-height:24px}
.interactive-content{margin:20px 0;padding:18px;border:1px solid #e5e5e5;border-radius:14px;background:#fff;min-width:0;overflow:hidden}
.interactive-content h3{font-size:15px!important;margin:0 0 10px!important}.interactive-content p{white-space:pre-wrap}.interactive-description{font-size:13px;color:#666}.interactive-content input[type=search]{font-size:13px;margin:4px 0;width:100%}
.interactive-content .response-table{max-height:380px;overflow:auto}.interactive-content table{width:100%;border-collapse:collapse;font-size:13px}.interactive-content th,.interactive-content td{padding:9px 10px;border-bottom:1px solid #eee;text-align:left;overflow-wrap:anywhere}.interactive-content th button{font-size:12px;padding:4px 0;border:0;background:transparent;white-space:nowrap}
.interactive-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.interactive-tabs button,.interactive-content>button{font-size:12px;padding:7px 12px;border:1px solid #ddd;border-radius:8px;background:#fafafa}.interactive-tabs button[aria-pressed=true]{background:#262626;color:#fff;border-color:#262626}
.interactive-detail{font-size:13px;line-height:1.8;padding:12px;background:#fafafa;border-radius:9px;white-space:pre-wrap}.interactive-chart{display:grid;gap:8px}.interactive-bar{display:grid;grid-template-columns:minmax(55px,1fr) minmax(50px,3fr) minmax(30px,auto);align-items:center;gap:10px;background:transparent;border:1px solid transparent;border-radius:6px;padding:7px;font-size:12px;text-align:left;width:100%}.interactive-bar[aria-pressed=true]{border-color:#bbb;background:#fafafa}.interactive-bar span{overflow-wrap:anywhere}.interactive-bar meter{width:100%;height:18px}.interactive-bar meter::-webkit-meter-optimum-value{background:#687d91}
.interactive-check{display:flex!important;gap:10px;align-items:flex-start!important;font-size:13px!important;margin:10px 0!important}.interactive-check input{width:16px;height:16px;margin:4px 0;flex:none}.interactive-check:has(input:checked) span{text-decoration:line-through;color:#888}
.history-search{display:flex;gap:4px;align-items:center;margin:8px 0 10px;padding:0 6px}.history-search input{min-width:0;width:100%;font-size:12px;padding:8px;margin:0;border:1px solid #dedede;border-radius:8px;background:transparent}.history-search select{flex:none;width:59px;font-size:11px;margin:0;padding:7px 15px 7px 5px;border:0;background-color:transparent}#historySearchStatus{font-size:11px;padding:0 10px}body[data-workspace] #taskHistory .history-search-snippet{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:400;color:#888;margin-top:5px}
