/* Isolated Marina proposal. Load last in both renderers. Conversation presentation
   only; no Home/History, source status, ordering, receipt, draft or upload changes. */
.office-console-shell.office-direct-chat{--dm-reading-width:840px}
.office-direct-chat :is(.conversation,.remote-conversation){min-width:0}
.office-direct-chat :is(.conversation-head,.remote-page-head){
 box-sizing:border-box;max-width:var(--dm-reading-width);width:100%;margin:0 auto;
 padding:12px 20px!important;min-height:0!important;max-height:none!important;
 border:0!important;align-items:center;gap:12px;
}
.office-direct-chat .conversation-title{gap:12px;min-width:0;align-items:center}
.office-direct-chat .conversation-title>div{min-width:0}
.office-direct-chat .conversation-title h1{font:600 20px/1.3 var(--sans)!important;margin:0 0 3px!important;letter-spacing:-.015em}
.office-direct-chat .conversation-title>.conversation-avatar{width:32px;height:32px;font-size:13px;flex:none}
.office-direct-chat .conversation-title>.sub,.office-direct-chat .conversation-title .sub,.office-direct-chat .conversation-title .hint{font:400 12px/1.45 var(--sans);margin:2px 0;color:var(--muted)}
.office-direct-chat .conversation-title .activity-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;line-height:1.4;margin:2px 0}
.office-direct-chat .activity-observation{margin:0;padding:0;border:0;box-shadow:none}
.office-direct-chat .activity-observation>summary{min-height:28px;font-size:12px;padding:0 4px}
.office-direct-chat .participant-states{font-size:12px;line-height:1.45;margin:2px 0}
.office-direct-chat .conversation-actions{align-self:center;flex:none;gap:4px}
.office-direct-chat .conversation-actions :is(button,summary){min-width:44px;min-height:44px}
.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head>.btn-row{align-self:center;flex:none;gap:4px}
.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head>.btn-row :is(button,summary){min-width:44px;min-height:44px}
.office-direct-chat .agent-conversations{box-sizing:border-box;width:min(100%,var(--dm-reading-width));margin:0 auto;border:0;border-block:1px solid var(--line);background:transparent}
.office-direct-chat .agent-conversations>summary{padding:6px 20px;min-height:44px;font-size:12px;gap:8px}
.office-direct-chat .agent-conversations-body{padding-inline:20px}
.office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed){
 box-sizing:border-box;width:100%;max-width:var(--dm-reading-width);margin:0 auto;
 padding:20px!important;gap:24px!important;scrollbar-gutter:stable;
}
.office-direct-chat :is(.conversation,.remote-conversation) :is(.msg,.remote-message){
 margin:0!important;padding:0!important;border:0!important;min-width:0;
}
.office-direct-chat :is(.conversation,.remote-conversation) .message-main{gap:5px}
.office-direct-chat :is(.conversation,.remote-conversation) .message-avatar{width:28px;height:28px;border:0;border-radius:8px;font-size:12px;background:var(--surface-2)}
.office-direct-chat :is(.conversation,.remote-conversation) .msg-head{justify-content:flex-start;font:500 13px/1.45 var(--sans);gap:8px;margin:0;padding:0}
.office-direct-chat :is(.conversation,.remote-conversation) .msg-head .msg-reply{margin-left:0;min-height:32px;padding:4px 8px;font-size:12px;color:var(--muted)}
.office-direct-chat :is(.conversation,.remote-conversation) .msg-head time{font-size:11px;color:var(--muted)}
.office-direct-chat .conversation .speaker-agent .message-main>.body,
.office-direct-chat .remote-conversation:not(.office-thread-panel) .remote-message:not(.speaker-you) .message-main>.body{
 width:auto!important;max-width:100%;margin:0;padding:4px 0!important;
 border:0!important;background:transparent!important;border-radius:0;
 font:400 16px/1.65 var(--sans);overflow-wrap:anywhere;
}
.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you>.message-main{max-width:min(64ch,85%);width:fit-content;justify-self:end;justify-items:end}
.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you .message-main>.body{margin:0;padding:11px 15px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2);font:400 16px/1.55 var(--sans)}
.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you .msg-head{justify-content:flex-end}
.office-direct-chat :is(.conversation,.remote-conversation) :is(.message-details,.office-message-details){margin:0;border:0!important;width:auto;max-width:100%;padding:0}
.office-direct-chat :is(.conversation,.remote-conversation) :is(.message-details,.office-message-details)>summary{min-height:28px;padding:0 3px;font:400 12px/1.4 var(--sans);color:var(--muted)}
.office-direct-chat :is(.conversation,.remote-conversation) :is(.message-details,.office-message-details)[open]{width:100%}
.office-direct-chat .office-dm-receipt{font-size:11px;line-height:1.4;min-height:20px}
.office-console-shell.office-direct-chat>.office-main>.office-console-dock{
 box-sizing:border-box;width:100%;max-width:calc(var(--dm-reading-width) + 56px);
 margin:0 auto;padding:10px 20px max(12px,env(safe-area-inset-bottom))!important;
 grid-template-columns:minmax(0,1fr) 52px;gap:5px 10px;border:0;
}
.office-direct-chat .owner-console-heading{font:400 12px/1.4 var(--sans);margin:0;color:var(--muted)}
.office-console-shell.office-direct-chat>.office-main>.office-console-dock>form.office-composer{
 min-height:64px!important;padding:8px 12px!important;border-radius:16px!important;box-shadow:none!important;
}
.office-direct-chat .office-composer-input{font-size:16px!important;line-height:1.5!important}
.office-direct-chat .office-console-dock .owner-dm-launcher{width:52px;min-width:52px;min-height:52px;height:auto;border-radius:13px;font-size:11px;gap:3px}
.office-direct-chat .owner-dm-launcher img{width:23px;height:23px}
@media(max-width:820px){
 .office-direct-chat{--dm-reading-width:100%}
 .office-direct-chat :is(.conversation-head,.remote-page-head){padding:10px 14px!important}
 .office-direct-chat .conversation-title h1{font-size:18px!important}
 .office-direct-chat .conversation-title{gap:9px;align-items:flex-start}
 .office-direct-chat .conversation-actions,.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head>.btn-row{gap:0}
 .office-direct-chat .conversation-title .sub,.office-direct-chat .participant-states{font-size:11px}
 .office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed){padding:14px!important;gap:20px!important;scrollbar-gutter:auto}
 .office-direct-chat .agent-conversations>summary{padding-inline:14px}
 .office-direct-chat :is(.conversation,.remote-conversation) .speaker-you>.message-main{max-width:88%}
 .office-direct-chat :is(.conversation,.remote-conversation) .msg-head .msg-reply,.office-direct-chat :is(.conversation,.remote-conversation) :is(.message-details,.office-message-details)>summary{min-height:44px}
 .office-console-shell.office-direct-chat>.office-main>.office-console-dock{padding-inline:12px!important;grid-template-columns:minmax(0,1fr) 48px;gap:4px 8px}
 .office-direct-chat .office-console-dock .owner-dm-launcher{width:48px;min-width:48px;min-height:56px}
}
@media(pointer:coarse){.office-direct-chat .activity-observation>summary{min-height:44px}}
@media(forced-colors:active){.office-direct-chat :is(.msg-reply,.message-details>summary,.office-message-details>summary):focus-visible{outline:2px solid Highlight}}

