/* 搜索面板与现有灰白通讯窗口一致，绿色只标记匹配文字。 */
body[data-surface="chat"] .chat-window{position:relative}
.chat-search-layer{position:absolute;inset:30px 0 0;z-index:16;pointer-events:none;color:#222;font:14px/1.5 "Microsoft YaHei UI","Microsoft YaHei",sans-serif}
.chat-search-layer:empty{display:none}
.chat-search-popover,.chat-history-window{pointer-events:auto;background:#fafafa;border:1px solid #dcdcdc;border-radius:7px;box-shadow:0 5px 20px #0000001b;overflow:hidden}
.chat-search-popover{position:absolute;left:73px;top:51px;width:402px;max-width:calc(100% - 89px);max-height:calc(100% - 66px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.chat-search-popover::-webkit-scrollbar{width:5px}
.chat-search-popover::-webkit-scrollbar-button{display:none}
.chat-search-popover::-webkit-scrollbar-thumb{border-radius:4px;background:#c9c9c9}
.chat-search-layer mark{padding:0;background:transparent;color:#07ae58;font-weight:inherit}
.chat-search-popover h3{margin:0 14px;padding:10px 0 7px;border-bottom:1px solid #e6e6e6;color:#999;font-size:12px;font-weight:400}
.chat-search-contact,.chat-search-conversation{position:relative;display:flex;width:100%;gap:12px;align-items:flex-start;padding:15px;text-align:left;border:0;border-radius:0;background:transparent;color:#222;font:inherit}
.chat-search-contact:hover,.chat-search-conversation:hover,.chat-history-record:hover{background:#ebebeb}
.chat-search-layer button:focus-visible{outline:2px solid #07ae58;outline-offset:-3px}
.chat-search-layer .avatar{flex-shrink:0;width:40px;height:40px;border-radius:4px}
.chat-search-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.chat-search-copy strong{display:block;padding-right:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;font-size:14px;line-height:1.6}
.chat-search-copy small,.chat-search-snippet{display:block;color:#999;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-search-conversation time{position:absolute;top:17px;right:14px;color:#999;font-size:11px;font-variant-numeric:tabular-nums}
.chat-search-empty{margin:0;padding:17px 15px 20px;color:#999;font-size:12px}
.chat-search-clear{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;padding:0;border:0;border-radius:50%;color:white;background:#b7b7b7;font:14px/1 Arial,sans-serif}
.chat-search-clear[hidden]{display:none}
body[data-surface="chat"] .contacts-search label{gap:6px}
body[data-surface="chat"] .contacts-search input{min-width:0;flex:1;width:0}
body[data-surface="chat"] .contacts-search label:focus-within{border-color:#07b75a}
.contacts-search input::-webkit-search-cancel-button,.chat-history-search input::-webkit-search-cancel-button{display:none}
.chat-history-window{position:absolute;left:50%;top:20px;transform:translateX(-50%);width:560px;max-width:calc(100% - 36px);height:calc(100% - 42px);max-height:630px;display:flex;flex-direction:column;background:#fff}
.chat-history-window>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 13px 13px 18px;background:#f3f3f3;border-bottom:1px solid #e7e7e7}
.chat-history-window>header strong{font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-history-window>header button{display:flex;align-items:center;justify-content:center;width:27px;height:27px;flex-shrink:0;border:0;border-radius:4px;background:transparent;color:#666}
.chat-history-window>header button:hover{background:#e7e7e7}
.chat-history-window .icon{width:17px;height:17px}
.chat-history-search{display:flex;align-items:center;gap:8px;flex-shrink:0;margin:16px 18px 0;padding:7px 10px;border:1px solid #e0e0e0;border-radius:4px;color:#999;background:#f5f5f5}
.chat-history-search:focus-within{background:#fff;border-color:#07ae58}
.chat-history-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;font:13px/1.5 "Microsoft YaHei UI",sans-serif;color:#222}
.chat-history-summary{margin:10px 18px;color:#999;font-size:12px}
.chat-history-results{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.chat-history-record{display:flex;gap:12px;width:100%;padding:16px 18px;text-align:left;border:0;border-bottom:1px solid #eeeeee;background:#fff;color:#222;font:inherit}
.chat-history-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:7px}
.chat-history-meta{display:flex;gap:12px;align-items:baseline;justify-content:space-between}
.chat-history-meta strong{font-size:13px;font-weight:400;color:#666}
.chat-history-meta time{flex-shrink:0;font-size:11px;color:#999}
.chat-history-text{font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-history-copy>small{align-self:flex-end;color:#999;font-size:11px}
.chat-search-target .message-bubble,.chat-search-target .chat-file-card,.chat-search-target .chat-link-card,.chat-search-target .chat-saved-link{outline:2px solid #d2b861;outline-offset:3px}
.comm-secondary-window .radio-composer button[data-chat-search="history-current"]{display:flex;align-items:center;gap:6px;margin-right:auto;padding:0;border:0;background:transparent;color:#666;font-size:12px}
.radio-composer [data-chat-search="history-current"] .icon{width:17px;height:17px}
@media(max-width:850px){.chat-search-popover{left:65px;max-width:calc(100% - 79px)}}
@media(max-width:650px){.chat-search-layer{inset:28px 0 0}.chat-search-popover{left:12px;top:48px;width:calc(100% - 24px);max-width:none;max-height:calc(100% - 60px)}.chat-history-window{top:8px;max-width:calc(100% - 16px);height:calc(100% - 16px);max-height:none}.chat-history-meta{flex-wrap:wrap;gap:3px}.chat-history-record{padding:14px 12px}}
