/* Navigation uses one sidebar; opening tasks never adds a conversation column. */
:root{--rail-width:56px;--sidebar-width:clamp(236px,20vw,280px);--work-sidebar-width:320px;--conversation-list-surface:#efeff0;--conversation-selected:#13ad78;--conversation-selected-muted:#d6f1e5}
:root[data-theme="dark"]{--conversation-list-surface:#1f2523;--conversation-selected:#176b4b;--conversation-selected-muted:#d0e6dc}
.frame.chat-focused, .frame.chat-focused.work-open{position:relative;grid-template-columns:var(--rail-width) var(--sidebar-width) minmax(0,1fr)}
.frame.chat-focused[data-chat-view="group"]{grid-template-columns:var(--rail-width) var(--sidebar-width) minmax(0,1fr)}
.app-rail{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 5px 12px;background:#e7e7e7;border-right:1px solid #ddd;min-height:0;z-index:31}
.rail-brand{position:relative;flex:none;width:40px;height:40px;padding:0;margin:0 0 14px;background:#222a32;border:0;border-radius:9px;color:#fff;font-size:24px;font-weight:650;line-height:40px}
.rail-brand>span{position:absolute;right:7px;bottom:7px;width:5px;height:5px;background:#24c780;border-radius:50%}
.rail-button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:0;border-radius:8px;background:transparent;color:#777;text-decoration:none;cursor:pointer}
.rail-button:hover, .rail-more>summary:hover{background:#dadada;color:#333}.rail-button.active{color:#07b75e}
.rail-icon{display:block;width:24px;height:24px;background:currentColor;mask:var(--rail-icon) center/contain no-repeat;flex:none}
.rail-employee-shortcuts{display:flex;flex-direction:column;align-items:center;gap:7px;flex:1;min-height:0;width:44px;padding-top:11px;border-top:1px solid var(--line,#ddd);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb,#c3cec6) transparent;overscroll-behavior:contain}
.rail-employee-shortcuts::-webkit-scrollbar{width:3px}.rail-employee-shortcuts::-webkit-scrollbar-thumb{background:var(--scroll-thumb,#c3cec6);border-radius:3px}
.rail-employee-shortcut{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:9px;text-decoration:none;color:var(--ink,#333);background:transparent;cursor:pointer}
.rail-employee-shortcut:hover{background:var(--rail-hover,#dadada)}
.rail-employee-shortcut.current-employee{background:var(--selected-surface,#e2ece6);box-shadow:inset 3px 0 var(--accent,#18765b)}
.rail-employee-shortcut:focus-visible{outline:2px solid var(--focus-ring,#298b6b);outline-offset:-2px}
.rail-employee-avatar{position:relative;display:grid;place-items:center;overflow:hidden;width:30px;height:30px;border-radius:7px;background:var(--avatar-surface,#e1eee6);font-size:13px;font-weight:600}
.rail-employee-avatar img{width:100%;height:100%;object-fit:cover;object-position:center 22%}
.app-rail>.rail-brand, .app-rail>.rail-button, .rail-bottom{flex:none}
.rail-bottom{display:flex;flex-direction:column;gap:6px;margin-top:auto;padding-top:8px;border-top:1px solid var(--line,#ddd)}.rail-more{position:relative}.rail-more>summary{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:8px;cursor:pointer;list-style:none;color:#777}.rail-more>summary::-webkit-details-marker, .chat-add>summary::-webkit-details-marker{display:none}
.rail-more>div{position:absolute;left:50px;bottom:0;display:flex;flex-direction:column;width:190px;padding:8px;background:#fff;border:1px solid #e5e5e5;border-radius:9px;box-shadow:0 8px 28px #0002;z-index:60}.rail-more>div .rail-button{width:100%;height:38px;justify-content:flex-start;gap:10px;padding:0 9px;font-size:12px}.rail-more>div .rail-button::after{content:attr(aria-label)}.rail-more>div .rail-icon{width:18px;height:18px}
.chat-focused .left{padding:0!important;background:#ededed;border-right:1px solid #dedede;overflow:visible;min-width:0;z-index:30}
.left>.brand, .left>.nav-work, .left>.left-label, .left>#employee-list, .left>.bottom{display:none!important}
.conversation-directory{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;background:var(--conversation-list-surface)}
.chat-directory-head{position:relative;display:flex;align-items:center;gap:12px;padding:14px 14px 12px;flex:none;height:64px}
.chat-search{display:flex;align-items:center;gap:7px;flex:1;min-width:0;height:34px;background:#f8f8f8;border-radius:6px;padding:0 10px;color:#aaa}.chat-search>.rail-icon{width:16px;height:16px}
.chat-search #chat-search{flex:1;min-width:0;width:100%;height:34px;border:0;padding:0;background:transparent;outline-offset:0;border-radius:0;font-size:13px}.chat-search:focus-within{outline:2px solid #b7d3c8}.chat-search #chat-search:focus-visible{outline:none}
.chat-add{flex:none}.chat-add>summary,.chat-add>.chat-add-trigger{padding:0;background:transparent;display:flex;align-items:center;justify-content:center;width:28px;height:28px;list-style:none;border:1.5px solid #8f8f8f;border-radius:50%;color:#626262;cursor:pointer}.chat-add>summary>.rail-icon,.chat-add>.chat-add-trigger>.rail-icon{width:17px;height:17px}.chat-add>div{position:absolute;right:14px;top:65px;display:flex;flex-direction:column;gap:3px;width:160px;padding:6px;border:1px solid #ddd;background:white;border-radius:8px;box-shadow:0 8px 25px #0002;z-index:50}.chat-add>div button, .chat-add>div a{display:block;text-align:left;padding:9px 10px;border:0;border-radius:5px;font-size:13px;color:#333;text-decoration:none;background:#fff}.chat-add>div button:hover, .chat-add>div a:hover{background:#f2f2f2}
.conversation-list{flex:1;overflow-y:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#ccc transparent}
.conversation-row{display:flex;align-items:center;gap:12px;box-sizing:border-box;height:68px;min-height:68px;padding:13px 12px;border:0;border-radius:0;color:#242424;text-decoration:none;background:transparent;position:relative}
.conversation-row:focus-visible{outline-offset:-3px}
.conversation-row:hover{background:#e1e1e1}.conversation-row.selected{background:#13ad78;color:white}.conversation-row.selected .conversation-preview, .conversation-row.selected time{color:#cce9de}.conversation-row.selected .conversation-preview small{color:white}.conversation-row::after{content:'';position:absolute;left:72px;right:16px;bottom:0;border-bottom:1px solid #e3e3e3}.conversation-row.selected::after{border-color:transparent}
.row-avatar{position:relative;display:block;width:40px;height:40px;flex:none}
.conversation-unread{position:absolute;right:-6px;top:-5px;min-width:18px;height:18px;padding:0 5px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:var(--danger,#e55757);color:#fff;border:1.5px solid var(--conversation-list-surface);font-size:10px;line-height:1;font-weight:500;z-index:2;box-sizing:border-box}.conversation-unread.is-dot{right:-3px;top:-3px;min-width:8px;width:8px;height:8px;padding:0}.conversation-unread[hidden]{display:none}.conversation-mention{flex:none;color:var(--danger,#d54b43);font-size:12px}.conversation-mention[hidden]{display:none}.conversation-muted-icon{flex:none;width:14px;height:14px;margin-left:auto;opacity:.55;background:var(--muted,#89908d);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M3 3l18 18M10 4a5 5 0 0 1 7 5v4l2 3H9m-4 0l2-3V9m3 10a2 2 0 0 0 4 0'/%3E%3C/svg%3E") center/contain no-repeat}.conversation-muted-icon[hidden]{display:none}
.conversation-avatar{position:relative;display:grid;place-items:center;width:40px;height:40px;flex:none;overflow:hidden;background:#d9e4df;color:#527068;border-radius:6px;font-size:18px;font-weight:600}
.conversation-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 22%}
.group-mosaic{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:2px;padding:3px;background:#d9dedb}.group-mosaic>span{position:relative;display:grid;place-items:center;overflow:hidden;background:#f1f4f1;align-self:stretch;justify-self:stretch;min-width:0;border-radius:2px;font-size:10px}.group-mosaic img{border-radius:2px}
.conversation-copy{flex:1;min-width:0}.conversation-title{display:flex;align-items:center;gap:8px;height:20px;line-height:20px}.conversation-title b{flex:1;min-width:0;font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-title time{font-size:11px;color:#999;flex:none;white-space:nowrap;line-height:20px}
.conversation-preview{display:flex;align-items:center;gap:4px;margin-top:4px;color:#939393;font-size:12px;height:18px;line-height:18px}.conversation-snippet{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-preview small{flex:none;font-size:10px;max-width:60px;color:#259867;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-directory-empty{margin:0;padding:30px 20px;color:#999;font-size:12px;text-align:center}.chat-directory-status{padding:9px 16px;border-top:1px solid #e0e0e0;color:#858585;font-size:12px;line-height:18px;min-height:37px;flex:none}.chat-directory-status.connected::before{content:'';display:inline-block;vertical-align:1px;width:5px;height:5px;margin-right:6px;border-radius:50%;background:#24a768}.chat-directory-status[data-retry='1']{cursor:pointer}
.chat-focused .right{border-left:0}.chat-focused .header{height:68px;min-height:68px;border-bottom:1px solid #e6e6e6;background:#f5f5f5;padding-inline:26px}.chat-focused .header>.avatar{display:none!important}.chat-focused .header h1{font-size:18px}
.mobile-chat-list, .chat-directory-close{display:none}.chat-list-backdrop{position:fixed;inset:0;background:#0003;border:0;border-radius:0;z-index:29}
@media(max-width:1480px) and (min-width:761px){.chat-focused .work-panel:not([hidden]){position:absolute;right:0;top:0;bottom:0;width:var(--work-sidebar-width);margin:0;border-radius:0;z-index:40;box-shadow:-12px 0 25px #0001}}
@media(max-width:760px){.frame.chat-focused, .frame.chat-focused.work-open{display:block}.app-rail{display:none}.chat-focused .left{display:none}.chat-focused.chat-list-open .left{display:flex;position:fixed;inset:0 auto 0 0;width:min(360px,88vw);z-index:35;box-shadow:10px 0 30px #0002}.chat-directory-head{padding:18px 14px;height:72px;gap:10px}.chat-directory-close{display:block;width:26px;height:28px;padding:0;background:transparent;border:0;color:#777;font-size:22px}.chat-focused .header>.mobile-chat-list{display:flex;align-items:center;justify-content:center;width:30px;height:34px;flex:none;padding:0;border:0;background:transparent;color:#666}.mobile-chat-list>.rail-icon{width:21px;height:21px}.chat-focused .header{padding-inline:12px;height:60px;min-height:60px;gap:7px}.chat-focused .header h1{font-size:16px}.chat-focused .head-actions{gap:2px}.chat-focused .head-actions>button{padding:5px 7px}.group-frame #group-switch{display:none!important}.group-frame .header>.group-symbol{display:none!important}.chat-search #chat-search{font-size:16px}}
@media(max-width:760px){.chat-focused.chat-list-open .app-rail{display:flex;position:fixed;inset:0 auto 0 0;width:var(--rail-width);z-index:36}.chat-focused.chat-list-open .left{left:var(--rail-width);width:min(360px,calc(100vw - var(--rail-width)))}}
@media(max-height:700px) and (min-width:761px){.app-rail{padding-top:14px;gap:6px}.rail-brand{margin-bottom:10px}.app-rail>.rail-button, .rail-bottom>.rail-button, .rail-more>summary{height:40px}.rail-bottom{gap:4px}}
@media(max-height:520px) and (min-width:761px){.app-rail{padding-block:10px 8px;gap:5px}.app-rail>.rail-brand{width:34px;height:34px;margin-bottom:8px;line-height:34px}.app-rail>.rail-button, .rail-bottom>.rail-button, .rail-more>summary{height:36px}.rail-employee-shortcuts{padding-top:6px;gap:5px}.rail-bottom{padding-top:6px}.chat-directory-head{height:64px;padding-block:14px}}
@media(max-height:440px) and (min-width:761px){.app-rail{padding-block:8px 6px;gap:3px}.app-rail>.rail-brand{width:32px;height:32px;margin-bottom:4px;line-height:32px}.app-rail>.rail-button, .rail-bottom>.rail-button, .rail-more>summary{width:36px;height:30px}.rail-bottom{gap:3px}.rail-employee-shortcuts{width:40px;padding-top:4px;gap:4px;min-height:0}.rail-employee-shortcut{width:36px;height:36px}.rail-employee-avatar{width:28px;height:28px}}
@media(max-height:360px) and (min-width:761px){.app-rail{padding-block:6px 4px;gap:2px}.app-rail>.rail-brand{width:28px;height:28px;margin-bottom:2px;line-height:28px}.app-rail>.rail-brand>img{width:24px;height:24px}.app-rail>.rail-button, .rail-bottom>.rail-button, .rail-more>summary{height:26px}.rail-bottom{gap:2px;padding-top:4px}}
/* The outer shell stays mounted; the group controller owns only its content pane. */
.frame.chat-focused>main.right{grid-column:3;grid-row:1}
.chat-pane{grid-column:3/-1;grid-row:1;display:block;width:100%;height:100%;min-width:0;border:0;background:var(--surface)}
.chat{scrollbar-gutter:stable}
.chat-focused .composer{min-height:0}
.embedded-chat .frame.chat-focused{display:block!important;height:100dvh}
.embedded-chat .left, .embedded-chat .app-rail{display:none!important}
.embedded-chat main.right{height:100dvh;width:100%;margin:0;border:0}
.embedded-chat .mobile-chat-list{display:none!important}
.embedded-chat.host-mobile .header>.mobile-chat-list{display:flex!important;font-size:24px}
@media(max-width:760px){.chat-pane{height:100dvh}.frame.chat-focused>main.right{height:100dvh}}

/* The task directory temporarily replaces the colleague list. */
.chat-focused .header-menu>div{max-height:calc(100dvh - 100px);overflow-y:auto;overscroll-behavior:contain}
.chat-focused .delivery-pin{margin:0;padding:7px var(--conversation-gutter);min-height:40px;flex-wrap:wrap;gap:6px;border-radius:0}
.chat-focused .pin-copy{flex:1;min-width:0;width:auto;flex-basis:auto}
.chat-focused .pin-actions{gap:5px;max-width:100%;flex-wrap:wrap}
.chat-focused .pin-actions :is(button,a){font-size:12px;min-height:28px;padding:4px 8px}
.chat-focused .pin-actions>.task-daily-link{display:none}
.chat-focused .composer-footer{max-width:none;gap:8px;flex-wrap:wrap;padding-top:4px;min-height:26px}
.chat-focused .composer-footer>.agent-controls{display:flex;align-items:center;gap:6px;min-height:24px;padding:0;border:0;flex:1;min-width:0;background:transparent}
.chat-focused .composer-footer>.agent-controls[hidden]{display:none}
.chat-focused .composer-footer .agent-controls .memory-button{display:none}
.chat-focused .composer-footer #executor-control{max-width:min(340px,45vw)}
.chat-focused .composer-footer #composer-note{flex:0 1 auto;font-size:10px}
.chat-focused .composer-footer #dispatch-button{order:2}
.chat-focused .work-panel>header{height:64px;min-height:64px}
.chat-focused .work-panel:not([hidden]){position:absolute;right:0;top:0;bottom:0;width:min(var(--work-sidebar-width),94vw);margin:0;border-radius:0;z-index:40;box-shadow:-12px 0 25px #0001}
@media(min-width:761px) and (max-width:1099px){
 .chat-focused .head-actions>[data-action="new-task"]{display:none}
 .chat-focused .header{padding-inline:18px}
 .chat-focused .head-actions{gap:2px}
}
@media(max-width:760px){
 .chat-focused .header-menu>div{max-height:calc(100dvh - 90px)}
 .chat-focused .pin-actions .task-window-link{font-size:0;width:30px;padding:0}
 .chat-focused .pin-actions .task-window-link::after{content:'↗';font-size:16px}
 .chat-focused .pin-actions :is(button,a){padding:4px 6px;min-height:30px}
 .chat-focused .composer-footer #composer-note{display:none}
 .chat-focused .composer-footer #executor-control{max-width:calc(100vw - 165px)}
 .chat-focused .composer-footer #executor-context{display:none}
}
@media(min-width:761px) and (max-height:520px){
 .chat-focused .header{height:52px;min-height:52px}
}

.task-origin-link{display:block;width:fit-content;max-width:100%;margin-top:8px;font-size:12px;line-height:20px;color:var(--accent);overflow-wrap:anywhere;text-decoration:none}

.task-collaboration{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.task-collaboration a{font-size:12px;line-height:20px;color:var(--accent);overflow-wrap:anywhere;text-decoration:none}

.chat-focused #work-toggle{display:inline-flex;align-items:center;gap:5px;flex:none;padding:4px 8px;border:0;background:transparent;color:var(--accent);font-size:12px;line-height:20px;white-space:nowrap}
.chat-focused #work-toggle::before{display:none}
.chat-focused #work-toggle:hover{background:var(--accent-soft)}
.chat-focused .work-panel>header b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.chat-focused #dispatch-button[hidden]{display:none}

.chat-add-menu[hidden]{display:none!important}

/* Keep the release-stage badge inside the existing navigation hit area. */
.app-rail .rail-beta-entry{position:relative}
.app-rail .rail-beta{position:absolute;top:1px;right:0;display:block;padding:0 1px;border:0;border-radius:0;background:transparent;color:var(--muted,#68736e);font:400 8px/10px system-ui,sans-serif;letter-spacing:0;pointer-events:none;white-space:nowrap}
.rail-more>div .rail-beta{display:none}
@media(forced-colors:active){.app-rail .rail-beta{background:Canvas;color:CanvasText;border-color:CanvasText}}
