/* 聊天窗口 (chat_windows.js): a floating 工作讨论 window, its tabs, the bottom dock and the small windows. */

/* The floating window: placed by inline left/top/width/height; the corner resizes it. */
body .team-chat-drawer.chat-float { box-sizing: border-box; right: auto; bottom: auto; resize: both; overflow: hidden; min-width: 320px; min-height: 360px;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 78px); border-radius: 14px; box-shadow: 0 18px 48px rgba(15, 30, 60, .28); z-index: 60; }
body .team-chat-drawer.chat-float .team-chat-drawer-head { cursor: move; user-select: none; }
body .team-chat-drawer.chat-float .team-chat-drawer-head p { display: none; }
.team-chat-drawer .chat-window-actions { display: flex; gap: 4px; flex: none; }

/* Phones: the chat is the whole screen; — goes back. */
body .team-chat-drawer.chat-phone { position: fixed; inset: 0; width: 100vw; height: 100dvh; border-radius: 0; z-index: 200; }
body .team-chat-drawer.chat-phone #studio-chat-focus { display: none; }

/* The conversations opened recently, as tabs. */
.chat-tabs { display: flex; gap: 4px; padding: 6px 8px; overflow-x: auto; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: thin; }
.chat-tabs[hidden] { display: none; }
.chat-tab { display: inline-flex; align-items: center; flex: none; max-width: 170px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface0, transparent); }
.chat-tab.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); }
html[data-theme] .chat-tab > button { border: 0; background: transparent; box-shadow: none; padding: 3px 6px; font-size: 12px; color: var(--txt); cursor: pointer; }
html[data-theme] .chat-tab > button[data-chat-tab] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; padding-left: 10px; }
.chat-tab.on > button[data-chat-tab] { font-weight: 700; color: var(--acc2); }
html[data-theme] .chat-tab .chat-tab-pop, html[data-theme] .chat-tab .chat-tab-close { color: var(--dim); padding: 3px 5px; }
.chat-tab-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--wh-violet, var(--acc)); vertical-align: middle; }

/* The dock along the bottom: the minimised window and up to three small windows. */
.chat-dock { position: fixed; right: 16px; bottom: 0; z-index: 59; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.chat-dock[hidden] { display: none; }
.chat-dock > * { pointer-events: auto; }
html[data-theme] .chat-dock-main { padding: 8px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--panel); color: var(--txt);
  font-weight: 700; box-shadow: 0 -6px 20px rgba(15, 30, 60, .16); cursor: pointer; }
.chat-pop { display: flex; flex-direction: column; width: 290px; height: 380px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--panel); box-shadow: 0 -8px 26px rgba(15, 30, 60, .2); overflow: hidden; }
.chat-pop > header { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.chat-pop > header b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
html[data-theme] .chat-pop > header button { border: 0; background: transparent; box-shadow: none; padding: 2px 6px; color: var(--dim); cursor: pointer; }
.chat-pop-feed { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px; display: grid; gap: 6px; align-content: start; font-size: 13px; }
.chat-pop-feed p { margin: 0; padding: 6px 8px; border-radius: 10px; background: color-mix(in srgb, var(--line) 35%, transparent); overflow-wrap: anywhere; }
.chat-pop-feed p.mine { background: color-mix(in srgb, var(--acc) 14%, transparent); justify-self: end; }
.chat-pop-feed p b { display: block; font-size: 12px; color: var(--dim); }
.chat-pop-empty { color: var(--dim); background: transparent !important; }
.chat-pop form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.chat-pop form input { flex: 1; min-width: 0; }
@media (max-width: 759px) { .chat-dock { right: 8px; } }
/* Phones: ‹ goes back (the — is the desktop's minimise). */
.team-chat-drawer .chat-back { display: none; }
body .team-chat-drawer.chat-phone .chat-back { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; width: 34px; height: 34px; flex: none; }
body .team-chat-drawer.chat-phone .chat-window-actions [data-chat-minimize] { display: none; }
/* Faces (chatChannelFace): an initial in a coloured circle with the status dot, an AI colleague's figure, or the kind. */
.chat-face { position: relative; display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--acc); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; overflow: visible; }
.chat-face.alt { background: var(--wh-violet, var(--acc2)); }
.chat-face.is-ai, .chat-face.is-kind { background: transparent; color: inherit; font-weight: 400; }
.chat-face.is-ai .chat-ai-face, .chat-face.is-ai img, .chat-face.is-ai svg { width: 24px; height: 24px; }
.chat-face .wh-presence-dot, .chat-face .chat-presence { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; margin: 0; border: 2px solid var(--panel); }
html[data-theme] .chat-tab > button[data-chat-tab] { display: inline-flex; align-items: center; gap: 6px; padding-left: 4px; max-width: 150px; }
.chat-tab > button[data-chat-tab] > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-tab .chat-face { width: 22px; height: 22px; font-size: 11px; }
/* The bar that stays at the bottom right while the window is closed. */
.chat-dock-bar { display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 4px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--panel); box-shadow: 0 -6px 20px rgba(15, 30, 60, .16); }
html[data-theme] .chat-dock-bar .chat-dock-main { border: 0; box-shadow: none; border-radius: 8px; padding: 6px 10px; }
html[data-theme] .chat-dock-face { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; cursor: pointer; }
html[data-theme] .chat-dock-face:hover { background: var(--surface1, color-mix(in srgb, var(--acc) 12%, transparent)); }
.chat-dock-face .chat-face { width: 28px; height: 28px; font-size: 13px; }
.chat-dock-face > .chat-tab-dot { position: absolute; top: 2px; right: 2px; margin: 0; }/* AI chat 历史 (ai_chat.js historyView): a small button in the header, then one card per piece of work handed over. */
html[data-theme] .aic-panel .aic-history-btn { margin-left: auto; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; box-shadow: none; font-size: 12px; color: var(--dim); cursor: pointer; }
html[data-theme] .aic-panel .aic-history-btn.on { color: var(--acc2); border-color: var(--acc); }
.aic-panel .aic-log.aic-jobs { display: grid; gap: 6px; align-content: start; }
.aic-panel .aic-job-card { list-style: none; }
html[data-theme] .aic-panel .aic-job-card > button { display: grid; gap: 2px; width: 100%; padding: 9px 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: none; cursor: pointer; }
html[data-theme] .aic-panel .aic-job-card > button:hover { border-color: var(--acc); }
.aic-panel .aic-job-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aic-panel .aic-job-card small { font-size: 12px; color: var(--dim); }
.aic-panel .aic-job-empty { list-style: none; color: var(--dim); padding: 12px; }/* 侧边同事栏 (Dylan 2026-10-27 「放在上面的横板不如放在侧面的竖版，可以看同事状态」): the floating window keeps the list of
   conversations and colleagues down its left side — face, name, status — instead of tabs along the top; in a narrow
   window the list keeps only the faces. */
