#chat-open svg,.chat-action[data-active="true"] svg,.chat-people svg{color:#368ecb;fill:none;stroke:currentColor;stroke-width:1.8}
.chat-action:not([data-active="true"]) svg{color:var(--theme-muted,#746d67)}
:is(.chat-action,.chat-people).icon-button svg{width:1.25rem;height:1.25rem}
.chat-page[open]{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:clamp(12px,2vw,28px);box-sizing:border-box;border:0;border-radius:0;display:flex;flex-direction:column}
:is(.chat-page,.chat-people-page)>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
:is(.chat-page,.chat-people-page) h2,.chat-main h3{margin:0}
.chat-panes{display:grid;grid-template-columns:minmax(220px,31%) minmax(0,1fr);flex:1;min-height:0;gap:16px}
.chat-main{display:flex;flex-direction:column;min-width:0;min-height:0}
.chat-messages,.chat-threads,.chat-members{overflow:auto;overscroll-behavior:contain}
.chat-messages{flex:1;min-height:0}
.chat-threads .chat-thread{background:transparent;color:inherit;border:0;border-radius:0;display:grid;text-align:start;width:100%;gap:4px;padding:12px;border-bottom:1px solid #8885;overflow-wrap:anywhere}
.chat-threads .chat-thread-split{padding:0;gap:0}
.chat-thread-split>button{display:grid;gap:4px;text-align:start;width:100%;min-width:0;margin:0;padding:10px 12px;color:inherit;background:transparent;border:0;border-radius:0;font:inherit;overflow-wrap:anywhere}
.chat-thread-split>.chat-thread-title{border-bottom:1px solid var(--line,#bdb6ac)}
.chat-thread[aria-current=true]{box-shadow:inset 3px 0 #368ecb}
.chat-thread strong img,.chat-thread strong svg{width:1.3em;height:1.3em;vertical-align:middle}
.chat-person{display:flex;gap:8px;align-items:center}.chat-person small{display:block}
.chat-message{padding:10px 4px;border-bottom:1px solid #8885}.chat-message time,.chat-thread time{font-size:.85em;opacity:.75}
.chat-body,.chat-mode,.chat-message blockquote{white-space:pre-wrap;overflow-wrap:anywhere}.chat-message blockquote{margin:6px 0;padding-inline-start:8px;border-inline-start:2px solid #368ecb}
.chat-message>.chat-menu-button{float:inline-end;margin:0 0 .3rem .5rem}
.chat-form,.chat-mode{display:flex;align-items:center;gap:12px}.chat-form{flex-wrap:wrap}.chat-form textarea{flex:1;min-width:0;font-size:16px}.chat-mode:not(:empty){width:100%}.chat-mode:empty{display:none}
.chat-page [hidden]{display:none}.chat-people-page{max-height:95dvh}.chat-members{max-height:65dvh}.chat-members>.chat-person{padding:8px 0}
.task-card-tools{flex-wrap:wrap}.task-card-project{overflow-wrap:anywhere}
.pull-refresh-clock i{display:block;width:26px;height:26px;box-sizing:border-box;border:3px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loading-spin .9s linear infinite}
@media(prefers-reduced-motion:reduce){.pull-refresh-clock i{animation-duration:2.5s}}
.task-card-tools :is(.chat-action,.chat-people){width:36px;height:36px;min-height:36px;padding:6px;margin:0}
.pull-refresh-clock{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2147483647;pointer-events:none;border-radius:50%;background:Canvas;color:CanvasText;box-shadow:0 2px 8px #0004;padding:8px;line-height:1}
@media(min-width:768px) and (max-width:1100px){
 body.qr-home .home-tools{flex-wrap:wrap;row-gap:4px}
 body.qr-home .home-people-tools{min-width:max-content;gap:10px}
 body.qr-home .home-people-tools button{flex-direction:column;font-size:14px;gap:3px;justify-content:center}
 body.qr-home .home-people-tools svg{width:30px;height:30px}
}
@media(max-width:767px){
 #activity-feed .feed-refresh{display:none}
 body.qr-home .home-people-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
 .chat-panes{display:flex;flex-direction:column}.chat-main,.chat-threads{flex:1;min-height:0}.chat-page:not(.chat-selected) .chat-main,.chat-selected .chat-threads{display:none}
}

.chat-direct .chat-panes{grid-template-columns:minmax(0,1fr)}
.chat-page header .catalog-scope-line{flex:1;margin:0}

.chat-page header .chat-refresh svg{fill:none;stroke:currentColor;stroke-width:2}
@media(max-width:767px){.chat-page .chat-refresh{display:none}.chat-page>header{flex-wrap:wrap;gap:6px}}

.chat-page>header{justify-content:flex-end}
.chat-page>header>h2{margin-inline-end:auto}
.chat-page:not([data-current]) .chat-thread-tool{display:none}
:root[data-theme] dialog.chat-page>header .icon-button.chat-section-icon{background:transparent;border:0;box-shadow:none;color:#368ecb}
.chat-page header .chat-people svg{color:inherit}
.chat-form .primary:disabled{opacity:.45;cursor:default}
.chat-section-icon svg{color:#368ecb;width:26px;height:26px;stroke:currentColor;fill:none}
.chat-page .chat-share svg{fill:none;stroke:currentColor;stroke-width:1.8}
@media(max-width:767px){
 .chat-page:not(.chat-selected)>header{position:relative;min-height:44px}
 .chat-page:not(.chat-selected) .chat-section-icon{position:absolute;left:50%;transform:translateX(-50%)}
 .chat-page:not(.chat-selected) .chat-thread-tool{display:none}
 .chat-page>.catalog-scope-line{margin:8px 0}
 .chat-selected>header{gap:4px}
 .chat-selected>header>button{flex-shrink:0}
}

.chat-search-dialog{position:fixed;border-radius:16px;padding:20px;color:inherit;background:var(--theme-surface,Canvas)}
.chat-search-dialog .search-dismiss{position:absolute;inset-block-start:12px;inset-inline-end:12px}
.chat-search-dialog h2{padding-inline-end:48px}
.chat-search-dialog input{display:block;width:100%;font:inherit;font-size:16px;margin-block-start:8px}
.chat-page .chat-filter-clear{align-self:flex-start}
.chat-page .chat-search-button svg{fill:none;stroke:currentColor;stroke-width:2}
.chat-unread-label{margin-inline-start:.65em;color:var(--link,#3286bd);font-size:.8em}
