body.rs-chat-space .workspace-footnote,body.rs-chat-space .rs-chat-inside>h1,body.rs-chat-space .mobile-bottom{display:none!important}body.rs-chat-space .workspace-body{padding:8px!important}body.rs-chat-space #collab-view,body.rs-chat-space .rs-chat-inside{margin:0!important;padding:0!important}body.rs-chat-space .rs-chat-inside iframe{min-height:0!important;border-radius:10px!important}body.rs-chat-space{overflow:hidden}@media(max-width:700px){body.rs-chat-space .rs-chat-inside iframe{border:0!important;border-radius:0!important}body.rs-chat-space .workspace-body{padding:0!important}}
/* Applied within the same-origin messenger frame only. */
html.rs-chat-frame #toolbar{position:relative;min-height:52px;flex-wrap:nowrap;padding:6px 10px;gap:8px}html.rs-chat-frame #toolbar>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}html.rs-chat-frame .rs-chat-tools{flex:none}html.rs-chat-frame .rs-chat-tools>summary{list-style:none;padding:8px 12px;min-height:44px;cursor:pointer;font-size:22px}html.rs-chat-frame .rs-chat-tools[open]>div{position:absolute;right:8px;top:52px;z-index:20;width:min(300px,calc(100vw - 24px));padding:12px;display:grid;gap:6px;background:white;border:1px solid #dce2e8;border-radius:12px;box-shadow:0 8px 24px #0002}html.rs-chat-frame .rs-chat-tools:not([open])>div{display:none}html.rs-chat-frame .rs-chat-tools input{width:100%;font-size:16px}html.rs-chat-frame .rs-chat-tools button{min-height:44px;text-align:left}html.rs-chat-frame #body{min-height:52px;font-size:16px}html.rs-chat-frame #composer{padding-bottom:max(8px,env(safe-area-inset-bottom))}

