/* Typography and geometry changes must never animate the editing surface. */
.chat-composer-shell textarea[data-slot="prompt-input-textarea"]{transition:none!important}
@media(max-width:768px),(pointer:coarse){
 .chat-composer-shell textarea[data-slot="prompt-input-textarea"],
 .chat-composer-shell [data-slot="prompt-input-body"]>[aria-hidden="true"]>.chat-input-placeholder{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:16px!important;line-height:24px!important;letter-spacing:normal!important;
  font-variant-ligatures:none;-webkit-text-size-adjust:100%;text-size-adjust:100%;
  box-sizing:border-box;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;
  transition:none!important;
 }
 .chat-composer-shell textarea[data-slot="prompt-input-textarea"]{
  max-height:min(180px,calc(var(--cqw-viewport-height,100dvh)*.35))!important;
  -webkit-appearance:none;border-radius:0;overscroll-behavior-y:contain;
 }
 .chat-composer-shell [data-slot="prompt-input-body"]>[aria-hidden="true"] span{transition:none!important}
 .chat-messages-pane{scroll-behavior:auto!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
  padding-bottom:clamp(0px,calc(var(--cqw-viewport-height,100dvh) - 600px),48px)!important}
 /* Native lazy rows already mount only near the viewport. A second browser
    height estimate changes their measured size as they enter the screen. */
 .chat-messages-pane [data-cqw-message-id] .chat-message{content-visibility:visible;contain-intrinsic-size:none}
}

/* Composer toolbar look (all widths): every control is the same soft chip —
   one border, one radius, one hover. Permission/knowledge keep their own
   state colours; only shape is unified. Geometry for phones is below. */
.chat-composer-shell [data-slot="prompt-input-footer"]{
 /* Share a row whenever the available width permits it. */
 column-gap:8px;row-gap:8px;
 --cqw-chip-h:36px;--cqw-chip-r:12px;
 --cqw-chip-border:hsl(var(--border));
 --cqw-chip-bg:hsl(var(--background));
 --cqw-chip-shadow:0 1px 2px hsl(var(--foreground) / .06);
}
/* Tools use the space beside the send actions, without reserving a whole row.
   Crowded tools wrap inside their own area instead of hiding behind actions. */
.chat-composer-shell [data-slot="prompt-input-footer"]>[data-slot="prompt-input-tools"]{
 gap:6px;flex:1 1 auto;width:auto;max-width:100%;min-width:0;flex-wrap:wrap;overflow:visible;
 padding:4px 2px;margin:-4px 0;scrollbar-width:none;overscroll-behavior-x:contain;
}
.chat-composer-shell [data-slot="prompt-input-footer"]>[data-slot="prompt-input-tools"]>*{flex-shrink:0}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto{gap:8px;flex-shrink:0}
/* The upstream footer has flex-wrap. A draft adds Clear and used to move the
   entire action group to a second row before the tools could shrink. */