/* Direct header: identity and actions share one compact row; source status stays visible. */
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;position:relative;row-gap:3px}
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head)>.conversation-title{display:contents}
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head)>.conversation-title>div{display:contents}
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head)>.conversation-title>:first-child{grid-area:1/1;width:30px;height:30px;align-self:center;object-fit:contain}
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head) h1{grid-area:1/1;padding-left:42px;align-self:center;min-width:0;overflow-wrap:anywhere}
.office-direct-chat .conversation-head>.conversation-actions,.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head>.btn-row{grid-area:1/2;align-self:center}
.office-direct-chat .conversation-head .activity-line,.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head .conversation-title>div>.comm-activity{grid-area:2/1/3/-1;margin:0 0 0 42px!important;font:400 12px/1.45 var(--sans);min-width:0}
.office-direct-chat .seat-scope-note{grid-area:3/1/4/-1;font-size:12px!important}
.office-direct-chat .dm-profile-details{position:relative;flex:none;border:0;margin:0;padding:0}
.office-direct-chat .dm-profile-details>summary{list-style:none;display:grid;place-items:center;min-width:44px;min-height:44px;font:400 20px/1 var(--sans);cursor:pointer;border-radius:9px;color:var(--muted)}
.office-direct-chat .dm-profile-details>summary::-webkit-details-marker{display:none}
.office-direct-chat .dm-profile-details>summary:hover{background:var(--surface-2);color:var(--ink)}
.office-direct-chat .dm-profile-popover{position:absolute;z-index:40;right:0;top:calc(100% + 6px);box-sizing:border-box;width:min(340px,calc(100vw - 28px));max-height:45dvh;overflow:auto;overscroll-behavior:contain;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 12px 32px #0002;font:400 14px/1.5 var(--sans);text-align:left}
.office-direct-chat .dm-profile-popover p{margin:0 0 10px!important;font-size:14px!important;line-height:1.5!important}
.office-direct-chat .dm-profile-popover p:last-child{margin-bottom:0!important}
.office-direct-chat .dm-profile-popover .participant-states{display:grid;gap:6px}
.office-direct-chat .dm-staffmor-entry{font:600 13px/1.4 var(--sans);padding:8px 12px;border:1px solid var(--line);border-radius:10px;white-space:nowrap}
.office-direct-chat .agent-conversations{border:0!important}
.office-direct-chat .agent-conversations>summary{color:var(--muted);font-weight:500}
.office-direct-chat .owner-console-heading{display:none}
.office-direct-chat :is(.conversation,.remote-conversation) :is(.message-details,.office-message-details){box-shadow:none!important;border-radius:0!important}
@media(max-width:820px){
 .office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){column-gap:6px}
 .office-direct-chat .dm-staffmor-entry{padding-inline:9px;font-size:12px}
 .office-direct-chat .conversation-head .activity-line,.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head .conversation-title>div>.comm-activity{margin-left:0!important}
 .office-direct-chat .activity-observation>summary{min-height:44px}
}