html.rs-chat-frame body>header h1{display:none}html.rs-chat-frame body>header .brand-mark{margin-right:auto}
/* Compact conversation layout, without changing message actions. */
html.rs-chat-frame main>aside>.rs-list-header{height:44px;padding:0 0 4px;border:0;display:flex;justify-content:flex-end;gap:4px;position:relative;z-index:5}html.rs-chat-frame .rs-list-header .brand-mark,html.rs-chat-frame .rs-list-header h1{display:none}html.rs-chat-frame .rs-list-header #new,html.rs-chat-frame .rs-list-header summary{min-height:40px;height:40px;padding:4px 10px}html.rs-chat-frame main{grid-template-columns:minmax(230px,28%) minmax(0,1fr)}html.rs-chat-frame aside{padding:8px 10px}html.rs-chat-frame #toolbar{height:48px;min-height:48px;padding:2px 10px}html.rs-chat-frame #toolbar>button{min-height:44px}html.rs-chat-frame #timeline{padding:12px}html.rs-chat-frame .message{padding:10px 12px;margin-bottom:10px}html.rs-chat-frame .message>p{margin:6px 0;line-height:1.45}html.rs-chat-frame #composer{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px;padding:8px 10px max(8px,env(safe-area-inset-bottom));margin:0}html.rs-chat-frame #composer[hidden]{display:none}html.rs-chat-frame #body{grid-column:1;grid-row:2;height:44px;min-height:44px;max-height:120px;padding:10px 12px;line-height:24px;overflow-y:auto;resize:none;margin:0}html.rs-chat-frame #composer>.actions{grid-column:2;grid-row:2;margin:0;display:flex;align-items:end;gap:2px;flex-wrap:nowrap}html.rs-chat-frame #composer>.actions>button[type=submit]{width:44px;height:44px;min-height:44px;font-size:20px;padding:8px;margin:0;border-radius:12px}html.rs-chat-frame #context{grid-column:1/-1;grid-row:1}html.rs-chat-frame #attachments,html.rs-chat-frame #progress{grid-column:1/-1}html.rs-chat-frame .rs-compose-more>summary{list-style:none;display:grid;place-items:center;width:40px;height:44px;font-size:26px;cursor:pointer;border-radius:10px}html.rs-chat-frame .rs-compose-more:not([open])>div{display:none}html.rs-chat-frame .rs-compose-more[open]>div{position:absolute;bottom:calc(100% - 4px);right:10px;z-index:25;width:min(300px,calc(100vw - 20px));display:grid;padding:10px;gap:5px;background:#fff;border:1px solid #dce3e8;border-radius:12px;box-shadow:0 -6px 24px #0002}html.rs-chat-frame .rs-compose-more>div>*{text-align:left;min-height:44px;font-size:14px;display:flex;align-items:center;gap:8px}html.rs-chat-frame #composer #cancelReply{font-size:12px;max-width:90px;white-space:normal}html.rs-chat-frame #composer .rs-compose-more input[type=checkbox]{width:20px;height:20px}
@media(max-width:700px){html.rs-chat-frame main{display:block}html.rs-chat-frame #timeline{padding:10px 8px}html.rs-chat-frame #composer{padding:6px 8px max(6px,env(safe-area-inset-bottom))}html.rs-chat-frame .message{max-width:92%}html.rs-chat-frame #toolbar>strong{font-size:16px}body.rs-chat-space .workspace-top{padding-top:6px!important;padding-bottom:6px!important}body.rs-chat-space .top-breadcrumb{display:none}body.rs-chat-space .workspace-top{gap:6px;flex-wrap:nowrap}body.rs-chat-space .top-right{gap:6px;min-width:0}body.rs-chat-space #header-user{display:none}body.rs-chat-space #logout-button{font-size:12px}body.rs-chat-space .top-left{flex:0 0 auto}}

/* Only history scrolls; the input never participates in history scrolling. */
html.rs-chat-frame,html.rs-chat-frame body{height:100%;min-height:0;overflow:hidden;overflow-anchor:none}
html.rs-chat-frame main,html.rs-chat-frame #workspace{min-height:0;overflow:hidden}
html.rs-chat-frame #toolbar,html.rs-chat-frame #composer{flex-shrink:0}
html.rs-chat-frame #timeline{min-height:0;overscroll-behavior:contain}
/* Composer V1: attachment / text / contextual action. */
html.rs-chat-frame #composer.rs-composer-v1{grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:end}
html.rs-chat-frame .rs-composer-v1 #body{grid-column:2;grid-row:3;width:100%;min-width:0}
html.rs-chat-frame .rs-composer-v1>.actions{grid-column:3;grid-row:3;display:block;margin:0}
html.rs-chat-frame .rs-composer-v1 #context{grid-row:1;grid-column:1/-1}
html.rs-chat-frame .rs-composer-v1 #attachments{grid-row:2;grid-column:1/-1;overflow-wrap:anywhere;max-height:70px;overflow:auto}
html.rs-chat-frame .rs-composer-v1 .rs-old-action{display:none!important}
html.rs-chat-frame .rs-composer-v1 .rs-send{display:grid;place-items:center;width:44px!important;height:44px!important;min-height:44px!important;padding:10px!important;margin:0!important;background:#b8223c;color:white;border-radius:50%!important}
html.rs-chat-frame .rs-composer-v1 .rs-send.rs-record-trigger{background:#edf1f3;color:#354751}
html.rs-chat-frame .rs-composer-v1 svg{width:24px;height:24px;pointer-events:none}
html.rs-chat-frame .rs-attach{grid-column:1;grid-row:3}
html.rs-chat-frame .rs-attach>summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;color:#526570;cursor:pointer}
html.rs-chat-frame .rs-attach>summary::-webkit-details-marker{display:none}
html.rs-chat-frame .rs-attach:not([open])>.rs-attach-menu{display:none}
html.rs-chat-frame .rs-attach-menu,html.rs-chat-frame .rs-media-menu,html.rs-chat-frame .rs-mentions{position:absolute;bottom:calc(100% + 4px);z-index:30;max-height:180px;overflow:auto;background:#fff;border:1px solid #dce3e8;border-radius:14px;box-shadow:0 -4px 20px #20343a22;padding:6px;max-width:calc(100% - 16px);width:290px}
html.rs-chat-frame .rs-attach-menu{left:8px}html.rs-chat-frame .rs-media-menu{right:8px}html.rs-chat-frame .rs-mentions{left:8px;right:8px;width:auto}
html.rs-chat-frame .rs-composer-v1 [hidden]{display:none!important}
html.rs-chat-frame .rs-attach-menu>*,html.rs-chat-frame .rs-media-menu>button,html.rs-chat-frame .rs-mentions>button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;min-height:44px;font-size:15px;padding:8px}
html.rs-chat-frame .rs-attach-menu input{width:20px;height:20px;flex-shrink:0}
html.rs-chat-frame .rs-mentions>.selected{background:#f9edf0}
html.rs-chat-frame .rs-compose-status{grid-column:1/-1;grid-row:4;margin:0;font-size:12px;color:#657783;overflow-wrap:anywhere}
html.rs-chat-frame .rs-record-panel{position:absolute;bottom:calc(100% + 4px);left:8px;right:8px;z-index:35;padding:12px;background:#fff;border:1px solid #dce3e8;border-radius:14px;box-shadow:0 -4px 20px #20343a22;max-height:60vh;overflow:auto}
html.rs-chat-frame .rs-record-panel>p{margin:8px 0;font-size:14px}
html.rs-chat-frame .rs-record-preview{display:block;width:100%;max-height:30vh;background:#f0f3f4;border-radius:8px}
html.rs-chat-frame .rs-record-controls{display:flex;flex-wrap:wrap;gap:8px}
html.rs-chat-frame .rs-record-controls button{min-height:44px;padding:8px 12px;background:#edf1f3}
html.rs-chat-frame .rs-record-controls button:first-child{background:#b8223c;color:white}
html.rs-chat-frame .rs-composer-v1 #cancelReply{position:absolute;right:8px;top:0;max-width:80px}
html.rs-chat-frame .rs-composer-v1 #context{padding-right:80px}

/* Composer V2: one physical row, independent of inherited grid placement. */
html.rs-chat-frame #composer.rs-composer-v2{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:4px;box-sizing:border-box}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row{grid-column:1/-1;grid-row:3;display:flex;align-items:flex-end;gap:6px;min-width:0;width:100%;box-sizing:border-box}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>#body{display:block;flex:1 1 0%;width:0;min-width:0;box-sizing:border-box;height:44px;min-height:44px;max-height:120px;font-size:16px;line-height:24px;margin:0;padding:10px 12px;border-radius:22px}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>.rs-attach,
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>.rs-send{flex:0 0 44px;align-self:flex-end;width:44px;height:44px;min-height:44px;box-sizing:border-box;margin:0}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>.rs-send{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border:0;cursor:pointer}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>.rs-send.rs-is-recording{background:#b8223c;color:#fff}
html.rs-chat-frame #composer.rs-composer-v2>.actions{position:static;grid-column:1/-1;grid-row:1;display:contents}
html.rs-chat-frame #composer.rs-composer-v2 #context:empty,
html.rs-chat-frame #composer.rs-composer-v2 #attachments:empty,
html.rs-chat-frame #composer.rs-composer-v2>small:empty{display:none}
html.rs-chat-frame #composer.rs-composer-v2>#progress{grid-row:5;width:100%}
html.rs-chat-frame #composer.rs-composer-v2>.rs-compose-status{grid-row:4}
html.rs-chat-frame #composer.rs-composer-v2>.rs-record-panel{max-height:min(360px,55vh);overscroll-behavior:contain}
html.rs-chat-frame #composer.rs-composer-v2 .rs-record-preview{object-fit:contain;max-height:min(240px,30vh)}
html.rs-chat-frame #composer.rs-composer-v2 .rs-record-status{font-size:14px;line-height:1.4}
html.rs-chat-frame #composer.rs-composer-v2 .rs-record-controls{gap:6px}
html.rs-chat-frame #composer.rs-composer-v2 .rs-send:focus-visible,
html.rs-chat-frame #composer.rs-composer-v2 summary:focus-visible{outline:2px solid #b8223c;outline-offset:2px}
@media(max-width:370px){html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row{gap:4px}html.rs-chat-frame #composer.rs-composer-v2{padding-left:4px;padding-right:4px}}
html.rs-chat-frame .rs-attach-menu{max-height:min(360px,60vh)}
html.rs-chat-frame .rs-contact-fields{display:grid;gap:10px;margin:10px 0}
html.rs-chat-frame .rs-contact-fields label{display:grid;gap:5px;font-size:14px}
html.rs-chat-frame .rs-contact-fields input{width:100%;min-height:44px;font-size:16px}
html.rs-chat-frame .rs-record-status{white-space:pre-wrap;overflow-wrap:anywhere}

/* Fit V4: no implicit empty grid rows or unused area below the composer. */
body.rs-chat-space .workspace-body{padding-bottom:0!important}
body.rs-chat-space .rs-chat-inside iframe{display:block!important;max-height:none!important;box-sizing:border-box!important;margin-bottom:0!important}
html.rs-chat-frame #composer.rs-composer-v2{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:4px 8px var(--rs-composer-bottom,max(4px,env(safe-area-inset-bottom)));min-height:0;width:100%;max-width:100%;flex:0 0 auto}
html.rs-chat-frame #composer.rs-composer-v2[hidden]{display:none}
html.rs-chat-frame #composer.rs-composer-v2>#context{order:1;margin:0}
html.rs-chat-frame #composer.rs-composer-v2>#attachments{order:2;margin:0}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row{order:3;flex:0 0 auto;gap:4px}
html.rs-chat-frame #composer.rs-composer-v2>.rs-compose-status{order:4;margin:0}
html.rs-chat-frame #composer.rs-composer-v2>#progress{order:5;margin:0}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>#body{padding:10px;overflow-wrap:anywhere}
@media(max-width:370px){html.rs-chat-frame #composer.rs-composer-v2{padding-left:4px;padding-right:4px}}

/* Emoji V5: button inside the text area, no extra composer row. */
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row{position:relative}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>#body{padding-right:42px}
html.rs-chat-frame #composer.rs-composer-v2>.rs-input-row>.rs-emoji-button{position:absolute;right:48px;bottom:0;width:40px;height:44px;min-height:44px;padding:4px;display:grid;place-items:center;font-size:25px;color:#657783;border:0;background:transparent;border-radius:22px}
html.rs-chat-frame .rs-emoji-panel{position:absolute;left:4px;right:4px;bottom:calc(100% + 4px);z-index:32;background:#fff;border:1px solid #dce3e8;border-radius:14px;box-shadow:0 -4px 20px #20343a22;padding:6px;max-height:min(300px,45vh);overflow:auto;overscroll-behavior:contain}
html.rs-chat-frame .rs-emoji-tabs{display:flex;gap:4px;position:sticky;top:-6px;background:white;z-index:1}
html.rs-chat-frame .rs-emoji-tabs>button{min-height:44px;padding:8px;font-size:14px}
html.rs-chat-frame .rs-emoji-tabs>button[aria-pressed=true]{background:#f9edf0;color:#b8223c}
html.rs-chat-frame .rs-emoji-tabs>button:last-child{margin-left:auto}
html.rs-chat-frame .rs-emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:2px}
html.rs-chat-frame .rs-emoji-grid>button{min-width:0;min-height:44px;padding:4px;font-size:26px}
html.rs-chat-frame .rs-sticker-grid{grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:4px}
html.rs-chat-frame .rs-sticker-grid img{display:block;width:100%;height:80px;object-fit:contain}
html.rs-chat-frame .rs-emoji-button:focus-visible{outline:2px solid #b8223c;outline-offset:0}

html.rs-chat-frame .rs-inline-sticker{width:180px;max-width:100%;min-height:180px;margin:6px 0}
html.rs-chat-frame .rs-inline-sticker img{display:block;width:180px;height:180px;max-width:100%;object-fit:contain;background:transparent}
html.rs-chat-frame .message>button[hidden]{display:none!important}

/* Message layout V9: compact time/receipts and local-calendar day separators. */
html.rs-chat-frame .message .rs-message-author{padding-right:26px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
html.rs-chat-frame .rs-message-footer{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:4px;min-height:18px;font-size:11px;line-height:18px;color:#667e87;white-space:nowrap}
html.rs-chat-frame .rs-message-time{font-size:11px;font-variant-numeric:tabular-nums}
html.rs-chat-frame .rs-message-status{display:inline-block;min-width:18px;font-size:14px;font-weight:600;letter-spacing:-3px;padding-right:3px;color:#667e87}
html.rs-chat-frame .rs-message-status.rs-read{color:#b8223c}
html.rs-chat-frame .rs-message-reactions{font-size:14px;line-height:1.5;margin-top:4px;overflow-wrap:anywhere}
html.rs-chat-frame .rs-day-divider{display:flex;justify-content:center;clear:both;width:100%;margin:12px 0;pointer-events:none}
html.rs-chat-frame .rs-day-divider>span{display:inline-block;padding:4px 12px;border-radius:12px;background:#e2e8eb;color:#4e646d;font-size:12px;line-height:18px;font-weight:500;max-width:100%;text-align:center}

/* Chat picker V10: native radio/checkbox rows, never a mobile multiple-select. */
html.rs-chat-frame dialog.rs-chat-dialog{width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:auto;overscroll-behavior:contain;text-align:left}
html.rs-chat-frame .rs-chat-dialog [hidden]{display:none!important}
html.rs-chat-frame .rs-chat-dialog h2{font-size:21px;margin:0 0 16px}
html.rs-chat-frame .rs-chat-fields{border:0;margin:0;padding:0;min-width:0}
html.rs-chat-frame .rs-chat-kind{display:flex;gap:4px;padding:4px;margin-bottom:16px;border-radius:12px;background:#f2f5f6}
html.rs-chat-frame .rs-chat-kind>button{flex:1;min-width:0;min-height:44px;padding:8px;font-size:15px}
html.rs-chat-frame .rs-chat-kind>button[aria-pressed=true]{background:white;color:#b8223c;box-shadow:0 1px 4px #20343a18;font-weight:600}
html.rs-chat-frame .rs-picker-field{display:grid;gap:6px;margin:12px 0;font-size:14px;min-width:0}
html.rs-chat-frame .rs-picker-field>input,html.rs-chat-frame .rs-picker-field>select{width:100%;min-width:0;min-height:44px;font-size:16px}
html.rs-chat-frame .rs-picker-label{font-size:15px;font-weight:600;margin-top:12px}
html.rs-chat-frame .rs-picker-hint,html.rs-chat-frame .rs-picker-status{font-size:13px;line-height:1.45;color:#647b84;margin:6px 0}
html.rs-chat-frame .rs-picker-people{max-height:min(280px,35dvh);overflow:auto;overscroll-behavior:contain;border:1px solid #dce4e7;border-radius:12px;margin:8px 0}
html.rs-chat-frame .rs-picker-people:empty{display:none}
html.rs-chat-frame .rs-picker-person{display:flex;align-items:center;gap:12px;min-height:56px;margin:0;padding:10px 12px;cursor:pointer;border-bottom:1px solid #eef1f3}
html.rs-chat-frame .rs-picker-person:last-child{border-bottom:0}
html.rs-chat-frame .rs-picker-person.rs-picked{background:#f9edf0}
html.rs-chat-frame .rs-picker-person.rs-unavailable{color:#8a5360}
html.rs-chat-frame .rs-picker-person>input{width:22px;height:22px;min-height:22px;flex:0 0 22px;padding:0;margin:0;accent-color:#b8223c}
html.rs-chat-frame .rs-picker-person-info{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
html.rs-chat-frame .rs-picker-person-info>strong{font-size:15px;line-height:1.4;font-weight:500}
html.rs-chat-frame .rs-picker-person-info>small{font-size:12px;color:#647b84}
html.rs-chat-frame .rs-picker-selected{display:flex;flex-wrap:wrap;gap:4px;max-height:100px;overflow:auto;margin:8px 0}
html.rs-chat-frame .rs-picker-chip{font-size:13px;background:#f9edf0;color:#a51c36;min-height:36px;max-width:100%;overflow-wrap:anywhere;text-align:left;padding:6px 10px}
html.rs-chat-frame .rs-picker-empty{padding:12px;margin:0;font-size:14px;color:#647b84}
html.rs-chat-frame .rs-picker-error{font-size:14px;line-height:1.45;color:#a51c36;background:#fff1f3;border-radius:10px;padding:10px 12px;margin:12px 0 0;overflow-wrap:anywhere}
html.rs-chat-frame .rs-picker-retry{font-size:14px;color:#b8223c;min-height:44px}
html.rs-chat-frame .rs-chat-picker-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:16px}
html.rs-chat-frame .rs-chat-picker-actions>button{min-height:44px;font-size:15px}
html.rs-chat-frame .rs-picker-submit{background:#b8223c;color:#fff}
html.rs-chat-frame .rs-chat-dialog :focus-visible{outline:2px solid #b8223c;outline-offset:2px}
@media(max-width:400px){html.rs-chat-frame dialog.rs-chat-dialog{padding:14px}html.rs-chat-frame .rs-picker-person{padding:9px;gap:9px}}
