:where(chat-shell){--chat-bg:var(--a-canvas-0);--chat-border:unset;--chat-radius:unset;--chat-header-height:var(--a-chrome-app-header-height);--chat-header-px:var(--a-space-4);--chat-header-gap:var(--a-space-2);--chat-header-border:1px solid var(--a-border-subtle);--chat-messages-px:var(--a-space-4);--chat-messages-py:var(--a-space-4);--chat-messages-gap:var(--a-space-3);--chat-message-max-width:85%;--chat-user-bg:var(--a-primary);--chat-user-fg:var(--a-primary-text-strong);--chat-user-radius:var(--a-radius-md);--chat-user-tail-radius:var(--a-radius-sm);--chat-user-px:var(--a-space-3);--chat-user-py:var(--a-space-1);--chat-assistant-bg:var(--a-canvas-2);--chat-assistant-fg:var(--a-fg);--chat-assistant-radius:var(--a-radius-lg);--chat-assistant-px:var(--a-space-3);--chat-assistant-py:var(--a-space-1);--chat-avatar-size:1.75rem;--chat-avatar-bg:var(--chat-assistant-bg);--chat-avatar-fg:var(--chat-assistant-fg);--chat-avatar-font:var(--a-ui-sm);--chat-avatar-weight:var(--a-weight-semibold);--chat-cursor-width:2px;--chat-cursor-color:currentColor;--chat-cursor-speed:.8s;--chat-footer-px:var(--a-space-3);--chat-footer-py:var(--a-space-3);--chat-actions-gap:var(--a-space-1);--chat-code-bg:var(--a-bg-muted);--chat-code-radius:var(--a-radius-md);--chat-font-size:var(--a-ui-size);--chat-line-height:var(--a-font-leading-relaxed);--chat-weight-semibold:var(--a-weight-semibold);--chat-header-name-font:var(--a-ui-lg);--chat-header-status-font:var(--a-ui-md);--chat-header-status-fg:var(--a-fg-muted);--chat-error-gap:var(--a-space-2);--chat-error-fg:var(--a-danger-strong);--chat-error-font:var(--a-ui-sm);--chat-actions-duration:var(--a-duration-fast);--chat-actions-easing:var(--a-easing);--chat-avatar-radius:var(--a-radius-full);--chat-thinking-fg:var(--a-fg-muted);--chat-code-inline-radius:var(--a-radius-sm);--chat-code-inline-family:var(--a-font-family-code);--chat-code-block-px:var(--a-space-3);--chat-code-block-my:var(--a-space-2);--chat-code-block-font:var(--a-ui-sm)}@scope(chat-shell){:scope{box-sizing:border-box;border:var(--chat-border);border-radius:var(--chat-radius);background:var(--chat-bg);flex-direction:column;height:100%;display:flex;overflow:hidden}:scope>header{align-items:center;gap:var(--chat-header-gap);min-height:var(--chat-header-height);padding:0 var(--chat-header-px);border-bottom:var(--chat-header-border);flex-shrink:0;display:flex}:scope>header chat-status{font-size:var(--chat-header-status-font);color:var(--chat-header-status-fg);margin-inline-start:auto}:scope>chat-thread,:scope>section{padding:var(--chat-messages-py) var(--chat-messages-px);gap:var(--chat-messages-gap);flex-direction:column;flex:1;min-height:0;display:flex;overflow-y:auto}:scope>footer{padding:var(--chat-footer-py) var(--chat-footer-px);flex-shrink:0;align-items:center;display:flex}:scope>footer chat-input-ui{flex:1}}@scope(chat-shell){[data-role]{gap:var(--chat-header-gap);max-width:var(--chat-message-max-width);align-items:flex-end;display:flex}[data-role=user]{flex-direction:row-reverse;align-self:flex-end}[data-role=assistant]{align-self:flex-start}[data-role] [data-avatar]{width:var(--chat-avatar-size);height:var(--chat-avatar-size);border-radius:var(--chat-avatar-radius);background:var(--chat-avatar-bg);color:var(--chat-avatar-fg);font-size:var(--chat-avatar-font);font-weight:var(--chat-avatar-weight);flex-shrink:0;justify-content:center;align-items:center;display:flex}[data-role] [data-bubble]{padding:var(--chat-assistant-py) var(--chat-assistant-px);border-radius:var(--chat-assistant-radius);font-size:var(--chat-font-size);line-height:var(--chat-line-height);white-space:pre-wrap;word-break:break-word}[data-role] [data-bubble]>:first-child{margin-block-start:0}[data-role] [data-bubble]>:last-child{margin-block-end:0}[data-role=user] [data-bubble]{background:var(--chat-user-bg);color:var(--chat-user-fg);padding:var(--chat-user-py) var(--chat-user-px);border-radius:var(--chat-user-radius);border-bottom-right-radius:var(--chat-user-tail-radius)}[data-role=assistant] [data-bubble]{color:var(--chat-assistant-fg)}[data-role]:has([data-bubble][data-surface]),[data-role]:has([data-bubble]>[data-surface-root]){width:100%;max-width:none}[data-role]:has([data-bubble][data-surface]) [data-bubble],[data-role]:has([data-bubble]>[data-surface-root]) [data-bubble]{flex:1}[data-role=error]{align-self:center;align-items:center;gap:var(--chat-error-gap);max-width:none;color:var(--chat-error-fg);font-size:var(--chat-error-font);display:flex}[data-role] [data-actions]{gap:var(--chat-actions-gap);opacity:0;transition:opacity var(--chat-actions-duration) var(--chat-actions-easing);display:flex}[data-role]:hover [data-actions]{opacity:1}}@scope(chat-shell){[data-cursor]{width:var(--chat-cursor-width);background:var(--chat-cursor-color);vertical-align:text-bottom;height:1em;animation:chat-shell-blink var(--chat-cursor-speed) step-end infinite;margin-inline-start:1px;display:inline-block}@keyframes chat-shell-blink{50%{opacity:0}}@media (prefers-reduced-motion:reduce){[data-cursor]{opacity:.7;animation:none}}[data-role=assistant][data-thinking] [data-bubble]{color:var(--chat-thinking-fg)}}@scope(chat-shell){[data-bubble] [data-content]{white-space:normal}[data-bubble] [data-content] p{margin:0 0 .5em}[data-bubble] [data-content] p:last-child{margin-bottom:0}[data-bubble] [data-content] strong{font-weight:var(--chat-weight-semibold)}[data-bubble] [data-content] code{background:var(--chat-code-bg);border-radius:var(--chat-code-inline-radius);font-family:var(--chat-code-inline-family);padding:.1em .15em;font-size:.875em}[data-bubble] [data-content] pre{background:var(--chat-code-bg);border-radius:var(--chat-code-radius);padding:var(--chat-code-block-px);margin:var(--chat-code-block-my) 0;font-size:var(--chat-code-block-font);line-height:1.5;overflow-x:auto}[data-bubble] [data-content] pre code{font-size:inherit;background:0 0;border-radius:0;padding:0}[data-bubble] [data-content] ul,[data-bubble] [data-content] ol{margin:.25em 0;padding-inline-start:1.25em}[data-bubble] [data-content] li{margin-bottom:.15em}[data-bubble] [data-content] a{color:inherit;text-underline-offset:2px;text-decoration:underline}[data-bubble] [data-content] h1,[data-bubble] [data-content] h2,[data-bubble] [data-content] h3,[data-bubble] [data-content] h4{font-weight:var(--chat-weight-semibold);margin:.75em 0 .25em}[data-bubble] [data-content] h1:first-child,[data-bubble] [data-content] h2:first-child,[data-bubble] [data-content] h3:first-child{margin-top:0}}@scope(chat-shell){chat-empty{margin:auto}:scope[streaming] chat-empty,:scope:has([data-role]) chat-empty{display:none}}@scope(chat-header){chat-shell>:scope,chat-sidebar>:scope[slot=header],chat-sidebar>:scope:first-child{align-items:center;gap:var(--chat-header-gap,var(--a-space-2));padding:0 var(--chat-header-px,var(--a-space-3));height:var(--chat-header-height,var(--a-size-lg));font-size:var(--chat-header-font,var(--a-ui-size));border-bottom:var(--chat-border,1px solid var(--a-border-subtle));background:var(--chat-bg,var(--a-bg));flex-shrink:0;display:flex}:scope>[slot=name]{font-weight:var(--a-weight-medium,500);color:var(--a-fg)}:scope>[slot=status]{margin-inline-start:var(--a-space-2)}:scope>[slot=action]:first-of-type{margin-inline-start:auto}:scope>[slot=action-leading]{margin-inline-end:var(--a-space-2)}}@scope(chat-status){:scope{align-items:center;gap:var(--a-space-1);font-size:var(--a-ui-sm);color:var(--a-fg-muted);display:inline-flex}}@scope(chat-thread){chat-shell>:scope{overscroll-behavior:contain;gap:var(--chat-message-gap,var(--a-space-3));min-height:0;padding:var(--chat-thread-py,var(--a-space-4)) var(--chat-thread-px,var(--a-space-4));background:var(--chat-thread-bg,var(--a-bg));flex-direction:column;flex:1;display:flex;overflow-y:auto}:scope:not([empty])>chat-empty{display:none}:scope[empty]>chat-empty{padding:var(--a-space-6);flex:1;justify-content:center;align-items:center;display:flex}}@scope(chat-composer){chat-shell>:scope{align-items:stretch;gap:var(--a-space-2);padding:var(--chat-composer-py,var(--a-space-3)) var(--chat-composer-px,var(--a-space-3));border-top:var(--chat-border,1px solid var(--a-border-subtle));background:var(--chat-bg,var(--a-bg));flex-shrink:0;display:flex}:scope>[slot=leading],:scope>[slot=attach],:scope>[slot=trailing]{align-items:center;gap:var(--a-space-1);flex-shrink:0;display:inline-flex}:scope>:is(chat-input-ui,input-ui,textarea-ui){flex:1;min-width:0}:scope[disabled]{opacity:.6;pointer-events:none}}@scope(chat-sidebar){:is(:scope[slot=leading],:scope[slot=trailing]){min-width:var(--chat-sidebar-min-width,48px);max-width:var(--chat-sidebar-max-width,480px);min-height:0;font-size:var(--chat-sidebar-font,var(--a-ui-size));transition:width var(--chat-duration,var(--a-duration,.2s)) var(--chat-easing,var(--a-easing,ease));background:var(--chat-bg,var(--a-bg));flex-direction:column;flex-shrink:0;display:flex;position:relative;container:sidebar/inline-size}:scope[slot=leading]{width:var(--chat-sidebar-width-leading,240px);border-right:var(--chat-border,1px solid var(--a-border-subtle))}:scope[slot=trailing]{width:var(--chat-sidebar-width-trailing,320px);border-left:var(--chat-border,1px solid var(--a-border-subtle))}:is(:scope[slot=leading],:scope[slot=trailing])>[data-sidebar-resize]{cursor:col-resize;z-index:1;-webkit-user-select:none;user-select:none;width:6px;position:absolute;top:0;bottom:0}:scope[slot=leading]>[data-sidebar-resize]{right:-3px}:scope[slot=trailing]>[data-sidebar-resize]{left:-3px}:is(:scope[slot=leading],:scope[slot=trailing])>[data-sidebar-resize]:hover{background:var(--a-primary);opacity:.5}:scope[resizing]{transition:none}:scope[resizing]>[data-sidebar-resize]{background:var(--a-primary);opacity:.8}}@scope(chat-shell){:scope:has(>chat-sidebar){flex-direction:row;display:flex}:scope:has(>chat-sidebar)>:not(chat-sidebar){display:contents}}@scope(chat-shell){:scope[data-narrow]>chat-sidebar[slot=leading],[data-mobile-nav-trigger]{display:none}:scope[data-narrow] [data-mobile-nav-trigger]{display:inline-flex}}