/* Remove inherited header/footer minimums in direct chat only. */
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){min-height:0!important;padding-block:8px!important;row-gap:0!important}
.office-direct-chat .conversation-head .activity-line{align-items:center;gap:8px;flex-wrap:nowrap}
.office-direct-chat .conversation-head .activity-line .activity-observation{flex:none}
.office-direct-chat .conversation-head .activity-line .activity-observation>summary{min-height:24px;padding:0 4px}
.office-direct-chat .conversation-head .activity-line .activity-observation>p{font-size:13px;line-height:1.5}
.office-direct-chat .conversation-head .activity-line>.comm-activity{min-width:0;flex:1}
.office-direct-chat .dm-profile-popover .agent-conversations{width:100%;margin-top:12px}
.office-direct-chat .dm-profile-popover .agent-conversations>summary{padding:0;min-height:44px}
.office-direct-chat .dm-profile-popover .agent-conversations-body{padding:0}
.office-console-shell.owner-workspace-shell.office-direct-chat>.office-main>.office-console-dock{grid-template-rows:auto!important;border-top:0!important}
.office-console-shell.owner-workspace-shell.office-direct-chat>.office-main>.office-console-dock>form.office-composer{grid-row:1!important}
.office-console-shell.owner-workspace-shell.office-direct-chat>.office-main>.office-console-dock>.owner-dm-launcher{grid-row:1!important}
.office-console-shell.owner-workspace-shell.office-direct-chat .office-console-dock>form.office-composer.office-reference-composer{padding:6px 8px!important}
.office-direct-chat .catalog-composer-picker>summary{padding-block:0!important;min-height:36px!important}
@media(max-height:520px){
 .office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){padding-block:4px!important}
 .office-direct-chat .conversation-head .activity-line,.office-direct-chat .remote-conversation:not(.office-thread-panel)>.remote-page-head .conversation-title>div>.comm-activity{font-size:11px!important}
 .office-console-shell.office-direct-chat>.office-main>.office-console-dock{padding-block:4px!important}
}

