/* Spacious CIS chat rooms: compact context, full-height conversation, bottom tools. */
body.rs-phone-page .room>header,body.embedded .room>header{min-height:64px!important;height:auto!important;padding:12px 20px!important;gap:12px;flex-wrap:nowrap!important}
body.rs-phone-page .room>header .reference-live-app-label,body.rs-phone-page .room>header .reference-live-hero,.reference-live-hero{display:none!important}
body.rs-phone-page:not(.embedded) .room>header h1{display:block!important;font-size:18px!important;margin:3px 0 0!important}
body.rs-phone-page .room>header .reference-live-brand{font-size:10px!important}
.chat-destination-bar{padding:8px 18px!important;min-height:32px!important;font-size:10px!important}
#communityTabs{padding:7px 14px!important}#communityTabs button{min-height:38px!important;padding:8px 5px!important;font-size:12px!important}
.belt-room-navigation{display:flex!important;align-items:center;gap:12px;padding:8px 20px!important;border-bottom:1px solid #e3e9ee;background:#fff;flex:none}
.belt-room-navigation[hidden]{display:none!important}.belt-room-navigation>label{font-size:10px!important;margin:0!important;white-space:nowrap}.belt-room-navigation select{font-size:13px!important;min-height:34px!important;padding:6px 32px 6px 10px!important;margin:0!important;max-width:260px;width:auto!important;flex:1}.belt-room-navigation #roomNote{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
body .community-fixed-top,body.embedded .community-fixed-top{max-height:30%!important;overflow-y:auto!important;flex:none;border-bottom:0}
.community-fixed-top>.principle,.community-fixed-top>.catchup-toolbar{display:none!important}
body:not(.chat-tip-visible) #trainingTip{display:none!important}
body.chat-tip-visible #trainingTip{max-height:180px!important;overflow-y:auto;margin:5px 18px!important;padding:10px!important}
body .weekly-belt-topic,body.embedded .weekly-belt-topic{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#f5f8fa!important;box-shadow:none!important}
.weekly-topic-notice>summary{padding:11px 20px;color:#34546c;font-size:12px;font-weight:650;cursor:pointer;overflow-wrap:anywhere}.weekly-topic-notice>summary::marker{color:#be1e2d}.weekly-topic-notice[open]{padding-bottom:12px}.weekly-topic-notice>div{padding:0 20px}.weekly-topic-notice p{font-size:13px!important;line-height:1.5!important;margin:8px 0!important}.weekly-topic-notice .weekly-topic-date{font-size:10px;color:#718393}
#pins{padding:5px 20px!important;max-height:66px;overflow:auto}#pins p{font-size:11px!important;line-height:1.4}
body #conversationScroll,body.embedded #conversationScroll{background:#fff;flex:1 1 0;min-height:80px!important}
body #messages,body.embedded #messages{padding:18px 20px 10px!important;min-height:0!important}
body .message,body.embedded .message{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:9px;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;max-width:88%!important;margin:0 0 20px!important;color:#294257}
.chat-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e8eef3;color:#385b75;font:750 10px Arial,sans-serif;grid-row:1/4}
.message-content{min-width:0}.message .meta{font-size:10px!important;margin:0 0 5px!important;color:#73828e!important;gap:5px!important}.message .meta strong{font-size:11px!important;color:#4b5f6f!important}.message .badge{font-size:8px!important;padding:2px 5px!important;color:#627c90!important;border-color:#d0dce5!important}.message .meta .mention-badge{font-size:9px;padding:2px 5px}
.chat-message-bubble{border-radius:0 17px 17px 17px;background:#eff4f7;padding:10px 14px;display:table;max-width:100%;color:#294257;overflow-wrap:anywhere}
body .message .body,body.embedded .message .body{font-size:15px!important;line-height:1.55!important;margin:0!important;color:#294257!important}
body .message.mine,body.embedded .message.mine{margin-left:auto!important;grid-template-columns:minmax(0,1fr);text-align:left}.message.mine .chat-avatar{display:none}.message.mine .meta{justify-content:flex-end}.message.mine .meta strong{display:none}.message.mine .chat-message-bubble{background:#10243a;color:#fff;border-radius:17px 0 17px 17px;margin-left:auto}
.chat-message-footer{display:flex;align-items:center;gap:8px;color:#8996a0;font-size:10px;line-height:1.3;padding:4px 2px 0}.mine .chat-message-footer{justify-content:flex-end}.chat-message-footer button{min-height:26px;min-width:0;border:0;background:none;padding:3px 4px;color:#8b99a4;font-size:10px}.chat-message-footer button[aria-pressed=true]{color:#b01e33;background:#fff2f4;border-radius:8px}.chat-message-footer time{font-size:10px;white-space:nowrap}.chat-read-count{font-size:9px;white-space:nowrap}
.chat-message-options{position:relative}.chat-message-options>summary{list-style:none;cursor:pointer;min-width:26px;min-height:26px;text-align:center;font-size:18px}.chat-message-options>summary::-webkit-details-marker{display:none}.chat-message-options .actions{position:absolute;right:0;bottom:30px;z-index:15;min-width:130px;padding:6px;background:white;border:1px solid #dce5ec;border-radius:12px;box-shadow:0 5px 24px #10283b20;display:none}.chat-message-options[open] .actions{display:grid!important}.chat-message-options .actions button{border:0!important;background:white!important;text-align:left;color:#304f65!important;min-height:38px!important;font-size:12px!important;padding:8px 10px!important}
body #composer,body.embedded #composer{border:0!important;border-top:1px solid #e0e7ed!important;border-radius:0!important;margin:0!important;padding:10px 18px calc(9px + env(safe-area-inset-bottom,0px))!important;box-shadow:none!important;background:#fff!important;flex:none;max-height:42%!important;position:relative;overflow:visible!important}
#composer>#memberIdentity,#composer>label,#composer>p,#composer>.sendrow,#ridePhotoControls,#composer>#count{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
body #composer #message,body.embedded #composer #message{display:block;width:100%;border:0!important;background:#fff!important;box-shadow:none!important;border-radius:0!important;margin:0!important;padding:8px 0!important;min-height:44px!important;max-height:120px!important;height:44px;color:#294257;font:15px/1.5 Arial,sans-serif;resize:none!important}
#composer #message::placeholder{color:#99a3ab;font-size:14px}
.chat-bottom-bar{display:flex;align-items:center;gap:8px;padding-top:5px}.chat-tools{display:flex;align-items:center;gap:2px;flex:1;min-width:0}.chat-tools>button,.chat-more-tools>summary{display:grid;place-items:center;width:35px;min-width:30px;height:36px;min-height:36px;padding:5px!important;border:0!important;background:white!important;color:#8897a2!important;border-radius:9px!important}.chat-tools>button:hover,.chat-more-tools>summary:hover{background:#f0f4f7!important;color:#2d516a!important}.chat-tools>button>span{font-size:10px;font-weight:800;letter-spacing:-.04em}.chat-tools [disabled]{opacity:.35}
body #composer #send,body.embedded #composer #send{min-height:38px!important;min-width:72px!important;padding:8px 15px!important;background:#be1e2d!important;border:0!important;border-radius:11px!important;color:#fff!important;font-size:13px!important;font-weight:750}

/* Band-style mobile composer: tools, message field, and send action share one calm row. */
@media(max-width:1024px){
 body #composer,body.embedded #composer{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;background:#fff!important;border-top:1px solid #e4e8eb!important}
 body #composer>label{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important}
 .chat-bottom-bar{display:grid!important;grid-template-columns:auto minmax(0,1fr) 43px!important;align-items:center!important;gap:8px!important;padding:0!important}
 .chat-tools{gap:2px!important;flex:none!important}
 .chat-tools>button,.chat-tools>details>summary{width:34px!important;min-width:34px!important;height:42px!important;min-height:42px!important;border-radius:50%!important;color:#38454d!important;background:transparent!important}
 .chat-tools>button svg,.chat-tools>details>summary svg{width:25px!important;height:25px!important;stroke-width:2!important}
 .chat-tools .chat-more-tools{display:none!important}
 .chat-editor{min-width:0!important;background:#f2f4f6!important;border-radius:25px!important;padding:0 14px!important}
 body #composer #message,body.embedded #composer #message{width:100%!important;min-height:46px!important;height:46px!important;max-height:120px!important;padding:11px 0!important;background:transparent!important;color:#283e4d!important;font:16px/1.45 Arial,sans-serif!important}
 #composer #message::placeholder{color:#a0a8ae!important;font-size:16px!important}
 body #composer .chat-send,body.embedded #composer .chat-send{display:grid!important;place-items:center!important;width:43px!important;min-width:43px!important;height:43px!important;min-height:43px!important;padding:0!important;border-radius:50%!important;background:#173a5a!important;color:transparent!important;font-size:0!important}
 body #composer .chat-send::before{content:'↑';color:#fff;font:700 24px/1 Arial,sans-serif;transform:translateY(-1px)}
 body #composer .chat-send:disabled{background:#d8dfe4!important;opacity:1!important}
 body #composer .chat-send:disabled::before{color:#8a99a3}
 body #composer.has-message .chat-send{background:#d84f60!important}
 .chat-attachment-preview{margin:0 0 8px!important;border-radius:12px!important}
}
.chat-more-tools{position:relative}.chat-more-tools>summary{font-size:25px;cursor:pointer;list-style:none}.chat-more-tools>summary::-webkit-details-marker{display:none}.chat-more-menu{display:none;position:absolute;bottom:44px;right:0;z-index:24;min-width:180px;padding:8px;background:white;border:1px solid #dae5ec;border-radius:13px;box-shadow:0 -8px 24px #10283b20}.chat-more-tools[open] .chat-more-menu{display:grid;gap:5px}.chat-more-menu button{border:0!important;background:white!important;color:#355970!important;font-size:12px!important;text-align:left;min-height:38px!important;padding:8px!important}.chat-more-menu>label{font-size:11px;color:#607789;padding:10px 6px;white-space:nowrap}
.chat-emoji-picker{position:absolute;bottom:58px;left:14px;z-index:30;background:white;border:1px solid #dce5ec;border-radius:15px;box-shadow:0 -8px 28px #10283b20;padding:8px;display:grid;grid-template-columns:repeat(5,42px);gap:2px}.chat-emoji-picker button{font-size:23px;min-width:40px;min-height:40px;border:0;background:white;padding:5px}
.chat-attachment-preview{display:flex;align-items:center;gap:10px;background:#f0f5f8;border-radius:11px;margin:5px 0;padding:8px;font-size:12px;color:#3a5c72}.chat-attachment-preview>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.chat-attachment-preview img{width:42px;height:42px;object-fit:cover;border-radius:7px}.chat-attachment-preview>button{min-width:32px;min-height:32px;font-size:20px;background:none;border:0;padding:2px}
.chat-shared-image{display:block;margin-top:7px;max-width:320px}.chat-shared-image img{display:block;width:100%;max-height:340px;object-fit:contain;border-radius:10px}.chat-shared-video{display:block;max-width:100%;max-height:320px;border-radius:10px;margin-top:8px}.chat-file-card{display:block;padding:12px;margin-top:7px;border:1px solid #c9d9e5;border-radius:9px;font-size:13px;overflow-wrap:anywhere;color:#295a7f;background:white}
.chat-link-dialog{border:1px solid #d8e3eb;border-radius:16px;max-width:380px;width:90%;padding:22px;color:#294257}.chat-link-dialog::backdrop{background:#10283b70}.chat-link-dialog label{display:block;margin-bottom:12px}.chat-link-dialog input{padding:12px;border:1px solid #cfdae4;border-radius:10px;width:100%;margin-bottom:14px;font:16px Arial,sans-serif}.chat-link-dialog button{margin:0 6px 0 0;min-height:40px;font-size:13px}
.chat-emoji-picker[hidden],.chat-attachment-preview[hidden],.chat-more-menu [hidden]{display:none!important}
body.feed-mode #composer{display:none!important}
@media(max-width:1024px){body #messages{padding:15px 13px 8px!important}body .message{max-width:94%!important;grid-template-columns:28px minmax(0,1fr);column-gap:7px;margin-bottom:16px!important}.chat-avatar{width:28px;height:28px;font-size:9px}.chat-message-bubble{padding:9px 12px}.chat-bottom-bar{gap:3px}.chat-tools{gap:0}.chat-tools>button,.chat-more-tools>summary{width:31px;min-width:27px;padding:4px!important}body #composer{padding-left:13px!important;padding-right:13px!important}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#composer input[type=file]{display:none!important}#newMessages{position:sticky!important;bottom:8px!important;left:auto!important;transform:none!important;margin:0 auto 8px!important;width:max-content!important;font-size:12px!important;min-height:36px!important}#newMessages[hidden]{display:none!important}

/* Live Chat opens directly to the conversation, with one clear title. */
body.live-chat-only #communityTabs,body.live-chat-only .chat-destination-bar,body.live-chat-only .reference-live-brand,body.live-chat-only .reference-live-logo{display:none!important}
body.live-chat-only .room>header h1{display:block!important;font-size:20px!important;margin:0!important}
body .message.mine .body,body.embedded .message.mine .body{color:#fff!important}
body .message.mine .chat-message-bubble a:not(.chat-file-card){color:#d5eaff!important}
body .message.mine .chat-message-bubble .mention{color:#fff!important;background:#ffffff20}

/* Desktop conversations stay readable in drawers and full view. */
@media(min-width:1025px){body.rs-phone-page .room{width:100%;max-width:680px!important;margin-inline:auto!important;border-inline:1px solid #dce5ec}body.rs-phone-page .message{max-width:82%!important}body.rs-phone-page .chat-message-bubble{max-width:480px}}
body.embedded .room{width:100%;max-width:680px!important;margin-inline:auto!important}

.catchup-panel#catchUpPanel{position:fixed;inset:0;margin:auto;width:min(560px,calc(100vw - 28px));max-height:80dvh;overflow:auto;box-sizing:border-box;padding:22px;border:1px solid #dce5ec;border-radius:18px;background:#fff;color:#294257;box-shadow:0 15px 70px #10243a40}.catchup-panel#catchUpPanel::backdrop{background:#10243a80}#catchUpPanel .catchup-top{display:flex;align-items:center;justify-content:space-between;gap:16px}#catchUpPanel h2{font-size:22px;margin:0}#catchUpPanel #catchUpClose{min-width:44px;min-height:44px;font-size:24px}#catchUpContent{font-size:15px;line-height:1.6;margin:14px 0;white-space:normal}#catchUpPanel #backToChat{min-height:44px;padding:10px 16px;background:#10243a;color:white;border:0;border-radius:10px}

body .room>header #catchUp{margin-left:auto;flex:none;min-height:38px;min-width:0;padding:8px 12px;border:1px solid #8096ab;border-radius:10px;background:#eff4f7;color:#244860;font-size:12px;font-weight:750;white-space:nowrap}body .room>header #connection{flex:none}

/* Chat room 2.0: the conversation is the primary screen; controls stay compact
   and the keyboard never competes with the member's message. */
body.rs-phone-page .room>header{min-height:72px!important;padding:12px 18px!important;background:#102b49!important}
body.rs-phone-page .room>header h1{font-size:20px!important;letter-spacing:-.02em}
body.rs-phone-page .chat-destination-bar{display:flex!important;align-items:center;justify-content:space-between;min-height:42px!important;padding:10px 18px!important;background:#f5f8fa!important;border-bottom:1px solid #dce5ec!important;color:#647b8b!important;font-size:10px!important;font-weight:800!important;letter-spacing:.08em}
body.rs-phone-page .chat-destination-bar a{font-size:13px!important;font-weight:750!important;letter-spacing:0;text-decoration:none;color:#1e4e72!important}
body.rs-phone-page .belt-room-navigation{min-height:58px!important;padding:10px 18px!important;background:#fff!important}
body.rs-phone-page #conversationScroll{background:#fff!important}
body.rs-phone-page #messages{padding:20px 18px 12px!important}
body.rs-phone-page #composer{flex:0 0 auto!important;max-height:none!important;padding:8px 14px calc(8px + env(safe-area-inset-bottom,0px))!important;border-top:1px solid #d9e3ea!important;box-shadow:0 -8px 22px rgba(16,43,73,.06)!important}
body.rs-phone-page #composer #message{min-height:42px!important;height:42px!important;padding:7px 0!important;font-size:16px!important;line-height:1.35!important}
body.rs-phone-page .chat-bottom-bar{padding-top:4px!important}
body.rs-phone-page .chat-reply-composer{min-height:50px!important;margin:0 0 6px!important;padding:6px 9px!important;font-size:12px!important}
body.rs-phone-page .chat-reply-composer button{min-width:34px!important;min-height:34px!important;font-size:20px!important}
body.rs-phone-page .chat-reply-composer span{max-width:calc(100vw - 122px)!important}
@media(max-width:800px){
 body.rs-phone-page.chat-input-focused .room>header,body.rs-phone-page.chat-input-focused .chat-destination-bar,body.rs-phone-page.chat-input-focused .belt-room-navigation,body.rs-phone-page.chat-input-focused .community-fixed-top{display:none!important}
 body.rs-phone-page.chat-input-focused #conversationScroll{min-height:0!important}
 body.rs-phone-page.chat-input-focused #composer{border-top:1px solid #cbd9e3!important}
 body.rs-phone-page.chat-input-focused .chat-emoji-picker{bottom:52px!important}
}

/* CIS identity stays in the room header; BAND informs the conversation layout. */
@media(max-width:800px){
 body.rs-phone-page .room>header{background:#102b49!important;color:#fff!important;border-bottom:0!important}
 body.rs-phone-page .room>header h1,body.rs-phone-page .band-room-subtitle{color:#fff!important}
 body.rs-phone-page .band-back,body.rs-phone-page .room>header #catchUp{color:#fff!important}
 body.rs-phone-page .room>header #catchUp::after{color:#fff!important}
}

/* BAND visual system on mobile: a quiet white room that puts people and their
   conversation ahead of product chrome. Desktop retains the CIS Console view. */
@media(max-width:800px){
 body.rs-phone-page .room>header{min-height:96px!important;padding:18px 20px!important;gap:14px!important;background:#fff!important;color:#202124!important;border-bottom:1px solid #eef0f2!important;box-shadow:none!important}
 body.rs-phone-page .room>header .reference-live-logo,body.rs-phone-page .room>header .reference-live-app-label,body.rs-phone-page .room>header .reference-live-brand{display:none!important}
 /* Legacy mobile pages can inject a text return link. It cannot coexist with
    this compact chat header, so the room owns one icon-only return control. */
 body.rs-phone-page .room>header .back{display:none!important}
 body.rs-phone-page .band-back{display:grid!important;place-items:center!important;width:32px!important;min-width:32px!important;height:44px!important;min-height:44px!important;border:0!important;border-radius:0!important;padding:0!important;background:transparent!important;color:#202124!important;text-decoration:none!important;font:400 48px/.75 Arial,sans-serif!important}
 body.rs-phone-page .room>header h1{display:block!important;margin:0!important;color:#202124!important;font-size:24px!important;font-weight:750!important;line-height:1.1!important;letter-spacing:-.035em!important}
 body.rs-phone-page .band-room-subtitle{display:block!important;margin-top:3px!important;color:#2e3034!important;font-size:14px!important;line-height:1.2!important}
 body.rs-phone-page .room>header #connection{display:none!important}
 body.rs-phone-page .room>header #catchUp{display:grid!important;place-items:center!important;margin-left:auto!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#202124!important;font-size:0!important}
 body.rs-phone-page .room>header #catchUp::after{content:'↻'!important;font:400 37px/1 Arial,sans-serif!important}
 body.rs-phone-page .chat-destination-bar{min-height:52px!important;padding:8px 20px!important;align-items:center!important;background:#f7f8f9!important;border-bottom:1px solid #eceff1!important;color:#202124!important;font-size:12px!important;font-weight:700!important;letter-spacing:0!important}
 body.rs-phone-page .chat-destination-bar>span::before{content:'Notices ';font-size:21px!important;font-weight:750!important;color:#34363a!important}
 body.rs-phone-page .chat-destination-bar>span{font-size:0!important}
 body.rs-phone-page .chat-destination-bar>span::after{content:'Community notices and weekly discussion';font-size:14px!important;font-weight:400!important;color:#4b6f96!important}
 body.rs-phone-page .chat-destination-bar a{font-size:0!important;color:#697077!important}
 body.rs-phone-page .chat-destination-bar a::after{content:'⌄';font:400 30px/1 Arial,sans-serif!important}
 body.rs-phone-page .belt-room-navigation{min-height:0!important;padding:8px 20px!important}
 body.rs-phone-page .community-fixed-top{max-height:28%!important}
 body.rs-phone-page #messages{padding:12px 20px 10px!important}
 body.rs-phone-page .message{grid-template-columns:62px minmax(0,1fr)!important;column-gap:12px!important;max-width:100%!important;margin:0 0 26px!important}
 body.rs-phone-page .chat-avatar{width:58px!important;height:58px!important;border-radius:50%!important;font-size:12px!important;background:#e8edf0!important}
 body.rs-phone-page .message .meta{margin:2px 0 7px!important;color:#202124!important;gap:10px!important}
 body.rs-phone-page .message .meta strong{font-size:16px!important;color:#202124!important;font-weight:750!important}
 body.rs-phone-page .message .badge{padding:0!important;border:0!important;color:#202124!important;font-size:15px!important;font-weight:700!important}
 body.rs-phone-page .chat-message-bubble{display:block!important;max-width:100%!important;padding:13px 16px!important;border-radius:0 27px 27px 27px!important;background:#f0f1f2!important;color:#202124!important}
 body.rs-phone-page .message .body{font-size:15px!important;line-height:1.4!important;color:#202124!important}
 body.rs-phone-page .chat-message-footer{padding-top:5px!important;color:#7e8388!important}
 body.rs-phone-page .message.mine{margin-left:0!important;grid-template-columns:62px minmax(0,1fr)!important;text-align:left!important}
 body.rs-phone-page .message.mine .chat-avatar{display:grid!important}
 body.rs-phone-page .message.mine .meta{justify-content:flex-start!important}
 body.rs-phone-page .message.mine .meta strong{display:inline!important}
 body.rs-phone-page .message.mine .chat-message-bubble{margin-left:0!important;border-radius:0 27px 27px 27px!important;background:#f0f1f2!important;color:#202124!important}
 body.rs-phone-page .message.mine .body{color:#202124!important}
 body.rs-phone-page .mine .chat-message-footer{justify-content:flex-start!important}
 body.rs-phone-page #composer{min-height:70px!important;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))!important;border-top:1px solid #eceff1!important;box-shadow:none!important;background:#fff!important}
 body.rs-phone-page #composer #message{height:50px!important;min-height:50px!important;max-height:100px!important;padding:13px 68px 12px 57px!important;border-radius:28px!important;background:#f3f4f5!important;font-size:18px!important;color:#25272a!important}
 body.rs-phone-page .chat-bottom-bar{left:21px!important;right:21px!important;bottom:15px!important;height:40px!important}
 body.rs-phone-page .chat-tools>button,body.rs-phone-page .chat-attachments>summary{color:#33373b!important}
 body.rs-phone-page .chat-tools>button[title="Choose emoji"]{margin-left:auto!important;margin-right:43px!important}
 body.rs-phone-page #composer #send{right:20px!important;bottom:17px!important;background:transparent!important;color:#32363a!important;opacity:1!important}
 body.rs-phone-page #composer #send::after{content:'⌁'!important;color:#32363a!important;font:400 40px/30px Arial,sans-serif!important}
 body.rs-phone-page #composer.has-message #send::after{content:'↑'!important;color:#be1e2d!important;font:700 25px/34px Arial,sans-serif!important}
}

/* BAND-inspired mobile composer: one calm message surface, with optional tools
   deliberately tucked away until a member asks for them. */
@media(max-width:800px){
 body.rs-phone-page #composer{min-height:62px!important;padding:7px 14px calc(7px + env(safe-area-inset-bottom,0px))!important;display:block!important}
 body.rs-phone-page #composer #message{box-sizing:border-box!important;width:100%!important;min-height:46px!important;height:46px!important;max-height:96px!important;margin:0!important;padding:12px 92px 10px 48px!important;border-radius:24px!important;background:#f1f3f5!important;color:#202d37!important;font-size:16px!important;line-height:1.35!important}
 body.rs-phone-page #composer #message::placeholder{color:#97a0a7!important;font-size:16px!important}
 body.rs-phone-page .chat-bottom-bar{position:absolute!important;inset:auto 20px calc(10px + env(safe-area-inset-bottom,0px)) 20px!important;height:40px!important;padding:0!important;pointer-events:none!important}
 /* The compact control rail overlaps the visual pill.  Keep its empty space
    transparent to touch so a tap anywhere in the message field focuses it. */
 body.rs-phone-page .chat-tools{pointer-events:none!important;gap:2px!important}
 body.rs-phone-page .chat-tools>button,body.rs-phone-page .chat-tools>.chat-more-tools{display:none!important}
 body.rs-phone-page .chat-tools>.chat-attachments,body.rs-phone-page .chat-tools>button[title="Choose emoji"]{display:block!important}
 body.rs-phone-page .chat-tools>.chat-attachments,body.rs-phone-page .chat-tools>button[title="Choose emoji"]{pointer-events:auto!important}
 body.rs-phone-page .chat-tools>button[title="Choose emoji"]{display:grid!important}
 body.rs-phone-page .chat-tools>button,body.rs-phone-page .chat-attachments>summary{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:5px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#647582!important}
 body.rs-phone-page .chat-attachments{position:relative!important}
 body.rs-phone-page .chat-attachments>summary{display:grid!important;place-items:center!important;list-style:none!important;cursor:pointer!important;font:400 29px/1 Arial,sans-serif!important}
 body.rs-phone-page .chat-attachments>summary::-webkit-details-marker{display:none!important}
 body.rs-phone-page .chat-attachments-menu{display:none!important;position:absolute!important;left:0!important;bottom:47px!important;z-index:35!important;width:190px!important;padding:7px!important;border:1px solid #d9e2e8!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 28px rgba(16,43,73,.18)!important}
 body.rs-phone-page .chat-attachments[open] .chat-attachments-menu{display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:3px!important}
 body.rs-phone-page .chat-attachments-menu button{display:grid!important;place-items:center!important;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:4px!important;border:0!important;border-radius:9px!important;background:#f5f7f8!important;color:#536d7d!important}
 body.rs-phone-page .chat-attachments-menu button>span{font-size:9px!important;font-weight:800!important}
 body.rs-phone-page #composer #send{pointer-events:auto!important;position:absolute!important;right:20px!important;bottom:12px!important;min-width:34px!important;width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border-radius:50%!important;font-size:0!important;opacity:.42!important;transition:opacity .15s ease!important}
 body.rs-phone-page #composer #send::after{content:'↑'!important;font:700 21px/34px Arial,sans-serif!important;color:#fff!important}
 body.rs-phone-page #composer.has-message #send{opacity:1!important}
 body.rs-phone-page .chat-emoji-picker{left:auto!important;right:14px!important;bottom:60px!important}
 body.rs-phone-page .chat-attachment-preview{margin:0 0 6px!important}
 body.rs-phone-page #composer:has(.chat-attachment-preview:not([hidden])){padding-top:7px!important}
}

/* Final mobile header layer — CIS blue is intentional and must override the
   neutral BAND reference styling above. */
@media(max-width:800px){
 body.rs-phone-page .room>header{background:#102b49!important;color:#fff!important;border-bottom:0!important}
 body.rs-phone-page .room>header h1,body.rs-phone-page .room>header .band-room-subtitle{color:#fff!important}
 body.rs-phone-page .room>header .band-back,body.rs-phone-page .room>header #catchUp{color:#fff!important}
 body.rs-phone-page .room>header #catchUp::after{color:#fff!important}
}


/* Reliable mobile composer — keep every control in the normal layout flow.
   This deliberately replaces the earlier overlapping rail so long messages,
   attachments and the Android keyboard cannot squeeze the text field. */
@media(max-width:800px){
 body.rs-phone-page #composer{display:block!important;min-height:0!important;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px))!important}
 body.rs-phone-page .chat-bottom-bar{position:static!important;inset:auto!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) 42px!important;align-items:center!important;gap:7px!important;height:auto!important;pointer-events:auto!important}
 body.rs-phone-page .chat-tools{display:flex!important;align-items:center!important;gap:0!important;pointer-events:auto!important}
 body.rs-phone-page .chat-tools>button,body.rs-phone-page .chat-tools>.chat-more-tools{display:none!important}
 body.rs-phone-page .chat-tools>.chat-attachments,body.rs-phone-page .chat-tools>button[title="Choose emoji"]{display:block!important;pointer-events:auto!important}
 body.rs-phone-page .chat-tools>button[title="Choose emoji"]{display:grid!important;place-items:center!important;margin:0!important}
 body.rs-phone-page .chat-tools>.chat-attachments>summary,body.rs-phone-page .chat-tools>button[title="Choose emoji"]{width:38px!important;min-width:38px!important;height:42px!important;min-height:42px!important;padding:5px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#39454d!important}
 body.rs-phone-page .chat-editor{display:block!important;min-width:0!important;padding:0 13px!important;border-radius:24px!important;background:#f1f3f5!important}
 body.rs-phone-page #composer #message{display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:46px!important;height:46px!important;max-height:96px!important;margin:0!important;padding:12px 0!important;border:0!important;border-radius:0!important;background:transparent!important;font-size:16px!important;line-height:1.35!important}
 body.rs-phone-page #composer #send,body.rs-phone-page #composer .chat-send{position:static!important;display:grid!important;place-items:center!important;width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;margin:0!important;padding:0!important;border-radius:50%!important;background:#173a5a!important;color:transparent!important;opacity:1!important}
 body.rs-phone-page #composer #send::before,body.rs-phone-page #composer .chat-send::before{content:'↑'!important;color:#fff!important;font:700 22px/1 Arial,sans-serif!important}
 body.rs-phone-page #composer #send::after,body.rs-phone-page #composer .chat-send::after{content:none!important}
 body.rs-phone-page #composer #send:disabled{background:#bcc6cc!important}
}


/* Keep the Band-style composer quiet while the member types. */
@media(max-width:800px){
 body.rs-phone-page #composer #message,body.rs-phone-page #composer #message:focus,body.rs-phone-page .chat-editor,body.rs-phone-page .chat-editor:focus-within{outline:none!important;box-shadow:none!important}
 body.rs-phone-page .chat-editor:focus-within{background:#f1f3f5!important;border-color:transparent!important}
}


/* One consistent mobile chat header. The return control is always the first
   item in the navy header; chat rooms never inherit the bottom member nav. */
@media(max-width:1024px){
 body.rs-phone-page.rs-member-navigation-ready{padding-bottom:0!important}
 body.rs-phone-page .rs-member-navigation,
 body.rs-phone-page #mobileNav{display:none!important}
 body.rs-phone-page .room>header{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:12px!important;background:#102b49!important;color:#fff!important}
 body.rs-phone-page .room>header .band-back{order:-1!important;display:grid!important;place-items:center!important;flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#fff!important;font:400 48px/.75 Arial,sans-serif!important}
 body.rs-phone-page .room>header>div{min-width:0!important}
 body.rs-phone-page .room>header h1{margin:0!important;color:#fff!important}
 body.rs-phone-page .room>header .band-room-subtitle{display:block!important;color:#fff!important}
}

/* Shared URLs remain readable on the light mobile message bubbles. */
body .message .chat-message-bubble a:not(.chat-file-card){text-decoration:underline!important;text-underline-offset:3px;overflow-wrap:anywhere}
@media(max-width:800px){
 body.rs-phone-page .message .chat-message-bubble a:not(.chat-file-card),
 body.rs-phone-page .message.mine .chat-message-bubble a:not(.chat-file-card){color:#145584!important}
 body.rs-phone-page .message .chat-message-bubble a:not(.chat-file-card):focus-visible{outline:2px solid #145584;outline-offset:3px}
}

/* Paper-plane send icon, sized for a clear mobile tap target. */
@media(max-width:800px){body.rs-phone-page #composer #send,body.rs-phone-page #composer .chat-send{position:relative!important}}
@media(max-width:800px){
 body.rs-phone-page #composer #send::before,body.rs-phone-page #composer .chat-send::before{content:''!important;display:block!important;position:absolute!important;inset:0!important;margin:auto!important;width:22px!important;height:22px!important;transform:none!important;background:#fff!important;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2 9.5 13.2 2 10.2 22 2Zm0 0-7.8 20-3.1-7.5L22 2Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 2 9.5 13.2 2 10.2 22 2Zm0 0-7.8 20-3.1-7.5L22 2Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
 body.rs-phone-page #composer #send:disabled::before,body.rs-phone-page #composer .chat-send:disabled::before{background:#8a99a3!important}
}

@media(max-width:800px){body.rs-phone-page #composer #send,body.rs-phone-page #composer .chat-send{top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;align-self:center!important}}

@media(max-width:800px){
 body.rs-phone-page .chat-bottom-bar{grid-template-columns:auto minmax(0,1fr) 38px 42px!important;align-items:center!important}
 body.rs-phone-page #composer .chat-voice-input{display:grid!important;place-items:center!important;width:38px!important;min-width:38px!important;height:42px!important;min-height:42px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#173a5a!important}
 body.rs-phone-page #composer .chat-voice-input[aria-pressed=true]{color:#c51d36!important;background:#ffedf0!important}
}

/* Give writing its own full-width row; controls no longer consume text space. */
body #composer .chat-bottom-bar,body.rs-phone-page #composer .chat-bottom-bar,body.embedded #composer .chat-bottom-bar{display:grid!important;position:static!important;inset:auto!important;grid-template-columns:minmax(0,1fr) 44px auto!important;gap:8px!important;height:auto!important;align-items:center!important}
body #composer .chat-editor,body.rs-phone-page #composer .chat-editor,body.embedded #composer .chat-editor{grid-column:1/-1!important;grid-row:1!important;min-width:0!important;padding:0 14px!important;border:1px solid #cbd8e1!important;border-radius:14px!important;background:#f5f7f9!important}
body #composer #message,body.rs-phone-page #composer #message,body.embedded #composer #message{box-sizing:border-box!important;width:100%!important;min-height:84px!important;height:84px!important;max-height:160px!important;padding:12px 0!important;background:transparent!important;line-height:1.45!important;overflow-y:auto!important}
body #composer .chat-tools,body.rs-phone-page #composer .chat-tools{grid-column:1!important;grid-row:2!important}
body #composer .chat-voice-input,body.rs-phone-page #composer .chat-voice-input{grid-column:2!important;grid-row:2!important}
body #composer #send,body.rs-phone-page #composer #send{grid-column:3!important;grid-row:2!important;position:relative!important;inset:auto!important}
body #composer .chat-editor:focus-within,body.rs-phone-page #composer .chat-editor:focus-within{outline:2px solid #355d78!important;outline-offset:2px!important}
