.communication-tabs,.communication-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.communication-tabs{margin:0 0 18px}.communication-tabs form,.communication-actions form{margin:0}.communication-tabs form{margin-left:auto}.communication-list{overflow:hidden}.communication-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:19px 22px;border-bottom:1px solid var(--line)}.communication-row:last-child{border-bottom:0}.communication-row.is-unread{background:#f2f7ff;border-left:3px solid var(--blue);padding-left:19px}.communication-summary{min-width:0;flex:1}.communication-summary p{margin:7px 0;color:var(--ink);font-size:13px;overflow-wrap:anywhere}.communication-summary small,.communication-muted{color:var(--muted);font-size:11px;overflow-wrap:anywhere}.communication-label{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.communication-label strong{overflow-wrap:anywhere;font-size:14px}.communication-new,.communication-count{display:inline-block;border-radius:12px;background:#1769e0;color:#fff;font-size:10px;font-weight:700;padding:3px 7px;line-height:1.25}.communication-count{margin-left:5px;min-width:20px;text-align:center}.communication-count[hidden]{display:none}.communication-message{color:inherit;text-decoration:none}.communication-message:hover,.communication-message:focus-visible{background:#eaf2ff}.communication-subject{overflow-wrap:anywhere}.communication-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:0 0 22px;padding-bottom:22px;border-bottom:1px solid var(--line)}.communication-meta dt{font-size:11px;color:var(--muted);margin-bottom:7px}.communication-meta dd{margin:0;font-size:13px;overflow-wrap:anywhere}.communication-meta small{display:block;color:var(--muted);margin-top:3px}.communication-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;font-size:14px}.communication-parent{border-top:1px solid var(--line);padding-top:18px;margin-top:24px;overflow-wrap:anywhere;font-size:13px}.communication-parent summary{cursor:pointer;font-weight:700;margin-bottom:12px}.communication-compose textarea{resize:vertical;min-height:210px}.communication-compose .communication-actions{justify-content:flex-end}.communication-actions .button{white-space:nowrap}
@media(max-width:650px){.communication-row{align-items:flex-start;flex-direction:column;gap:12px;padding:16px}.communication-row.is-unread{padding-left:13px}.communication-meta{grid-template-columns:1fr}.communication-tabs form{margin-left:0}.communication-actions{width:100%}}
/* Conversation layout: history scrolls independently from the page. */
.chat-shell{display:grid;grid-template-columns:280px minmax(0,1fr);padding:0;overflow:hidden;min-height:540px;height:min(740px,calc(100dvh - 160px))}.chat-sidebar{display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid var(--line);background:#f8fafc}.chat-person-picker{padding:18px;border-bottom:1px solid var(--line);margin:0}.chat-person-picker label{font-size:12px;font-weight:700;display:block;margin-bottom:8px}.chat-person-picker>div{display:flex;gap:7px}.chat-person-picker select{min-width:0;width:100%;font-size:12px;padding:9px}.chat-person-picker .button{flex-shrink:0;padding:8px 11px}.chat-conversations{min-height:0;overflow:auto;flex:1}.chat-conversation{display:block;color:inherit;text-decoration:none;padding:16px 18px;border-bottom:1px solid var(--line)}.chat-conversation>div{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-conversation strong{font-size:13px;overflow-wrap:anywhere}.chat-conversation p{margin:7px 0;color:var(--muted);font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-conversation small{color:var(--muted);font-size:10px}.chat-conversation:hover,.chat-conversation.is-active{background:#eaf2ff}.chat-conversation.is-active{box-shadow:inset 3px 0 var(--blue)}.chat-list-pagination{padding:10px 18px;display:flex;justify-content:space-between;gap:12px;font-size:11px}.chat-list-pagination a[hidden]{display:none}.chat-room{min-height:0;min-width:0;display:flex;flex-direction:column;position:relative;background:#fff}.chat-room-header{padding:17px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.chat-room-header strong{display:block;overflow-wrap:anywhere;font-size:15px}.chat-room-header small{display:block;color:var(--muted);font-size:11px;margin-top:4px;overflow-wrap:anywhere}.chat-connection{color:var(--muted);font-size:10px;white-space:nowrap}.chat-history{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 22px;background:#f7f9fc;scrollbar-gutter:stable}.chat-older-wrap{text-align:center}.chat-older-wrap .button{font-size:11px;margin:0 0 12px;padding:7px 12px}.chat-message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 15px}.chat-message.is-mine{align-items:flex-end}.chat-bubble{max-width:84%;padding:11px 14px;background:#fff;border:1px solid #e1e7ef;border-radius:14px 14px 14px 3px;min-width:40px}.chat-message.is-mine .chat-bubble{background:#e8f1ff;border-color:#d0e1ff;border-radius:14px 14px 3px 14px}.chat-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.chat-legacy-subject{display:block;border-bottom:1px solid var(--line);padding-bottom:7px;margin-bottom:7px;font-size:12px;overflow-wrap:anywhere}.chat-message-meta{display:flex;gap:8px;margin:5px 3px 0;font-size:10px;color:var(--muted)}.chat-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;padding:14px 18px;border-top:1px solid var(--line);margin:0}.chat-composer textarea{min-height:64px;max-height:180px;resize:vertical;line-height:1.5;margin:0;font-size:13px}.chat-composer .button{margin-bottom:1px;height:42px}.chat-error{grid-column:1/-1;font-size:12px;color:#b42318;margin:0}.chat-jump-anchor{position:relative;flex:none;height:0;z-index:3}.chat-jump{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid #ccdcf5;background:#fff;border-radius:50%;padding:0;color:#245eb9;box-shadow:0 3px 12px #17334d24;cursor:pointer}.chat-jump:hover{background:#eaf2ff;border-color:#9dbbea}.chat-jump:focus-visible{outline:2px solid #2774df;outline-offset:3px}.chat-jump[hidden],.chat-error[hidden],.chat-start[hidden],.chat-older-wrap button[hidden]{display:none}.chat-start,.chat-inactive{text-align:center;padding:20px;color:var(--muted);font-size:12px;line-height:1.7}.chat-welcome{display:flex;flex:1;flex-direction:column;justify-content:center;align-items:center;padding:30px;text-align:center}.chat-welcome h2{font-size:20px;margin:0 0 12px}.chat-welcome p{margin:4px 0;color:var(--muted);font-size:13px}
@media(max-width:850px){.chat-shell{grid-template-columns:230px minmax(0,1fr)}.chat-history{padding:14px}.chat-room-header{padding:14px}.chat-connection{max-width:120px;white-space:normal;text-align:right}.chat-composer{padding:12px}.chat-bubble{max-width:90%}}
@media(max-width:620px){.chat-shell{display:flex;flex-direction:column;height:auto;min-height:600px}.chat-sidebar{border-right:0;border-bottom:1px solid var(--line);max-height:230px;flex:none}.chat-person-picker{padding:12px}.chat-conversations{max-height:125px}.chat-conversation{padding:10px 14px}.chat-conversation p{margin:4px 0}.chat-list-pagination{padding:6px 14px}.chat-room{height:540px;min-height:440px}.chat-message-meta{font-size:9px}.chat-bubble{max-width:92%}.chat-room-header strong{font-size:14px}.chat-composer .button{font-size:11px;padding:9px}.chat-welcome p{line-height:1.7}}
.chat-composer .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* HWAIL ONE team chat: native disclosures and inline file selection need no backdrop. */
.chat-shell{grid-template-columns:300px minmax(0,1fr);height:min(790px,calc(100dvh - 145px))}
.chat-sidebar-scroll{min-height:0;overflow:auto;flex:1;scrollbar-gutter:stable}.chat-sidebar-scroll .chat-conversations{overflow:visible;max-height:none}.chat-list-heading{font-size:11px;font-weight:750;letter-spacing:.02em;color:#64748b;padding:17px 18px 8px;margin:0}.chat-list-empty{font-size:11px;color:var(--muted);padding:5px 18px 13px;margin:0}.chat-list-pagination:has(a[hidden]:only-child){display:none}.chat-member-total{display:inline-block;background:#dce7f3;color:#4b6380;border-radius:7px;padding:2px 5px;vertical-align:1px;font-size:10px;font-weight:600}.chat-group-create{border-bottom:1px solid var(--line);min-height:0;flex-shrink:0;background:#fff}.chat-group-create>summary{list-style:none;cursor:pointer;color:#245eb9;font-size:12px;font-weight:700;padding:14px 18px}.chat-group-create>summary::-webkit-details-marker{display:none}.chat-group-create>summary:after{content:'⌄';float:right}.chat-group-create[open]>summary:after{content:'⌃'}.chat-group-create>form{padding:0 18px 16px;margin:0;overflow:auto;max-height:440px}.chat-group-create>form>label{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:10px 0 7px;font-size:11px;font-weight:700}.chat-group-create>form>label>small{color:var(--muted);font-size:10px;font-weight:500}.chat-group-create input:not([type=checkbox]){font-size:12px;min-height:36px;padding:8px 9px;box-sizing:border-box;width:100%}.chat-group-create .button{width:100%;font-size:12px;min-height:36px;padding:9px}.chat-member-list{border:1px solid var(--line);border-radius:8px;max-height:180px;overflow:auto;background:#f8fafc;margin-top:9px;padding:4px}.chat-member-option{display:flex;align-items:center;gap:9px;padding:8px;border-radius:5px;font-size:12px;cursor:pointer;margin:0}.chat-member-option:hover{background:#edf3fd}.chat-member-option input{margin:0;accent-color:#1769e0;width:15px;height:15px;min-height:0;flex-shrink:0}.chat-member-option span{min-width:0;overflow-wrap:anywhere}.chat-member-option small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.chat-member-option[hidden]{display:none}.chat-group-help{font-size:10px;color:var(--muted);line-height:1.6;margin:9px 0}.chat-group-create .chat-error{margin:8px 0;line-height:1.5}.chat-sidebar:has(.chat-group-create[open]) .chat-sidebar-scroll{flex-basis:50px}.chat-participants{font-size:11px;margin-top:7px;max-width:560px;color:var(--muted)}.chat-participants summary{cursor:pointer}.chat-participants p{line-height:1.8;margin:6px 0 0;overflow-wrap:anywhere}.chat-room-header>div{min-width:0}.chat-sender{font-size:11px;font-weight:600;color:#566479;margin:0 3px 6px;overflow-wrap:anywhere}.chat-composer{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px 17px}.chat-compose-row{display:flex;align-items:flex-end;gap:9px}.chat-compose-row textarea{flex:1;min-width:0;min-height:62px}.chat-compose-row .button{flex-shrink:0;min-width:74px}.chat-attach-button{display:flex;align-items:center;justify-content:center;color:#52687e;background:#f2f5f9;border:1px solid #dce4ed;border-radius:9px;width:38px;height:42px;flex-shrink:0;cursor:pointer;margin-bottom:1px}.chat-attach-button:hover{background:#e6edf7;color:#1a5aba}.chat-attach-button:disabled{opacity:.45;cursor:wait}.chat-composer-note{display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;color:#7b8798;font-size:10px;line-height:1.5}.chat-selected-files{display:flex;flex-wrap:wrap;gap:6px;max-height:120px;overflow:auto}.chat-file-chip{display:flex;align-items:center;gap:7px;background:#f2f6fc;border:1px solid #dbe4f0;border-radius:7px;padding:5px 7px;font-size:11px;max-width:100%;box-sizing:border-box}.chat-file-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-file-chip>button{width:22px;height:22px;border:0;border-radius:4px;background:transparent;color:#687890;flex-shrink:0;cursor:pointer;font-size:18px;line-height:1}.chat-file-chip>button:hover{background:#e2e9f3;color:#9e2e2e}.chat-file-chip>button:disabled{opacity:.4;cursor:wait}.chat-send-status{font-size:11px;color:#245eb9;margin:0}.chat-error{white-space:pre-line}.chat-files{display:flex;flex-direction:column;gap:8px}.chat-files+.chat-text{margin-top:10px}.chat-file{background:#ffffffb8;border:1px solid #dce5ee;border-radius:8px;min-width:190px;max-width:360px;overflow:hidden}.chat-file-link{display:flex;gap:10px;padding:11px;color:#1e4e85;text-decoration:none;align-items:center}.chat-file-link>span:last-child{min-width:0}.chat-file-link strong{display:block;font-size:12px;overflow-wrap:anywhere;font-weight:650}.chat-file-link small{display:block;font-size:10px;color:#77869b;margin-top:4px}.chat-file-link:hover{background:#f0f5ff}.chat-file-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:22px;width:32px;height:34px;background:#e9f0fb;border-radius:6px;color:#527bb2}.chat-file-link.is-expired{color:#8290a0}.chat-file-link.is-expired .chat-file-icon{background:#eef1f5;color:#98a2b0}.chat-file-expiry{display:block;padding:0 10px 9px;font-size:9px;color:#8391a3;line-height:1.5}.chat-drop-hint{position:absolute;inset:10px;z-index:2;border:2px dashed #578be0;border-radius:14px;background:#eef5fff2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;pointer-events:none;color:#235fae;font-size:18px;font-weight:700}.chat-drop-hint small{font-size:12px;font-weight:400}.chat-drop-hint[hidden],.chat-selected-files[hidden],.chat-send-status[hidden],.chat-composer input[hidden]{display:none}.chat-welcome-icon{font-size:34px;line-height:1;background:#eff5fe;color:#5082c6;border-radius:18px;padding:19px;margin-bottom:22px}.chat-bubble{box-sizing:border-box}.chat-group-create summary:focus-visible,.chat-attach-button:focus-visible,.chat-file-link:focus-visible,.chat-file-chip button:focus-visible{outline:2px solid #2774df;outline-offset:2px}
@media(max-width:1000px){.chat-shell{grid-template-columns:265px minmax(0,1fr)}.chat-composer-note{font-size:9px}.chat-file{min-width:160px}}
@media(max-width:620px){.chat-shell{display:flex;height:auto}.chat-sidebar{max-height:265px}.chat-sidebar-scroll{max-height:150px}.chat-sidebar:has(.chat-group-create[open]){max-height:610px}.chat-group-create>form{max-height:390px}.chat-person-picker{padding:10px 13px}.chat-group-create>summary{padding:11px 14px}.chat-list-heading{padding:12px 14px 6px}.chat-room{height:580px}.chat-room-header{padding:12px}.chat-composer{padding:10px;gap:7px}.chat-compose-row{gap:6px}.chat-compose-row .button{min-width:57px;padding:9px 7px}.chat-attach-button{width:32px}.chat-compose-row textarea{font-size:12px}.chat-composer-note{display:block;font-size:9px}.chat-composer-note span{display:block}.chat-bubble{max-width:94%;padding:10px}.chat-file{max-width:270px;min-width:0}.chat-file-link{padding:9px;gap:8px}.chat-file-link strong{font-size:11px}.chat-participants{font-size:10px}.chat-drop-hint{font-size:15px}.chat-drop-hint small{font-size:10px}}
.chat-group-create>form>label{flex-direction:row;text-align:left}.chat-group-create .chat-member-list .chat-member-option{flex-direction:row;justify-content:flex-start;text-align:left;align-items:center;width:auto}.chat-group-create .chat-member-list .chat-member-option>span{text-align:left}.chat-group-create .chat-member-list .chat-member-option input{width:15px;height:15px;min-width:15px;flex:none}
/* v126: conversation controls stay inside the room without overlay layers. */
.chat-room-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}.chat-leave{border:1px solid #d7e0eb;border-radius:7px;background:#fff;color:#64748b;font-size:11px;padding:7px 10px;cursor:pointer;white-space:nowrap}.chat-leave:hover{background:#f4f7fb;color:#b42318}.chat-leave:disabled{opacity:.5;cursor:wait}.chat-leave:focus-visible{outline:2px solid #2774df;outline-offset:3px}.chat-deleted{color:#7b8798;font-style:italic;font-size:12px}.chat-message-meta{align-items:center;flex-wrap:wrap}.chat-composer-note{display:block;text-align:left}.chat-room-error{padding:9px 20px;background:#fff5f4;margin:0;flex-shrink:0}.chat-room-error[hidden]{display:none}
@media(max-width:620px){.chat-room-actions{flex-direction:column;align-items:flex-end;gap:5px}.chat-leave{padding:5px 8px;font-size:10px}}

/* v127: application-owned chat actions and recipient picker */
.chat-context-menu button{font:inherit}.chat-forward-label{display:block;margin-bottom:6px;font-size:10px;color:#637991;line-height:1.4}.chat-context-menu{position:fixed;z-index:990;min-width:205px;max-width:calc(100vw - 16px);padding:6px;border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:0 12px 38px rgba(16,36,56,.2)}.chat-context-menu[hidden]{display:none}.chat-context-menu button{display:block;width:100%;border:0;border-radius:7px;padding:10px 12px;background:#fff;color:var(--ink);text-align:left;font-size:12px;cursor:pointer}.chat-context-menu button:hover,.chat-context-menu button:focus-visible{background:#edf4fa;outline:none}.chat-context-menu .is-danger{color:#b43742}.chat-forward-dialog{max-height:calc(100vh - 40px);overflow:auto;width:min(480px,calc(100% - 28px));margin:auto}.chat-forward-dialog::backdrop{background:rgba(15,23,42,.52);backdrop-filter:blur(3px)}.chat-forward-dialog .chat-forward-preview{margin:0 0 18px;padding:10px 12px;border-radius:8px;background:#f4f7fa;white-space:pre-wrap;overflow-wrap:anywhere;max-height:90px;overflow:auto;font-size:12px}.chat-forward-dialog label{display:block;margin:0 0 6px;font-size:12px;font-weight:700}.chat-forward-targets{display:grid;gap:6px;margin-top:12px;max-height:min(310px,40vh);overflow:auto}.chat-forward-target{display:block;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;text-align:left;cursor:pointer}.chat-forward-target strong,.chat-forward-target small{display:block;overflow-wrap:anywhere}.chat-forward-target strong{font-size:13px}.chat-forward-target small{margin-top:3px;color:var(--muted);font-size:11px}.chat-forward-target[aria-pressed="true"]{border-color:var(--blue);background:#eef6ff;box-shadow:inset 0 0 0 1px var(--blue)}.chat-forward-more{margin-top:8px}.chat-forward-dialog .app-dialog-actions{position:sticky;bottom:-24px;padding:12px 0 0;background:#fff}.chat-forward-dialog .chat-error{margin-top:12px}

/* Compact composer tools share one size and stay vertically aligned at every width. */
/* Image dimensions reserve their final space before decoding, including lazy history images. */
.chat-file.chat-image-file{width:300px;min-width:0;max-width:100%}.chat-image-preview{position:relative;display:block;width:100%;aspect-ratio:1;overflow:hidden;background:#edf2f7}.chat-image-preview>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}.chat-image-preview.is-unavailable{display:flex;align-items:center;justify-content:center}.chat-image-unavailable{padding:10px;color:#78899e;font-size:11px;text-align:center;overflow-wrap:anywhere;box-sizing:border-box;max-width:100%}.chat-image-file .chat-file-link{padding:8px 10px;gap:7px}.chat-image-file .chat-file-icon{width:22px;height:24px;font-size:17px}.chat-image-file .chat-file-link strong{font-size:11px}.chat-image-file .chat-file-link small{margin-top:2px}.chat-image-file .chat-file-expiry{padding-bottom:7px}
.chat-compose-tools{display:flex;flex-direction:column;gap:4px;flex:0 0 auto;align-self:stretch;justify-content:flex-end}
.chat-compose-tools .chat-tool-button{display:flex;align-items:center;justify-content:center;width:32px;height:30px;min-width:32px;min-height:30px;padding:0;margin:0;box-sizing:border-box;border:1px solid #dce4ed;border-radius:7px;color:#52687e;background:#f2f5f9;cursor:pointer;flex:0 0 auto}
.chat-compose-tools .chat-tool-button svg{width:18px;height:18px;pointer-events:none}.chat-compose-tools .chat-tool-button:hover{background:#e6edf7;color:#1a5aba}.chat-compose-tools .chat-tool-button:focus-visible{outline:2px solid #2774df;outline-offset:2px}.chat-compose-tools .chat-tool-button:disabled{opacity:.45;cursor:wait}
.chat-message[tabindex]:focus-visible{outline:2px solid #2774df;outline-offset:4px;border-radius:10px}
.chat-invite-dialog{max-height:calc(100vh - 40px);overflow:auto;width:min(480px,calc(100% - 28px));margin:auto}.chat-invite-dialog::backdrop{background:rgba(15,23,42,.52);backdrop-filter:blur(3px)}
.chat-invite-dialog .chat-invite-help{font-size:12px;line-height:1.65;color:var(--muted);margin:0 0 16px;white-space:pre-line}.chat-invite-dialog form>label{display:block;margin:0 0 6px;font-size:12px;font-weight:700}.chat-invite-dialog input[type=search]{width:100%;box-sizing:border-box;min-width:0}
.chat-invite-targets{display:grid;gap:6px;max-height:min(290px,35vh);overflow:auto;margin-top:9px}.chat-invite-option{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:10px;border:1px solid var(--line);border-radius:9px;background:#fff;padding:10px 12px;margin:0;text-align:left;cursor:pointer}.chat-invite-option:hover{background:#f4f8fc}.chat-invite-option:has(input:checked){border-color:var(--blue);background:#eef6ff}.chat-invite-option input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:16px;padding:0;margin:0;flex:none;accent-color:var(--blue)}.chat-invite-option span{min-width:0;text-align:left}.chat-invite-option strong,.chat-invite-option small{display:block;overflow-wrap:anywhere}.chat-invite-option strong{font-size:13px}.chat-invite-option small{font-size:11px;color:var(--muted);margin-top:3px}
.chat-invite-selected{display:flex;flex-wrap:wrap;gap:6px;max-height:100px;overflow:auto;margin-top:12px}.chat-invite-selected[hidden]{display:none}.chat-invite-chip{display:inline-flex;align-items:center;gap:6px;background:#edf4fc;border:1px solid #dce7f4;border-radius:7px;padding:4px 6px 4px 9px;font-size:12px;max-width:100%;box-sizing:border-box}.chat-invite-chip>span{overflow-wrap:anywhere;min-width:0}.chat-invite-chip button{width:22px;height:22px;padding:0;background:none;border:0;color:#536b84;cursor:pointer;font-size:18px;flex:none}.chat-invite-count{display:block;font-size:11px;color:var(--muted);margin-top:9px}.chat-invite-dialog .app-dialog-actions{position:sticky;bottom:-24px;padding:12px 0 0;background:#fff}.chat-invite-dialog .chat-error{margin-top:12px}

/* Image messages show the image alone; file details belong to the protected viewer. */
.chat-image-preview{border:0;padding:0;margin:0;color:inherit;font:inherit;cursor:zoom-in;box-sizing:border-box;text-align:initial}.chat-image-preview:focus-visible{outline:3px solid #2774df;outline-offset:-3px}.chat-image-preview:disabled{cursor:default}.chat-image-dialog{width:min(1080px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;margin:auto;overflow:hidden;border:1px solid #d9e2ed;border-radius:16px;background:#fff;box-sizing:border-box}.chat-image-dialog[open]{display:flex;flex-direction:column}.chat-image-dialog::backdrop{background:rgba(10,18,30,.78);backdrop-filter:blur(3px)}.chat-image-viewer-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;flex-shrink:0}.chat-image-viewer-header h2{margin:0;font-size:16px}.chat-image-viewer-close{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;padding:0;border:1px solid #dce4ed;border-radius:9px;background:#f5f7fb;color:#4d627b;font-size:27px;line-height:1;cursor:pointer}.chat-image-viewer-close:hover{background:#e9eff7}.chat-image-viewer-close:focus-visible{outline:2px solid #2774df;outline-offset:2px}.chat-image-viewer-stage{display:flex;align-items:center;justify-content:center;height:min(70dvh,760px);min-height:0;overflow:hidden;background:#101a29;flex:1 1 auto}.chat-image-viewer-stage img{display:block;width:100%;height:100%;object-fit:contain;min-width:0;min-height:0}.chat-image-viewer-stage img[hidden],.chat-image-viewer-stage p[hidden],.chat-image-viewer-footer a[hidden]{display:none}.chat-image-viewer-stage p{max-width:480px;padding:24px;color:#d8e2ef;text-align:center;font-size:13px;line-height:1.7}.chat-image-viewer-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;flex-shrink:0}.chat-image-viewer-footer>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#607189;font-size:12px}.chat-image-viewer-footer .button{flex-shrink:0;font-size:12px;min-height:38px;box-sizing:border-box}
@media(max-width:620px){.chat-image-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.chat-image-viewer-header{padding:10px 12px}.chat-image-viewer-header h2{font-size:14px}.chat-image-viewer-stage{height:65dvh}.chat-image-viewer-footer{padding:10px 12px;gap:8px}.chat-image-viewer-footer .button{font-size:11px;padding:10px;min-height:40px}}

/* Image window controls, zoom canvas, and nonblocking minimized restore bar. */
.chat-image-preview{cursor:pointer}.chat-image-window-actions{display:flex;align-items:center;gap:6px}.chat-image-window-button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:1px solid #dce4ed;border-radius:9px;background:#f5f7fb;color:#4d627b;font-size:23px;line-height:1;cursor:pointer}.chat-image-window-button:hover{background:#e9eff7}.chat-image-window-button:focus-visible,.chat-image-zoom-toolbar button:focus-visible,.chat-image-restore-bar button:focus-visible{outline:2px solid #2774df;outline-offset:2px}.chat-image-zoom-toolbar{display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 12px;border-top:1px solid #edf1f5;border-bottom:1px solid #dce4ed;background:#f8fafc;flex-shrink:0}.chat-image-zoom-toolbar button{display:flex;align-items:center;justify-content:center;min-width:34px;height:32px;padding:0 9px;border:1px solid #d4deeb;border-radius:7px;color:#42607e;background:#fff;font-size:12px;cursor:pointer}.chat-image-zoom-toolbar button:disabled{opacity:.4;cursor:default}.chat-image-zoom-toolbar button[aria-pressed="true"]{background:#e7f0ff;border-color:#bfd4f4;color:#225aa4}.chat-image-zoom-toolbar output{min-width:48px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums;color:#42607e}.chat-image-viewer-stage{display:block;position:relative;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scroll-behavior:auto}.chat-image-viewer-canvas{position:relative;min-width:100%;min-height:100%;flex:none}.chat-image-viewer-canvas img{position:absolute;display:block;max-width:none;max-height:none;width:auto;height:auto;object-fit:contain;user-select:none;-webkit-user-drag:none}.chat-image-viewer-stage.is-zoomed img{cursor:grab}.chat-image-viewer-stage.is-panning,.chat-image-viewer-stage.is-panning img{cursor:grabbing}.chat-image-viewer-canvas[hidden]{display:none}.chat-image-viewer-stage>p:not([hidden]){position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:auto;box-sizing:border-box}.chat-image-dialog.is-maximized{inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}.chat-image-dialog.is-maximized .chat-image-viewer-stage{height:auto;flex:1 1 0}.chat-image-restore-bar{position:fixed;right:20px;bottom:18px;z-index:980;display:flex;align-items:stretch;width:min(360px,calc(100vw - 32px));border:1px solid #cbd9e9;border-radius:12px;background:#fff;box-shadow:0 7px 30px #17334d33;overflow:hidden}.chat-image-restore-bar[hidden]{display:none}.chat-image-restore-bar button{border:0;background:#fff;color:#42607e;cursor:pointer;padding:10px;min-height:44px;font-size:12px}.chat-image-restore-bar button:hover{background:#edf4fd}.chat-image-restore-bar>button:first-child{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 10px;text-align:left;flex:1;min-width:0}.chat-image-restore-bar>button:first-child>span:first-child{grid-row:1/3;align-self:center;font-size:24px}.chat-image-restore-bar [data-image-viewer-restore-name]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}.chat-image-restore-label{font-size:10px;color:#8190a3}.chat-image-restore-bar>button:last-child{font-size:25px;width:42px;flex:none;border-left:1px solid #e5ebf3}
@media(max-width:620px){.chat-image-viewer-header{gap:8px}.chat-image-viewer-header h2{font-size:13px}.chat-image-window-actions{gap:4px}.chat-image-window-button,.chat-image-viewer-close{width:32px;height:32px;min-width:32px}.chat-image-zoom-toolbar{gap:5px;padding:7px 8px}.chat-image-zoom-toolbar button{min-width:31px;padding:0 7px;font-size:11px}.chat-image-zoom-toolbar output{min-width:42px;font-size:11px}.chat-image-dialog.is-maximized{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.chat-image-restore-bar{right:8px;bottom:8px;width:min(360px,calc(100vw - 16px))}}
.chat-reply{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0;box-sizing:border-box;border:0;border-left:3px solid #79a3db;border-radius:4px;background:#edf2f8;color:#4d617b;padding:8px 10px;margin:0 0 9px;font:inherit;text-align:left;line-height:1.45;overflow-wrap:anywhere}.chat-reply strong{font-size:11px;color:#315b90}.chat-reply span{font-size:12px;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}button.chat-reply{cursor:pointer}button.chat-reply:hover{background:#e0eafb}button.chat-reply:focus-visible{outline:2px solid #2774df;outline-offset:2px}.chat-reply.is-unavailable{color:#7a8595;border-left-color:#c5ccd6;background:#f0f2f5}.chat-message.is-mine .chat-reply:not(.is-unavailable){background:#dce9fb}.chat-reply-composer{display:flex;align-items:center;gap:10px;min-width:0;border-left:3px solid #6290d1;background:#f1f5fb;border-radius:5px;padding:8px 10px}.chat-reply-composer>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}.chat-reply-composer strong{font-size:11px;color:#315b90}.chat-reply-composer span{font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#63748b}.chat-reply-composer>button{flex-shrink:0;border:0;background:transparent;font-size:22px;line-height:1;color:#63748b;cursor:pointer;padding:5px}.chat-reply-composer>button:focus-visible{outline:2px solid #2774df;outline-offset:1px}.chat-reply-navigation{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;background:#edf4ff;border-top:1px solid #d4e2f5;color:#315b90;font-size:11px}.chat-reply-navigation>button{border:1px solid #b8cce8;background:#fff;border-radius:5px;color:#315b90;font:inherit;padding:4px 8px;cursor:pointer}.chat-reply-composer[hidden],.chat-reply-navigation[hidden]{display:none}.chat-message.is-reply-target>.chat-bubble{outline:3px solid #82addd;outline-offset:3px;box-shadow:0 0 0 6px #dceafb}.chat-message.is-reply-target{scroll-margin-block:24px}

/* Albums keep the existing thumbnail width within the conversation bubble. */
.chat-image-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:300px;max-width:100%;min-width:0}.chat-image-grid>.chat-image-file{grid-column:span 2;width:100%;min-width:0;max-width:100%;border-radius:6px;box-sizing:border-box}.chat-image-grid>.chat-gallery-half{grid-column:span 3}.chat-image-grid>.chat-gallery-full{grid-column:1/-1}.chat-image-grid .chat-image-preview{aspect-ratio:1}.chat-image-grid>.chat-gallery-half .chat-image-preview{aspect-ratio:3/2}.chat-image-grid[data-image-count="2"] .chat-image-preview,.chat-image-grid[data-image-count="4"] .chat-image-preview{aspect-ratio:1}.chat-image-grid .chat-image-preview>img{object-fit:cover}.chat-image-grid .chat-image-unavailable{font-size:9px;padding:4px}
/* Three photographs form one filled mosaic; orientation selects its leading tile. */
.chat-image-grid[data-image-layout="portrait"],.chat-image-grid[data-image-layout="landscape"]{aspect-ratio:1;grid-template-rows:repeat(2,minmax(0,1fr))}.chat-image-grid[data-image-layout="portrait"]>.chat-gallery-lead{grid-column:1/5;grid-row:1/3}.chat-image-grid[data-image-layout="portrait"]>.chat-gallery-side-first{grid-column:5/7;grid-row:1}.chat-image-grid[data-image-layout="portrait"]>.chat-gallery-side-last{grid-column:5/7;grid-row:2}.chat-image-grid[data-image-layout="landscape"]>.chat-gallery-lead{grid-column:1/7;grid-row:1}.chat-image-grid[data-image-layout="landscape"]>.chat-gallery-side-first{grid-column:1/4;grid-row:2}.chat-image-grid[data-image-layout="landscape"]>.chat-gallery-side-last{grid-column:4/7;grid-row:2}.chat-image-grid[data-image-layout="portrait"] .chat-image-preview,.chat-image-grid[data-image-layout="landscape"] .chat-image-preview{height:100%;aspect-ratio:auto}
/* Navigation stays fixed beside the image while the zoom canvas scrolls. */
.chat-image-viewer-body{position:relative;display:flex;min-height:0;height:min(70dvh,760px);flex:1 1 auto}.chat-image-viewer-body .chat-image-viewer-stage{height:auto;min-width:0;flex:1 1 auto}.chat-image-dialog.is-maximized .chat-image-viewer-body{height:auto;flex:1 1 0}.chat-image-gallery-arrow{position:absolute;z-index:1;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:44px;height:58px;padding:0;border:1px solid #ffffff50;border-radius:10px;background:#17283fba;color:#fff;font-size:42px;line-height:1;cursor:pointer;box-shadow:0 2px 8px #0004;box-sizing:border-box}.chat-image-gallery-arrow svg{display:block;width:28px;height:28px;flex:none;pointer-events:none}.chat-image-gallery-arrow.is-previous{left:10px}.chat-image-gallery-arrow.is-next{right:10px}.chat-image-gallery-arrow:hover{background:#244469e8}.chat-image-gallery-arrow:disabled{opacity:.25;cursor:default}.chat-image-gallery-arrow:focus-visible{outline:3px solid #9fc6ff;outline-offset:2px}.chat-image-gallery-arrow[hidden],.chat-image-gallery-counter[hidden]{display:none}.chat-image-gallery-counter{flex:none;color:#607189;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.chat-image-viewer-footer [data-image-viewer-name]{flex:1}
@media(max-width:620px){.chat-image-viewer-body{height:65dvh}.chat-image-gallery-arrow{width:36px;height:48px;font-size:36px}.chat-image-gallery-arrow.is-previous{left:6px}.chat-image-gallery-arrow.is-next{right:6px}.chat-image-gallery-counter{font-size:11px}}
.chat-image-viewer-footer{flex-wrap:wrap}.chat-image-download-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0;max-width:100%}.chat-image-download-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:5px;text-align:center;white-space:normal}.chat-image-download-actions .button[hidden]{display:none}
@media(max-width:620px){.chat-image-gallery-arrow svg{width:24px;height:24px}.chat-image-viewer-footer [data-image-viewer-name]{flex-basis:calc(100% - 64px)}.chat-image-download-actions{width:100%;gap:6px}.chat-image-download-actions .button{flex:1;min-width:0;font-size:10px;line-height:1.4;padding:8px 6px;min-height:36px}}
.chat-image-viewer-stage:not(.is-zoomed){touch-action:pan-y}
.chat-image-viewer-stage.is-sliding{overflow:hidden}.chat-image-slide-incoming{position:absolute;inset:0;z-index:1;min-width:0;min-height:0;pointer-events:none;will-change:transform}

/* Match the Case ranked picker and keep the dropdown inside the sidebar. */
.chat-person-picker .ranked-combobox{flex:1;min-width:0}
.chat-person-picker .customer-suggestions{max-height:240px;overflow-y:auto;z-index:30}
.chat-person-picker .customer-suggestions button{white-space:normal;text-align:left}
.chat-person-picker .customer-suggestions .chat-self-option{flex-direction:column;align-items:flex-start;gap:4px}
.chat-person-picker-controls>button{flex:none}
/* v186: the image tools wrap inside the viewer; the image retains the remaining space. */
.chat-image-edit-tools{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;padding:8px 12px;background:#f8fafc;border-bottom:1px solid #dce4ed;flex-shrink:0}
.chat-image-edit-tools button,.chat-image-edit-tools select{border:1px solid #cbd8e7;border-radius:6px;background:#fff;color:#365572;padding:6px 8px;font:inherit;font-size:11px;min-height:30px;cursor:pointer}
.chat-image-edit-tools button[aria-pressed="true"]{background:#e7f0ff;border-color:#7daae7;color:#164d95}
.chat-image-edit-tools button:disabled{opacity:.4;cursor:default}.chat-image-edit-tools button:focus-visible,.chat-image-context-menu button:focus-visible{outline:2px solid #2774df;outline-offset:1px}
.chat-image-edit-tools input[type="color"]{padding:2px;width:32px;height:30px;min-height:0;border:1px solid #cbd8e7;border-radius:6px;background:#fff}
.chat-image-edit-overlay{position:absolute;max-width:none;max-height:none;pointer-events:none;z-index:1}.chat-image-edit-overlay[hidden]{display:none}
.chat-image-viewer-stage.is-drawing{touch-action:none}.chat-image-viewer-stage.is-drawing img{cursor:crosshair}
.chat-image-context-menu{position:absolute;z-index:5;width:200px;background:#fff;border:1px solid #d3dfed;border-radius:8px;box-shadow:0 5px 25px #12294340;padding:5px;box-sizing:border-box}.chat-image-context-menu[hidden]{display:none}
.chat-image-context-menu button{display:block;width:100%;border:0;background:#fff;text-align:left;padding:10px;border-radius:5px;color:#253c58;font-size:12px;cursor:pointer}.chat-image-context-menu button:hover{background:#eaf2fc}
.chat-file-chip.is-image{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;width:140px;max-width:100%;padding:5px;border-radius:8px;box-sizing:border-box}
.chat-file-chip.is-image>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.chat-file-chip.is-image>.chat-draft-preview{grid-column:1/-1;width:100%;height:96px;max-width:100%;padding:0;border:0;border-radius:5px;overflow:hidden;background:#eaf0f7;display:flex;align-items:center;justify-content:center;color:#526985;font-size:11px;cursor:zoom-in}
.chat-draft-preview img{display:block;width:100%;height:100%;object-fit:contain}.chat-draft-preview img[hidden]{display:none}
@media(max-width:620px){.chat-image-edit-tools{gap:4px;padding:6px 8px;max-height:30dvh;overflow-y:auto}.chat-image-edit-tools button{padding:5px;font-size:10px}.chat-image-viewer-footer{flex-wrap:wrap}.chat-image-download-actions{flex-wrap:wrap}.chat-file-chip.is-image{width:112px}.chat-file-chip.is-image>.chat-draft-preview{height:80px}}
.chat-selected-files:has(.chat-draft-preview){max-height:180px;align-items:flex-start}.chat-file-chip.is-image{flex:none}

/* v187: compact icon tools, preset colors, and text entered on the image. */
.chat-image-edit-tools .chat-image-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:32px;padding:5px;flex:none}
.chat-image-icon svg{display:block;width:20px;height:20px;pointer-events:none;flex:none}
.chat-image-palette{position:absolute;z-index:6;display:flex;flex-direction:column;gap:12px;padding:12px;width:256px;max-width:calc(100% - 8px);box-sizing:border-box;overflow:auto;background:#fff;border:1px solid #ccd8e7;border-radius:6px;box-shadow:0 5px 20px #142d4b40}
.chat-image-palette[hidden]{display:none}
.chat-image-color-area{position:relative;flex:none;height:144px;min-height:72px;border-radius:2px;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent);cursor:crosshair;touch-action:none;outline-offset:2px}
.chat-image-color-area>span{position:absolute;width:10px;height:10px;box-sizing:border-box;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #0008;transform:translate(-50%,-50%);pointer-events:none}
.chat-image-color-spectrum{display:flex;align-items:center;gap:10px;min-width:0}
.chat-image-eyedropper{display:flex;align-items:center;justify-content:center;flex:none;width:24px;height:28px;margin:0;padding:2px;min-height:0;border:0;border-radius:3px;background:#fff;color:#3c4043;cursor:pointer}
.chat-image-eyedropper svg{width:20px;height:20px;pointer-events:none}
.chat-image-color-current{width:24px;height:24px;border-radius:50%;flex:none;border:1px solid #0002;box-sizing:border-box}
.chat-image-palette .chat-image-color-hue{display:block;flex:1;width:0;min-width:0;height:14px;min-height:0;margin:0;padding:0;border:0;border-radius:7px;appearance:none;-webkit-appearance:none;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00);cursor:pointer}
.chat-image-color-hue::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:14px;height:20px;border:2px solid #fff;border-radius:4px;background:transparent;box-shadow:0 0 0 1px #0008}
.chat-image-color-hue::-moz-range-thumb{width:10px;height:16px;border:2px solid #fff;border-radius:4px;background:transparent;box-shadow:0 0 0 1px #0008}
.chat-image-color-values{display:flex;align-items:flex-start;gap:6px;min-width:0}
.chat-image-color-fields{flex:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;min-width:0}
.chat-image-color-fields.is-hex{grid-template-columns:minmax(0,1fr)}
.chat-image-color-fields label{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;font:400 11px Arial,"Malgun Gothic",sans-serif;color:#5f6368}
.chat-image-color-fields input{width:100%;min-width:0;height:28px;min-height:0;box-sizing:border-box;padding:3px 1px;border:1px solid #bfc4ca;border-radius:2px;text-align:center;font:400 12px Arial,"Malgun Gothic",sans-serif;color:#202124;background:#fff;appearance:textfield;-moz-appearance:textfield}
.chat-image-color-fields input::-webkit-inner-spin-button,.chat-image-color-fields input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.chat-image-color-values select{flex:none;width:57px;min-width:0;height:28px;min-height:0;padding:3px 0;border:0;border-radius:2px;background:#fff;color:#3c4043;font:400 11px Arial,"Malgun Gothic",sans-serif;cursor:pointer}
.chat-image-color-presets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));justify-items:center;gap:7px;padding-top:8px;border-top:1px solid #e1e7ef}
.chat-image-palette :focus-visible{outline:2px solid #2774df;outline-offset:2px}
.chat-image-color-area[aria-disabled="true"]{opacity:.4;cursor:default}
.chat-image-viewer-stage.is-color-picking,.chat-image-viewer-stage.is-color-picking img,.chat-image-viewer-stage.is-color-picking .chat-image-text-hit{cursor:crosshair}
.chat-image-copy-notice{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:20;box-sizing:border-box;width:max-content;max-width:calc(100% - 32px);padding:12px 18px;border:1px solid #ffffff30;border-radius:10px;background:#182b42ed;color:#fff;box-shadow:0 6px 24px #101a2940;font-size:13px;line-height:1.5;text-align:center;pointer-events:none;opacity:1;transition:opacity 350ms ease-out}
.chat-image-copy-notice.is-fading{opacity:0}.chat-image-copy-notice[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.chat-image-copy-notice{transition:none}}
.chat-image-discard-dialog{box-sizing:border-box;width:440px;max-width:calc(100vw - 32px);margin:auto;color:#182b42}
.chat-image-discard-dialog::backdrop{background:#101a2966}
.chat-image-discard-dialog .app-dialog-actions{flex-wrap:wrap}
.chat-image-palette .chat-image-swatch{width:32px;height:26px;min-height:0;min-width:0;margin:0;padding:0;border:1px solid #97a6b7;border-radius:3px;cursor:pointer}
.chat-image-palette .chat-image-swatch[aria-pressed="true"]{outline:2px solid #426da7;outline-offset:2px;border-color:#fff}
.chat-image-palette input[type="color"][hidden]{display:none}
.chat-image-edit-tools .chat-image-color-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:0;padding:5px;border-radius:6px;flex:none}
.chat-image-color-toggle>span{display:block;width:20px;height:20px;border:1px solid #0002;pointer-events:none}
.chat-image-color-toggle[aria-expanded="true"]{outline:2px solid #9ebde6;outline-offset:1px}
.chat-image-edit-tools select{width:58px;height:32px;min-height:32px;padding:4px;font-variant-numeric:tabular-nums}
.chat-image-edit-tools input[type="color"]{width:32px;height:32px;flex:none}
.chat-image-text-hits{position:absolute;inset:0;z-index:2;pointer-events:none}
.chat-image-text-hit,.chat-image-text-editor{position:absolute;display:block;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;transform-origin:0 0}
.chat-image-text-hit{pointer-events:auto;cursor:move;touch-action:none;box-shadow:none}
.chat-image-text-hit:hover,.chat-image-text-hit:focus-visible{outline:1px dashed #3881d6;outline-offset:1px}
.chat-image-text-editor{z-index:3;outline:1px dashed #3881d6;box-shadow:0 0 0 2px #ffffff80}
.chat-image-textbox{display:block;box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;resize:none;overflow:hidden;font-family:Arial,"Malgun Gothic",sans-serif;font-weight:400;line-height:1.25;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-all;touch-action:auto}
.chat-image-textbox:focus{outline:none;box-shadow:none}
.chat-image-textbox[contenteditable]{cursor:text;user-select:text;-webkit-user-select:text;text-align:left;font-style:normal}
.chat-image-textbox span{font-family:inherit;font-size:inherit;line-height:inherit}
.chat-image-text-editor button{position:absolute;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:0;touch-action:none}
.chat-image-text-editor .chat-image-text-move{left:0;top:-24px;width:24px;height:22px;border:1px solid #3881d6;border-radius:3px;background:#fff;color:#275c9e;cursor:move;z-index:2}
.chat-image-text-move svg{width:18px;height:18px;display:block;margin:auto;pointer-events:none}
.chat-image-text-handle{background:transparent;z-index:1}.chat-image-text-handle:focus-visible,.chat-image-text-move:focus-visible{outline:2px solid #93bcff}
.chat-image-text-handle.is-n,.chat-image-text-handle.is-s{left:0;width:100%;height:8px;cursor:ns-resize}
.chat-image-text-handle.is-n{top:-4px}.chat-image-text-handle.is-s{bottom:-4px}
.chat-image-text-handle.is-e,.chat-image-text-handle.is-w{top:0;height:100%;width:8px;cursor:ew-resize}
.chat-image-text-handle.is-e{right:-4px}.chat-image-text-handle.is-w{left:-4px}
.chat-image-text-editor .chat-image-text-handle.is-nw,.chat-image-text-editor .chat-image-text-handle.is-ne,.chat-image-text-editor .chat-image-text-handle.is-sw,.chat-image-text-editor .chat-image-text-handle.is-se{width:8px;height:8px;background:#fff;border:1px solid #3881d6;z-index:2}
.chat-image-text-handle.is-nw{left:-4px;top:-4px;cursor:nwse-resize}.chat-image-text-handle.is-ne{right:-4px;top:-4px;cursor:nesw-resize}
.chat-image-text-handle.is-sw{left:-4px;bottom:-4px;cursor:nesw-resize}.chat-image-text-handle.is-se{right:-4px;bottom:-4px;cursor:nwse-resize}
.chat-image-dialog [data-image-save][hidden]{display:none}.chat-image-dialog [aria-invalid="true"]{outline:2px solid #d84444;outline-offset:1px}
.chat-image-dialog [data-image-save][aria-busy="true"]{cursor:progress}
@media(max-width:620px){.chat-image-edit-tools .chat-image-icon{width:30px;height:30px;min-height:30px}}

/* v194: image-only draft attachments, with an accessible remove control. */
.chat-file-chip.is-image{position:relative;display:block}
.chat-file-chip.is-image>button:not(.chat-draft-preview){position:absolute;right:7px;top:7px;background:#fff;box-shadow:0 1px 4px #0003}

/* Arrival popups and personal notification selection. */
.communication-toast-stack{position:fixed;right:20px;bottom:20px;z-index:1450;display:flex;flex-direction:column;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}
.communication-toast{display:flex;align-items:flex-start;min-width:0;background:#eaf2ff;border:1px solid #b5cbea;border-left:4px solid #4c79b5;border-radius:12px;box-shadow:0 10px 30px #21406b30,0 2px 7px #21406b14;pointer-events:auto;animation:communication-arrive .2s ease-out;transition:opacity .22s ease,transform .22s ease}
.communication-toast.is-leaving{opacity:0;transform:translateY(8px);pointer-events:none}
.communication-toast-content{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;padding:13px 8px 14px 14px;text-decoration:none;color:#182c49;overflow-wrap:anywhere}
.communication-toast-content small{font-size:11px;font-weight:600;color:#44638b}.communication-toast-content strong{font-size:14px;line-height:1.4;color:#203d65}.communication-toast-content span{font-size:12px;line-height:1.5;color:#53647b;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.communication-toast-close{flex:none;width:30px;height:30px;padding:0;margin:7px 5px 0 0;border:0;background:transparent;color:#687b96;font:22px/1 sans-serif;border-radius:6px;cursor:pointer}.communication-toast-close:hover{background:#d7e5f8;color:#244b7f}.communication-toast a:focus-visible,.communication-toast button:focus-visible{outline:2px solid #316bdc;outline-offset:2px}
.notification-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 22px;margin-bottom:12px}.notification-selection .notification-select-all{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;margin:0}.notification-selection [data-notification-selected-count]{font-size:12px;color:#60738c}.notification-selection>button{margin-left:auto}.notification-selection input[type=checkbox],.notification-selectable>.notification-select-item{width:18px;height:18px;min-width:18px;flex:none;margin:0;accent-color:#316bdc}.notification-selectable{gap:14px}.notification-selectable>.notification-select-item{align-self:center}.notification-selectable>.communication-summary{min-width:0;flex:1}
@keyframes communication-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:620px){.communication-toast-stack{right:16px;bottom:16px}.notification-selectable{flex-wrap:wrap}.notification-selectable>.communication-summary{flex-basis:calc(100% - 36px)}.notification-selectable>.communication-actions{margin-left:32px}.notification-selection>button{margin-left:0}}
@media(prefers-reduced-motion:reduce){.communication-toast{animation:none;transition:none}}
@media print{.communication-toast-stack{display:none!important}}

/* v212 sent-message editing */
.chat-edit-dialog{width:min(580px,calc(100vw - 32px));border:1px solid #dbe3f0;border-radius:20px;padding:26px;background:#fff;color:#182940;box-shadow:0 24px 80px #13284930}
.chat-edit-dialog::backdrop{background:#10233e70}
.chat-edit-dialog h2{font-size:20px;margin:0 0 10px}.chat-edit-dialog p{color:#6d7d93;font-size:13px}
.chat-edit-dialog textarea{width:100%;min-height:150px;resize:vertical;box-sizing:border-box;margin:12px 0 20px;line-height:1.6}
.chat-edit-dialog [data-edit-error]{color:#be2e39}.chat-message-meta [data-chat-edited]{font-size:11px;color:#7a879b}

/* v212: label enhancement must not move Select all ahead of its checkbox. */
.notification-selection .notification-select-all>input[type=checkbox]{order:-1}
.notification-selection .notification-select-all>.field-title{order:0;margin:0}
@media(max-width:620px){.notification-selection{padding-left:16px;padding-right:16px}.notification-selectable{flex-direction:row;align-items:center}}

/* Selection controls sit at each bubble's top-left, outside its text. */
.chat-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 16px;background:#edf4ff;border-bottom:1px solid #d5e3f7;flex-shrink:0;font-size:12px;color:#32557f}
.chat-selection-bar[hidden]{display:none}
.chat-selection-bar>span{margin-right:auto;font-weight:600}
.chat-selection-bar button{width:auto;border:1px solid #c9d9ed;border-radius:7px;background:#fff;padding:6px 10px;color:#335b8c;cursor:pointer;font:inherit}
.chat-selection-bar button:disabled{opacity:.5;cursor:default}
.chat-room [data-chat-select-toggle][aria-pressed=true]{color:#205eaf;background:#eaf2ff;border-color:#9cbce7}
.chat-message .chat-bubble{position:relative}
.chat-message-pick{position:absolute;left:-28px;top:4px;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:1px;margin:0;border:0;border-radius:4px;background:#f7f9fc;color:#7b8ba1;cursor:pointer;opacity:1}
.chat-message-pick[hidden]{display:none}
.chat-message-pick .chat-pick-tick{visibility:hidden}
.chat-message-pick[aria-checked=true]{color:#2169c5}
.chat-message-pick[aria-checked=true] .chat-pick-tick{visibility:visible}
.chat-message.is-selected-for-delete .chat-bubble{border-color:#3f7cd0;box-shadow:0 0 0 2px #6094db35;background:#e5efff}
.chat-message-pick:focus-visible,.chat-selection-bar button:focus-visible{outline:2px solid #276bd4;outline-offset:2px}
@media(hover:none){.chat-message-pick{opacity:1}}

/* v236: a separate selection gutter, never over attachment/text hit targets. */
.chat-message-main{position:relative;max-width:84%;min-width:0}
.chat-message-main>.chat-bubble{max-width:100%}
.chat-selecting .chat-message:not(.chat-system-message){padding-left:28px}
@media(max-width:900px){.chat-message-main{max-width:90%}}
@media(max-width:600px){.chat-message-main{max-width:94%}}

/* Message reactions are separate from the text/file click targets. */
.chat-reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px;align-items:center}
.chat-message.is-mine .chat-reactions{justify-content:flex-end}
.chat-reaction{display:inline-flex;gap:5px;align-items:center;justify-content:center;min-height:27px;padding:2px 8px;margin:0;border:1px solid #d4e0ef;border-radius:14px;background:#fff;color:#49627f;font-size:11px;line-height:1.3;cursor:pointer}
.chat-reaction-emoji{font:16px/1.3 "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.chat-reaction[aria-pressed="true"]{border-color:#78a4de;background:#e5efff;color:#234f8f;font-weight:700}
.chat-reaction:hover{border-color:#88a9d1;background:#eef4fd}
.chat-reaction:focus-visible{outline:2px solid #2774df;outline-offset:2px}
.chat-context-menu .chat-reaction-picker{display:grid;grid-template-columns:repeat(6,34px);gap:3px;padding:3px 2px 8px;margin-bottom:4px;border-bottom:1px solid #e1e8f2}
.chat-context-menu .chat-reaction-picker button{width:34px;height:34px;padding:3px;border:1px solid transparent;text-align:center;font:21px/1 "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.chat-context-menu .chat-reaction-picker button[aria-checked="true"]{border-color:#78a4de;background:#e5efff}
.chat-context-menu .chat-reaction-picker button:focus-visible{outline:2px solid #2774df;outline-offset:-2px}
.chat-reaction:disabled,.chat-context-menu .chat-reaction-picker button:disabled{opacity:.55;cursor:wait}
