/* Mobile tool panels occupy keyboard space rather than covering the draft. */
@media(min-width:701px){
 :root[data-theme] #chatInputRow.has-footer-tools:not(.is-expanded) #voiceRecordBtn:not([hidden]){display:flex!important;grid-column:5!important;grid-row:1;align-items:center;justify-content:center}
}
@media(max-width:700px){
 :root[data-theme] body.conversation-workspace #chatInputRow.has-footer-tools{display:grid!important;grid-template-columns:44px 44px minmax(0,1fr) 44px!important;align-items:center;gap:0!important;padding:4px!important;border:0!important;box-shadow:none!important}
 :root[data-theme] body.conversation-workspace #chatInputRow.has-footer-tools[hidden]{display:none!important}
 :root[data-theme] #chatInputRow.has-footer-tools>textarea{display:block!important;box-sizing:border-box;width:100%!important;min-width:0;min-height:44px;height:44px;padding:10px 4px!important;margin:0;grid-column:3!important;grid-row:1;font-size:14px}
 :root[data-theme] #chatInputRow.has-footer-tools :is(.chat-toolbar,.chat-toolbar-left,.chat-toolbar-right){display:contents!important}
 :root[data-theme] #chatInputRow.has-footer-tools.is-expanded>textarea{grid-column:1/-1!important;grid-row:1;padding-inline:8px!important}
 :root[data-theme] #chatInputRow.has-footer-tools :is(#emojiBtn,#cameraBtn,.chat-more-toggle,#voiceRecordBtn,#chatSendBtn){grid-row:1}
 :root[data-theme] #chatInputRow.has-footer-tools #emojiBtn{display:none!important}
 :root[data-theme] #chatInputRow.has-footer-tools #cameraBtn{grid-column:2}
 :root[data-theme] #chatInputRow.has-footer-tools .chat-more-toggle{grid-column:1}
 :root[data-theme] #chatInputRow.has-footer-tools :is(#voiceRecordBtn,#chatSendBtn){grid-column:4}
 :root[data-theme] #chatInputRow.has-footer-tools.is-expanded :is(#emojiBtn,#cameraBtn,.chat-more-toggle,#voiceRecordBtn,#chatSendBtn){grid-row:2}
 :root[data-theme] #chatInputRow.has-footer-tools :is(.chat-icon-btn,.chat-quick-reply-label,.chat-send-btn){display:flex!important;align-items:center;justify-content:center;flex:0 0 44px;min-width:44px;width:44px;height:44px;min-height:44px;padding:10px!important;background:transparent;box-shadow:none;border:0}
 :root[data-theme] #chatInputRow.has-footer-tools :is(#voiceRecordBtn,#chatSendBtn)[hidden]{display:none!important}
 :root[data-theme] #chatInputRow.has-footer-tools .conversation-quick-replies{position:absolute;display:block!important;margin:0!important;width:0;height:0}
 :root[data-theme] #chatInputRow.has-footer-tools :is(.chat-icon-btn,.chat-send-btn)>svg{width:20px;height:20px;stroke-width:1.7}
 :root[data-theme] #chatInputRow.has-footer-tools .chat-quick-reply-label>span{display:none}
 :root[data-theme] #chatInputRow.has-footer-tools .chat-quick-reply-label::marker{content:''}
 :root[data-theme] body.conversation-workspace #msgForm.chat-composer.has-chat-bottom-panel{padding-bottom:min(240px,35dvh)!important;flex-shrink:0}
 :root[data-theme] #chatInputRow.has-footer-tools #emojiPicker:not([hidden]){position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:none!important;height:min(240px,35dvh);max-height:35dvh!important;box-sizing:border-box;margin:0!important;padding:12px 12px max(12px,env(safe-area-inset-bottom))!important;z-index:100;overflow:auto;background:var(--surface);border:0!important;border-radius:16px 16px 0 0;box-shadow:none!important;animation:chat-panel-rise .16s ease-out}
 :root[data-theme] #chatInputRow.has-footer-tools #emojiPicker:not([hidden]){display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));grid-template-rows:none;grid-auto-flow:row;grid-auto-columns:auto;align-content:start;gap:2px}
 :root[data-theme] #chatInputRow.has-footer-tools #emojiPicker button{width:44px;height:44px;font-size:24px}
 :root[data-theme] #chatInputRow.has-footer-tools .conversation-quick-replies[open] .conversation-suggestion-rail{display:flex;flex-direction:row;gap:6px;height:auto;box-sizing:border-box;overflow:auto;background:var(--surface);border:0;box-shadow:none;border-radius:12px;padding:8px}
 :root[data-theme] #chatInputRow.has-footer-tools .conversation-suggestion-action{white-space:normal;text-align:left;justify-content:flex-start;flex:none}
 :root[data-theme] #locationShareDialog[open]{position:fixed;inset:auto 0 0;width:100%;max-width:none;max-height:85dvh;margin:0;border:0;border-radius:16px 16px 0 0;box-shadow:none;animation:chat-panel-rise .16s ease-out}
}
.chat-more-toggle{display:none!important}
@media(max-width:700px){
 :root[data-theme] #chatInputRow.has-footer-tools .chat-more-toggle{display:none!important}
 :root[data-theme] #chatInputRow.has-footer-tools.tools-collapsed .chat-more-toggle{display:flex!important;order:1}
 :root[data-theme] #chatInputRow.has-footer-tools.tools-collapsed :is(#attachBtn,[data-location-open],.conversation-quick-replies>summary){display:none!important}
 :root[data-theme] #chatInputRow.has-footer-tools.tools-collapsed .conversation-quick-replies{flex:0 0 0!important;width:0;margin:0!important}
 :root[data-theme] #chatInputRow.has-footer-tools.tools-collapsed .chat-toolbar-left{justify-content:flex-start!important;flex:1;gap:2px!important}
}
dialog.chat-more-tools{position:fixed;inset:auto 0 0;width:100%;max-width:360px;box-sizing:border-box;margin:0 auto;padding:12px 8px max(8px,env(safe-area-inset-bottom));border:0;border-radius:18px 18px 0 0;background:var(--surface);color:var(--text-primary)}
dialog.chat-more-tools[open]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;animation:chat-tools-rise .18s ease-out}
.chat-more-tools::before{content:'';grid-column:1/-1;justify-self:center;width:28px;height:3px;border-radius:3px;background:var(--text-secondary);opacity:.5;margin-bottom:18px}
.chat-more-tools button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:68px;padding:6px 2px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;font-size:12px;text-align:center}
.chat-more-tools button svg{width:20px;height:20px;box-sizing:content-box;flex:none;padding:0;border-radius:0;background:transparent;stroke-width:1.7}
.chat-more-tools [data-chat-tool="Photos"] svg{color:var(--primary)}
.chat-more-tools [data-chat-tool="Quick replies"] svg{color:var(--primary)}
.chat-more-tools .chat-more-close{position:absolute;top:0;right:2px;min-height:44px;min-width:44px;padding:6px;font-size:20px}
.chat-more-tools::backdrop{background:rgb(0 0 0/.35)}
@keyframes chat-tools-rise{from{transform:translateY(36px);opacity:.6}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){dialog.chat-more-tools[open]{animation:none}}
:root[data-theme] body.conversation-workspace .voice-recording-panel .voice-recording-pulse{display:grid;place-items:center;position:relative;flex:0 0 28px;width:28px;height:28px;color:var(--primary);background:transparent;animation:none}
:root[data-theme] body.conversation-workspace .voice-recording-pulse::before{content:'';position:absolute;inset:0;border:2px solid currentColor;border-radius:50%;opacity:calc(.12 + var(--voice-level,0) * .4);transform:scale(calc(1 + var(--voice-level,0) * .55));transition:transform .09s linear,opacity .09s linear}
.voice-recording-pulse svg{transform:scale(calc(1 + var(--voice-level,0) * .12));transition:transform .09s linear}
@media(prefers-reduced-motion:reduce){.voice-recording-pulse::before,.voice-recording-pulse svg{transform:none!important;transition:none!important}}
:root[data-theme] body.conversation-workspace .voice-preview{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:4px 6px;padding:6px 8px}
:root[data-theme] body.conversation-workspace .voice-preview[hidden]{display:none}
:root[data-theme] body.conversation-workspace .voice-preview .voice-player{grid-column:1/-1;grid-row:1;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:6px;padding:0;margin:0;min-width:0}
:root[data-theme] body.conversation-workspace .voice-preview .voice-player-play{width:44px;min-width:44px;height:44px;padding:0;background:transparent}
:root[data-theme] body.conversation-workspace .voice-preview .voice-player-time{font-size:12px;text-align:right}
:root[data-theme] body.conversation-workspace .voice-preview :is(#voiceRemoveBtn,#voiceResumeBtn,#voicePreviewSendBtn){grid-row:2;min-height:44px;padding:8px;border:0;box-shadow:none}
:root[data-theme] body.conversation-workspace #voiceRemoveBtn{grid-column:1;color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,var(--surface-2));border-radius:50%}
:root[data-theme] body.conversation-workspace #voiceResumeBtn{grid-column:2;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;background:var(--surface);border-radius:20px;font-size:13px;color:var(--text-primary);text-decoration:none}
:root[data-theme] body.conversation-workspace #voiceResumeBtn[hidden]{display:none}
:root[data-theme] body.conversation-workspace #voicePreviewSendBtn{grid-column:3;width:44px;border-radius:50%}
:root[data-theme] body.conversation-workspace .voice-recording-panel{display:grid;grid-template-columns:44px 44px minmax(0,1fr) 44px;align-items:center;gap:4px 6px;padding:6px 8px}
:root[data-theme] body.conversation-workspace .voice-recording-panel[hidden]{display:none}
:root[data-theme] body.conversation-workspace .voice-recording-panel .voice-recording-pulse{grid-column:1;grid-row:1;justify-self:center}
:root[data-theme] body.conversation-workspace #voiceRecordingTime{grid-column:2;grid-row:1}
:root[data-theme] body.conversation-workspace .voice-recording-wave{grid-column:3/-1;grid-row:1;height:44px;width:100%;overflow:hidden}
:root[data-theme] body.conversation-workspace :is(#voiceCancelBtn,#voicePauseBtn,#voiceFinishBtn){grid-row:2;min-height:44px;padding:8px;border:0;box-shadow:none}
:root[data-theme] body.conversation-workspace #voiceCancelBtn{grid-column:1;color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,var(--surface-2));border-radius:50%}
:root[data-theme] body.conversation-workspace #voicePauseBtn{grid-column:2/4;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;background:var(--surface);border-radius:20px;font-size:13px;color:var(--text-primary)}
:root[data-theme] body.conversation-workspace #voicePauseBtn::after{content:'Pause'}
:root[data-theme] body.conversation-workspace #voicePauseBtn.is-paused::after{content:'Resume'}
:root[data-theme] body.conversation-workspace #voiceFinishBtn{grid-column:4}
/* Photos retain the same compact inset and caption rhythm on both sides. */
:root[data-theme] .msg-bubble:has(>.message-photo-grid){padding:4px!important}
:root[data-theme] .msg-bubble>.message-photo-grid{border-radius:10px}
:root[data-theme] body.conversation-workspace .msg-bubble:has(>.message-photo-grid){box-sizing:border-box;width:288px;min-width:0;max-width:calc(100% - 44px)}
:root[data-theme] body.conversation-workspace .msg-bubble>.message-photo-grid{width:100%}
:root[data-theme] body.conversation-workspace .msg-has-voice{box-sizing:border-box;width:320px;min-width:0;max-width:calc(100% - 44px)}
:root[data-theme] body.conversation-workspace .msg-has-voice .voice-player-play{grid-column:2;grid-row:1}
:root[data-theme] body.conversation-workspace .msg-has-voice .voice-player-track{grid-column:3;grid-row:1}
:root[data-theme] body.conversation-workspace .msg-has-voice .voice-player-footer{grid-column:2/-1;grid-row:2;flex-wrap:wrap;gap:2px 6px}
:root[data-theme] body.conversation-workspace .msg-has-voice .voice-player-footer>.msg-meta{margin-left:auto}
body.conversation-workspace .voice-captured-wave:empty::after{content:'';display:block;width:100%;height:2px;background:var(--text-muted);opacity:.45;border-radius:2px}
:root[data-theme] .msg-bubble:has(>.message-photo-grid)>.msg-bubble-text{display:block;padding:4px 6px 0}
:root[data-theme] .msg-bubble:has(>.message-photo-grid)>.msg-meta{padding:2px 6px 0;margin-top:2px}
/* Uncaptioned photo receipts sit over the photo, without intercepting gallery taps. */
:root[data-theme] body.conversation-workspace .msg-bubble:has(>.message-photo-grid):not(:has(>.msg-bubble-text,>.msg-channel-tag,>.message-reply-quote))>.msg-meta{position:absolute;right:8px;bottom:8px;max-width:calc(100% - 16px);padding:3px 6px;margin:0;border-radius:6px;background:rgb(0 0 0/.64);color:#fff;pointer-events:none;flex-wrap:wrap}
:root[data-theme] body.conversation-workspace .msg-bubble:has(>.message-photo-grid):not(:has(>.msg-bubble-text))>.msg-meta .msg-delivered{color:#fff}
:root[data-theme] body.conversation-workspace .msg-bubble:has(>.message-photo-grid):not(:has(>.msg-bubble-text))>.msg-meta .msg-seen{color:#62ed9e}
:root[data-theme] .msg-bubble:has(>.support-inbox-attachment>img){padding:4px!important}
:root[data-theme] .support-inbox-attachment:has(>img){display:block;margin:0;border:0;padding:0;overflow:hidden;border-radius:10px}
:root[data-theme] .support-chat-message:has(>.support-chat-attachment>img){padding:6px}
.messages-conversation-pane{position:relative}
.chat-jump-latest{position:absolute;right:12px;z-index:25;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--surface-2);color:var(--text-primary);box-shadow:0 2px 8px rgb(0 0 0/.12);cursor:pointer}
.chat-jump-latest[hidden],.chat-jump-count[hidden]{display:none!important}
.chat-jump-count{position:absolute;top:-5px;right:-4px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 3px;border-radius:10px;background:var(--primary);color:var(--on-accent);font:600 10px/1 var(--font-body,system-ui)}
.chat-jump-latest:focus-visible{outline:1px solid var(--text-secondary);outline-offset:2px}
:root[data-theme] body.conversation-workspace #chatInputRow :is(#voiceRecordBtn,#chatSendBtn){border-radius:50%;background:color-mix(in srgb,var(--primary) 12%,var(--surface-2))!important;color:var(--text-secondary)!important;box-shadow:none;border:0;transition:background-color .12s,color .12s}
:root[data-theme] body.conversation-workspace #chatInputRow.has-compose-content #chatSendBtn{background:var(--primary)!important;color:var(--on-accent)!important}
@keyframes chat-panel-rise{from{transform:translateY(20px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){#emojiPicker,.conversation-suggestion-rail,#locationShareDialog{animation:none!important}}
/* The approved wallpaper belongs only to the scrolling conversation, never its controls. */
:root[data-theme="dark"]{--chat-history:#0e191c;--chat-received:#252f33;--chat-sent:#124c4c;--chat-ink:#f0f5f5;--chat-muted:#c2cecf}
:root[data-theme="light"]{--chat-history:#f6f5f0;--chat-received:#fff;--chat-sent:#cde8e5;--chat-ink:#15262a;--chat-muted:#526366}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history,.support-chat-messages){background-color:var(--chat-history);background-image:none}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble{--message-surface:var(--chat-received);background:var(--message-surface)!important;color:var(--chat-ink);border-color:transparent}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble.mine{--message-surface:var(--chat-sent)}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble::after{background:var(--message-surface)!important}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble :is(.msg-meta,.msg-meta time,.msg-delivered){color:var(--chat-muted)}
:root[data-theme] .support-chat-messages .support-chat-message{background:var(--chat-sent);color:var(--chat-ink)}
:root[data-theme] .support-chat-messages .support-chat-message.staff{background:var(--chat-received)}
:root[data-theme] .support-chat-messages .support-chat-message time{color:var(--chat-muted)}
:root[data-theme] :is(.messages-conv-head,.support-workspace-thread-heading) :is(.icon-circle-btn,#convMenuBtn,.messages-back-btn,.inbox-conversation-tools>summary){display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--text-primary);border-radius:0}
:root[data-theme] :is(.messages-conv-head,.support-workspace-thread-heading) :is(.icon-circle-btn,#convMenuBtn,.messages-back-btn):focus-visible{outline:2px solid var(--primary);outline-offset:-3px}
/* Preserve the existing bubble geometry, tails, image/voice layout and selection states. */
/* Only the rounded input has a surface; its structural wrapper stays invisible. */
:root[data-theme] :is(.messages-shell .messages-conversation-pane,.support-workspace-conversation,.support-chat-panel){background:var(--chat-history)!important;border:0!important;border-radius:0;box-shadow:none!important;outline:0!important}
:root[data-theme] :is(.messages-conversation-pane,.support-workspace-conversation,.support-chat-panel) :is(form.chat-composer,.support-chat-composer){background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;backdrop-filter:none!important;position:sticky;bottom:0;flex-shrink:0;z-index:30}
:root[data-theme] :is(.chat-input-row,.support-message-input),
:root[data-theme] :is(.chat-input-row,.support-message-input):focus-within{border:0!important;box-shadow:none!important;outline:none!important}
:root[data-theme] :is(.chat-input-row,.support-message-input):has(:focus-visible){outline:1px solid var(--text-secondary)!important;outline-offset:1px}
:root[data-theme] :is(.msg-delivered,.msg-seen){display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:600}
:root[data-theme] :is(.msg-delivered,.msg-seen)[hidden]{display:none!important}
:root[data-theme] :is(.msg-delivered,.msg-seen)::before{content:none}
[data-message-status-icon]{display:inline-flex;align-items:center;flex:none}
[data-message-status-icon] svg{display:block}
:root[data-theme="dark"] :is(#msgScroll,.support-customer-history,.support-workspace-history,.support-chat-messages) .msg-seen{color:#35d785}
:root[data-theme="light"] :is(#msgScroll,.support-customer-history,.support-workspace-history,.support-chat-messages) .msg-seen{color:#12833c}
/* Each message keeps its own visible tail, including grouped text and audio. */
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble:is(.mine,.theirs)::after{content:'';position:absolute;width:9px;height:9px;border:0;transform:none;display:block;pointer-events:none}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble.mine::after{inset:auto 0 -6px auto;clip-path:polygon(0 0,100% 0,100% 100%)}
:root[data-theme] :is(#msgScroll,.support-customer-history,.support-workspace-history) .msg-bubble.theirs::after{inset:-6px auto auto 0;clip-path:polygon(0 0,0 100%,100% 100%)}
:root[data-theme] .msg-bubble .voice-avatar-microphone{color:var(--chat-muted)}
:root[data-theme="dark"] .msg-bubble.mine:has(.msg-seen:not([hidden])) .voice-avatar-microphone{color:#35d785}
:root[data-theme="light"] .msg-bubble.mine:has(.msg-seen:not([hidden])) .voice-avatar-microphone{color:#12833c}
:root[data-theme="dark"] .msg-bubble.voice-listened .voice-avatar-microphone{color:#35d785}
:root[data-theme="light"] .msg-bubble.voice-listened .voice-avatar-microphone{color:#12833c}
@media(max-width:860px){
 body.conversation-workspace .dash-topbar-search,body.conversation-workspace .header-search-form,body.conversation-workspace .quick-search-form,body.conversation-workspace .mobile-tabbar,body.conversation-workspace .messages-shell>.unified-inbox-tabs{display:none!important}
 body.conversation-workspace .support-chat{display:none!important}
 :root[data-theme] .user-dash-topbar{padding-inline:16px!important;box-sizing:border-box}
 :root[data-theme] .user-dash-topbar .dash-topbar-left{min-width:0;margin:0}
 :root[data-theme] .workspace-mobile-brand{margin:0!important;padding:0!important}
 :root[data-theme] .messages-conv-head{min-height:56px;padding:6px 10px!important;gap:6px;box-sizing:border-box}
 :root[data-theme] .messages-conv-head :is(.messages-back-btn,.icon-circle-btn,#convMenuBtn){width:44px;height:44px;flex:0 0 44px;padding:10px!important;box-sizing:border-box}
 :root[data-theme] .messages-conv-head :is(.messages-back-btn,.icon-circle-btn,#convMenuBtn)>svg{width:22px;height:22px}
 :root[data-theme] .messages-conv-head .seller-avatar-ring{width:36px;height:36px;flex:0 0 36px}
 :root[data-theme] .messages-conv-head .seller-avatar{width:32px;height:32px}
 :root[data-theme] .messages-conv-name-block{min-width:0;flex:1}
 :root[data-theme] .messages-conv-name{font-size:14px;line-height:20px}
 :root[data-theme] .messages-conv-name-block .messages-conv-status{font-size:11px;line-height:16px}
 :root[data-theme] body.conversation-workspace .thread-listing-banner{padding:6px 10px!important;gap:8px}
 :root[data-theme] body.conversation-workspace .thread-listing-banner-label{display:block;flex:0 0 auto;font-size:11px;line-height:1.4}
 :root[data-theme] body.conversation-workspace #msgForm.chat-composer{padding:6px 10px max(8px,env(safe-area-inset-bottom))!important;background:transparent!important;border:0!important;box-shadow:none!important}
 :root[data-theme] body.conversation-workspace .messages-conversation-pane{border-inline:0;border-bottom:0;border-radius:0}
 :root[data-app-shell="android"] body.conversation-workspace .dash-topbar-wrap{display:none!important}
 :root[data-app-shell="android"] body.conversation-workspace .messages-conversation-pane{height:var(--chat-viewport-height,100dvh)!important;max-height:var(--chat-viewport-height,100dvh)!important}
 :root[data-app-shell="android"] body.conversation-workspace .messages-conv-head{position:sticky;top:0;z-index:20;flex-shrink:0;background:var(--surface)}
 :root[data-app-shell="android"] body.conversation-workspace #convMenuBtn svg{stroke-width:2.6}
}

/* Aligned conversation/context rows use quiet separators, not framed headers. */
:root[data-theme] body.conversation-workspace .messages-conv-head{border:0;border-bottom:1px solid var(--border);box-shadow:none;outline:0;box-sizing:border-box}
:root[data-theme] body.conversation-workspace .thread-listing-banner{border:0;border-bottom:1px solid var(--border);box-shadow:none;outline:0;border-radius:0;padding-inline:16px}
:root[data-theme] body.conversation-workspace .thread-listing-banner-meta{flex-wrap:nowrap;min-width:0;width:100%;gap:6px}
:root[data-theme] body.conversation-workspace .thread-listing-reference{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 10px/1.4 var(--font-body,Inter,system-ui,sans-serif);letter-spacing:0;text-transform:none}
:root[data-theme] body.conversation-workspace .thread-listing-banner-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:860px){
 :root[data-theme] body.conversation-workspace :is(.messages-conv-head,.thread-listing-banner){padding-inline:10px!important}
 :root[data-theme] body.conversation-workspace .thread-listing-banner{grid-template-columns:44px minmax(0,1fr) auto;gap:8px;padding-block:6px}
 :root[data-theme] body.conversation-workspace .thread-listing-banner>img,:root[data-theme] body.conversation-workspace .thread-listing-banner-noimg{width:44px;height:44px}
 :root[data-theme] body.conversation-workspace .thread-listing-banner-view{min-width:44px;padding:0;font-size:11px;white-space:nowrap}
}
/* Photo sets share one message and reserve their layout before images load. */
.message-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:min(280px,100%);border-radius:12px;overflow:hidden}
.message-photo-grid>a{position:relative;display:block;min-width:0;aspect-ratio:1;background:var(--surface);overflow:hidden}
.message-photo-grid>a:only-child{grid-column:1/-1;aspect-ratio:4/3}
.message-photo-grid img{display:block;width:100%;height:100%;object-fit:cover}
.message-photo-more{position:absolute;inset:0;display:grid;place-items:center;background:#0008;color:#fff;font-size:24px;font-weight:600}
.chat-photo-selection{padding:6px 0;max-width:100%;flex-shrink:0}
.chat-photo-selection[hidden]{display:none!important}
.chat-photo-selection-head{display:flex;align-items:center;gap:8px;font-size:13px}
.chat-photo-selection-head>span{margin-right:auto}
.chat-photo-selection-head button{min-height:44px;padding:4px 8px;border:0;background:transparent;color:var(--text);cursor:pointer}
.chat-photo-selection .message-photo-grid{width:min(260px,100%);grid-template-columns:repeat(4,minmax(0,1fr))}
.chat-photo-selection .message-photo-grid>a:only-child{grid-column:auto;aspect-ratio:1}
.chat-photo-selection .message-photo-more{font-size:18px}
dialog.message-photo-viewer{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:max(8px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));box-sizing:border-box;border:0;border-radius:0;background:#101619;color:#f3f7f7;overflow:hidden}
dialog.message-photo-viewer[open]{display:flex;flex-direction:column;gap:8px}
.message-photo-viewer::backdrop{background:#101619}
.message-photo-viewer header{display:flex;align-items:center;gap:12px;flex-shrink:0}
.message-photo-viewer button{min-width:44px;min-height:44px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;font-size:24px}
.message-photo-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;position:relative}
.message-photo-stage>img{width:100%;height:100%;min-height:0;object-fit:contain;touch-action:pan-y pinch-zoom}
.message-photo-stage>button{position:absolute;z-index:1;background:#101619aa;font-size:36px}
.message-photo-stage>button:first-child{left:0}.message-photo-stage>button:last-child{right:0}
.message-photo-viewer nav{display:flex;justify-content:flex-start;gap:6px;overflow-x:auto;flex-shrink:0;max-width:100%;padding:3px}
.message-photo-viewer nav button{flex:0 0 48px;padding:2px;opacity:.6}
.message-photo-viewer nav button[aria-current=true]{opacity:1;outline:2px solid #49d6c5;outline-offset:-2px}
.message-photo-viewer nav img{width:44px;height:44px;object-fit:cover;border-radius:5px}
.message-photo-viewer .message-photo-remove{font-size:14px;color:#ff9f9f;align-self:center;flex-shrink:0}
@media(min-width:768px){.message-photo-viewer .message-photo-stage{width:min(100%,1100px);align-self:center}.message-photo-viewer nav{align-self:center}}