/* Actual saved-pixel repair: the information surface must escape the compact header. */
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){overflow:visible!important}
.office-direct-chat .dm-profile-popover{max-height:min(45dvh,calc(var(--office-visible-height,100dvh) - 270px))}
.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you:has(>.message-main){grid-template-columns:minmax(0,1fr)!important}
.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you>.message-avatar{display:none!important}
/* One attachment plus. Existing message controls remain a distinct ellipsis above it. */
.office-direct-chat .office-console-dock>form.office-reference-composer{position:relative}
.office-direct-chat .office-reference-composer .office-composer-secondary>.office-direct-upload{
 display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;
 border:0;border-radius:50%;padding:0;margin:0;background:transparent;color:var(--ink);font:300 27px/1 var(--sans);
}
.office-direct-chat .office-reference-composer .office-composer-secondary>.office-direct-upload:hover:not(:disabled){background:var(--surface-2)}
.office-direct-chat .office-reference-composer .office-composer-secondary>details{position:absolute;right:8px;top:2px}
.office-direct-chat .office-reference-composer .office-composer-secondary>details>summary::after{content:'⋯';font:500 23px/1 var(--sans)}
.office-direct-chat .office-reference-composer .office-composer-secondary>details[open]>.office-composer-menu{left:auto!important;right:0;top:auto;bottom:calc(100% + 8px);max-height:calc(var(--office-visible-height,100dvh) - 180px);overflow:auto}
.office-direct-chat .catalog-composer-picker>summary{min-height:44px!important}

/* Info is anchored to the whole header, keeping the panel inside its reading width. */
.office-direct-chat :is(.conversation-head,.remote-conversation:not(.office-thread-panel)>.remote-page-head){position:relative!important}
.office-direct-chat .dm-profile-details{position:static}
/* Controls sits at the form's upper right, apart from the attachment plus. */
.office-direct-chat .office-reference-composer :is(.office-composer-toolbar,.office-composer-secondary){position:static!important}
.office-direct-chat .office-reference-composer .office-composer-secondary>details>summary{display:grid!important;place-items:center;box-sizing:border-box;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important}
.office-direct-chat .office-reference-composer .office-composer-input{padding-right:56px!important}