@media(min-width:721px){
 .chat-composer-shell [data-slot="prompt-input-footer"]{
  display:grid!important;grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;column-gap:8px;row-gap:4px;
 }
 /* The keyboard hint is a separate full-width row, never a third item that
    can squeeze the actual buttons out of their single control row. */
 .chat-composer-shell [data-slot="prompt-input-footer"]>.basis-full{grid-column:1/-1;min-width:0}
 .chat-composer-shell [data-slot="prompt-input-footer"]>[data-slot="prompt-input-tools"]{
  flex:1 1 0%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;
  gap:5px;scrollbar-width:thin;scroll-padding-inline:4px;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"] [data-slot="prompt-input-tools"] #cqw-interaction-dock{flex-wrap:nowrap;max-width:none;gap:5px}
 .chat-composer-shell [data-slot="prompt-input-tools"] button[aria-label="Show token usage"]>span:last-child{display:none}
}
/* The clear action carries a tooltip wrapper, unlike the adjacent clock. */
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>:has(>[data-cqw-clear-input]){flex:0 0 auto}
.chat-composer-shell [data-cqw-clear-input]{
 width:var(--cqw-chip-h);min-width:var(--cqw-chip-h);height:var(--cqw-chip-h);min-height:var(--cqw-chip-h);
 border:1px solid var(--cqw-chip-border);border-radius:var(--cqw-chip-r);
 background:var(--cqw-chip-bg);color:hsl(var(--muted-foreground));box-shadow:var(--cqw-chip-shadow);
 transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.chat-composer-shell [data-cqw-clear-input]:hover{
 border-color:hsl(var(--primary) / .35);background:hsl(var(--primary) / .06);color:hsl(var(--foreground));
 transform:translateY(-1px);box-shadow:0 3px 8px -2px hsl(var(--foreground) / .12);
}
.chat-composer-shell [data-cqw-clear-input]:active{transform:translateY(0) scale(.96)}
@media(max-width:639px){
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>:has(>[data-cqw-clear-input]){display:none}
}
.chat-composer-shell [data-slot="prompt-input-tools"] button,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button:not([type="submit"]),
.chat-composer-shell [data-slot="prompt-input-footer"] [data-cqw-model-fallback-trigger]{
 height:var(--cqw-chip-h);min-height:var(--cqw-chip-h);border-radius:var(--cqw-chip-r);
 box-shadow:var(--cqw-chip-shadow);
 transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.chat-composer-shell [data-slot="prompt-input-tools"] button.w-8,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button.w-8{width:var(--cqw-chip-h);min-width:var(--cqw-chip-h)}
/* Neutral chips: attach, voice, usage, commands, questions, tasks, schedule, model. */
.chat-composer-shell [data-slot="prompt-input-tools"] button,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button:not([type="submit"]):not(#cqw-chat-knowledge-toggle):not([title^="点击更改权限模式"]),
.chat-composer-shell [data-slot="prompt-input-footer"] [data-cqw-model-fallback-trigger]{
 border:1px solid var(--cqw-chip-border);background:var(--cqw-chip-bg);color:hsl(var(--muted-foreground));
}
.chat-composer-shell [data-slot="prompt-input-tools"] button:hover,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button:not([type="submit"]):not(#cqw-chat-knowledge-toggle):not([title^="点击更改权限模式"]):hover,
.chat-composer-shell [data-slot="prompt-input-footer"] [data-cqw-model-fallback-trigger]:hover{
 border-color:hsl(var(--primary) / .35);background:hsl(var(--primary) / .06);color:hsl(var(--foreground));
}
.chat-composer-shell [data-slot="prompt-input-tools"] button:not(:disabled):hover,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button:not(:disabled):hover{
 transform:translateY(-1px);box-shadow:0 3px 8px -2px hsl(var(--foreground) / .12);
}
.chat-composer-shell [data-slot="prompt-input-tools"] button:active,
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button:active{transform:translateY(0) scale(.96)}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[aria-label="Select model and reasoning effort"]{
 padding:0 12px;color:hsl(var(--foreground));font-weight:500;
}
/* The task dock's own sheet (ID-scoped) strips borders; match the chips here. */
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock{gap:6px;max-width:100%;flex-wrap:wrap}
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock button[hidden]{display:none!important}
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock button{
 padding:0 10px;border:1px solid var(--cqw-chip-border);border-radius:var(--cqw-chip-r);
 background:var(--cqw-chip-bg);box-shadow:var(--cqw-chip-shadow);color:hsl(var(--muted-foreground));
}
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock button:hover{
 border-color:hsl(var(--primary) / .35);background:hsl(var(--primary) / .06);color:hsl(var(--foreground));
}
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-chat-question-toggle[aria-expanded="true"],
.chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock button[aria-expanded="true"]{
 border-color:hsl(var(--primary) / .45);background:hsl(var(--primary) / .1);color:hsl(var(--primary));
}
/* Usage chip: keep the tinted activity tile, tidy the text. */
.chat-composer-shell [data-slot="prompt-input-tools"] button[aria-label="Show token usage"]{padding:0 10px 0 6px}
.chat-composer-shell [data-slot="prompt-input-tools"] button[aria-label="Show token usage"]>span:first-child{border-radius:8px}
/* Count badge: a pill seated beside the icon (the row scrolls, so a badge
   hanging off the corner would be clipped or cover the icon). */
.chat-composer-shell [data-slot="prompt-input-tools"] button.w-8:has(>span.absolute){
 width:auto;padding:0 7px 0 10px;gap:5px;
}
.chat-composer-shell [data-slot="prompt-input-tools"] button>span.absolute{
 position:static;width:auto;min-width:18px;height:18px;padding:0 5px;border-radius:999px;
 font-size:10px;font-weight:600;line-height:18px;
}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>#cqw-chat-knowledge-toggle{padding:0 12px}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>#cqw-chat-knowledge-toggle:not([aria-checked="true"]){
 border-color:var(--cqw-chip-border);background:var(--cqw-chip-bg);
}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>#cqw-chat-knowledge-toggle[aria-checked="true"] .cqw-kb-dot{
 box-shadow:0 0 0 3px hsl(var(--primary) / .18);
}
/* Send: solid gradient with a soft glow; disabled is a calm muted chip
   instead of a washed-out primary. */
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[type="submit"]{
 width:var(--cqw-chip-h);height:var(--cqw-chip-h);border-radius:var(--cqw-chip-r);
 background:linear-gradient(135deg,hsl(var(--primary)),hsl(var(--primary) / .78));
 box-shadow:0 4px 12px -3px hsl(var(--primary) / .55),inset 0 1px 0 hsl(0 0% 100% / .18);
 transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[type="submit"]:disabled{
 opacity:1;background:hsl(var(--muted));color:hsl(var(--muted-foreground) / .7);box-shadow:none!important;
}
.chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[type="submit"]:not(:disabled):hover{
 filter:brightness(1.06);box-shadow:0 8px 18px -4px hsl(var(--primary) / .6),inset 0 1px 0 hsl(0 0% 100% / .18);
}
@media(prefers-reduced-motion:reduce){
 .chat-composer-shell [data-slot="prompt-input-footer"] button{transition:none!important;transform:none!important}
}

/* Mobile composer: two full-width rows share a consistent left edge and
   touch target height. These rules do not reposition the textarea or menus. */
@media(max-width:720px){
 .chat-composer-shell [data-slot="prompt-input-header"]{
  /* With the keyboard open the attachment cards shrink to fit (down to 36px)
     instead of being clipped to a sliver; 80px whenever there is room. */
  --cqw-attach-room:calc(var(--cqw-viewport-height,100dvh) - 270px - var(--cqw-composer-input-height,64px));
  --cqw-attach-size:clamp(36px,calc(var(--cqw-attach-room) - 20px),80px);
  box-sizing:border-box;max-height:max(44px,min(160px,var(--cqw-attach-room)));
  padding-top:clamp(0px,min(calc(var(--cqw-viewport-height,100dvh) - 340px),calc(var(--cqw-attach-room) - 96px)),12px);
  overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
 }
 .chat-composer-shell [data-slot="prompt-input-header"]>div{padding:clamp(3px,calc((var(--cqw-attach-room) - 80px)/2),8px)!important}
 .chat-composer-shell [data-slot="prompt-input-header"] :is(img.h-20,div.h-20.w-20){width:var(--cqw-attach-size)!important;height:var(--cqw-attach-size)!important}
 .chat-composer-shell [data-slot="prompt-input-header"] div.h-20.w-56{height:var(--cqw-attach-size)!important}
 .chat-composer-shell [data-slot="prompt-input-header"] .cqw-image-point-trigger{
  font-size:clamp(0px,calc((var(--cqw-attach-size) - 40px)/4),10px)!important;
  padding:clamp(0px,calc((var(--cqw-attach-size) - 40px)/10),4px) clamp(0px,calc((var(--cqw-attach-size) - 40px)/5),8px)!important;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]{
  flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;
  gap:8px!important;padding:8px 12px 10px!important;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]>[data-slot="prompt-input-tools"]{
  width:100%;min-width:0;max-width:100%;flex:0 0 auto;flex-wrap:wrap;padding:0;margin:0;
  gap:6px!important;align-items:center;overflow:visible;
  scrollbar-width:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
 }
 .chat-composer-shell [data-slot="prompt-input-tools"]::-webkit-scrollbar{display:none}
 .chat-composer-shell [data-slot="prompt-input-footer"]>[data-slot="prompt-input-tools"]>*{flex-shrink:0}
 /* Let each visible control share its row's remaining width. Flatten only the
    task dock's layout, keeping its DOM, events and hidden state intact. */
 .chat-composer-shell [data-slot="prompt-input-tools"]> :not(#cqw-interaction-dock){flex:1 1 auto;min-width:40px}
 .chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock:not([hidden]){display:contents}
 .chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock>button:not([hidden]){flex:1 1 auto;justify-content:center}
 .chat-composer-shell [data-slot="prompt-input-tools"]> :not(button):not(#cqw-interaction-dock)>*,
 .chat-composer-shell [data-slot="prompt-input-tools"]> :not(button):not(#cqw-interaction-dock) button{width:100%!important}
 .chat-composer-shell [data-slot="prompt-input-footer"]{--cqw-chip-h:40px}
 .chat-composer-shell [data-slot="prompt-input-tools"] button{
  height:40px!important;min-height:40px!important;border-radius:12px!important;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:12px!important;line-height:1.2!important;
 }
 .chat-composer-shell [data-slot="prompt-input-tools"]>button{min-width:40px}
 .chat-composer-shell [data-slot="prompt-input-tools"] button.w-8{min-width:40px!important}
 .chat-composer-shell [data-slot="prompt-input-tools"] #cqw-chat-question-toggle,
 .chat-composer-shell [data-slot="prompt-input-tools"] #cqw-interaction-dock button{
  height:40px!important;min-height:40px!important;padding:0 10px!important;
  font-size:12px!important;font-weight:500!important;
 }
 .chat-composer-shell [data-slot="prompt-input-tools"] button.w-8:has(>span.absolute){
  width:auto!important;min-width:40px!important;padding:0 6px 0 11px;gap:4px;
 }
 .chat-composer-shell [data-slot="prompt-input-tools"] button>span.absolute{
  min-width:16px;height:16px!important;padding:0 4px;font-size:9px!important;line-height:16px;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto{
  width:100%;min-width:0;margin-left:0!important;gap:6px!important;
  align-items:center;justify-content:flex-start;flex-wrap:nowrap;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button{
  width:40px!important;height:40px!important;min-height:40px!important;flex:0 0 40px;
  border-radius:12px!important;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[aria-label="Select model and reasoning effort"],
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>[data-cqw-model-fallback]{
  width:auto!important;max-width:none!important;min-width:0!important;flex:1 1 0!important;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>button[aria-label="Select model and reasoning effort"],
 .chat-composer-shell [data-slot="prompt-input-footer"] [data-cqw-model-fallback-trigger]{
  padding:0 10px!important;font:500 12px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  text-align:left;justify-content:flex-start;
 }
 .chat-composer-shell [data-slot="prompt-input-footer"] [data-cqw-model-fallback-trigger]{width:100%;height:40px;border-radius:12px}
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>#cqw-chat-knowledge-toggle{
  width:auto!important;max-width:108px;min-height:40px!important;height:40px!important;flex:0 0 auto;
  gap:5px;padding:0 10px;border-radius:12px;font-size:11px;line-height:1.2;
 }
 .chat-composer-shell #cqw-chat-knowledge-toggle .cqw-kb-dot{width:5px;height:5px}
 .chat-composer-shell #cqw-chat-knowledge-toggle .cqw-kb-state{font-size:10px;font-weight:600;letter-spacing:.02em}
}
@media(max-width:359px){
 .chat-composer-shell [data-slot="prompt-input-footer"]{padding-left:10px!important;padding-right:10px!important}
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto{gap:4px!important}
 .chat-composer-shell [data-slot="prompt-input-footer"]>div.ml-auto>#cqw-chat-knowledge-toggle{padding:0 6px}
}

/* Phone: three primary actions and one disclosure; existing secondary controls
   live in a bounded popover. Desktop keeps its original DOM and layout. */
@media(max-width:720px){
 .chat-composer-shell [data-cqw-mobile-footer]{position:relative;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
 .chat-composer-shell [data-cqw-composer-primary]{display:flex;align-items:center;gap:8px;min-width:0}
 .chat-composer-shell [data-cqw-composer-primary] button,.chat-composer-shell [data-cqw-primary-send]{width:40px!important;height:40px!important;min-height:40px!important;flex:none;border-radius:12px}
 .chat-composer-shell [data-cqw-composer-more-toggle]{display:inline-flex;align-items:center;justify-content:center;background:hsl(var(--muted)/.5);color:hsl(var(--foreground));border:1px solid hsl(var(--border));cursor:pointer}
 .chat-composer-shell [data-cqw-composer-more-toggle][aria-expanded=true]{background:hsl(var(--primary)/.12);border-color:hsl(var(--primary)/.45)}
 .chat-composer-shell [data-cqw-composer-more-panel]{position:absolute;z-index:70;bottom:calc(100% + 8px);left:0;right:0;box-sizing:border-box;max-height:min(var(--cqw-composer-more-max-height,370px),max(120px,min(370px,calc(var(--cqw-viewport-height,100dvh) - 100px))));overflow:auto;overscroll-behavior:contain;padding:12px;background:hsl(var(--popover,var(--background)));color:hsl(var(--popover-foreground,var(--foreground)));border:1px solid hsl(var(--border));border-radius:16px;box-shadow:0 8px 28px hsl(var(--foreground)/.16)}
 .chat-composer-shell [data-cqw-composer-more-panel][hidden]{display:none!important}
 .chat-composer-shell .cqw-more-heading{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:600;margin-bottom:10px}
 .chat-composer-shell .cqw-more-heading button{height:32px;width:32px;font-size:22px;background:transparent;border:0;color:inherit}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-slot=prompt-input-tools],.chat-composer-shell [data-cqw-more-actions]{display:flex!important;flex-wrap:wrap!important;align-items:center;gap:8px!important;width:100%;margin:0!important;padding:0!important;overflow:visible}
 .chat-composer-shell [data-cqw-more-actions]{padding-top:10px!important;margin-top:10px!important;border-top:1px solid hsl(var(--border))}
 .chat-composer-shell [data-cqw-more-actions]>*,.chat-composer-shell [data-cqw-composer-more-panel] [data-slot=prompt-input-tools]>*{flex:1 1 auto;min-width:40px;max-width:100%}
 .chat-composer-shell [data-cqw-composer-more-panel] button:not([hidden]){min-height:40px;border-radius:10px;font-size:12px}
 .chat-composer-shell [data-cqw-more-actions]>button{height:40px;width:auto!important;padding:0 10px;justify-content:center}
 .chat-composer-shell [data-cqw-more-actions] [data-cqw-clear-input]{display:inline-flex!important;gap:5px}
 .chat-composer-shell [data-cqw-more-actions] button[aria-label="Select model and reasoning effort"]{min-width:0;flex-basis:100%;justify-content:flex-start}
 .chat-composer-shell [data-cqw-more-actions] [data-cqw-model-fallback]{flex-basis:100%}
 .chat-composer-shell [data-cqw-composer-more-panel] button[aria-label="Show token usage"]::after{content:'Usage'}
 .chat-composer-shell [data-cqw-composer-more-panel][lang=zh] button[aria-label="Show token usage"]::after{content:'用量'}
 .chat-composer-shell [data-cqw-composer-more-panel] button[aria-label="指令"]::after{content:'指令'}
 .chat-composer-shell [data-cqw-composer-more-panel] button[aria-label="Commands"]::after{content:'Commands'}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-clear-input]::after{content:'Clear'}
 .chat-composer-shell [data-cqw-composer-more-panel][lang=zh] [data-cqw-clear-input]::after{content:'清空'}
 .chat-composer-shell [data-cqw-composer-more-panel] button[aria-label="定时发送这条消息"]::after{content:'定时'}
 .chat-composer-shell [data-cqw-composer-more-panel] button[aria-label^="How should"]::after{content:'Permissions'}
 .chat-composer-shell [data-cqw-composer-more-panel][lang=zh] button[aria-label^="How should"]::after{content:'权限'}
 .chat-composer-shell [data-cqw-composer-more-panel] button::after{margin-left:5px}
}
@media(max-width:720px){
 .chat-composer-shell [data-slot="prompt-input"]:has([data-cqw-composer-more-toggle][aria-expanded="true"]){overflow:visible!important}
}

/* cqw:composer-task-flow-v1 — use native activity, with no timer or API polling. */
/* A masked ring holds one turning layer: only its transform moves, so the compositor runs it without style updates or repaints. */
@keyframes cqw-composer-flow{to{transform:translate(-50%,-50%) rotate(360deg)}}
[data-cqw-composer-flow]{display:none}
.chat-composer-shell:has(.chat-activity-enter .chat-activity-tab) [data-cqw-composer-flow]{
 display:block;position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;padding:2px;overflow:hidden;container-type:size;
 -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
 -webkit-mask-composite:xor;mask-composite:exclude;
}
/* 142cqmax covers the ring's diagonal at every angle and composer height. */
[data-cqw-composer-flow]>i{
 position:absolute;top:50%;left:50%;width:142cqmax;aspect-ratio:1;
 background:conic-gradient(hsl(var(--primary)/.12) 0deg,hsl(var(--primary)/.12) 80deg,hsl(var(--primary)/.4) 125deg,hsl(var(--primary)/.95) 165deg,hsl(var(--primary)/.12) 180deg,hsl(var(--primary)/.12) 260deg,hsl(var(--primary)/.4) 305deg,hsl(var(--primary)/.95) 345deg,hsl(var(--primary)/.12) 360deg);
 transform:translate(-50%,-50%);animation:cqw-composer-flow 12s linear infinite;
}
@media(prefers-reduced-motion:reduce){
 [data-cqw-composer-flow]>i{animation:none}
}
@media print{
 [data-cqw-composer-flow]{display:none!important}
}
/* While the user is typing (composer-input-mutations.js), both task glows hold still
   instead of repainting every frame; they resume about a second after typing stops. */
html[data-cqw-typing] [data-cqw-composer-flow]>i,
html[data-cqw-typing] [data-cqw-chat-viewport]::after{animation-play-state:paused!important}
/* The quick setting removes only this flow; the native activity tabs and stop button stay. */
html[data-cqw-composer-glow="off"] .chat-composer-shell:has(.chat-activity-enter .chat-activity-tab) [data-cqw-composer-flow]{display:none!important}

/* Lift both native activity tabs together above the open tools panel. Keep
   their native enter/exit animation and the stop button's event handler. */
@media(max-width:720px){
 .chat-composer-shell>.absolute:has(>.chat-activity-enter,>.chat-activity-exit){bottom:calc(100% + var(--cqw-composer-more-lift,0px))}
}

/* The native status shimmer moves a background every frame on the main thread; breathe on the compositor. */
@keyframes cqw-status-breathe{0%,100%{opacity:1}50%{opacity:.55}}
.chat-composer-shell .animate-shimmer{animation:cqw-status-breathe 1.8s ease-in-out infinite!important;background-position:0 0!important}
@media(prefers-reduced-motion:reduce){.chat-composer-shell .animate-shimmer{animation:none!important}}

/* cqw:page-task-flow-v1 — the viewport already follows the mobile keyboard.
   Native activity and pending questions own the state; no polling or overlay hit area. */
/* Only opacity animates, so the compositor runs it without style recalculation or repaint. */
@keyframes cqw-page-pulse{0%,100%{opacity:.17}50%{opacity:.85}}
[data-cqw-chat-viewport]::after{
 content:'';position:absolute;inset:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);
 z-index:90;pointer-events:none;border-radius:14px;padding:0;--cqw-page-glow-width:clamp(28px,6vw,56px);
 background:hsl(var(--primary)/.5);
 /* Feather only the edges; the center remains fully transparent. */
 -webkit-mask:linear-gradient(to right,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to left,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to bottom,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to top,#000,transparent var(--cqw-page-glow-width));mask:linear-gradient(to right,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to left,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to bottom,#000,transparent var(--cqw-page-glow-width)),linear-gradient(to top,#000,transparent var(--cqw-page-glow-width));
 -webkit-mask-composite:source-over;mask-composite:add;
 opacity:0;transition:opacity .35s ease;
}
[data-cqw-chat-viewport]:has(.chat-composer-shell .chat-activity-enter .chat-activity-tab)::after{opacity:.85;animation:cqw-page-pulse 2.4s ease-in-out infinite}
.dark [data-cqw-chat-viewport]:has(.chat-composer-shell .chat-activity-enter .chat-activity-tab)::after{background:hsl(var(--primary)/.35)}
[data-cqw-chat-viewport]:has(.chat-composer-shell [aria-label="有问题待回答"]:not([hidden]))::after{background:hsl(var(--primary)/.18);animation-play-state:paused}
@media(prefers-reduced-motion:reduce){[data-cqw-chat-viewport]::after{animation:none!important;transition:none}[data-cqw-chat-viewport]:has(.chat-composer-shell .chat-activity-enter .chat-activity-tab)::after{opacity:.5}}
@media print{[data-cqw-chat-viewport]::after{display:none!important;animation:none!important}}

/* The quick setting overrides running, waiting, dark and reduced-motion states. */
html[data-cqw-page-glow="off"] [data-cqw-chat-viewport]::after{
 display:none!important;content:none!important;animation:none!important;transition:none!important;
}

/* cqw:mobile-more-files-polish-v1 — phone layout only; desktop keeps its native layout.
   Uniform tiles for the composer "更多功能" panel; the Files page is styled by cqw:file-page-design-v1. */
@media(max-width:720px){
 .chat-composer-shell [data-cqw-composer-more-panel]{padding:14px 14px 16px;border-radius:20px;box-shadow:0 18px 48px -12px hsl(var(--foreground)/.28),0 2px 6px hsl(var(--foreground)/.06)}
 .chat-composer-shell .cqw-more-heading{font-size:15px;margin-bottom:12px}
 .chat-composer-shell .cqw-more-heading button{width:30px!important;height:30px!important;min-height:30px!important;border-radius:999px!important;background:hsl(var(--muted)/.7)!important;font-size:18px!important;line-height:1}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-slot=prompt-input-tools],
 .chat-composer-shell [data-cqw-more-actions]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;border-top:0!important}
 .chat-composer-shell [data-cqw-more-actions]{padding-top:0!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-slot=prompt-input-tools]::before,
 .chat-composer-shell [data-cqw-more-actions]::before{grid-column:1/-1;font-size:11px;font-weight:600;letter-spacing:.04em;color:hsl(var(--muted-foreground));margin:0 2px -2px}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-slot=prompt-input-tools]::before{content:'Tools'}
 .chat-composer-shell [data-cqw-more-actions]::before{content:'Send'}
 .chat-composer-shell [data-cqw-composer-more-panel][lang=zh] [data-slot=prompt-input-tools]::before{content:'常用工具'}
 .chat-composer-shell [data-cqw-composer-more-panel][lang=zh] [data-cqw-more-actions]::before{content:'发送设置'}
 /* Task dock buttons join the grid; hidden ones take no cell. */
 .chat-composer-shell [data-cqw-composer-more-panel] #cqw-interaction-dock{display:contents}
 .chat-composer-shell [data-cqw-composer-more-panel] :is([data-slot=prompt-input-tools],[data-cqw-more-actions])>*{min-width:0!important;max-width:none!important;width:100%!important;flex:none!important}
 .chat-composer-shell [data-cqw-composer-more-panel] :is([data-slot=prompt-input-tools],[data-cqw-more-actions])>div:not(#cqw-interaction-dock)>button{width:100%!important}
 .chat-composer-shell [data-cqw-composer-more-panel] :is([data-slot=prompt-input-tools],[data-cqw-more-actions],#cqw-interaction-dock) button:not([hidden]){
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;
  height:46px!important;min-height:46px!important;width:100%!important;max-width:none!important;padding:0 12px!important;
  border:1px solid transparent!important;border-radius:14px!important;background:hsl(var(--muted)/.55)!important;
  color:hsl(var(--foreground))!important;font-size:13px!important;font-weight:500!important;box-shadow:none!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .15s,border-color .15s}
 .chat-composer-shell [data-cqw-composer-more-panel] :is([data-slot=prompt-input-tools],[data-cqw-more-actions],#cqw-interaction-dock) button:not([hidden]):active{background:hsl(var(--muted))!important}
 .chat-composer-shell [data-cqw-composer-more-panel] :is([data-slot=prompt-input-tools],[data-cqw-more-actions]) button svg{width:17px!important;height:17px!important;flex:none;color:hsl(var(--primary))}
 .chat-composer-shell [data-cqw-composer-more-panel] button::after{margin-left:0!important}
 /* cqw:more-send-row-v1 — send settings stay on one compact row; the model takes what is left. */
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]{display:flex!important;flex-wrap:wrap!important;gap:6px 4px!important;margin-top:12px!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]::before{flex:0 0 100%}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]>*{flex:0 0 auto!important;width:auto!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]>:is(button[aria-label="Select model and reasoning effort"],[data-cqw-model-fallback],:has(>button[aria-label="Select model and reasoning effort"])){flex:1 1 0!important;width:0!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]:not(#cqw-interaction-dock) button:not([hidden]){
  justify-content:center!important;gap:3px!important;height:32px!important;min-height:32px!important;width:auto!important;padding:0 7px!important;border-radius:10px!important;font-size:11.5px!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]:not(#cqw-interaction-dock) :is(button[aria-label="Select model and reasoning effort"],[data-cqw-model-fallback] button){width:100%!important;min-width:0!important}
 .chat-composer-shell [data-cqw-more-actions] button[aria-label="Select model and reasoning effort"] .truncate{min-width:0;max-width:none!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions] button svg{width:14px!important;height:14px!important}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions] [data-cqw-clear-input]::after{content:none}
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions]:not(#cqw-interaction-dock) [data-cqw-clear-input]:not([hidden]){width:32px!important;min-width:0!important;padding:0!important}
}
@media(max-width:359px){
 .chat-composer-shell [data-cqw-composer-more-panel] [data-cqw-more-actions] :is(button[aria-label="定时发送这条消息"],button[aria-label^="How should"])::after{content:none}
}

/* cqw:file-page-design-v1 — Files page on desktop and phone. Style only: native markup,
   behaviour and file-type icons are unchanged; icons sit on tinted tiles of their own colour. */
[data-cqw-file-tree-project-id]{background:linear-gradient(180deg,hsl(var(--muted)/.35),hsl(var(--background)) 160px)!important}
[data-cqw-file-tree-project-id]>div:first-of-type{padding:16px 18px 14px!important;border-bottom-color:hsl(var(--border)/.6)!important}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex{gap:10px!important}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>h3{display:flex;align-items:center;gap:10px;font-size:17px!important;font-weight:650!important;letter-spacing:-.01em}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>h3{position:relative}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>h3::before{content:'';width:30px;height:30px;border-radius:9px;background:hsl(var(--primary)/.12);box-shadow:inset 0 0 0 1px hsl(var(--primary)/.2)}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>h3::after{content:'';position:absolute;left:7px;top:50%;width:16px;height:16px;margin-top:-8px;background:hsl(var(--primary));-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/16px 16px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") center/16px 16px no-repeat}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex{gap:2px!important;padding:3px;border-radius:12px;background:hsl(var(--muted)/.6);box-shadow:inset 0 0 0 1px hsl(var(--border)/.5)}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button{width:30px!important;height:30px!important;min-width:30px;padding:0!important;border-radius:9px!important;color:hsl(var(--muted-foreground));transition:background-color .15s,color .15s,box-shadow .15s}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button:hover{background:hsl(var(--background))!important;color:hsl(var(--foreground));box-shadow:0 1px 2px hsl(var(--foreground)/.08),0 0 0 1px hsl(var(--border)/.6)}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button:is(.bg-primary,[aria-pressed=true]){background:hsl(var(--primary))!important;color:hsl(var(--primary-foreground))!important;box-shadow:0 2px 8px -2px hsl(var(--primary)/.55)}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button svg{width:16px!important;height:16px!important}
[data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>div.w-px{height:18px!important;margin:0 3px!important;background:hsl(var(--border))!important}
/* "Folder → project root" becomes a folder-upload icon; its title still explains it. */
[data-cqw-file-tree-project-id] button[aria-label="Upload local folder"]{font-size:0!important;gap:0!important}
[data-cqw-file-tree-project-id] button[aria-label="Upload local folder"]::before{content:'';width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3Cpath d='M12 10v6'/%3E%3Cpath d='m9 13 3-3 3 3'/%3E%3C/svg%3E") center/16px 16px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3Cpath d='M12 10v6'/%3E%3Cpath d='m9 13 3-3 3 3'/%3E%3C/svg%3E") center/16px 16px no-repeat}
[data-cqw-file-tree-project-id] button[aria-label="Upload local folder"] *{display:none!important}
[data-cqw-file-tree-project-id]>div:first-of-type input[type=text]{height:38px!important;border-radius:12px!important;font-size:14px!important;padding-left:36px!important;background:hsl(var(--background))!important;border-color:hsl(var(--border)/.8)!important;box-shadow:0 1px 2px hsl(var(--foreground)/.04)!important;transition:border-color .15s,box-shadow .15s}
[data-cqw-file-tree-project-id]>div:first-of-type input[type=text]:focus{border-color:hsl(var(--primary)/.55)!important;box-shadow:0 0 0 3px hsl(var(--primary)/.14)!important}
[data-cqw-file-tree-project-id]>div:first-of-type div.relative>svg:first-child{left:12px!important;width:16px!important;height:16px!important}
/* Detailed view column header and rows. */
[data-cqw-file-tree-project-id]>div.border-b:not(:first-of-type){padding:8px 18px 7px!important;border-bottom-color:hsl(var(--border)/.6)!important;background:hsl(var(--background)/.7)}
[data-cqw-file-tree-project-id]>div.border-b:not(:first-of-type)>div.grid{padding:0 10px 0 6px!important;font-size:11px!important;letter-spacing:.06em!important;color:hsl(var(--muted-foreground)/.85)!important}
[data-cqw-file-tree-project-id]>div.flex-1{padding:6px 10px!important}
[data-cqw-file-row]{min-height:40px;padding-top:4px!important;padding-bottom:4px!important;margin:1px 0;border-radius:10px!important;border-left-color:transparent!important;transition:background-color .15s,box-shadow .15s!important}
@media(hover:hover){[data-cqw-file-row]:hover{background:hsl(var(--accent)/.75)!important;box-shadow:inset 0 0 0 1px hsl(var(--border)/.55)}}
@media(hover:none){[data-cqw-file-row]:active{background:hsl(var(--accent)/.75)!important}}
[data-cqw-file-row]>:first-child{gap:8px!important}
[data-cqw-file-row]>:first-child>span:not(.flex-shrink-0):not(:has(svg)){font-size:14px!important;line-height:20px!important}
[data-cqw-file-row]:has(.lucide-chevron-right)>:first-child>span:last-child{font-weight:600!important}
[data-cqw-file-row].grid-cols-12>:is(:nth-child(2),:nth-child(3)){font-size:12.5px!important;font-variant-numeric:tabular-nums}
[data-cqw-file-row].grid-cols-12>:nth-child(4){justify-self:start;font-size:11px!important;line-height:18px;padding:0 7px;border-radius:6px;background:hsl(var(--muted)/.7);color:hsl(var(--muted-foreground))!important}
[data-cqw-file-row]>button[aria-label^="Upload files to"]{border-radius:8px!important;padding:6px!important;box-shadow:0 1px 3px hsl(var(--foreground)/.12),0 0 0 1px hsl(var(--border)/.7)}
/* File-type icon tiles; folders are filled in the primary colour. */
[data-cqw-file-row] svg.lucide:not(.lucide-chevron-right):not(.lucide-upload){box-sizing:border-box;width:28px!important;height:28px!important;padding:6px;border-radius:8px;background:color-mix(in srgb,currentColor 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 14%,transparent)}
.dark [data-cqw-file-row] svg.lucide:not(.lucide-chevron-right):not(.lucide-upload){background:color-mix(in srgb,currentColor 20%,transparent)}
[data-cqw-file-row] svg:is(.lucide-folder,.lucide-folder-open){color:hsl(var(--primary))!important;fill:hsl(var(--primary)/.22)}
[data-cqw-file-row] span.ml-\[18px\]{margin-left:16px!important}
[data-cqw-file-row] svg.lucide-chevron-right{width:14px!important;height:14px!important}
/* Common research formats the native map shows as a grey generic file. */
:is([data-cqw-file-row$=".xlsx" i],[data-cqw-file-row$=".xls" i],[data-cqw-file-row$=".tsv" i]) svg.lucide-file{color:#059669!important}
:is([data-cqw-file-row$=".pptx" i],[data-cqw-file-row$=".ppt" i],[data-cqw-file-row$=".key" i]) svg.lucide-file{color:#ea580c!important}
:is([data-cqw-file-row$=".bib" i],[data-cqw-file-row$=".ris" i],[data-cqw-file-row$=".enw" i],[data-cqw-file-row$=".nbib" i]) svg.lucide-file{color:#d97706!important}
:is([data-cqw-file-row$=".sav" i],[data-cqw-file-row$=".dta" i],[data-cqw-file-row$=".rds" i],[data-cqw-file-row$=".rdata" i],[data-cqw-file-row$=".omv" i],[data-cqw-file-row$=".mat" i],[data-cqw-file-row$=".h5" i],[data-cqw-file-row$=".parquet" i]) svg.lucide-file{color:#0d9488!important}
:is([data-cqw-file-row$=".nii" i],[data-cqw-file-row$=".nii.gz" i],[data-cqw-file-row$=".dcm" i],[data-cqw-file-row$=".nrrd" i],[data-cqw-file-row$=".mha" i]) svg.lucide-file{color:#0891b2!important}
:is([data-cqw-file-row$=".7z" i],[data-cqw-file-row$=".xz" i]) svg.lucide-file{color:#d97706!important}
/* Empty, no-match and loading states. */
[data-cqw-file-tree-project-id] div.py-8.text-center{padding:56px 24px!important}
[data-cqw-file-tree-project-id] div.py-8.text-center>div:first-child{width:64px!important;height:64px!important;border-radius:20px!important;margin-bottom:16px!important;background:linear-gradient(145deg,hsl(var(--primary)/.16),hsl(var(--primary)/.05))!important;box-shadow:inset 0 0 0 1px hsl(var(--primary)/.18)}
[data-cqw-file-tree-project-id] div.py-8.text-center>div:first-child svg{width:28px!important;height:28px!important;color:hsl(var(--primary))!important}
[data-cqw-file-tree-project-id] div.py-8.text-center>h4{font-size:15px;font-weight:600!important}
[data-cqw-file-tree-project-id] div.h-full.items-center.justify-center>div.text-sm{display:flex;align-items:center;gap:10px}
[data-cqw-file-tree-project-id] div.h-full.items-center.justify-center>div.text-sm::before{content:'';width:16px;height:16px;border-radius:50%;border:2px solid hsl(var(--primary)/.2);border-top-color:hsl(var(--primary));animation:cqw-file-spin .8s linear infinite}
@keyframes cqw-file-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){[data-cqw-file-tree-project-id] div.h-full.items-center.justify-center>div.text-sm::before{animation-duration:2.4s}}
/* Phone: toolbar fills one scrollable row, search grows, rows show name / size · time. */
@media(max-width:720px){
 [data-cqw-file-tree-project-id]>div:first-of-type{padding:12px 14px 12px!important}
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex{flex-wrap:nowrap!important;gap:8px!important}
 /* The workspace tab already names this view; the toolbar takes the full width instead. */
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>h3{display:none!important}
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;flex:1 1 auto;justify-content:space-between;min-width:0}
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex::-webkit-scrollbar{display:none}
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button{flex:none;width:32px!important;height:32px!important;min-width:32px}
 [data-cqw-file-tree-project-id]>div:first-of-type input[type=text]{height:42px!important;font-size:15px!important}
 [data-cqw-file-tree-project-id]>div.border-b:not(:first-of-type){display:none!important}
 [data-cqw-file-tree-project-id]>div.flex-1{padding:6px 8px!important}
 [data-cqw-file-row]{min-height:56px;--cqw-file-meta-indent:58px}
 [data-cqw-file-row]:not(:has(.lucide-chevron-right)){--cqw-file-meta-indent:60px}
 [data-cqw-file-row].grid-cols-12{display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;column-gap:10px!important;row-gap:0!important;padding-top:8px!important;padding-bottom:8px!important;padding-right:44px!important;align-items:center}
 [data-cqw-file-row].grid-cols-12>:nth-child(1){grid-column:1/-1;gap:10px!important}
 [data-cqw-file-row].grid-cols-12>:nth-child(1)>span:last-child{font-size:15px!important;font-weight:500;color:hsl(var(--foreground))!important}
 [data-cqw-file-row]:has(.lucide-chevron-right).grid-cols-12>:nth-child(1)>span:last-child{font-weight:600!important}
 [data-cqw-file-row] svg.lucide:not(.lucide-chevron-right):not(.lucide-upload){width:32px!important;height:32px!important;padding:7px;border-radius:10px}
 [data-cqw-file-row].grid-cols-12>:nth-child(2),[data-cqw-file-row].grid-cols-12>:nth-child(3){grid-row:2;margin-top:-6px;font-size:12px!important;line-height:16px;white-space:nowrap}
 [data-cqw-file-row].grid-cols-12>:nth-child(2){grid-column:1;margin-left:var(--cqw-file-meta-indent)}
 [data-cqw-file-row].grid-cols-12>:nth-child(2):empty{display:none}
 [data-cqw-file-row].grid-cols-12>:nth-child(2):empty+:nth-child(3){grid-column:1;margin-left:var(--cqw-file-meta-indent)}
 [data-cqw-file-row].grid-cols-12>:nth-child(3){grid-column:2}
 [data-cqw-file-row].grid-cols-12>:nth-child(2):not(:empty)+:nth-child(3)::before{content:'·';margin-right:10px;color:hsl(var(--muted-foreground)/.6)}
 [data-cqw-file-row].grid-cols-12>:nth-child(4){display:none!important}
 [data-cqw-file-row]>button[aria-label^="Upload files to"]{right:6px!important;background:transparent!important;box-shadow:none!important}
}
@media(max-width:359px){
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex{gap:1px!important}
 [data-cqw-file-tree-project-id]>div:first-of-type>div.flex>div.flex>button{width:27px!important;min-width:27px}
}

/* Dictation stays in the composer. Keep its focused textarea mounted for IMEs. */
.chat-composer-shell [data-cqw-dictation-control]{display:inline-flex;align-items:center;position:relative;flex:none}
.chat-composer-shell [data-cqw-dictation-button],.chat-composer-shell [data-cqw-voice-cancel]{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:0;border-radius:50%;color:hsl(var(--foreground));background:transparent;cursor:pointer;flex:none}
.chat-composer-shell [data-cqw-dictation-button]:focus-visible,.chat-composer-shell [data-cqw-voice-cancel]:focus-visible{outline:2px solid hsl(var(--primary));outline-offset:-2px}
.chat-composer-shell [data-cqw-mobile-footer]>[data-cqw-dictation-control]{margin-inline-start:auto}
.chat-composer-shell [data-cqw-recording-row]{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}
.chat-composer-shell [data-cqw-recording-wave]{display:block;min-width:0;flex:1 1 0;width:0;height:29px;color:hsl(var(--foreground))}
.chat-composer-shell [data-cqw-recording-row]>[role=status]:not(.sr-only){flex:1;min-width:0;color:hsl(var(--muted-foreground));font-size:.875rem}
.chat-composer-shell [data-cqw-recording-row] [data-cqw-dictation-button],.chat-composer-shell [data-cqw-voice-cancel]{background:hsl(var(--muted));font-size:28px;line-height:1}
.chat-composer-shell [data-cqw-recording-stop]{width:13px;height:13px;border-radius:2.5px;background:currentColor}
.chat-composer-shell form:has([data-cqw-recording-row]) [data-slot=prompt-input-body]{position:absolute!important;clip-path:inset(50%);width:1px!important;height:1px!important;overflow:hidden!important}
.chat-composer-shell [data-cqw-dictation-error]{position:absolute;bottom:100%;right:0;width:max-content;max-width:min(68vw,24rem);line-height:1.35;border-radius:8px;padding:5px 8px;color:hsl(var(--destructive-foreground));background:hsl(var(--destructive));font-size:12px;z-index:5}

.chat-composer-shell [data-slot=prompt-input-footer]:has(>[data-cqw-recording-row])>:not([data-cqw-recording-row]){display:none!important}
.chat-composer-shell [data-cqw-recording-row]{width:100%;flex:1;min-width:0}
@media(max-width:720px){
 .chat-composer-shell [data-cqw-dictation-button],.chat-composer-shell [data-cqw-voice-cancel]{width:40px;height:40px;min-height:40px}
}
@media(max-width:720px) and (max-height:480px){
 .chat-composer-shell [data-cqw-mobile-footer]{padding-block:4px!important}
}