body .team-chat-drawer.chat-float { container-type: inline-size; container-name: chatwin; }
body .team-chat-drawer.chat-float #chat-tabs { display: none; }
body .team-chat-drawer.chat-float .chat-window-actions button[onclick^="studioBrowseChats"] { display: none; }
body .team-chat-drawer.chat-float .ops-chat-layout { flex-direction: row; }
body .team-chat-drawer.chat-float .ops-channel-list { display: block; flex: 0 0 196px; max-height: none; overflow: auto; padding: 8px 6px; border-bottom: 0; border-right: 1px solid var(--line); background: var(--surface1, transparent); }
body .team-chat-drawer.chat-float .ops-conversation { flex: 1; min-width: 0; }
html[data-theme] #team-chat-drawer .ops-channel { display: flex !important; gap: 9px; justify-content: flex-start !important; text-align: left !important; width: 100%; }
.team-chat-drawer .ops-channel .chat-face { width: 30px; height: 30px; font-size: 13px; }
.team-chat-drawer .ops-channel .chat-face.is-ai .chat-ai-face, .team-chat-drawer .ops-channel .chat-face.is-ai img { width: 30px; height: 30px; }
#team-chat-drawer .ops-channel > span b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(13px, calc(var(--chat-fs, 15px) - 2px), 15px); }
#team-chat-drawer .ops-channel > span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dim); }
@container chatwin (max-width: 560px) {
  .team-chat-drawer .ops-channel-list { flex-basis: 58px !important; padding: 8px 4px !important; }
  .team-chat-drawer .ops-channel-list :is(#studio-chat-search, .ops-new-group, .ops-channel-section, .ops-inbox-channel, .ops-channel > span) { display: none !important; }
  .team-chat-drawer .ops-channel { justify-content: center; padding: 6px 0 !important; }
}
/* 聊天时间: a line for each new day; the time on each message. */
/* 历史消息: older than five days, folded above the recent ones */
.world-messages .chat-history { margin: 4px 0 8px; }
.world-messages .chat-history > summary { list-style: none; cursor: pointer; display: flex; justify-content: center; color: var(--dim); font-size: 12px; padding: 4px 0; }
.world-messages .chat-history > summary::-webkit-details-marker { display: none; }
.world-messages .chat-history > summary span { padding: 3px 12px; border-radius: 999px; border: 1px dashed var(--line); }
.world-messages .chat-history > summary:hover span { color: var(--text, inherit); border-style: solid; }
.world-messages .chat-history[open] > summary span::after { content: ' · 收起'; }
.world-messages .chat-history[open] { padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.world-messages .chat-day { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; color: var(--dim); font-size: 12px; }
.world-messages .chat-day::before, .world-messages .chat-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
/* 聊天附件: a file on a message. */
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
html[data-theme] .chat-file { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: none; cursor: pointer; font-size: 13px; }
.chat-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chat-file small { color: var(--dim); flex: none; }/* 聊天窗口 like a messenger (Dylan 2026-10-27 「聊天窗口再更新下」): the other side's messages on the left, mine on the right
   in blue; the name and time small above; Enter sends; 📎 beside 发送; the person's face and status at the top. */
html[data-theme] #team-chat-drawer .world-messages { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
html[data-theme] #team-chat-drawer .world-message { position: relative; align-self: flex-start; max-width: 78%; margin: 0; padding: 8px 12px 9px;
  border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; background: var(--panel); box-shadow: none; }
html[data-theme] #team-chat-drawer .world-message.mine { align-self: flex-end; border-color: transparent; border-radius: 14px 4px 14px 14px;
  background: color-mix(in srgb, var(--acc) 14%, var(--panel)); }