/* Compact original-message controls; keep every action and receipt in place. */
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed){gap:16px!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .message-main{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:0 8px!important;align-content:start!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .msg-head{grid-row:1;grid-column:1;margin:0!important;padding:0!important;gap:8px!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .message-main>.body{grid-row:2;grid-column:1/-1;margin:0!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .message-main>:is(.office-dm-receipt,.office-message-status){grid-row:3;grid-column:1/-1;font-size:11px!important;line-height:1.4!important;margin:4px 0 0!important;min-height:0!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .message-main>:is(.message-details,.office-message-details){grid-row:1;grid-column:2;justify-self:end;align-self:start;margin:0!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .message-main>:is(.message-details,.office-message-details)[open]{grid-row:4;grid-column:1/-1;width:100%;margin-top:8px!important}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you>.message-main{justify-items:end}
.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation,.remote-conversation) .speaker-you .message-main>.body{padding:10px 14px!important}
.office-direct-chat .agent-timeline{border:0!important;border-radius:0;background:transparent!important;margin:8px 0 0!important;padding:0!important}
.office-direct-chat .agent-timeline>summary{font:500 13px/1.4 var(--sans);color:var(--muted);min-height:44px;display:flex;align-items:center;padding:0!important}
.office-direct-chat .office-composer-context{display:block!important;min-width:0;max-width:100%;white-space:normal;overflow:visible!important}
.office-direct-chat .office-composer-context :is(.notice,[role=alert],.send-error){box-sizing:border-box;max-width:100%;min-width:0;white-space:normal!important;overflow-wrap:anywhere;font-size:13px!important;line-height:1.45!important}
.office-direct-chat .office-composer-context .with-pose{display:grid!important;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:8px;padding:8px!important}
.office-direct-chat .office-composer-context .with-pose .staffmor-reaction-portrait{width:32px!important;height:40px!important;min-width:0;max-width:32px}
.office-direct-chat .office-composer-context .with-pose .staffmor-reaction-portrait img{width:32px!important;height:40px!important;object-fit:contain}
@media(max-width:820px){.office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed){gap:14px!important}}

.office-direct-chat .agent-timeline>summary::before{content:'›';font-size:20px;line-height:1;margin-right:8px}
.office-direct-chat .agent-timeline[open]>summary::before{content:'⌄'}

/* Preserve one attachment glyph under the inherited reference-form selectors. */
.office-console-shell.owner-workspace-shell.office-direct-chat .office-console-dock form.office-reference-composer .office-composer-secondary>details>summary::after{content:'⋯'!important;font:500 23px/1 var(--sans)!important}
/* Original refusal copy must wrap; retain the original alert, character and draft. */
.office-console-shell.owner-workspace-shell.office-direct-chat form.office-reference-composer>.office-composer-context:has(.notice.error){height:auto!important;max-height:none!important;overflow:visible!important;white-space:normal!important}
.office-direct-chat form.office-reference-composer .notice.error{display:grid!important;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:8px;padding:8px!important;min-width:0;max-width:100%;box-sizing:border-box}
.office-direct-chat form.office-reference-composer .notice.error :is(span,p){white-space:normal!important;overflow-wrap:anywhere!important;min-width:0;line-height:1.45}
.office-direct-chat form.office-reference-composer .notice.error>.pose{width:32px!important;height:40px!important;object-fit:contain}

/* Inherited reference-form positioning must not push the actual Controls menu offscreen. */
.office-console-shell.owner-workspace-shell.office-direct-chat .office-console-dock form.office-reference-composer .office-composer-secondary>details[open]>.office-composer-menu{left:auto!important;right:0!important;top:auto!important;bottom:calc(100% + 8px)!important;width:min(320px,calc(100vw - 40px));max-width:calc(100vw - 40px)!important;box-sizing:border-box;max-height:calc(var(--office-visible-height,100dvh) - 160px)!important;overflow:auto!important}

/* Account for the adjacent DM tile when sizing the floating Controls menu. */
.office-console-shell.owner-workspace-shell.office-direct-chat .office-console-dock form.office-reference-composer .office-composer-secondary>details[open]>.office-composer-menu{width:min(320px,calc(100vw - 96px))!important;max-width:min(320px,calc(100vw - 96px))!important;max-height:min(400px,calc(var(--office-visible-height,100dvh) - 270px))!important}
.office-direct-chat .office-composer-menu button{min-height:44px}

/* Original Controls occupies its own grid cell beside Skills, after previews. */
.office-direct-chat .office-reference-composer .office-composer-secondary{display:contents!important}
.office-direct-chat .office-reference-composer .office-composer-secondary>.office-direct-upload{grid-column:1;grid-row:3;align-self:center}
.office-direct-chat .office-reference-composer .office-composer-secondary>details{position:relative!important;right:auto!important;top:auto!important;grid-column:3;grid-row:2;align-self:center;justify-self:end}

/* Short/keyboard-height reading preserves a usable latest-message slice. */
@media(max-height:520px){
 .office-console-shell.owner-workspace-shell.office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed){padding-block:4px 0!important;gap:8px!important}
 .office-direct-chat :is(.conversation>.feed,.remote-conversation>.remote-feed)>.agent-timeline{margin:0!important;margin-top:-8px!important}
}
