.chat-workspace,.chat-dialog{--chat-canvas:color-mix(in oklab, var(--ds-surface-2) 60%, var(--ds-bg));--chat-r:calc(var(--ds-radius-panel) + 6px);--chat-r-joined:max(4px, calc(var(--ds-radius-panel) / 2.5));--chat-r-tail:4px;--chat-mine-bg:linear-gradient(180deg, color-mix(in oklab, var(--ds-accent) 90%, white), var(--ds-accent));--chat-mine-tail:var(--ds-accent);--chat-mine-fg:var(--ds-on-accent);--chat-mine-meta:color-mix(in oklab, var(--ds-on-accent) 80%, transparent);--chat-their-bg:var(--ds-surface);--chat-their-border:var(--ds-border);--chat-gap-group:var(--ds-space-3);--chat-gap-row:2px;--chat-sidebar-w:340px;--chat-enter:calc(var(--ds-duration) * 1.2);--chat-pad-x:clamp(12px, 3vw, 28px);--chat-name-l:.5;--chat-name-c:.12;color:var(--ds-text);font-family:var(--ds-font-sans)}html[data-theme=dark] :is(.chat-workspace,.chat-dialog){--chat-canvas:var(--ds-bg);--chat-their-bg:var(--ds-surface-hover);--chat-name-l:.8;--chat-name-c:.1}.chat-workspace{box-sizing:border-box;grid-template-columns:var(--chat-sidebar-w) minmax(0, 1fr);width:100%;height:calc(var(--chat-vh,100dvh) - var(--chat-top,140px) - var(--ds-space-4));border:1px solid var(--ds-border);border-radius:var(--ds-radius-panel);background:var(--ds-surface);min-height:420px;box-shadow:var(--ds-shadow-sm);font-size:var(--ds-text-md);display:grid;overflow:hidden}.chat-workspace *,.chat-dialog *{box-sizing:border-box}:is(.chat-workspace,.chat-dialog,.chat-menu) :focus-visible{box-shadow:var(--ds-focus-ring);outline:none}.chat-pane{background:var(--chat-canvas);flex-direction:column;min-width:0;min-height:0;display:flex}:is(.chat-workspace,.chat-dialog) button{font:inherit;letter-spacing:normal;text-transform:none;cursor:pointer}.chat-button{justify-content:center;align-items:center;gap:var(--ds-space-2);min-height:34px;padding:0 var(--ds-space-4);border:1px solid var(--ds-border-strong);border-radius:var(--ds-radius-control);background:var(--ds-surface);color:var(--ds-text);font-size:var(--ds-text-md);white-space:nowrap;transition:background-color var(--ds-duration) var(--ds-ease), border-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease);font-weight:550;display:inline-flex}.chat-button:hover:not(:disabled){border-color:color-mix(in oklab, var(--ds-accent) 35%, var(--ds-border-strong));background:var(--ds-surface-hover)}.chat-button:disabled{opacity:.55;cursor:default}.chat-button--primary{border-color:var(--ds-accent);background:var(--ds-accent);color:var(--ds-on-accent)}.chat-button--primary:hover:not(:disabled){border-color:var(--ds-accent-hover);background:var(--ds-accent-hover);color:var(--ds-on-accent)}.chat-button--small{min-height:28px;padding:0 var(--ds-space-3);font-size:var(--ds-text-sm)}.chat-icon-button{border-radius:var(--ds-radius-pill);width:36px;height:36px;color:var(--ds-text-muted);transition:background-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease);background:0 0;border:0;flex:none;place-items:center;padding:0;display:inline-grid}.chat-icon-button:hover{background:var(--ds-surface-hover);color:var(--ds-text)}.chat-icon-button--accent{background:var(--ds-accent-soft);color:var(--ds-accent-text)}.chat-icon-button--accent:hover{background:var(--ds-accent);color:var(--ds-on-accent)}.chat-icon-button--small{width:28px;height:28px}.chat-spinner{border:2px solid var(--ds-border-strong);border-top-color:var(--ds-accent);border-radius:50%;flex:none;width:16px;height:16px;animation:.8s linear infinite chat-spin;display:inline-block}@media (prefers-reduced-motion:reduce){.chat-spinner{animation:none}}.chat-list{border-inline-end:1px solid var(--ds-border);background:var(--ds-surface);flex-direction:column;min-width:0;min-height:0;display:flex}html[data-glass=on] .chat-list{background:var(--ds-glass-bg)}.chat-list__header{justify-content:space-between;align-items:center;gap:var(--ds-space-2);padding:var(--ds-space-4) var(--ds-space-4) var(--ds-space-3);display:flex}.chat-list__title{color:var(--ds-text);letter-spacing:-.01em;margin:0;font-size:20px;font-weight:650;line-height:28px}.chat-list__tools{gap:var(--ds-space-2);padding-bottom:var(--ds-space-2);flex-direction:column;display:flex}.chat-search{margin:0 var(--ds-space-4);align-items:center;display:flex;position:relative}.chat-search__icon{color:var(--ds-text-subtle);pointer-events:none;position:absolute;inset-inline-start:10px}.chat-search>input.chat-search__input{width:100%;padding-inline:36px 34px}.chat-search__input::-webkit-search-cancel-button{appearance:none}.chat-search__clear{width:28px;height:28px;color:var(--ds-text-muted);background:0 0;border:0;border-radius:50%;place-items:center;padding:0;display:grid;position:absolute;inset-inline-end:3px}.chat-search__clear:hover{background:var(--ds-surface-hover);color:var(--ds-text)}.chat-chips{padding:2px var(--ds-space-4);scroll-snap-type:x proximity;scroll-padding-inline:var(--ds-space-4);scrollbar-width:none;gap:6px;margin:0;display:flex;overflow-x:auto}.chat-chips::-webkit-scrollbar{display:none}@media (hover:hover) and (pointer:fine){.chat-chips{flex-wrap:wrap;overflow:visible}}.chat-chip{border:1px solid var(--ds-border);border-radius:var(--ds-radius-pill);background:var(--ds-surface);height:30px;color:var(--ds-text-muted);font-size:var(--ds-text-sm);white-space:nowrap;scroll-snap-align:start;transition:background-color var(--ds-duration) var(--ds-ease), border-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease);flex:none;align-items:center;gap:6px;padding:0 12px;font-weight:550;display:inline-flex}.chat-chip:hover{border-color:var(--ds-border-strong);color:var(--ds-text)}.chat-chip[aria-pressed=true]{border-color:var(--ds-accent);background:var(--ds-accent);color:var(--ds-on-accent)}.chat-chip__badge{border-radius:var(--ds-radius-pill);background:var(--ds-accent-soft);min-width:18px;height:18px;color:var(--ds-accent-text);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums;place-items:center;padding:0 5px;font-weight:650;display:inline-grid}.chat-chip[aria-pressed=true] .chat-chip__badge{background:color-mix(in oklab, var(--ds-on-accent) 22%, transparent);color:var(--ds-on-accent)}.chat-list__scroll{overscroll-behavior:contain;scrollbar-width:thin;min-height:0;transition:opacity var(--ds-duration) var(--ds-ease);flex:1;overflow-y:auto}.chat-list__scroll[data-stale=true]{opacity:.6}.chat-rows-list{padding:2px var(--ds-space-2) var(--ds-space-3);flex-direction:column;gap:2px;margin:0;list-style:none;display:flex}.chat-row-item{margin:0;padding:0;line-height:normal}.chat-row{align-items:center;gap:var(--ds-space-3);border-radius:calc(var(--ds-radius-control) + 2px);min-height:64px;color:var(--ds-text);transition:background-color var(--ds-duration) var(--ds-ease);padding:10px 12px;text-decoration:none;display:flex;position:relative}.chat-row:hover{background:var(--ds-surface-hover);color:var(--ds-text)}.chat-row[aria-current=page]{background:var(--ds-accent-soft);color:var(--ds-text)}.chat-row[aria-current=page]:before{content:"";border-radius:var(--ds-radius-pill);background:var(--ds-accent);width:3px;position:absolute;inset-block:12px;inset-inline-start:0}.chat-row__body{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.chat-row__top,.chat-row__bottom{align-items:center;gap:var(--ds-space-2);min-width:0;display:flex}.chat-row__title{min-width:0;font-size:var(--ds-text-base);text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:550;line-height:20px;overflow:hidden}.chat-row__subtitle{color:var(--ds-text-muted);font-weight:400}.chat-row__time{color:var(--ds-text-subtle);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums;flex:none}.chat-row__preview{min-width:0;color:var(--ds-text-muted);font-size:var(--ds-text-md);flex:1;align-items:center;gap:4px;line-height:18px;display:flex}.chat-row__prefix{color:var(--ds-text);flex:none;font-weight:500}.chat-row__prefix[data-draft=true]{color:var(--ds-danger)}.chat-row__text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.chat-typing{color:var(--ds-accent-text);animation:chat-typing calc(var(--ds-duration) * 8) var(--ds-ease) infinite alternate;font-weight:550}.chat-row__preview.chat-typing{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.chat-row__failed{color:var(--ds-danger);flex:none}.chat-row__badge{border-radius:var(--ds-radius-pill);background:var(--ds-accent);min-width:20px;height:20px;color:var(--ds-on-accent);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums;animation:chat-pop var(--chat-enter) var(--ds-ease);flex:none;place-items:center;padding:0 6px;font-weight:650;display:inline-grid}.chat-row[data-unread=true] .chat-row__title{font-weight:650}.chat-row[data-unread=true] .chat-row__preview{color:var(--ds-text)}.chat-row[data-unread=true] .chat-row__time{color:var(--ds-accent-text);font-weight:600}:is(.chat-row,.chat-option) mark{background:color-mix(in oklab, var(--ds-warning) 24%, transparent);color:inherit;border-radius:3px;padding:0 1px}.chat-list__more{min-height:48px;padding:var(--ds-space-2);place-items:center;display:grid}.chat-skeletons{padding:2px var(--ds-space-2)}.chat-skeleton-row{align-items:center;gap:var(--ds-space-3);min-height:64px;padding:10px 12px;display:flex}.chat-skeletons .chat-skeleton-row__avatar{border-radius:50%;flex:0 0 44px;width:44px;height:44px}.chat-skeleton-row__lines{flex-direction:column;flex:1;gap:8px;display:flex}.chat-skeletons :is(.chat-skeleton-row__title,.chat-skeleton-row__text){border-radius:var(--ds-radius-pill);height:12px;display:block}.chat-skeletons .chat-skeleton-row__text{height:10px}.chat-bubble-skeletons{padding:var(--ds-space-4) 0;flex-direction:column;gap:10px;margin-top:auto;display:flex}.chat-bubble-skeletons .chat-bubble-skeleton{border-radius:var(--chat-r);align-self:flex-start;height:38px;display:block}.chat-bubble-skeletons .chat-bubble-skeleton[data-mine=true]{align-self:flex-end}.chat-empty,.chat-welcome,.chat-first{max-width:380px;padding:var(--ds-space-6) var(--ds-space-5);text-align:center;flex-direction:column;align-items:center;gap:10px;margin:auto;display:flex}.chat-empty__icon,.chat-welcome__icon{background:var(--ds-accent-soft);width:52px;height:52px;color:var(--ds-accent-text);border-radius:50%;place-items:center;margin-bottom:4px;display:grid}.chat-welcome__icon{width:68px;height:68px}.chat-empty__title,.chat-welcome__title{color:var(--ds-text);font-size:var(--ds-text-lg);margin:0;font-weight:600;line-height:1.35}.chat-welcome__title{font-size:18px}.chat-empty__hint,.chat-welcome__hint{align-items:center;gap:var(--ds-space-2);color:var(--ds-text-muted);font-size:var(--ds-text-md);margin:0 0 4px;line-height:1.55;display:flex}.chat-welcome__caption{color:var(--ds-text-subtle);font-size:var(--ds-text-xs)}.chat-banner{align-items:center;gap:var(--ds-space-2);max-height:0;padding:0 var(--ds-space-4);background:var(--ds-warning-soft);color:var(--ds-warning);font-size:var(--ds-text-sm);opacity:0;transition:max-height var(--ds-duration) var(--ds-ease), padding var(--ds-duration) var(--ds-ease), opacity var(--ds-duration) var(--ds-ease);font-weight:550;line-height:1.4;display:flex;overflow:hidden}.chat-banner[data-visible=true]{max-height:64px;padding:8px var(--ds-space-4);opacity:1}.chat-conversation{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.chat-conversation--state{justify-content:center}.chat-header{z-index:4;min-height:60px;padding:10px var(--ds-space-4);border-bottom:1px solid var(--ds-border);background:var(--ds-surface);align-items:center;gap:10px;display:flex;position:relative}html[data-glass=on] .chat-header{background:var(--ds-glass-bg);-webkit-backdrop-filter:blur(var(--ds-glass-blur)) saturate(1.3);backdrop-filter:blur(var(--ds-glass-blur)) saturate(1.3)}.chat-header__back{margin-inline-start:-6px;display:none}.chat-header__avatar-skeleton{border-radius:50%;flex:0 0 36px;width:36px;height:36px}.chat-header__text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.chat-header .chat-header__title{color:var(--ds-text);letter-spacing:-.005em;text-overflow:ellipsis;white-space:nowrap;text-wrap:nowrap;margin:0;font-size:15px;font-weight:600;line-height:20px;overflow:hidden}.chat-header .chat-header__title:focus-visible{box-shadow:none}.chat-header__title-skeleton{border-radius:var(--ds-radius-pill);width:160px;height:14px;margin:3px 0;display:block}.chat-header__meta{align-items:center;gap:var(--ds-space-2);min-width:0;color:var(--ds-text-muted);font-size:var(--ds-text-sm);line-height:18px;display:flex}.chat-header__meta-text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.chat-header__meta .status-badge{font-size:var(--ds-text-xs);flex:none}.chat-header__meta[data-presence=available]{color:var(--ds-success)}.chat-header__open{border:1px solid var(--ds-border);border-radius:var(--ds-radius-pill);background:var(--ds-surface);max-width:42%;height:32px;color:var(--ds-text);font-size:var(--ds-text-sm);transition:background-color var(--ds-duration) var(--ds-ease), border-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease);flex:0 auto;align-items:center;gap:6px;padding:0 12px;font-weight:550;text-decoration:none;display:inline-flex}.chat-header__open:hover{border-color:color-mix(in oklab, var(--ds-accent) 40%, var(--ds-border));background:var(--ds-accent-soft);color:var(--ds-accent-text)}.chat-header__open-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.chat-header__open>svg{flex:none}.chat-conversation__body{flex:1;min-height:0;position:relative}.chat-feed{flex-direction:column;display:flex;position:absolute;inset:0}.chat-feed__scroll{min-height:0;padding:var(--ds-space-2) var(--chat-pad-x) calc(var(--chat-composer-h,72px) + 12px);overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;background:var(--chat-canvas);flex-direction:column;flex:1;display:flex;overflow:hidden auto}.chat-feed__top{flex:none;justify-content:center;align-items:center;min-height:40px;margin-top:auto;display:flex}.chat-feed__notice{align-items:center;gap:var(--ds-space-2);color:var(--ds-text-muted);font-size:var(--ds-text-sm);display:inline-flex}.chat-feed__notice[role=alert]{color:var(--ds-danger)}.chat-feed__start{border-radius:var(--ds-radius-pill);background:color-mix(in oklab, var(--ds-surface) 70%, transparent);color:var(--ds-text-subtle);font-size:var(--ds-text-xs);padding:4px 12px}.chat-days,.chat-rows{margin:0;padding:0;list-style:none}.chat-day-group{margin:0;padding:0}.chat-feed .chat-day{z-index:2;margin:var(--ds-space-3) 0 var(--ds-space-2);font-size:var(--ds-text-xs);pointer-events:none;justify-content:center;font-weight:600;line-height:16px;display:flex;position:sticky;top:8px}.chat-day>span{border-radius:var(--ds-radius-pill);background:var(--ds-glass-bg);color:var(--ds-text-muted);box-shadow:var(--ds-shadow-sm);-webkit-backdrop-filter:blur(var(--ds-glass-blur));backdrop-filter:blur(var(--ds-glass-blur));padding:4px 12px}.chat-rows{gap:var(--chat-gap-row);flex-direction:column;display:flex}.chat-unread-divider{margin:var(--ds-space-3) calc(-1 * var(--chat-pad-x));padding:6px var(--ds-space-4);background:var(--ds-accent-soft);color:var(--ds-accent-text);font-size:var(--ds-text-sm);justify-content:center;font-weight:600;line-height:16px;display:flex}.chat-msg{align-items:flex-end;gap:var(--ds-space-2);border-radius:var(--chat-r);transition:background-color calc(var(--ds-duration) * 4) var(--ds-ease);outline:none;margin:0;padding:0;line-height:normal;display:flex}.chat-rows>.chat-msg:is([data-position=first],[data-position=single]):not(:first-child){margin-top:calc(var(--chat-gap-group) - var(--chat-gap-row))}.chat-msg.is-mine{justify-content:flex-end}.chat-msg.is-highlighted{background:var(--ds-accent-soft);transition-duration:var(--ds-duration)}.chat-msg__gutter{flex:0 0 28px;width:28px}.chat-msg__column{flex-direction:column;align-items:flex-start;min-width:0;max-width:min(72%,640px);display:flex}.chat-msg.is-mine .chat-msg__column{align-items:flex-end}.chat-msg__name{color:oklch(var(--chat-name-l) var(--chat-name-c) var(--chat-hue,200));font-size:var(--ds-text-sm);margin:0 12px 3px;font-weight:600;line-height:16px}.chat-msg__line{max-width:100%;display:flex;position:relative}.chat-bubble{border-radius:var(--chat-r);background:var(--chat-their-bg);min-width:0;max-width:100%;box-shadow:0 1px 1px color-mix(in oklab, var(--ds-text) 7%, transparent), 0 0 0 1px color-mix(in oklab, var(--chat-their-border) 60%, transparent);color:var(--ds-text);font-size:var(--ds-text-base);overflow-wrap:anywhere;padding:7px 12px;line-height:20px;position:relative}.chat-msg.is-mine .chat-bubble{background:var(--chat-mine-bg);box-shadow:0 1px 1px color-mix(in oklab, var(--ds-accent) 25%, transparent);color:var(--chat-mine-fg)}.chat-msg:focus-visible .chat-bubble{box-shadow:var(--ds-focus-ring)}.chat-msg.is-highlighted .chat-bubble{box-shadow:0 0 0 2px color-mix(in oklab, var(--ds-accent) 55%, transparent)}.chat-msg.is-mine[data-position=single] .chat-bubble{border-end-end-radius:var(--chat-r-tail)}.chat-msg.is-mine[data-position=first] .chat-bubble{border-end-end-radius:var(--chat-r-joined)}.chat-msg.is-mine[data-position=middle] .chat-bubble{border-start-end-radius:var(--chat-r-joined);border-end-end-radius:var(--chat-r-joined)}.chat-msg.is-mine[data-position=last] .chat-bubble{border-start-end-radius:var(--chat-r-joined);border-end-end-radius:var(--chat-r-tail)}.chat-msg.is-theirs[data-position=single] .chat-bubble{border-end-start-radius:var(--chat-r-tail)}.chat-msg.is-theirs[data-position=first] .chat-bubble{border-end-start-radius:var(--chat-r-joined)}.chat-msg.is-theirs[data-position=middle] .chat-bubble{border-start-start-radius:var(--chat-r-joined);border-end-start-radius:var(--chat-r-joined)}.chat-msg.is-theirs[data-position=last] .chat-bubble{border-start-start-radius:var(--chat-r-joined);border-end-start-radius:var(--chat-r-tail)}@supports ((-webkit-mask-image:radial-gradient(black, black)) or (mask-image:radial-gradient(black, black))){.chat-workspace{--chat-r-tail:0px}.chat-msg:is([data-position=last],[data-position=single]) .chat-bubble:after{content:"";pointer-events:none;width:8px;height:12px;position:absolute;bottom:0}.chat-msg.is-mine:is([data-position=last],[data-position=single]) .chat-bubble:after{background:var(--chat-mine-tail);inset-inline-end:-7px;-webkit-mask-image:radial-gradient(circle at 100% 0,#0000 8px,#000 8.5px);mask-image:radial-gradient(circle at 100% 0,#0000 8px,#000 8.5px)}.chat-msg.is-theirs:is([data-position=last],[data-position=single]) .chat-bubble:after{background:var(--chat-their-bg);inset-inline-start:-7px;-webkit-mask-image:radial-gradient(circle at 0 0,#0000 8px,#000 8.5px);mask-image:radial-gradient(circle at 0 0,#0000 8px,#000 8.5px)}}.chat-bubble__text{white-space:pre-wrap}.chat-link-inline{color:var(--ds-accent-text);text-underline-offset:2px;text-decoration:underline;text-decoration-thickness:1px}.chat-msg.is-mine .chat-link-inline{color:inherit}.chat-meta{float:inline-end;color:var(--ds-text-muted);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums;white-space:nowrap;-webkit-user-select:none;user-select:none;align-items:center;gap:3px;margin-inline-start:10px;line-height:16px;display:inline-flex;position:relative;top:5px}.chat-msg.is-mine .chat-meta{color:var(--chat-mine-meta)}.chat-msg[data-status=read] .chat-meta__status{color:var(--chat-mine-fg)}.chat-msg[data-status=failed] .chat-meta__status{color:var(--ds-danger)}.chat-msg[data-status=failed] .chat-bubble{opacity:.8}.chat-quote{border:0;border-inline-start:3px solid var(--ds-accent);border-radius:calc(var(--ds-radius-control) - 2px);background:var(--ds-accent-soft);width:100%;min-width:0;color:inherit;text-align:start;transition:background-color var(--ds-duration) var(--ds-ease);flex-direction:column;gap:1px;margin:2px 0 6px;padding:5px 10px;display:flex}.chat-quote:hover{background:color-mix(in oklab, var(--ds-accent) 18%, var(--ds-surface))}.chat-msg.is-mine .chat-quote{border-inline-start-color:color-mix(in oklab, var(--ds-on-accent) 70%, transparent);background:color-mix(in oklab, var(--ds-on-accent) 14%, transparent)}.chat-msg.is-mine .chat-quote:hover{background:color-mix(in oklab, var(--ds-on-accent) 22%, transparent)}.chat-quote__author{color:var(--ds-accent-text);font-size:var(--ds-text-sm);font-weight:600;line-height:16px}.chat-msg.is-mine .chat-quote__author{color:var(--chat-mine-fg)}.chat-quote__text{font-size:var(--ds-text-sm);white-space:pre-wrap;-webkit-line-clamp:2;line-clamp:2;opacity:.9;-webkit-box-orient:vertical;line-height:16px;display:-webkit-box;overflow:hidden}.chat-msg__actions{opacity:0;pointer-events:none;transition:opacity var(--ds-duration) var(--ds-ease);gap:2px;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.chat-msg.is-theirs .chat-msg__actions{inset-inline-start:calc(100% + 6px)}.chat-msg.is-mine .chat-msg__actions{inset-inline-end:calc(100% + 6px)}.chat-msg__action{border:1px solid var(--ds-border);background:var(--ds-surface);width:28px;height:28px;color:var(--ds-text-muted);box-shadow:var(--ds-shadow-sm);transition:color var(--ds-duration) var(--ds-ease), background-color var(--ds-duration) var(--ds-ease);border-radius:50%;place-items:center;padding:0;display:grid}.chat-msg__action:hover{background:var(--ds-surface-hover);color:var(--ds-text)}@media (hover:hover) and (pointer:fine){.chat-msg:is(:hover,:focus-within) .chat-msg__actions{opacity:1;pointer-events:auto}}@media not ((hover:hover) and (pointer:fine)){.chat-msg__actions{display:none}}.chat-msg__failed{color:var(--ds-danger);font-size:var(--ds-text-sm);flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px 8px;margin-top:4px;display:flex}.chat-msg__failed-text{flex-basis:100%;justify-content:flex-end;align-items:center;gap:4px;font-weight:550;display:inline-flex}.chat-msg.is-theirs .chat-msg__failed,.chat-msg.is-theirs .chat-msg__failed-text{justify-content:flex-start}.chat-msg__failed-action{border:1px solid color-mix(in oklab, var(--ds-danger) 30%, var(--ds-border));border-radius:var(--ds-radius-pill);background:var(--ds-surface);min-height:32px;color:var(--ds-text);font-size:var(--ds-text-sm);transition:background-color var(--ds-duration) var(--ds-ease);padding:0 12px;font-weight:550}.chat-msg__failed-action:hover{background:var(--ds-danger-soft)}.chat-msg.is-new .chat-bubble{transform-origin:0 100%;animation:chat-in var(--chat-enter) var(--ds-ease) both}.chat-msg.is-new.is-mine .chat-bubble{transform-origin:100% 100%}.chat-jump{inset-inline-end:calc(var(--chat-pad-x) + 4px);bottom:calc(var(--chat-composer-h,72px) + 12px);z-index:3;border:1px solid var(--ds-border);background:var(--ds-surface);width:40px;height:40px;color:var(--ds-text-muted);box-shadow:var(--ds-shadow-lg);opacity:0;pointer-events:none;transition:opacity var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease);border-radius:50%;place-items:center;padding:0;display:grid;position:absolute;transform:translateY(8px)scale(.96)}.chat-jump[data-visible=true]{opacity:1;pointer-events:auto;transform:none}.chat-jump:hover{color:var(--ds-text)}.chat-jump__badge{top:-7px;border-radius:var(--ds-radius-pill);background:var(--ds-accent);min-width:20px;height:20px;color:var(--ds-on-accent);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums;animation:chat-pop var(--chat-enter) var(--ds-ease);place-items:center;padding:0 5px;font-weight:650;display:grid;position:absolute;inset-inline-end:-4px}.chat-toast{left:50%;bottom:calc(var(--chat-composer-h,72px) + 16px);z-index:5;border-radius:var(--ds-radius-pill);background:var(--ds-text);color:var(--ds-surface);box-shadow:var(--ds-shadow-lg);font-size:var(--ds-text-sm);opacity:0;pointer-events:none;transition:opacity var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease);padding:8px 14px;font-weight:550;position:absolute;transform:translate(-50%,8px)}.chat-toast[data-visible=true]{opacity:1;transform:translate(-50%)}.chat-menu-positioner{z-index:90;outline:none}.chat-menu{border:1px solid var(--ds-border);border-radius:calc(var(--ds-radius-control) + 4px);background:var(--ds-surface);min-width:190px;color:var(--ds-text);box-shadow:var(--ds-shadow-lg);font-family:var(--ds-font-sans);transform-origin:var(--transform-origin);transition:opacity var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease);outline:none;padding:4px}.chat-menu:is([data-starting-style],[data-ending-style]){opacity:0;transform:scale(.97)}.chat-menu__item{border-radius:var(--ds-radius-control);min-height:36px;font-size:var(--ds-text-md);cursor:default;-webkit-user-select:none;user-select:none;outline:none;align-items:center;gap:10px;padding:0 10px;display:flex}.chat-menu__item>svg{color:var(--ds-text-muted)}.chat-menu__item[data-highlighted]{background:var(--ds-surface-hover)}.chat-composer{inset-inline:0;z-index:4;padding:var(--ds-space-2) var(--chat-pad-x) max(var(--ds-space-2), env(safe-area-inset-bottom));border-top:1px solid var(--ds-border);background:var(--ds-glass-bg);-webkit-backdrop-filter:blur(var(--ds-glass-blur)) saturate(1.3);margin:0;position:absolute;bottom:0}.chat-composer__notice{justify-content:center;align-items:center;gap:var(--ds-space-2);border-radius:var(--ds-radius-control);background:var(--ds-surface-2);color:var(--ds-text-muted);font-size:var(--ds-text-md);text-align:center;margin:0;padding:10px 12px;display:flex}.chat-composer__reply{margin:0 0 var(--ds-space-2);border-inline-start:3px solid var(--ds-accent);border-radius:var(--ds-radius-control);background:var(--ds-accent-soft);animation:chat-in var(--chat-enter) var(--ds-ease);align-items:center;gap:10px;padding:6px 6px 6px 10px;display:flex}.chat-composer__reply-icon{color:var(--ds-accent-text);flex:none}.chat-composer__reply-text{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.chat-composer__reply-author{color:var(--ds-accent-text);font-size:var(--ds-text-sm);text-overflow:ellipsis;white-space:nowrap;font-weight:600;line-height:16px;overflow:hidden}.chat-composer__reply-body{color:var(--ds-text-muted);font-size:var(--ds-text-sm);white-space:pre-wrap;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:16px;display:-webkit-box;overflow:hidden}.chat-composer__field{border:1px solid var(--ds-border);border-radius:calc(var(--ds-radius-control) + 10px);background:var(--ds-surface);transition:border-color var(--ds-duration) var(--ds-ease), box-shadow var(--ds-duration) var(--ds-ease);align-items:flex-end;gap:6px;padding:3px 4px 3px 10px;display:flex;position:relative}.chat-composer__field:focus-within{border-color:var(--ds-accent);box-shadow:var(--ds-focus-ring)}.chat-workspace .chat-composer__field>textarea.chat-composer__input,.chat-workspace .chat-composer__field>textarea.chat-composer__input:is(:hover,:focus,:focus-visible){min-width:0;height:36px;min-height:0;max-height:176px;box-shadow:none;color:var(--ds-text);font-size:var(--ds-text-base);resize:none;background:0 0;border:0;border-radius:0;outline:none;flex:1;margin:0;padding:8px 4px;line-height:20px;overflow-y:hidden}@supports (field-sizing:content){.chat-workspace .chat-composer__field>textarea.chat-composer__input{field-sizing:content}}.chat-composer__hint{inset-inline-end:52px;max-width:45%;color:var(--ds-text-subtle);font-size:var(--ds-text-xs);text-overflow:ellipsis;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--ds-duration) var(--ds-ease);line-height:16px;position:absolute;bottom:13px;overflow:hidden}.chat-composer{container:chat-composer/inline-size}@media (hover:hover) and (pointer:fine){@container chat-composer (width>=560px){.chat-composer[data-empty=true] .chat-composer__field:focus-within .chat-composer__hint{opacity:1}}}@media not ((hover:hover) and (pointer:fine)){.chat-composer__hint{display:none}}.chat-composer__footer{justify-content:flex-end;padding:4px 6px 0;display:flex}.chat-composer__counter{color:var(--ds-text-muted);font-size:var(--ds-text-xs);font-variant-numeric:tabular-nums}.chat-composer__counter[data-tone=warning]{color:var(--ds-warning);font-weight:600}.chat-composer__counter[data-tone=danger]{color:var(--ds-danger);font-weight:650}.chat-send{background:var(--ds-surface-2);width:36px;height:36px;color:var(--ds-text-subtle);transition:background-color var(--ds-duration) var(--ds-ease), color var(--ds-duration) var(--ds-ease), transform var(--ds-duration) var(--ds-ease);border:0;border-radius:50%;flex:0 0 36px;place-items:center;margin-bottom:0;padding:0;display:grid;transform:scale(.9)}.chat-send[data-ready=true]{background:var(--ds-accent);color:var(--ds-on-accent);transform:scale(1)}.chat-send[data-ready=true]:hover{background:var(--ds-accent-hover)}.chat-send[aria-disabled=true]{cursor:default}.chat-send__icon{place-items:center;display:grid}.chat-send__icon.is-fired{animation:chat-fire calc(var(--ds-duration) * 1.4) var(--ds-ease)}.chat-avatar{width:var(--chat-avatar-size,44px);height:var(--chat-avatar-size,44px);font-size:calc(var(--chat-avatar-size,44px) * .38);letter-spacing:.01em;-webkit-user-select:none;user-select:none;border-radius:50%;flex:none;place-items:center;font-weight:650;line-height:1;display:inline-grid;position:relative}.chat-avatar:not([data-kind=user]){border-radius:calc(var(--chat-avatar-size,44px) * .3)}.chat-avatar[data-kind=user]{background:oklch(.93 .045 var(--chat-hue));color:oklch(.42 .09 var(--chat-hue))}html[data-theme=dark] .chat-avatar[data-kind=user]{background:oklch(.34 .06 var(--chat-hue));color:oklch(.9 .05 var(--chat-hue))}.chat-avatar[data-kind=sales_order]{background:var(--ds-info-soft);color:var(--ds-info)}.chat-avatar[data-kind=proforma]{background:var(--ds-warning-soft);color:var(--ds-warning)}.chat-avatar[data-kind=batch]{background:var(--ds-success-soft);color:var(--ds-success)}.chat-avatar[data-kind=party]{background:var(--ds-accent-soft);color:var(--ds-accent-text)}.chat-presence-dot{inset-inline-end:0;background:var(--ds-text-subtle);width:10px;height:10px;box-shadow:0 0 0 2px var(--ds-surface);border-radius:50%;position:absolute;bottom:0}.chat-presence-dot[data-tone=online]{background:var(--ds-success)}.chat-presence-dot[data-tone=busy]{background:var(--ds-danger)}.chat-presence-dot[data-tone=away]{background:var(--ds-warning)}.chat-presence-dot--inline{width:8px;height:8px;box-shadow:none;flex:none;display:inline-block;position:static}.chat-dialog{border:1px solid var(--ds-border);border-radius:calc(var(--ds-radius-panel) + 4px);background:var(--ds-surface);width:min(560px,100vw - 32px);max-width:none;height:min(640px,100dvh - 64px);max-height:none;color:var(--ds-text);box-shadow:var(--ds-shadow-lg);margin:auto;padding:0;overflow:hidden}.chat-dialog[open]{animation:chat-dialog-in var(--ds-duration) var(--ds-ease);flex-direction:column;display:flex}.chat-dialog::backdrop{background:var(--ds-overlay);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.chat-dialog__panel{gap:var(--ds-space-3);min-height:0;padding:var(--ds-space-4) 0 0;flex-direction:column;flex:1;display:flex}.chat-dialog__header{justify-content:space-between;align-items:center;gap:var(--ds-space-3);padding:0 var(--ds-space-3) 0 var(--ds-space-5);display:flex}.chat-dialog .chat-dialog__title{color:var(--ds-text);margin:0;font-size:18px;font-weight:650;line-height:26px}.chat-dialog__search{margin:0 var(--ds-space-5)}.chat-dialog__chips{padding-inline:var(--ds-space-5)}.chat-dialog__error{align-items:center;gap:var(--ds-space-2);margin:0 var(--ds-space-5);border-radius:var(--ds-radius-control);background:var(--ds-danger-soft);color:var(--ds-danger);font-size:var(--ds-text-sm);padding:8px 10px;display:flex}.chat-dialog__error .chat-button{margin-inline-start:auto}.chat-dialog__results{min-height:0;padding:0 var(--ds-space-3) var(--ds-space-3);overscroll-behavior:contain;border-top:1px solid var(--ds-border);flex:1;overflow-y:auto}.chat-dialog__group-head{z-index:1;justify-content:space-between;align-items:center;gap:var(--ds-space-2);background:var(--ds-surface);padding:12px 10px 4px;display:flex;position:sticky;top:0}.chat-dialog__group-title{color:var(--ds-text-subtle);font-size:var(--ds-text-xs);letter-spacing:.04em;text-transform:uppercase;font-weight:650}.chat-dialog__show-all{border-radius:var(--ds-radius-control);color:var(--ds-accent-text);font-size:var(--ds-text-sm);background:0 0;border:0;padding:2px 6px;font-weight:550}.chat-dialog__show-all:hover{background:var(--ds-accent-soft)}.chat-option{align-items:center;gap:var(--ds-space-3);border-radius:calc(var(--ds-radius-control) + 2px);cursor:pointer;min-height:52px;transition:background-color var(--ds-duration) var(--ds-ease);padding:8px 10px;display:flex}.chat-option[data-active=true]{background:var(--ds-surface-hover)}.chat-option__text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.chat-option__title,.chat-option__subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chat-option__title{font-size:var(--ds-text-base);font-weight:550;line-height:20px}.chat-option__subtitle{color:var(--ds-text-muted);font-size:var(--ds-text-sm);line-height:16px}.chat-option__tag{border-radius:var(--ds-radius-pill);background:var(--ds-accent-soft);color:var(--ds-accent-text);font-size:var(--ds-text-xs);white-space:nowrap;flex:none;padding:2px 8px;font-weight:550}.chat-dialog__status{padding:var(--ds-space-6) var(--ds-space-4);color:var(--ds-text-muted);font-size:var(--ds-text-md);text-align:center;margin:0}.chat-dialog__status[role=alert]{color:var(--ds-danger)}.chat-dialog__more{margin:var(--ds-space-2) auto 0;display:flex}.chat-dialog__hint{padding:10px var(--ds-space-5);border-top:1px solid var(--ds-border);background:var(--ds-surface-2);color:var(--ds-text-subtle);font-size:var(--ds-text-xs);margin:0}@media not ((hover:hover) and (pointer:fine)){.chat-dialog__hint{display:none}}@keyframes chat-in{0%{opacity:0;transform:translateY(6px)scale(.98)}}@keyframes chat-pop{0%{transform:scale(.6)}60%{transform:scale(1.12)}to{transform:scale(1)}}@keyframes chat-fire{45%{opacity:0;transform:translate(4px,-4px)}46%{opacity:0;transform:translate(-4px,4px)}to{opacity:1;transform:none}}@keyframes chat-typing{0%{opacity:1}to{opacity:.55}}@keyframes chat-spin{to{transform:rotate(360deg)}}@keyframes chat-dialog-in{0%{opacity:0;transform:scale(.98)}}@keyframes chat-sheet-in{0%{opacity:0;transform:translateY(24px)}}@keyframes chat-pane-in{0%{opacity:0;transform:translate(12%)}}@media (width<=1000px){.chat-workspace{--chat-sidebar-w:280px}.chat-header__open{max-width:36%}}@media (pointer:coarse){.chat-icon-button,.chat-send{flex-basis:40px;width:40px;height:40px}.chat-msg__failed-action{min-height:40px}.chat-bubble{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}@media (width<=700px){html.chat-fullscreen,html.chat-fullscreen body{overflow:hidden}.chat-workspace{grid-template-columns:minmax(0,1fr);min-height:320px}.chat-workspace[data-view=list] .chat-pane{display:none}.chat-workspace[data-view=conversation] .chat-pane{inset-inline:0;top:var(--chat-vv-top,0px);z-index:50;height:var(--chat-vh,100dvh);background:var(--ds-surface);animation:chat-pane-in calc(var(--ds-duration) * 1.4) var(--ds-ease);position:fixed}.chat-list{border-inline-end:0}.chat-header{min-height:56px;padding:max(8px, env(safe-area-inset-top)) var(--ds-space-3) 8px var(--ds-space-2);gap:var(--ds-space-2)}.chat-header__back{display:inline-grid}.chat-header__open{border-radius:50%;justify-content:center;width:36px;height:36px;padding:0}.chat-header__open-label{display:none}.chat-msg__column{max-width:84%}.chat-dialog{border-radius:calc(var(--ds-radius-panel) + 6px) calc(var(--ds-radius-panel) + 6px) 0 0;border-width:1px 0 0;width:100vw;height:92dvh;margin:auto 0 0}.chat-dialog[open]{animation-name:chat-sheet-in}}