html[data-theme] #team-chat-drawer .world-message.from-ai { background: color-mix(in srgb, var(--wh-violet, var(--acc2)) 9%, var(--panel)); }
html[data-theme] #team-chat-drawer .world-message > b { font-size: 12px; color: var(--dim); font-weight: 600; margin-right: 6px; }
html[data-theme] #team-chat-drawer .world-message.mine > b { display: none; }
html[data-theme] #team-chat-drawer .world-message > time { float: none; font-size: 11px; color: var(--dim); }
html[data-theme] #team-chat-drawer .world-message.mine > time { display: block; text-align: right; }
html[data-theme] #team-chat-drawer .world-message > p { margin: 3px 0 0; font-size: var(--chat-fs, 15px); line-height: 1.55; color: var(--txt); }
html[data-theme] #team-chat-drawer .world-message .world-message-menu { position: absolute; top: 2px; right: 4px; opacity: 0; }
html[data-theme] #team-chat-drawer .world-message:hover .world-message-menu, html[data-theme] #team-chat-drawer .world-message .world-message-menu[open] { opacity: 1; }
html[data-theme] #team-chat-drawer .world-message .chat-local-tag { display: block; margin-top: 4px; font-size: 11px; color: var(--dim); }
html[data-theme] #team-chat-drawer .world-message-tag { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--surface1, var(--line)); color: var(--acc2); }
/* The person at the top: face, name, status. */
.team-chat-drawer .ops-conversation-head { justify-content: flex-start; padding: 10px 14px; }
.team-chat-drawer .ops-conversation-head > div { flex: 1; min-width: 0; }
.team-chat-drawer .ops-conversation-head .ops-chat-face:empty { display: none; }
.team-chat-drawer .ops-conversation-head .ops-chat-face .chat-face { width: 36px; height: 36px; font-size: 15px; }
.team-chat-drawer .ops-conversation-head h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-chat-drawer .ops-conversation-head small { font-size: 12px; }
/* Writing: the box, then 📎 · kind · hint · 发送 on one line. */
html[data-theme] #team-chat-drawer .world-compose { display: block; padding: 8px 10px 6px; border-top: 1px solid var(--line); }
html[data-theme] #team-chat-drawer .world-compose textarea { width: 100%; min-height: 44px; max-height: 140px; resize: vertical; border: 0; background: transparent; font-size: var(--chat-fs, 15px); padding: 4px 2px; box-shadow: none; }
html[data-theme] #team-chat-drawer .chat-compose-actions { gap: 8px; }
html[data-theme] #team-chat-drawer .chat-compose-actions small { margin-left: auto; font-size: 11px; color: var(--dim); }
html[data-theme] #team-chat-drawer .chat-attach { padding: 3px 8px; border: 0; background: transparent; box-shadow: none; font-size: 17px; cursor: pointer; }
html[data-theme] #team-chat-drawer .chat-compose-actions select { width: auto; border: 0; background: transparent; color: var(--dim); }
html[data-theme] #team-chat-drawer .world-quick-requests { margin: 0; padding: 2px 10px 8px; gap: 12px; }
html[data-theme] #team-chat-drawer .world-quick-requests button { flex: none; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--dim); font-size: 12px; }
html[data-theme] #team-chat-drawer .world-quick-requests button:hover { color: var(--acc2); }/* 虚拟人物形象 (chatChannelFace): square boxes, never stretched; the pixel figure on a soft disc; a group as two or three
   figures overlapping; work as a line icon on a tinted square. */
.chat-face { box-sizing: border-box; width: var(--chat-face, 30px) !important; height: var(--chat-face, 30px) !important; flex: 0 0 var(--chat-face, 30px) !important;
  aspect-ratio: 1; border-radius: 50%; overflow: visible; }
