.tg-chat{--chat-bg:#e9e5f2;--bubble-own:#e4d9fd;--bubble-other:#fff;--bubble-shadow:0 1px 1px rgba(40,20,90,.08);--service-bg:rgba(70,45,140,.12);--service-fg:#3d2f6b;--reply-bg:rgba(122,74,232,.08);--reply-bg-own:rgba(255,255,255,.55);--kbd-bg:rgba(255,255,255,.8);grid-template-columns:320px minmax(0,1fr)}
[data-theme=dark] .tg-chat{--chat-bg:#121214;--bubble-own:#3b3363;--bubble-other:#252527;--bubble-shadow:none;--service-bg:rgba(255,255,255,.08);--service-fg:#c9c9d0;--reply-bg:rgba(255,255,255,.06);--reply-bg-own:rgba(0,0,0,.2);--kbd-bg:rgba(255,255,255,.08)}
.tg-chat .codex-chat-pane{background:var(--chat-bg);position:relative}.tg-chat .codex-chat-list{padding:0;gap:0;position:relative}.tg-list-header{padding:12px 12px 0;flex-shrink:0;background:var(--background-primary)}.tg-search-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}.tg-search-row input{flex:1;width:100%;height:32px;min-width:0;border:0;border-radius:16px;background:var(--background-modifier-hover);font-size:12.5px;padding:0 11px}.tg-chat .codex-chat-list>h3{display:none}.tg-folders{display:flex;gap:2px;border-bottom:1px solid var(--background-modifier-border)}.tg-folders button{display:flex;align-items:center;gap:4px;padding:0 7px;height:34px;min-height:34px;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--text-muted);font-size:12px;background:transparent;font-weight:500;white-space:nowrap}.tg-folders button.is-active{border-bottom-color:var(--interactive-accent);color:var(--text-accent);font-weight:650}.tg-count{display:grid;place-items:center;min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:var(--interactive-accent);color:#fff;font-size:10.5px}.tg-chat .codex-chat-list>.tg-chat-row{padding:7px 8px;margin:0 6px;border-radius:9px;min-height:62px;flex-shrink:0;position:relative}.tg-chat .codex-chat-list>.tg-chat-row:first-of-type{margin-top:4px}.tg-chat-row>.design-avatar{width:48px!important;height:48px!important;border-radius:50%!important;font-size:15px;font-weight:650}.tg-chat-row .design-chat-summary{gap:2px}.tg-chat-row .design-chat-summary strong{font-size:13px;font-weight:650;display:flex;gap:5px;align-items:center;padding-right:34px}.tg-chat-row .design-chat-summary strong i{font-size:12px;color:var(--text-muted)}.tg-chat-time{position:absolute;right:8px;top:10px;font-size:11.5px;color:var(--text-faint)}.tg-chat .codex-conversation-header{height:56px;padding:0 16px;gap:11px;flex-wrap:nowrap}.tg-chat .design-chat-avatar{width:40px;height:40px;border-radius:50%;font-size:13px}.tg-chat .design-conversation-title strong{font-size:14.5px}.tg-chat .design-icon-button{width:34px;height:34px;min-height:34px;font-size:18px}.tg-pinned{display:flex;align-items:center;gap:10px;padding:7px 16px;border-bottom:1px solid var(--background-modifier-border);background:var(--background-primary);flex-shrink:0}.tg-pin-mark{width:3px;align-self:stretch;border-radius:2px;background:var(--interactive-accent)}.tg-pinned>div:nth-child(2){display:flex;flex-direction:column;min-width:0;flex:1}.tg-pinned strong{font-size:12px;font-weight:650;color:var(--text-accent)}.tg-pinned span{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-control-button{height:28px;min-height:28px;padding:0 11px;border-radius:14px;background:var(--interactive-accent);color:#fff;border:0;font-size:12px;font-weight:600}.tg-controls:not([open]){display:none}.tg-controls[open]{max-height:42%;padding:8px 16px}.tg-chat .codex-chat{gap:3px;padding:10px 24px;scroll-padding:14px}.tg-chat .codex-date-divider{background:var(--service-bg);color:var(--service-fg);font-size:12px;font-weight:600;padding:3px 10px;border-radius:11px;margin:6px auto}.tg-chat .design-bubble{gap:4px;padding:6px 10px 5px;border-radius:14px 14px 14px 4px;box-shadow:var(--bubble-shadow);max-width:560px;font-size:13.5px}.tg-chat .is-user>.design-bubble{padding:6px 7px 5px;border-radius:14px 14px 4px 14px;max-width:560px}.tg-chat .design-message-row{padding:1px 0!important;max-width:100%;gap:8px}.tg-chat .design-message-row>.codex-avatar{width:34px;height:34px;flex-basis:34px;font-size:10.5px}.tg-chat .codex-author{font-size:12.5px;line-height:1.2}.tg-chat .codex-author b{font-weight:650;color:#5b3fd6}.tg-chat .codex-author small{font-size:11.5px;color:var(--text-faint)}.tg-chat .design-message-row[data-participant='1'] .codex-author b{color:#1f63b0}.tg-chat .design-message-row[data-participant='2'] .codex-author b{color:#a85a12}.tg-chat .design-message-row[data-participant='3'] .codex-author b{color:#0b7a70}.tg-chat .design-message-row[data-participant='4'] .codex-author b{color:#a32c63}.tg-chat .design-message-row[data-participant='5'] .codex-author b{color:#23773a}[data-theme=dark] .tg-chat .codex-author b{color:#b3a6ff}[data-theme=dark] .tg-chat .design-message-row[data-participant='1'] .codex-author b{color:#6fb0f5}[data-theme=dark] .tg-chat .design-message-row[data-participant='2'] .codex-author b{color:#f0a35e}[data-theme=dark] .tg-chat .design-message-row[data-participant='3'] .codex-author b{color:#4fd1c0}[data-theme=dark] .tg-chat .design-message-row[data-participant='4'] .codex-author b{color:#f07fb3}[data-theme=dark] .tg-chat .design-message-row[data-participant='5'] .codex-author b{color:#6fd68a}.tg-grouped>.codex-avatar{visibility:hidden}.tg-grouped .codex-message-head{display:none}.tg-grouped>.design-bubble{border-radius:14px!important}.tg-service{display:flex;justify-content:center;padding:3px 0;align-self:stretch}.tg-service>button{display:flex;align-items:center;gap:6px;max-width:86%;font-size:12px;line-height:1.35;min-height:24px;padding:4px 11px;border:0;border-radius:12px;background:var(--service-bg);color:var(--service-fg);text-align:center}.tg-service i{font-size:12px;flex:none}.tg-service span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-reply{display:flex;flex-direction:column;padding:3px 8px;border-radius:5px;background:var(--reply-bg);box-shadow:inset 3px 0 0 var(--interactive-accent);font-size:12px;line-height:1.35;margin-bottom:4px}.is-user .tg-reply{background:var(--reply-bg-own)}.tg-reply strong{font-size:12px;margin:0;color:var(--text-accent)}.tg-reply span{color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:470px}.tg-plan-card,.tg-result-card{max-width:560px;min-width:260px;display:flex;flex-direction:column;gap:7px;padding:10px 12px;border-radius:14px;background:var(--bubble-other);box-shadow:var(--bubble-shadow);align-self:flex-start;margin:4px 0}.tg-plan-card small{font-size:12px;font-weight:650;color:var(--text-accent)}.tg-plan-card>strong,.tg-result-card>strong{font-size:14px}.tg-plan-card ol{padding-left:20px;font-size:12.5px;line-height:1.35;margin:4px 0}.tg-plan-card li+li{margin-top:6px}.tg-result-card p{font-size:12px;line-height:1.4;margin:0;color:var(--text-muted)}.tg-inline-buttons{display:flex;gap:3px;flex-wrap:wrap}.tg-inline-buttons button{min-height:34px;flex:1;background:var(--kbd-bg);color:var(--text-accent);border:0;border-radius:8px;font-size:12.5px;font-weight:600}.tg-chat .tg-question-card{border:0;border-radius:14px;background:var(--bubble-other);box-shadow:var(--bubble-shadow);max-width:560px}.tg-chat .tg-question-card button{background:var(--kbd-bg);border:0;min-height:34px;border-radius:8px;color:var(--text-accent);font-size:12.5px;font-weight:600}.tg-chat .codex-composer{padding:10px 16px 12px;position:relative}.tg-chat .design-compose-row{gap:8px;align-items:flex-end}.tg-attach{width:40px;height:40px;flex:none;display:grid;place-items:center;color:var(--text-muted);font-size:20px;background:transparent;border:0;padding:0}.tg-chat .design-compose-row textarea{border:0;box-shadow:none;background:transparent;border-radius:0;padding:9px 4px;font-size:14px;min-height:40px;line-height:1.45}.tg-chat .design-compose-row .design-send{width:40px;height:40px;min-height:40px;min-width:40px}.tg-recipient-explanation{display:none}.tg-chat .design-recipient-chips:has(button:only-child){display:none}.tg-chat .codex-reply-context{background:var(--reply-bg);border-radius:6px;padding:4px 8px}.tg-chat .codex-reply-context p{font-size:12px;margin:2px 0}.tg-suggestions{position:absolute;left:64px;bottom:68px;display:flex;flex-direction:column;width:300px;max-width:calc(100% - 80px);padding:5px;border-radius:12px;background:var(--background-primary);box-shadow:0 10px 30px rgba(40,20,90,.2);z-index:4;max-height:240px;overflow:auto}.tg-suggestions>button{display:flex;align-items:center;gap:10px;padding:6px 9px;border:0;background:transparent;min-height:44px;text-align:left}.tg-suggestions>button>div{display:flex;flex-direction:column;gap:2px;min-width:0}.tg-suggestions small{font-size:11.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-avatar{width:30px;height:30px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:10.5px;font-weight:600;background:var(--interactive-accent);color:#fff}.tg-dialog{width:min(560px,calc(100vw - 24px));max-height:90dvh;padding:16px;border-radius:12px;overflow:auto}.tg-dialog>header{display:flex;align-items:center;gap:10px;padding-bottom:12px}.tg-dialog>header strong{flex:1;font-size:15px}.tg-dialog>header button{margin:0}.tg-dialog pre{max-height:65dvh;overflow:auto;font-size:12px}.tg-dialog input,.tg-dialog select{width:100%;min-height:36px;margin:8px 0}.tg-dialog a{display:block;font-size:12px;overflow-wrap:anywhere;margin:8px 0}.tg-info-identity{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 0 16px}.tg-info-identity .tg-avatar{width:72px;height:72px;font-size:24px}.tg-info-identity>strong{font-size:17px;font-weight:700;text-align:center}.tg-info-identity small{font-size:12px;color:var(--text-muted)}.tg-info-actions{display:flex;gap:8px;margin:0 0 18px}.tg-info-actions button{flex:1;height:34px;font-size:12px}.tg-info-tabs{display:flex;gap:2px;border-bottom:1px solid var(--background-modifier-border);margin-bottom:12px}.tg-info-tabs button{flex:1;padding:0 4px;height:34px;border:0;border-radius:0;border-bottom:2px solid transparent;background:transparent;font-size:11.5px;color:var(--text-muted)}.tg-info-tabs button.is-active{border-bottom-color:var(--interactive-accent);color:var(--text-accent);font-weight:650}.tg-member{display:flex;gap:10px;align-items:center;padding:7px 0}.tg-member>div{display:flex;flex-direction:column;gap:2px;min-width:0}.tg-member strong{font-size:13px}.tg-member small{font-size:12px;color:var(--text-muted)}.tg-info-body p{font-size:12.5px;color:var(--text-muted)}.tg-info-body a{display:block;overflow-wrap:anywhere;font-size:12px;margin:8px 0}.tg-file-row{display:flex;gap:10px;width:100%;padding:8px 0;border:0;border-radius:0;background:transparent;text-align:left;min-height:56px}.tg-file-row>i{width:40px;height:40px;display:grid;place-items:center;flex:none;border-radius:50%;background:var(--interactive-accent);color:#fff;font-size:18px}.tg-file-row>div{display:flex;flex-direction:column;gap:3px;min-width:0}.tg-file-row strong{font-size:13px;overflow-wrap:anywhere}.tg-file-row small{font-size:11.5px;color:var(--text-muted)}.tg-image-view img{display:block;width:100%;max-height:65dvh;object-fit:contain;background:var(--background-secondary)}.tg-attachment-options{display:flex;flex-direction:column;gap:8px}.tg-attachment-options button{width:100%;text-align:left;height:44px;margin:0;padding:0 12px}.tg-chat .tg-highlight{outline:2px solid var(--interactive-accent);outline-offset:4px;border-radius:12px}.tg-chat .tg-dragging:after{content:'Отправить в проект';position:absolute;inset:56px 10px 10px;display:grid;place-items:center;border:2px dashed var(--interactive-accent);border-radius:16px;background:var(--background-primary);color:var(--text-accent);font-size:17px;font-weight:700;pointer-events:none;z-index:6}.tg-chat:has(.design-info-pane){grid-template-columns:320px minmax(0,1fr) 300px}.tg-chat:has(.design-info-pane)>.codex-chat-list{display:flex}
@media(min-width:768px) and (max-width:1250px){.tg-chat:has(.design-info-pane){grid-template-columns:320px minmax(0,1fr)}.tg-chat>.design-info-pane{position:absolute;right:0;top:0;bottom:0;width:300px;z-index:5;box-shadow:-4px 0 20px #0002}.tg-chat{position:relative}}
@media(max-width:767px){.tg-chat{display:flex}.tg-chat .codex-chat-list{width:100%}.tg-chat .codex-chat-list h3{display:block;text-align:center;font-size:17px;padding:12px 14px;margin:0;order:-1}.tg-list-header{padding:0 10px}.tg-folders button{font-size:12.5px;padding:0 10px;flex:1;justify-content:center}.tg-chat-row .design-avatar{width:52px!important;height:52px!important;font-size:16px}.tg-chat .codex-conversation-header{height:54px;padding:0 10px;gap:8px}.tg-chat .codex-chat-back{font-size:0;width:26px;min-height:40px;padding:0;flex:none}.tg-chat .codex-chat-back:after{content:'‹';font-size:32px;line-height:1}.tg-chat .design-chat-avatar{width:36px;height:36px;font-size:12px}.tg-chat .design-conversation-title strong{font-size:14px}.tg-chat .design-conversation-title small{font-size:11.5px}.tg-chat .design-icon-button{width:28px;height:32px;min-height:32px;font-size:17px}.tg-chat .design-icon-button[aria-label='Сохранить обсуждение в заметку'],.tg-chat .design-icon-button[aria-label='Лента команды']{display:none}.tg-pinned{padding:6px 12px;gap:8px}.tg-pinned strong{font-size:11.5px}.tg-pinned span{font-size:12px}.tg-control-button{font-size:11px;padding:0 9px}.tg-chat .codex-chat{padding:8px 10px;gap:3px}.tg-chat .design-message-row>.codex-avatar{width:30px;height:30px;flex-basis:30px;font-size:10.5px}.tg-chat .design-bubble{font-size:13.5px;max-width:calc(100vw - 64px)}.tg-chat .is-user>.design-bubble{max-width:82vw}.tg-chat .codex-message-text{font-size:13.5px}.tg-reply span{max-width:240px}.tg-chat .codex-composer{padding:8px 10px 10px}.tg-chat .design-compose-row textarea{font-size:14px;min-height:40px}.tg-chat .design-compose-row .design-send{width:36px;height:36px;min-height:36px;min-width:36px}.tg-attach{width:30px;height:36px;min-height:36px;font-size:22px}.tg-plan-card,.tg-result-card{min-width:0;max-width:calc(100vw - 56px)}.tg-plan-card{margin:5px 0}.tg-inline-buttons button{font-size:12px;padding:0 8px;min-height:34px}.tg-info{width:calc(100vw - 16px);max-width:390px;max-height:92dvh}.tg-info-identity{padding:16px 0}.tg-info-actions{margin-bottom:12px}.tg-dialog input,.tg-dialog select{font-size:16px}.tg-suggestions{left:12px;bottom:64px;max-width:calc(100% - 24px);width:300px}}
.tg-upload-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.tg-upload-item{min-width:0;display:flex;flex-direction:column;gap:4px}.tg-upload-image{height:110px;display:grid;place-items:center;border-radius:10px;overflow:hidden;background:var(--background-secondary)}.tg-upload-image>i{font-size:28px;color:var(--text-faint)}.tg-upload-image img{width:100%;height:110px;object-fit:cover}.tg-upload-item input{min-width:0;width:100%;margin:0;font-size:11.5px;padding:5px}.tg-upload-item small{font-size:11px;color:var(--text-muted)}.tg-upload-preview textarea{width:100%;min-height:60px;font-size:13px}.tg-upload-preview progress{width:100%;height:8px;accent-color:var(--interactive-accent)}.tg-upload-preview .design-primary{width:100%;min-height:40px;border-radius:20px;font-size:13px;margin:0}.tg-upload-status{font-size:12px;color:var(--text-muted);line-height:1.45}.tg-document{display:flex;gap:10px;align-items:center;padding:2px 0;background:transparent;border:0;min-width:220px;text-align:left;margin:4px 0}.tg-document>i{width:40px;height:40px;border-radius:50%;background:var(--interactive-accent);color:#fff;display:grid;place-items:center;font-size:18px;flex:none}.tg-document>div{display:flex;flex-direction:column;gap:1px;min-width:0}.tg-document strong{font-size:13px;font-weight:600;margin:0;overflow-wrap:anywhere}.tg-document small{font-size:11.5px;color:var(--text-muted)}.tg-document:disabled{opacity:1}.tg-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.tg-media-tile{position:relative;aspect-ratio:1;overflow:hidden;min-height:0;padding:0;border-radius:4px;background:var(--background-secondary);display:grid;place-items:center}.tg-media-tile>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}.tg-media-tile>i{width:30px;height:30px;font-size:14px}.tg-media-tile>div{position:absolute;bottom:0;left:0;right:0;padding:3px;background:var(--background-primary)}.tg-media-tile strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-media-tile small{display:none}
@media(max-width:767px){.tg-upload-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.tg-upload-preview textarea{font-size:16px}.tg-upload-item input{font-size:13px;min-height:32px}.tg-document{min-width:0;max-width:100%;font-size:13px}.tg-document>i{width:36px;height:36px;font-size:17px}.tg-document strong{font-size:12.5px}}
@media(max-width:359px){.tg-folders button{padding:0 6px;font-size:12px}.tg-chat .design-icon-button[aria-label='Поиск в переписке']{display:none}}
.tg-chat .codex-chat:before{content:'';flex:1;min-height:0}.tg-chat .codex-chat>*{flex-shrink:0}
.tg-chat .tg-folders button.is-active{background:transparent}.tg-chat .is-user>.design-bubble>time i{color:var(--text-muted)}.tg-chat .design-bubble>.tg-plan-card{background:transparent;box-shadow:none;padding:2px 0;margin:0;min-width:0;max-width:100%}.tg-plan-comment summary{font-size:11.5px;padding:3px 0}.tg-plan-card>strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.tg-message-attachments{display:flex;flex-direction:column;gap:3px;min-width:0}.tg-message-attachments.has-many:has(.tg-photo-document){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;max-width:320px}.tg-photo-document{position:relative;display:block;width:100%;max-width:320px;min-width:0;padding:0;border-radius:10px;overflow:hidden}.tg-photo-document>img{display:block;width:100%;height:170px;object-fit:cover}.tg-photo-document>i{display:none}.tg-photo-document>div{padding:3px 6px;min-width:0;background:var(--reply-bg)}.tg-photo-document strong{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tg-photo-document small{display:none}
@media(max-width:767px){.tg-message-attachments.has-many:has(.tg-photo-document){max-width:250px}.tg-photo-document>img{height:140px}}
.tg-chat .tg-jump{position:absolute;right:18px;width:42px;height:42px;min-height:42px;border-radius:50%;padding:0;border:0;background:var(--background-primary);color:var(--text-accent);box-shadow:0 2px 8px #0002;z-index:3;margin:0;font-size:11px;font-weight:700}.tg-jump:after{content:'⌄';font-size:24px;line-height:1;display:block;color:var(--text-muted)}

.tg-chat-pin{position:absolute;right:13px;bottom:13px;color:var(--text-faint);font-size:12px}.tg-pinned-chat .design-chat-summary{padding-right:14px}

.tg-chat-row .design-chat-summary>strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:36px;box-sizing:border-box}
/* Keep project actions inside the fixed-width information pane. */
.tg-info-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tg-info-actions button{min-width:0;width:100%;height:auto;min-height:38px;margin:0;padding:8px;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
.tg-info-identity>strong,.tg-member strong{max-width:100%;overflow-wrap:anywhere}
