/* Chat surfaces share compact facts, title links and secondary disclosures. */
.conversation-product{--chat-card-border:#e4e8ed;--chat-card-bg:#fafbfd;--chat-secondary:#606b79;--chat-accent:#0071e3}
.conversation-product .room-list.messages{padding-bottom:16px}
.conversation-product .room-message.message-first{margin-top:12px}
.room-message>.room-speaker{color:#66717e;font-size:11px;line-height:1.5;margin-bottom:4px}
.conversation-product .room-message>.preserve-text.message-bubble{line-height:1.55;border-radius:18px;font-weight:400}
.conversation-product .room-message.mine>.preserve-text.message-bubble{background:var(--chat-accent);border-radius:18px}

/* Arrangements show facts and confirmation; titles open confirmed items. */
.conversation-product .room-arrangement{width:320px;max-width:100%;margin:8px 0 2px;padding:13px 14px;border:1px solid var(--chat-card-border);border-radius:16px;background:var(--chat-card-bg);color:#263342;box-shadow:0 1px 2px #15253a04;text-align:left}
.room-arrangement>.arrangement-title{margin:0 0 5px;font-size:15px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.room-arrangement>.arrangement-title::before{content:"";display:inline-block;width:18px;height:18px;margin-right:7px;vertical-align:-3px;background:var(--chat-accent);-webkit-mask:var(--solar-calendar) center/contain no-repeat;mask:var(--solar-calendar) center/contain no-repeat}
.room-arrangement>.arrangement-title:not(:first-child){margin-top:12px;padding-top:11px;border-top:1px solid #e9edf2}
.room-arrangement .micro{margin:4px 0 7px;font-size:12px;line-height:1.65;color:var(--chat-secondary);white-space:pre-wrap;overflow-wrap:anywhere}
.room-arrangement>button.quiet{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 14px;margin:5px 0 3px;border:0;border-radius:11px;background:var(--chat-accent);color:#fff;font-size:13px;font-weight:550;line-height:1.5}
.room-arrangement>button.quiet:hover{background:#0064cb}
.room-arrangement>button:disabled{opacity:.55}
.room-arrangement>.buttons{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin:7px 0 0}
.room-arrangement>.buttons:not(.matter-links){padding-top:7px;border-top:1px solid #e9edf2}
.room-arrangement .text-button{min-height:40px;padding:8px 9px;border:0;border-radius:10px;font-size:12px;line-height:1.5;color:var(--chat-accent);background:transparent;white-space:normal;text-align:left}
.room-arrangement .text-button:hover,.room-arrangement .text-button:focus-visible{background:#eaf3ff}
.conversation-product .room-arrangement .text-button,.conversation-product .room-message>.text-button,.conversation-product .room-message>.matter-links .matter-entry,.conversation-product .workspace-window .text-button,.conversation-product #my-todos-dialog .text-button,.conversation-product #room-reaction-dialog .text-button{font-weight:500;text-decoration:none}
.room-arrangement .matter-links{gap:4px;margin-top:2px}
.room-arrangement .matter-links .text-button{border:1px solid #e1eaf5;background:#fff}
.conversation-product .room-arrangement>.arrangement-open{display:block;width:100%;min-height:44px;padding:3px 0;background:transparent;color:inherit;border-radius:6px;text-align:left;font-size:15px;line-height:1.5;font-weight:600;white-space:normal}
.conversation-product .room-arrangement>.arrangement-open:not(:first-child){padding-top:11px}
.room-arrangement>.arrangement-open:hover,.room-arrangement>.arrangement-open:focus-visible{color:var(--chat-accent)}

/* Inline native disclosures avoid another layer of popup navigation. */
.conversation-product .chat-disclosure{margin:8px 0 0;max-width:100%;text-align:left}
.chat-disclosure>summary{display:flex!important;align-items:center;gap:6px;width:fit-content;max-width:100%;min-height:40px;padding:7px 9px;list-style:none;border-radius:10px;color:#536579;font-size:12px;font-weight:500;cursor:pointer;line-height:1.5}
.chat-disclosure>summary::-webkit-details-marker{display:none}
.chat-disclosure>summary::after{content:"";width:16px;height:16px;flex:none;background:currentColor;-webkit-mask:var(--solar-menu) center/contain no-repeat;mask:var(--solar-menu) center/contain no-repeat}
.chat-disclosure>summary:hover,.chat-disclosure[open]>summary{background:#edf3fa;color:var(--chat-accent)}
.chat-disclosure .action-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:6px;padding:7px;border:1px solid #e3eaf3;border-radius:12px;background:white}
.conversation-product .action-list>button,.conversation-product .action-list>a{display:flex;align-items:center;min-height:44px;margin:0;padding:9px 10px;background:transparent;color:var(--chat-accent);border:0;border-radius:8px;font-size:13px;font-weight:400;line-height:1.5;text-align:left;text-decoration:none;white-space:normal;overflow-wrap:anywhere}
.action-list>button:hover,.action-list>a:hover{background:#f0f5fc}
.action-list>button:disabled{opacity:.5}
.source-disclosure>summary::after{ -webkit-mask-image:var(--solar-chevron-right);mask-image:var(--solar-chevron-right)}
.source-disclosure[open]>summary::after{transform:rotate(90deg)}
.conversation-product .room-message>.source-disclosure{align-self:flex-start}
.conversation-product .room-message>.action-disclosure{align-self:flex-start}
.room-message.mine>.action-disclosure{align-self:flex-end}
.conversation-product [hidden]{display:none!important}
.conversation-product .micro:empty,.conversation-product .buttons:empty{display:none}

/* Secondary actions stay available but have a quieter visual hierarchy. */
.conversation-product .room-message>.text-button,.room-message>.matter-links .matter-entry{display:inline-flex;align-items:center;justify-content:center;min-height:36px;margin-top:3px;padding:6px 10px;border:1px solid #e9eef4;border-radius:11px;background:#fafcfe;color:#536579;font-size:12px;line-height:1.5;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
.room-message>.text-button::after{content:"";width:14px;height:14px;flex:none;margin-left:5px;background:currentColor;-webkit-mask:var(--solar-arrow-right) center/contain no-repeat;mask:var(--solar-arrow-right) center/contain no-repeat}
.room-message>.text-button:hover,.room-message>.matter-links .matter-entry:hover{background:#edf4fc;border-color:#dce6f2}
.room-message .room-sources{width:100%;margin:8px 0 2px;padding:9px 11px;border-left:2px solid #cbd9ea;border-radius:0 9px 9px 0;background:#f8fafc;color:var(--chat-secondary);text-align:left;overflow-wrap:anywhere}
.room-sources .micro{font-size:12px;line-height:1.6}
.room-sources p{margin:0 0 5px}
.room-sources a{display:inline-block;padding:3px 0;max-width:100%;text-decoration-thickness:1px;text-underline-offset:3px}
.room-message .room-reaction-row{gap:5px;margin-top:5px}
.room-message .room-member-reaction,.room-message .room-agent-ack{min-height:30px;padding:4px 9px;border:1px solid #e3e9f0;border-radius:14px;background:#f5f8fc;color:#526478;font-size:11px;line-height:1.4}
.room-message .room-monochrome-thumb{width:17px;height:17px}

/* Images retain their full contents in a reserved, responsive preview frame. */
.conversation-product .room-image-preview{width:260px;max-width:100%;height:auto;aspect-ratio:4/3;margin:8px 0 3px;border:1px solid var(--chat-card-border);border-radius:16px;background:#f6f8fb;box-shadow:none}
.room-image-preview img{width:100%;height:100%;object-fit:contain}
.conversation-product #attachment-window{width:min(640px,calc(100% - 24px))}
.attachment-image{border-radius:14px}
.attachment-preview{padding:12px;border:1px solid #e8edf3;border-radius:12px;background:#fafbfd;line-height:1.65}

/* Compact detail sheets and task rows use the same surface and spacing. */
.conversation-product .workspace-window{padding:20px!important;border:1px solid var(--chat-card-border);border-radius:22px;box-shadow:0 16px 60px #18263b1c}
.workspace-window>.sheet-head{margin-bottom:16px;gap:12px}
.workspace-window>.sheet-head h2{font-size:17px;line-height:1.4;font-weight:600;letter-spacing:0}
.workspace-window>.sheet-head h2{min-width:0;overflow-wrap:anywhere}
.workspace-window .sheet-close{width:44px;min-width:44px;min-height:44px;border-radius:12px}
.workspace-window .sheet-close:hover{background:#f0f4f9}
#matter-current{padding:14px;border:1px solid var(--chat-card-border);border-radius:16px;background:var(--chat-card-bg)}
#matter-title{margin:0 0 12px;font-size:17px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.matter-facts{gap:9px;font-size:13px;line-height:1.6}
.matter-facts div{grid-template-columns:4.8em minmax(0,1fr);gap:10px}
.matter-facts dt{color:var(--chat-secondary)}
.matter-facts dd{overflow-wrap:anywhere}
#matter-delivery{margin:12px 0 0;font-size:12px;line-height:1.6;color:var(--chat-secondary)}
.matter-actions{gap:7px;margin:13px 0}
.matter-actions button{min-height:42px;padding:9px 12px;border-radius:11px;font-size:13px;line-height:1.5}
.matter-actions .primary{background:var(--chat-accent);color:#fff}
.matter-source{padding:12px;border:1px solid #e7edf5;border-radius:12px;background:#fafcfe;font-size:13px;line-height:1.65}
.matter-history li{padding:10px 0;border-bottom:1px solid #edf0f4;font-size:13px}
.matter-history li:last-child{border-bottom:0}
.matter-history li p{margin:3px 0;line-height:1.6}
.conversation-product #my-todos-dialog{padding:18px 20px;border:1px solid var(--chat-card-border);border-radius:22px;box-shadow:0 16px 60px #18263b1c}
#my-todos-dialog>header{gap:12px;align-items:center;margin-bottom:5px}
#my-todos-dialog>header h2{font-size:17px;font-weight:600}
#my-todos-dialog>header>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
#my-todos-dialog>header .text-button{min-height:40px;padding:6px 3px;font-size:12px;color:#536579}
.popover-todo{padding:13px 0;border-bottom:1px solid #edf0f4}
.popover-todo:last-child{border-bottom:0}
.popover-todo h3{font-size:15px;line-height:1.5;font-weight:550}
.popover-todo .micro{font-size:12px;line-height:1.55;color:var(--chat-secondary)}
.popover-todo-top{gap:11px}
.popover-todo-actions{margin:3px 0 0 35px;gap:8px;flex-wrap:wrap}
.popover-todo-actions .text-button{min-height:38px;padding:7px 10px;border-radius:10px;font-size:12px;color:var(--chat-accent);background:#f1f6fd}
.todo-defer-form{padding:10px 0 0 35px}
.todo-defer-form input{max-width:100%;min-width:0;font-size:16px}
.todo-defer-form .quiet{min-height:42px;border-radius:11px}
.conversation-product .todo-title{display:block;min-height:36px;padding:0;background:transparent;color:var(--ink);text-align:left;font-size:15px;font-weight:550;line-height:1.5;border-radius:5px;overflow-wrap:anywhere}
.todo-title:hover{color:var(--chat-accent)}
.popover-todo-actions{display:block;margin-top:0}
.popover-todo-actions .chat-disclosure{margin-top:0}
.popover-todo-actions .action-list{min-width:210px;max-width:100%}
.attachment-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px;margin-top:14px}
.attachment-actions>.primary{min-height:44px;border-radius:11px;font-size:13px}
.attachment-actions>.chat-disclosure{flex:1;min-width:150px;margin:0}
#attachment-status{margin:0 0 10px}
#attachment-text{margin-top:10px;max-height:42dvh;overflow:auto}
#note-more,#matter-more{padding-top:8px;border-top:1px solid #e9edf3}
#note-more>.history{margin-top:8px;padding-top:8px}
#note-links{display:grid;gap:4px;margin:10px 0}
#note-links:empty{display:none}
#note-links>button{display:block;min-height:44px;padding:8px 0;background:transparent;text-align:left;text-decoration:none;font-size:13px;font-weight:500;color:var(--chat-accent);overflow-wrap:anywhere}
#note-links>button::after{content:"";display:inline-block;width:14px;height:14px;margin-left:5px;vertical-align:-2px;background:currentColor;-webkit-mask:var(--solar-chevron-right) center/contain no-repeat;mask:var(--solar-chevron-right) center/contain no-repeat}
#note-more>#note-version{display:block;margin:8px}
#matter-source{margin-top:12px}
#matter-more .history{margin-top:10px;padding-top:8px}
#voice-dialog{max-width:calc(100% - 24px);width:400px}
#voice-dialog .chat-disclosure p{font-size:13px;line-height:1.6}
.conversation-product #room-reaction-close{min-height:44px;width:44px;padding:0}
#my-todos-dialog .sheet-close{width:44px;min-width:44px;min-height:44px}

/* All existing composer controls keep their functions and get larger targets. */
.conversation-product .composer{gap:3px;align-items:flex-end}
.conversation-product .composer .mic-button{width:44px;height:44px;min-height:44px;padding:11px;color:#5e6c7c}
.conversation-product .composer .send-button{width:44px;height:44px;min-height:44px;margin:0;padding:5px;border:5px solid transparent;background:var(--chat-accent);background-clip:padding-box}
.conversation-product #capture-body{min-height:44px;padding:9px 13px;border-color:#dce2ea}
.conversation-product #capture-body:focus{border-color:#82b8ef;outline-color:#e1efff}
.composer-context{padding:9px 11px;border:1px solid #e2eaf6;border-left:3px solid #78a8dd;border-radius:12px;background:#f7faff;gap:10px}
#composer-context-label{margin:0;font-size:13px;line-height:1.5;color:#465a72}
#composer-cancel{min-height:42px;padding:6px 8px;font-size:12px;line-height:1.5;color:var(--chat-accent);white-space:normal}
#capture-progress,#voice-status,#room-status{font-size:12px;line-height:1.5}

.conversation-product #room-reaction-dialog{width:min(380px,calc(100% - 24px));max-height:75dvh;overflow:auto;padding:16px;border:1px solid var(--chat-card-border);border-radius:22px;background:#fff;box-shadow:0 16px 60px #18263b1c}
#room-reaction-dialog .section-heading{margin:0 0 9px;gap:10px}
#room-reaction-heading{font-size:16px;font-weight:600}
#room-reaction-close{min-height:42px;padding:7px 10px;font-size:13px;color:#536579}
#room-reaction-quote{max-height:140px;overflow:auto;padding:10px 12px;margin:0 0 12px;border-radius:12px;background:#f4f6f9;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#room-reaction-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.room-reaction-choice{width:100%;min-width:44px;min-height:46px;margin:0;border-radius:13px;background:#f6f8fb;font-size:24px;line-height:1;padding:9px 4px}
.room-reaction-choice[aria-pressed=true]{background:#e5f0ff;box-shadow:inset 0 0 0 1px #8bb9ed}
#room-reaction-dialog>p.micro{font-size:12px;line-height:1.6;color:var(--chat-secondary)}
@media(max-width:620px){
 .conversation-product .room-arrangement{width:280px;padding:12px}
 .room-arrangement .text-button{min-height:42px;padding:8px}
 .conversation-product .workspace-window{padding:17px!important;width:calc(100% - 24px);max-height:90dvh;border-radius:20px}
 .matter-facts div{grid-template-columns:4.4em minmax(0,1fr);gap:8px}
 .conversation-product #my-todos-dialog{width:calc(100% - 24px);inset:auto 12px 12px;padding:16px}
 .popover-todo-actions .text-button{min-height:42px}
 .conversation-product #room-reaction-dialog{inset:auto 12px 12px;margin:0;width:calc(100% - 24px)}
}

/* Message references remain below their source without an extra reply action. */
.message-origin{font-size:10px;color:var(--chat-secondary);margin-top:2px}
.message-quote{font-size:11px;color:var(--chat-secondary);border-left:2px solid currentColor;padding-left:8px;max-width:100%;overflow-wrap:anywhere}
.message-bubble[data-replyable=true]{-webkit-touch-callout:none;touch-action:pan-y pinch-zoom}
@media(pointer:coarse){.message-bubble[data-replyable=true]{-webkit-user-select:none;user-select:none}}
#room-reply-context{padding:8px 12px;margin:0 0 6px;background:var(--chat-card-bg);border-radius:12px}
#room-reply-label{overflow-wrap:anywhere;margin:0}
/* Three-dot actions float in the top layer and never contribute to card height. */
.conversation-product .chat-action-menu{display:inline-flex;position:relative;margin:0;padding:0;border:0;text-align:left}
.conversation-product .action-menu-trigger{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:10px;border:0;border-radius:10px;background:transparent;color:#68788a}
.action-menu-trigger .solar-icon{width:20px;height:20px}
.conversation-product .action-menu-trigger:hover,.conversation-product .action-menu-trigger[aria-expanded=true]{background:#eaf1fa;color:var(--chat-accent)}
.conversation-product .chat-action-popover{display:none;position:fixed;inset:auto;margin:0;width:240px;max-width:calc(100vw - 16px);max-height:min(60dvh,420px);overflow:auto;padding:6px;border:1px solid #e0e7f0;border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 8px 32px #172a452b;z-index:1000;text-align:left}
.conversation-product .chat-action-popover[data-open=true]{display:block}
.chat-action-popover::backdrop{background:transparent}
.conversation-product .chat-action-popover>.action-list{display:flex;flex-direction:column;gap:1px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.conversation-product .chat-action-popover .action-list>button,.conversation-product .chat-action-popover .action-list>a{display:flex;width:100%;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:9px;background:transparent;color:#2d415b;font-size:13px;font-weight:400;line-height:1.5;text-align:left;text-decoration:none;white-space:normal;overflow-wrap:anywhere}
.conversation-product .chat-action-popover .action-list>button:hover,.conversation-product .chat-action-popover .action-list>a:hover{background:#edf4fd;color:var(--chat-accent)}
.chat-action-popover .micro{margin:8px 12px;font-size:12px;line-height:1.6}
.chat-action-popover>.history{margin:0;padding:0;border:0}
.chat-action-popover>.history>summary{min-height:44px;padding:10px 12px;font-size:13px;color:#2d415b;font-weight:400}
.chat-action-popover .history[open]{padding-bottom:10px}
.chat-action-popover .history form{padding:0 10px}
.conversation-product .room-arrangement{position:relative}
.conversation-product .room-arrangement>.chat-action-menu{position:absolute;top:3px;right:3px}
.conversation-product .room-arrangement>.arrangement-title:first-child{padding-right:35px}
.room-arrangement .arrangement-meta{display:flex;align-items:baseline;gap:6px}
.arrangement-meta::before{content:"";display:inline-block;flex:none;width:15px;height:15px;position:relative;top:3px;background:currentColor;-webkit-mask:var(--solar-user) center/contain no-repeat;mask:var(--solar-user) center/contain no-repeat}
.popover-todo{position:relative}
.conversation-product .popover-todo-actions{position:absolute;top:6px;right:-6px;margin:0}
.popover-todo .todo-title{padding-right:32px}
.conversation-product #matter-more.chat-action-menu,.conversation-product #attachment-more.chat-action-menu{position:absolute;top:17px;right:63px;margin:0;padding:0;border:0}
#note-detail{position:relative}
.conversation-product #note-more.chat-action-menu{position:absolute;top:-3px;right:44px;margin:0;padding:0;border:0}
#attachment-window .attachment-actions{margin:0;gap:0}
.attachment-actions>.primary{margin-top:14px}
.workspace-window>.sheet-head h2{padding-right:42px}
.room-attachment-message{cursor:pointer}
.room-attachment-message .attachment-label-icon{width:17px;height:17px;margin-right:6px;vertical-align:-3px}
.room-attachment-message:focus-visible{outline:3px solid #82b8ef;outline-offset:3px}
.room-attachment-message[aria-disabled=true]{opacity:.65;cursor:default}
.attachment-expired{font-size:12px}