.chat-face.is-pixel { display: inline-grid; place-items: center; background: var(--surface1, color-mix(in srgb, var(--acc) 10%, transparent)); }
.chat-face.is-pixel > :not(.wh-presence-dot):not(.chat-presence) { max-width: 100%; max-height: 100%; overflow: hidden; border-radius: 50%; image-rendering: pixelated; }
.chat-face.is-ai { background: transparent; }
.chat-face.is-ai .ai-face { width: 100% !important; height: 100% !important; }
.chat-face.is-group { position: relative; display: inline-block; background: transparent; }
.chat-face.is-group > i { position: absolute; display: grid; place-items: center; width: 70%; height: 70%; border-radius: 50%; overflow: hidden;
  background: var(--surface1, color-mix(in srgb, var(--acc) 10%, transparent)); box-shadow: 0 0 0 2px var(--panel); }
.chat-face.is-group > i:first-child { left: 0; top: 0; }
.chat-face.is-group > i:nth-child(2) { right: 0; bottom: 0; }
.chat-face.is-group > i > * { width: 100%; height: 100%; }
.chat-face.is-kind { display: inline-grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--acc) 12%, var(--panel)); color: var(--acc2); }
/* The list: room on the left, section names readable. */
body .team-chat-drawer.chat-float .ops-channel-list { padding: 10px 8px !important; }
.team-chat-drawer .ops-channel-section { margin: 12px 6px 4px !important; font-size: 12px !important; font-weight: 600; }
html[data-theme] #team-chat-drawer .ops-channel { padding: 7px 8px !important; border-radius: 10px; }
/* The window's title is not clipped. */
body .team-chat-drawer.chat-float .team-chat-drawer-head { min-height: 50px; padding: 8px 12px; overflow: visible; }
body .team-chat-drawer.chat-float .team-chat-drawer-head h3 { margin: 0; line-height: 1.4; font-size: 15px; }
/* The sender's face beside their bubble. */
html[data-theme] #team-chat-drawer .world-message:not(.mine) { margin-left: 38px; }
.team-chat-drawer .world-message-face { position: absolute; left: -38px; top: 0; }
.team-chat-drawer .chat-empty.chat-loading { color: var(--dim); }/* 字号 (chatSetFont): names and times follow too. */
html[data-theme] #team-chat-drawer .world-message > b, html[data-theme] #team-chat-drawer .world-message > time { font-size: calc(var(--chat-fs, 15px) - 3px); }
html[data-theme] #team-chat-drawer .world-message .chat-file { font-size: calc(var(--chat-fs, 15px) - 2px); }
/* ⚙ at the bottom left of the window: opens the 字号 slider. */
.team-chat-drawer .ops-channel-list { display: flex !important; flex-direction: column; }
.team-chat-drawer #ops-chat-channels { flex: 1 1 auto; }
.team-chat-drawer .chat-settings { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 2px 2px; background: inherit; border-top: 1px solid var(--line); }
html[data-theme] #team-chat-drawer .chat-settings-btn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--dim); font-size: 17px; cursor: pointer; }
html[data-theme] #team-chat-drawer .chat-settings-btn:hover, .team-chat-drawer .chat-settings.open .chat-settings-btn { color: var(--acc2); background: var(--surface1, transparent); }
#team-chat-drawer .chat-font { white-space: nowrap; display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
#team-chat-drawer .chat-settings.open .chat-font { display: flex; }
.team-chat-drawer .chat-font input { width: 96px; accent-color: var(--acc); }
.team-chat-drawer .chat-font output { min-width: 18px; color: var(--txt); font-weight: 600; }
@container chatwin (max-width: 560px) { #team-chat-drawer .chat-settings { flex-wrap: wrap; } #team-chat-drawer .chat-settings.open .chat-font { flex-direction: column; } #team-chat-drawer .chat-font input { width: 48px; } }
/* @ 提到: the people of this chat over the box. */
.team-chat-drawer .world-compose { position: relative; }
.team-chat-drawer .chat-mention { position: absolute; left: 10px; bottom: calc(100% + 4px); z-index: 5; width: min(300px, calc(100% - 20px)); max-height: 260px; overflow: auto; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 30px rgba(15, 30, 60, .18); }
.team-chat-drawer .chat-mention[hidden] { display: none; }
.team-chat-drawer .chat-mention-row { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.team-chat-drawer .chat-mention-row.on { background: var(--surface1, color-mix(in srgb, var(--acc) 10%, transparent)); }
html[data-theme] #team-chat-drawer .chat-mention-name { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 0; background: transparent; box-shadow: none; text-align: left; font-size: calc(var(--chat-fs, 15px) - 1px); cursor: pointer; }
.team-chat-drawer .chat-mention-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] #team-chat-drawer .chat-mention-task { flex: none; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: none; font-size: 12px; color: var(--acc2); cursor: pointer; }
/* 放大 too: room on the left of the list, and the title not clipped. */
body .team-chat-drawer .ops-channel-list { padding: 10px 8px !important; box-sizing: border-box; }
body .team-chat-drawer .team-chat-drawer-head { min-height: 50px; padding: 8px 14px !important; overflow: visible; }
body .team-chat-drawer .team-chat-drawer-head h3 { margin: 0; line-height: 1.4 !important; }/* The empty chat follows 字号 too. */
html[data-theme] #team-chat-drawer .chat-empty b { font-size: var(--chat-fs, 15px); }
html[data-theme] #team-chat-drawer .chat-empty :is(p, small) { font-size: calc(var(--chat-fs, 15px) - 2px); }/* 字号 is about what is said (Dylan 「重点不是聊天框里的字体吗」): the AI colleague chat in the window follows it too —
   the bubbles, the box and its notes — while the list only grows a little. */
html[data-theme] #team-chat-drawer .aic-panel .aic-log :is(.aic-bubble, .aic-user) { font-size: var(--chat-fs, 15px); line-height: 1.6; }
html[data-theme] #team-chat-drawer .aic-panel .aic-bubble :is(p, li, ul, ol, td, th, code) { font-size: inherit; }
html[data-theme] #team-chat-drawer .aic-panel [data-aic-input] { font-size: var(--chat-fs, 15px); }
html[data-theme] #team-chat-drawer .aic-panel :is(.aic-context, .aic-note, .aic-actions .aic-link) { font-size: calc(var(--chat-fs, 15px) - 3px); }
html[data-theme] #team-chat-drawer .aic-panel .aic-history-btn { white-space: nowrap; writing-mode: horizontal-tb; flex: none; }/* 手机 like WeChat (Dylan 2026-10-27 「简化下手机的操作界面 能有微信类似的操作感」): two pages. The list — search, then each
   conversation as a row with its face, name and line — and, from a row, the conversation: ‹ · face · name and
   status on top, the messages, and one line to write (the box, ＋ for 文件 / 指派任务 / 引用工作 / 形成任务 / 会话摘要, 发送). */
.team-chat-drawer .chat-phone-back, .team-chat-drawer .chat-plus, .team-chat-drawer .chat-plus-panel { display: none; }
.team-chat-drawer .chat-plus-panel[hidden] { display: none !important; }
body .team-chat-drawer.chat-phone { display: flex; flex-direction: column; }
body .team-chat-drawer.chat-phone .ops-chat-layout { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* The list page. */
body .team-chat-drawer.chat-phone.browse-chats .ops-conversation { display: none !important; }
body .team-chat-drawer.chat-phone.browse-chats .ops-channel-list { display: flex !important; flex-direction: column; flex: 1; max-height: none; min-height: 0; overflow: auto; padding: 8px 0 0 !important; border: 0; background: var(--panel); }
body .team-chat-drawer.chat-phone .team-chat-drawer-head { min-height: 52px; padding: 6px 12px !important; }
body .team-chat-drawer.chat-phone .team-chat-drawer-head h3 { font-size: 17px; }
body .team-chat-drawer.chat-phone .team-chat-drawer-head p, body .team-chat-drawer.chat-phone #studio-chat-focus,
body .team-chat-drawer.chat-phone .chat-window-actions button[onclick^="studioBrowseChats"], body .team-chat-drawer.chat-phone .chat-back { display: none !important; }
html[data-theme] #team-chat-drawer.chat-phone .chat-window-actions [data-chat-close] { width: 40px; height: 40px; font-size: 22px; border: 0; background: transparent; box-shadow: none; }
#team-chat-drawer.chat-phone #studio-chat-search { margin: 0 12px 6px; width: calc(100% - 24px); padding: 10px 12px; font-size: 15px; border-radius: 10px; }
#team-chat-drawer.chat-phone .ops-new-group { margin: 0 12px 6px; }
#team-chat-drawer.chat-phone .ops-inbox-channel { margin: 0 12px 6px; }
#team-chat-drawer.chat-phone .ops-inbox-channel.is-empty { display: none; }
#team-chat-drawer.chat-phone .ops-channel-section { margin: 14px 16px 4px !important; font-size: 13px !important; }
html[data-theme] #team-chat-drawer.chat-phone .ops-channel { min-height: 64px; padding: 8px 16px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0; background: transparent; gap: 12px; }
html[data-theme] #team-chat-drawer.chat-phone .ops-channel.on { background: transparent; }
#team-chat-drawer.chat-phone .ops-channel .chat-face { --chat-face: 46px; font-size: 18px; }
#team-chat-drawer.chat-phone .ops-channel > span b { font-size: 16px !important; }
#team-chat-drawer.chat-phone .ops-channel > span small { font-size: 13px !important; }
#team-chat-drawer.chat-phone .chat-settings { padding: 8px 16px; }
/* The conversation page. */
body .team-chat-drawer.chat-phone:not(.browse-chats) .team-chat-drawer-head, body .team-chat-drawer.chat-phone:not(.browse-chats) .ops-channel-list { display: none !important; }
body .team-chat-drawer.chat-phone:not(.browse-chats) .ops-conversation { display: flex !important; flex-direction: column; flex: 1; min-height: 0; }
#team-chat-drawer.chat-phone .ops-conversation-head { min-height: 56px; padding: 6px 12px 6px 4px !important; gap: 8px; }
html[data-theme] #team-chat-drawer.chat-phone .chat-phone-back { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 28px; line-height: 1; color: var(--acc2); }
#team-chat-drawer.chat-phone .ops-conversation-head #team-chat-kind { font-size: 12px; }
#team-chat-drawer.chat-phone .world-messages { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; }
html[data-theme] #team-chat-drawer.chat-phone .world-message { max-width: 82%; }
/* One line to write. */
html[data-theme] #team-chat-drawer.chat-phone .world-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "box acts" "panel panel"; align-items: end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface1, var(--panel)); }
html[data-theme] #team-chat-drawer.chat-phone .world-compose textarea { grid-area: box; min-height: 40px; height: 40px; max-height: 120px; padding: 9px 12px; resize: none; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
html[data-theme] #team-chat-drawer.chat-phone .chat-compose-actions { grid-area: acts; gap: 6px; }
#team-chat-drawer.chat-phone .chat-compose-actions :is(select, small, .chat-attach) { display: none !important; }
html[data-theme] #team-chat-drawer.chat-phone .chat-plus { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); box-shadow: none; font-size: 22px; color: var(--txt); }
html[data-theme] #team-chat-drawer.chat-phone #studio-chat-send { height: 40px; padding: 0 14px; border-radius: 10px; }
#team-chat-drawer.chat-phone .world-quick-requests { display: none !important; }
#team-chat-drawer.chat-phone .chat-plus-panel { display: grid; grid-area: panel; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px 2px 4px; }
html[data-theme] #team-chat-drawer.chat-phone .chat-plus-panel button { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: auto !important; min-height: 76px; padding: 10px 2px !important; line-height: 1.2; border: 0; border-radius: 12px; background: var(--panel); box-shadow: none; font-size: 13px; color: var(--txt); }
#team-chat-drawer.chat-phone .chat-plus-panel button i { font-style: normal; font-size: 24px; line-height: 1; }
#team-chat-drawer.chat-phone .chat-mention { left: 8px; right: 8px; width: auto; }/* 聊天列表 like QQ: 消息 / 任务 on top, sections that fold, ⋯ on a row for 分组 / 删除 / 解散. */
#team-chat-drawer .chat-list-tabs { display: flex; gap: 4px; margin: 0 0 6px; padding: 3px; border-radius: 10px; background: var(--surface1, color-mix(in srgb, var(--acc) 8%, transparent)); }
html[data-theme] #team-chat-drawer .chat-list-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; }
html[data-theme] #team-chat-drawer .chat-list-tabs button.on { background: var(--panel); color: var(--acc2); box-shadow: 0 1px 3px rgba(15, 30, 60, .12); }
#team-chat-drawer .chat-list-tabs i { min-width: 16px; padding: 0 5px; border-radius: 999px; background: var(--acc); color: #fff; font-style: normal; font-size: 11px; line-height: 16px; }
html[data-theme] #team-chat-drawer .ops-channel-section.chat-fold { display: flex !important; align-items: center; gap: 6px; width: 100%; padding: 4px 6px !important; border: 0; background: transparent; box-shadow: none; text-align: left; cursor: pointer; color: var(--dim); }
#team-chat-drawer .chat-fold > i { font-style: normal; display: inline-block; transition: transform .15s ease; font-size: 11px; }
#team-chat-drawer .chat-fold.open > i { transform: rotate(90deg); }
#team-chat-drawer .chat-fold small { margin-left: auto; font-weight: 400; }
#team-chat-drawer .chat-fold .chat-unread { margin-left: 4px; }
#team-chat-drawer .ops-channel { position: relative; }
#team-chat-drawer .chat-row-more { display: none; margin-left: auto; padding: 0 6px; border-radius: 6px; font-style: normal; color: var(--dim); }
#team-chat-drawer .ops-channel:hover .chat-row-more { display: inline-block; }
#team-chat-drawer .chat-row-more:hover { background: var(--surface1, var(--line)); color: var(--acc2); }
#team-chat-drawer.chat-phone .chat-row-more { display: inline-block; }
.chat-row-menu { position: fixed; z-index: 300; min-width: 180px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 12px 30px rgba(15, 30, 60, .2); }
.chat-row-menu[hidden] { display: none; }
html[data-theme] .chat-row-menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; text-align: left; font-size: 13px; color: var(--txt); cursor: pointer; }
html[data-theme] .chat-row-menu button:hover { background: var(--surface1, var(--line)); }
html[data-theme] .chat-row-menu button.danger { color: var(--wh-danger, #c0392b); }
.chat-row-menu-note { display: block; padding: 7px 10px; font-size: 12px; color: var(--dim); }/* 微信式 (Dylan 2026-10-28 「把手机界面改为微信的类型」): both sides show their face beside the bubble — the other side on the
   left, me on the right — and a file is a card with its name, size and a coloured mark for its kind. */
html[data-theme] #team-chat-drawer .world-message.mine { margin-right: 38px; }
#team-chat-drawer .world-message.mine .world-message-face { left: auto; right: -38px; }
html[data-theme] #team-chat-drawer .chat-file { display: flex; align-items: center; gap: 12px; width: 240px; max-width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-align: left; }
#team-chat-drawer .chat-file-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
#team-chat-drawer .chat-file-text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-weight: 500; line-height: 1.35; color: var(--txt); }
#team-chat-drawer .chat-file-text small { color: var(--dim); font-size: 12px; }
#team-chat-drawer .chat-file-icon { flex: none; display: grid; place-items: center; width: 38px; height: 44px; border-radius: 4px; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; background: #8a96a8; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
#team-chat-drawer .chat-file.kind-pdf .chat-file-icon { background: #e5484d; }
#team-chat-drawer .chat-file.kind-xls .chat-file-icon { background: #1fa463; font-size: 18px; }
#team-chat-drawer .chat-file.kind-doc .chat-file-icon { background: #2b6fd6; font-size: 18px; }
#team-chat-drawer .chat-file.kind-ppt .chat-file-icon { background: #d86a2b; font-size: 18px; }
#team-chat-drawer .chat-file.kind-img .chat-file-icon { background: var(--wh-violet, #7a5af5); }
/* The phone: a plain grey page behind the bubbles, the time between messages small and centred. */
html[data-theme] #team-chat-drawer.chat-phone .world-messages { background: color-mix(in srgb, var(--panel) 92%, #000); }
#team-chat-drawer.chat-phone .world-messages .chat-day { justify-content: center; }
#team-chat-drawer.chat-phone .world-messages .chat-day::before, #team-chat-drawer.chat-phone .world-messages .chat-day::after { content: none; }
html[data-theme] #team-chat-drawer.chat-phone .world-message:not(.mine) > b { display: none; }/* By hand like WeChat: hold a message for its actions (the ⋯ goes), ＋ until there is text and then 发送. */
#team-chat-drawer.chat-phone .world-message { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#team-chat-drawer.chat-phone .world-message-menu, #team-chat-drawer.chat-phone .chat-row-more { display: none; }
#team-chat-drawer.chat-phone .world-compose:has(#world-message-input:placeholder-shown) #studio-chat-send { display: none; }
#team-chat-drawer.chat-phone .world-compose:not(:has(#world-message-input:placeholder-shown)) .chat-plus { display: none; }
.chat-sheet { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .35); }
.chat-sheet[hidden] { display: none; }
.chat-sheet-box { width: 100%; display: grid; gap: 1px; padding-bottom: env(safe-area-inset-bottom); border-radius: 12px 12px 0 0; background: var(--line); overflow: hidden; }
.chat-sheet-box button { min-height: 54px; border: 0; background: var(--panel); color: var(--txt); font-size: 16px; }
.chat-sheet-box .cancel { margin-top: 7px; }
/* 美化 (Dylan 2026-10-28 「界面美化下」): calmer bubbles with a small tail, the time tucked under the text, a file sent on
   its own shown as just the card, rounded-square faces, and a list with inset dividers and a filled search box. */
html[data-theme] #team-chat-drawer.chat-phone .world-messages { gap: 14px; padding: 14px 12px; }
html[data-theme] #team-chat-drawer.chat-phone .world-message { display: flex; flex-direction: column; padding: 9px 12px 6px; border: 0; border-radius: 8px; background: var(--panel); box-shadow: 0 1px 1px rgba(15, 30, 60, .06); }
html[data-theme] #team-chat-drawer.chat-phone .world-message.mine { border-radius: 8px; background: color-mix(in srgb, var(--acc) 28%, var(--panel)); }
#team-chat-drawer.chat-phone .world-message::before { content: ''; position: absolute; top: 11px; left: -6px; border: 6px solid transparent; border-left: 0; border-right-color: var(--panel); }
#team-chat-drawer.chat-phone .world-message.mine::before { left: auto; right: -6px; border: 6px solid transparent; border-right: 0; border-left-color: color-mix(in srgb, var(--acc) 28%, var(--panel)); }
#team-chat-drawer.chat-phone .world-message > p { order: 1; margin: 0; }
#team-chat-drawer.chat-phone .world-message > .chat-files { order: 2; margin-top: 0; }
#team-chat-drawer.chat-phone .world-message > p + .chat-files { margin-top: 6px; }
html[data-theme] #team-chat-drawer.chat-phone .world-message > time { order: 3; display: block; margin-top: 2px; text-align: right; font-size: 11px; opacity: .75; }
#team-chat-drawer.chat-phone .world-message > :is(.chat-local-tag, .world-message-link, .world-message-tag) { order: 4; }
html[data-theme] #team-chat-drawer.chat-phone .world-message:not(:has(> p)):has(.chat-file) { padding: 0; background: transparent; box-shadow: none; }
#team-chat-drawer.chat-phone .world-message:not(:has(> p)):has(.chat-file)::before { content: none; }
html[data-theme] #team-chat-drawer.chat-phone .world-message:not(:has(> p)):has(.chat-file) > time { padding: 0 4px; }
#team-chat-drawer.chat-phone .world-message .chat-file { box-shadow: 0 1px 1px rgba(15, 30, 60, .06); }
#team-chat-drawer.chat-phone :is(.world-message-face, .ops-channel, .ops-conversation-head) .chat-face { border-radius: 8px; overflow: hidden; }
html[data-theme] #team-chat-drawer.chat-phone .world-compose { background: color-mix(in srgb, var(--panel) 95%, #000); }
html[data-theme] #team-chat-drawer.chat-phone .world-compose textarea { border: 0; background: var(--panel); }
html[data-theme] #team-chat-drawer.chat-phone .chat-plus { border-color: color-mix(in srgb, var(--txt) 35%, transparent); background: transparent; }
html[data-theme] #team-chat-drawer.chat-phone #studio-chat-search { border: 0; background: color-mix(in srgb, var(--txt) 6%, var(--panel)); box-shadow: none; }
#team-chat-drawer.chat-phone .chat-list-tabs { margin: 4px 12px 2px; background: color-mix(in srgb, var(--txt) 6%, var(--panel)); }
html[data-theme] #team-chat-drawer.chat-phone .ops-channel { border-bottom: 0 !important; }
#team-chat-drawer.chat-phone .ops-channel::after { content: ''; position: absolute; left: 74px; right: 0; bottom: 0; border-bottom: 1px solid var(--line); }
#team-chat-drawer.chat-phone .ops-channel > span b { font-weight: 600; }
html[data-theme] #team-chat-drawer.chat-phone .ops-channel.on, html[data-theme] #team-chat-drawer.chat-phone .ops-channel.on > span b { color: var(--txt); }/* 左滑 a conversation: it slides over to show 置顶 / 删除 (Dylan 2026-10-28); a pinned one sits on a light grey. */
#team-chat-drawer.chat-phone .ops-channel { transition: transform .18s ease; }
html[data-theme] #team-chat-drawer.chat-phone .ops-channel.pinned { background: color-mix(in srgb, var(--txt) 4%, var(--panel)); }
.chat-swipe { position: fixed; right: 0; z-index: 210; display: flex; }
.chat-swipe[hidden] { display: none; }
html[data-theme] .chat-swipe button { width: 80px; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: #8a96a8; color: #fff; font-size: 15px; }
html[data-theme] .chat-swipe button.danger { background: #e5484d; }html[data-theme] #team-chat-drawer.chat-phone .ops-channel .chat-row-more { display: none; }

/* 同事资料 (Dylan 2026-11-02): a face or name in the chat opens a colleague's card — title, department, how to reach them. */
[data-chat-profile], .chat-profile-link { cursor: pointer; }
.world-message b[data-chat-profile]:hover, #ops-chat-title.chat-profile-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.chat-profile { position: fixed; z-index: 260; width: 320px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--txt); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.chat-profile[hidden] { display: none; }
html[data-theme] .chat-profile .chat-profile-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--dim); font-size: 18px; line-height: 1; }
.chat-profile header { display: flex; gap: 12px; align-items: center; padding-right: 24px; }
.chat-profile-face { flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.chat-profile-face img { width: 100%; height: 100%; object-fit: cover; }
.chat-profile h3 { margin: 0; font-size: 17px; font-weight: 700; }
.chat-profile h3 em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 14%, transparent); color: var(--acc2, var(--acc)); vertical-align: middle; }
.chat-profile header p { margin: 3px 0 0; color: var(--txt); font-size: 13px; }
.chat-profile-presence { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--dim); font-size: 12px; }
.chat-profile-presence i { width: 7px; height: 7px; border-radius: 50%; background: #9aa4b2; }
.chat-profile-presence.on i { background: #22a06b; }
.chat-profile-rows { margin-top: 14px; border-top: 1px solid var(--line); }
.chat-profile-row { display: grid; grid-template-columns: minmax(44px, max-content) 1fr; gap: 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 13px; }
.chat-profile-row > span { color: var(--dim); white-space: nowrap; }
.chat-profile-row > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.chat-profile-row a { color: var(--acc2, var(--acc)); text-decoration: none; }
.chat-profile-row small { color: var(--dim); }
html[data-theme] .chat-profile .chat-profile-copy { padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; box-shadow: none; color: var(--dim); font-size: 11px; line-height: 18px; }
.chat-profile-chip { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--txt) 6%, transparent); font-size: 12px; }
.chat-profile footer { display: flex; gap: 8px; margin-top: 14px; }
.chat-profile footer button { flex: 1; white-space: nowrap; }
@media (max-width: 759px) {
  .chat-profile { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}