/* Soroban Fix112 standalone messaging interface. */
.soroChatOverlay[hidden],.soroChatShell [hidden]{display:none!important}
.soroChatOverlay{position:fixed;inset:0;z-index:29999;display:flex;align-items:center;justify-content:center;background:#0b241f91;padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));box-sizing:border-box;direction:rtl}
.soroChatShell{width:min(510px,100%);height:min(780px,96dvh);max-height:96dvh;min-height:350px;border-radius:24px;overflow:hidden;background:#f1f5ee;display:flex;flex-direction:column;border:1px solid #bcd7c5;box-shadow:0 20px 90px #001e163f;font-family:system-ui,'Noto Sans Arabic',sans-serif;color:#1c3a2e;box-sizing:border-box}
.soroChatHead{background:linear-gradient(135deg,#176444,#184a3a);color:white;display:flex;align-items:center;gap:10px;padding:14px 16px;flex-shrink:0;min-height:58px;box-sizing:border-box}
.soroChatAvatar{width:43px;height:43px;border-radius:50%;background:#ffffff29;display:grid;place-items:center;font-size:24px}
.soroChatHeadText{display:flex;flex-direction:column;gap:2px;flex:1}.soroChatHeadText b{font-size:17px}.soroChatHeadText small{opacity:.83;font-size:11px}
.soroChatHead button{font:inherit;cursor:pointer;color:white;background:#ffffff28;border:0;border-radius:12px;padding:8px 12px;min-height:38px}
.soroChatWelcome{overflow-y:auto;padding:22px 21px;text-align:center;flex:1}.soroChatWelcomeLogo{font-size:42px}.soroChatWelcome h3{font-size:19px;margin:12px 0 4px}.soroChatWelcome p{font-size:14px;line-height:1.9;color:#436356}.soroChatWelcome label{display:block;margin:12px 0;text-align:right;font-size:13px;font-weight:750}.soroChatWelcome input,.soroChatLinkBox input{width:100%;margin-top:6px;padding:12px;border-radius:12px;border:1px solid #c7d7cb;font-size:15px;box-sizing:border-box;background:white;color:#122c23}
.soroChatWelcome button,.soroChatOpenContact,.soroChatLinkBox button{background:#176644;color:white;border:0;border-radius:13px;padding:12px 18px;font-size:14px;font-weight:800;cursor:pointer;min-height:42px}.soroChatWelcome>small{display:block;margin-top:13px;font-size:11px;line-height:1.8;color:#688475}
.soroChatInbox{padding:14px;overflow-y:auto;flex:1}.soroChatInboxTop{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.soroChatInboxTop button,.soroChatConvTop button{background:white;border:1px solid #bfd5c8;border-radius:11px;padding:9px 13px;font:inherit;cursor:pointer}
.soroChatThreads{display:grid;gap:7px;margin-bottom:17px}.soroChatThread{display:flex;align-items:center;justify-content:space-between;background:white;border:1px solid #d6e2d9;border-radius:14px;padding:13px;text-align:right;cursor:pointer;font:inherit;min-height:50px}.soroChatThread span{font-weight:750}.soroChatThread small{color:#789187}.soroChatEmpty{color:#74867b;font-size:13px}
#soroChatContacts{display:flex;flex-direction:column;gap:8px}#soroChatContacts select{padding:12px;background:white;border:1px solid #bdd2c6;border-radius:12px;color:#235344;font:inherit}
.soroChatSettings{margin-top:15px;padding-top:10px;border-top:1px solid #cedcd0}.soroChatSettings h4{margin:3px 0 10px}.soroChatSettings label{display:block;margin:8px 0}.soroChatSettingsNote{color:#6e897d;font-size:11px;line-height:1.8}
.soroChatConversation{flex:1;min-height:0;display:flex;flex-direction:column}.soroChatConvTop{display:flex;align-items:center;gap:14px;padding:8px 12px;background:#e1ebe3;font-size:13px}.soroChatConvTop span{font-weight:750}
.soroChatMessages{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:15px 13px;background-image:radial-gradient(#bfd2c366 1px,transparent 1px);background-size:21px 21px;scrollbar-width:thin}
.soroChatBubble{max-width:84%;width:fit-content;box-sizing:border-box;border-radius:16px;padding:10px 13px;box-shadow:0 2px 7px #173f3a13;overflow-wrap:anywhere;white-space:pre-wrap;font-size:14px;line-height:1.8}.soroChatBubble.mine{align-self:flex-start;background:#d6f6d9;border-bottom-left-radius:4px}.soroChatBubble.theirs{align-self:flex-end;background:white;border-bottom-right-radius:4px}.soroChatBubble a{color:#136b9d;text-decoration:underline}.soroChatBubble small{display:block;text-align:left;font-size:10px;color:#778e84;direction:ltr;margin-top:3px}.soroChatAudio{background:#ffffff77;border:1px solid #aad1bb;border-radius:10px;padding:10px;font:inherit;cursor:pointer}
.soroChatNotice{font-size:12px;text-align:center;color:#bb3f35;padding:3px 10px;min-height:16px}.soroChatNotice:empty{display:none}.soroChatNotice[data-good="1"]{color:#217944}
.soroChatComposer{display:flex;align-items:flex-end;gap:5px;padding:9px;background:#fff;border-top:1px solid #d2e1d6}.soroChatComposer textarea{flex:1;min-width:0;max-height:106px;resize:none;outline:none;border-radius:13px;border:1px solid #d7e4da;padding:11px;background:#f8fcf9;color:#17352a;font:inherit;font-size:14px}.soroChatComposer button{min-width:43px;border:0;border-radius:12px;background:#e6f3eb;color:#125c43;font:inherit;cursor:pointer;padding:9px 8px;min-height:44px}.soroChatComposer #soroChatSend{background:#176644;color:white;font-weight:800}
#soroChatRecording{background:#fff3ef;border:1px solid #f7d8ce;border-radius:10px;padding:10px;color:#91362e;font-size:12px}#soroChatRecording button{font:inherit;border-radius:9px;border:1px solid #cca49e;background:white;padding:8px;cursor:pointer}
#soroChatLinkBox{padding:8px 12px;background:white;border-top:1px solid #ddd;display:flex;gap:8px;align-items:center}#soroChatLinkBox label{font-size:11px;flex:1}#soroChatLinkBox input{padding:8px}
html.soroChatShown,html.soroChatShown body{overflow:hidden!important}
@media(max-width:600px){.soroChatOverlay{padding:0;align-items:stretch;justify-content:flex-start}.soroChatShell{height:100%;max-height:100%;min-height:0;border-radius:0;width:100vw}.soroChatHead{padding-top:max(14px,env(safe-area-inset-top))}.soroChatComposer{padding-bottom:max(9px,env(safe-area-inset-bottom))}}

.soroChatHours{display:grid;gap:6px}.soroChatHours p{margin:0;color:#73877b;font-size:12px}.soroChatHours label{display:flex;justify-content:space-between;align-items:center}.soroChatHours input{border:1px solid #bfd3c4;border-radius:8px;padding:5px;color:#214e3e;background:white}

.soroChatContactSearch{padding:11px;border:1px solid #bed6c8;border-radius:11px;background:#fff;color:#224d3e;font:inherit}

/* Fix112: admin-only messaging policy and deletion screens */
.soroChatAdminPanel,.soroChatDeletePanel{display:grid;gap:9px;background:#fff;border:1px solid #ceddd1;border-radius:16px;padding:14px;margin:12px 0;direction:rtl}
.soroChatAdminPanel select,.soroChatDeletePanel select,.soroChatDeletePanel input{width:100%;box-sizing:border-box;padding:10px;border:1px solid #c5d6ca;border-radius:10px;background:#f9fcfa;color:#1d4836;font:inherit;margin-top:6px}
.soroChatDeletePanel label{display:block;font-size:13px;font-weight:650}
.soroChatDeletePanel .soroChatDanger{border:0;border-radius:12px;background:#b73838;color:white;padding:12px;font-weight:750;cursor:pointer}
.soroChatDeletePanel .soroChatDanger:disabled{opacity:.45;cursor:not-allowed}
.soroChatDeletePanel .soroChatPlain{background:#f1f4f1;border:1px solid #c8d8cc;padding:11px;border-radius:11px;color:#305644;cursor:pointer}
.soroChatDeleteCount{padding:10px;background:#f8f6ef;color:#64512d;border-radius:11px;font-size:12px;line-height:1.8}
.soroChatSettingsTitle{display:block;font-weight:750}
.soroChatToggle{display:flex!important;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:1px solid #e1ebe3;line-height:1.7}
.soroChatDeletePanel small{font-size:11px;line-height:1.75;color:#78675f}

/* Fix113: visible, non-emoji messaging tiles on the current R25/R46 layouts. */
#loginScreen .safeR25LoginGrid>.soroChatGuestTile{grid-column:1 / -1!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;height:105px!important;min-height:105px!important;padding:10px 12px!important;text-align:right!important;border:1px solid #97cdb7!important;background:linear-gradient(125deg,#d4f1df,#eefaf1)!important;box-shadow:0 5px 15px rgba(17,87,62,.08)!important;direction:rtl!important}
#loginScreen .soroChatGuestTile .soroChatGuestCopy{display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:6px!important}
#loginScreen .soroChatGuestTile .soroChatGuestCopy b{height:auto!important;min-height:0!important;padding:0!important;margin:0!important;line-height:1.3!important;font-size:15px!important;color:#124e3b!important}
#loginScreen .soroChatGuestTile .soroChatGuestCopy small{height:auto!important;min-height:0!important;display:block!important;max-width:100%!important;margin:0!important;line-height:1.4!important;font-size:11px!important;color:#316b55!important}
#loginScreen .soroChatGuestTile .safeR25LoginVisual{width:78px!important;height:78px!important;min-width:78px!important;max-width:78px!important;flex:0 0 78px!important;overflow:hidden!important;border-radius:13px!important;margin-inline-start:10px!important}
#loginScreen .soroChatGuestTile .safeR25LoginVisual img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
#modules .soroChatMemberTile.safeR25Card{cursor:pointer!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;background:#e6f4ea!important;border:1px solid #acd5bd!important;min-width:0!important}
#modules .soroChatMemberTile.safeR25Card .safeR25Title{color:#145840!important;font-weight:900!important;display:block!important}
#modules .soroChatMemberTile.safeR25Card .safeR25Visual{flex:1 1 auto!important;min-height:0!important;background:#e6f4ea!important}
#modules .soroChatMemberTile.safeR25Card .safeR25Visual img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
#modules .soroChatMemberTile:focus-visible,#loginScreen .soroChatGuestTile:focus-visible{outline:3px solid #148464!important;outline-offset:2px!important}
@media(max-width:440px){#loginScreen .safeR25LoginGrid>.soroChatGuestTile{height:94px!important;min-height:94px!important}#loginScreen .soroChatGuestTile .safeR25LoginVisual{width:66px!important;height:66px!important;min-width:66px!important;flex-basis:66px!important}}

.soroChatTileIcon{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;pointer-events:none!important}

/* Fix115: stable, high-visibility messaging entry; not dependent on emoji fonts. */
#loginScreen .soroChatGuestShortcut{display:flex!important;align-items:center!important;gap:10px!important;width:100%!important;min-height:52px!important;margin:8px 0 10px!important;padding:6px 12px!important;border:1px solid #9dcdb5!important;border-radius:14px!important;background:#e4f5e9!important;color:#144f39!important;text-align:right!important;direction:rtl!important;cursor:pointer!important;box-shadow:0 3px 10px #134b3813!important}
#loginScreen .soroChatGuestShortcut img{display:block!important;width:51px!important;height:38px!important;object-fit:cover!important;border-radius:9px!important;flex-shrink:0!important}
#loginScreen .soroChatGuestShortcut span{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important}
#loginScreen .soroChatGuestShortcut b{color:#105039!important;font-size:14px!important;font-weight:900!important;line-height:1.25!important}
#loginScreen .soroChatGuestShortcut small{color:#4c755d!important;font-size:10px!important;line-height:1.35!important}
#modules .soroChatMemberTile.safeR25Card{--r25-title:#164f39!important;--r25-card:#d6eddf!important;border:2px solid #a2d0b5!important;background:#d6eddf!important}
#modules .soroChatMemberTile .safeR25Title{color:#164f39!important;display:flex!important;font-weight:900!important}
#modules .soroChatMemberTile .safeR25Visual{background:#d6eddf!important;min-height:0!important;flex:1!important}
#modules .soroChatMemberTile .safeR25Visual img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
#soroChatFloatingMember{position:fixed!important;inset-inline-start:12px!important;bottom:79px!important;z-index:510!important;display:flex!important;align-items:center!important;gap:6px!important;height:44px!important;border-radius:26px!important;border:2px solid #f7ebc9!important;padding:5px 12px 5px 7px!important;background:#126c50!important;color:#fff!important;font-size:12px!important;font-weight:900!important;box-shadow:0 5px 18px #113e3066!important;cursor:pointer!important;direction:rtl!important}
#soroChatFloatingMember img{width:35px!important;height:32px!important;display:block!important;object-fit:cover!important;border-radius:9px!important}
body:not(.safeR25HomeActive) #soroChatFloatingMember{display:none!important}
body[data-safe-r10-role="trainer"] #soroChatFloatingMember{background:#e5b24f!important;color:#173f33!important}
@media(max-width:380px){#soroChatFloatingMember{bottom:76px!important;height:40px!important;padding:4px 9px!important}}

/* Fix116: one messaging entry in the same grid as the other learning modules. */
#modules #soroChatMemberCard{position:relative!important;inset:auto!important;z-index:auto!important;min-height:0!important;box-sizing:border-box!important;box-shadow:0 8px 24px #174e3515!important}
#modules #soroChatMemberCard:focus-visible{outline:3px solid #157a53!important;outline-offset:2px!important}
#soroChatFloatingMember{display:none!important}
#loginScreen #soroChatGuestEntry{box-sizing:border-box!important;max-width:100%!important;margin:10px 0 12px!important;border-radius:16px!important;box-shadow:0 3px 12px #184c3612!important}


/* Fix117: a single, compact messaging shortcut at the END of the student/trainer
   home grid. The public pre-login messaging shortcut remains unchanged. */
#modules #soroChatMemberCard.soroChatMemberTile.safeR25Card{
 grid-column:1 / -1!important;
 width:100%!important;
 height:68px!important;
 min-height:68px!important;
 max-height:68px!important;
 padding:6px 12px!important;
 border-radius:16px!important;
 display:flex!important;
 flex-direction:row!important;
 align-items:center!important;
 gap:12px!important;
 box-sizing:border-box!important;
}
#modules #soroChatMemberCard .safeR25Title{
 order:2!important;
 flex:1 1 auto!important;
 display:flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 height:auto!important;
 min-height:0!important;
 max-height:none!important;
 margin:0!important;
 padding:0!important;
 font-size:16px!important;
 line-height:1.3!important;
}
#modules #soroChatMemberCard .safeR25Visual{
 order:1!important;
 flex:0 0 60px!important;
 display:block!important;
 width:60px!important;
 height:50px!important;
 min-height:50px!important;
 max-height:50px!important;
 border-radius:10px!important;
 overflow:hidden!important;
 background:transparent!important;
}
#modules #soroChatMemberCard .safeR25Visual img{
 display:block!important;
 width:100%!important;
 height:100%!important;
 object-fit:contain!important;
}

/* Fix118: compact entry alongside the notification bell, not a seventh module. */
#home .hero>.card:first-child #soroChatHeaderEntry.soroChatHeaderEntry{
 position:absolute!important;left:52px!important;top:13px!important;
 width:31px!important;height:31px!important;min-width:31px!important;min-height:31px!important;
 display:grid!important;place-items:center!important;z-index:4!important;
 border:0!important;border-radius:50%!important;background:transparent!important;
 color:#0b6555!important;padding:4px!important;margin:0!important;cursor:pointer!important;
 box-shadow:none!important;
}
#home #soroChatHeaderEntry svg{display:block!important;width:22px!important;height:22px!important;stroke:currentColor!important;pointer-events:none!important}
body[data-safe-r10-role="trainer"] #home #soroChatHeaderEntry{color:#efd079!important}
#home #soroChatHeaderEntry:focus-visible{outline:2px solid #1fa274!important;outline-offset:2px!important}
#home #soroChatHeaderEntry:active{background:#0b65551f!important}
.soroChatDirectError{padding:18px;text-align:center;color:#9a4337;font-size:14px;line-height:1.8}
#soroChatMessages>.soroChatDirectError+button,#soroChatThreads>.soroChatDirectError+button{align-self:center;display:block;margin:10px auto;padding:11px 18px;border-radius:10px;border:1px solid #9ccdb8;background:#e5f4eb;color:#13513a;font:inherit;font-weight:700;cursor:pointer}
.soroChatConversationEmpty{margin:auto;padding:16px;text-align:center;color:#71867c;font-size:13px;line-height:1.8}

/* Fix119: compact professional broadcast controls and older-message pagination. */
.soroChatBroadcast{margin-top:14px;border:1px solid #d5e8de;border-radius:14px;padding:12px;background:#f5faf7;display:grid;gap:9px}
.soroChatBroadcastToggle{width:100%;border:0;border-radius:11px;background:#e2f2e9;color:#105841;padding:11px;font:inherit;font-weight:800;text-align:right;cursor:pointer}
.soroChatBroadcast>div:not(.soroChatBroadcastStatus){display:grid;gap:9px}
.soroChatBroadcast label{display:grid;gap:5px;font-size:13px;font-weight:700;color:#275747}
.soroChatBroadcast select,.soroChatBroadcast textarea{box-sizing:border-box;width:100%;border:1px solid #b6d4c4;border-radius:10px;background:#fff;padding:10px;font:inherit;color:#164a39;resize:vertical}
.soroChatBroadcast button:not(.soroChatBroadcastToggle){border-radius:10px;border:1px solid #aac9b8;padding:11px;font:inherit;background:#fff;color:#15553e;font-weight:750;cursor:pointer}
.soroChatBroadcast button.soroChatBroadcastConfirm{background:#116b4b;color:#fff}
.soroChatBroadcast button:disabled{opacity:.47;cursor:not-allowed}
.soroChatBroadcastStatus{font-size:12px;line-height:1.7;color:#39735c}
.soroChatOlder{display:block;min-height:36px;margin:5px auto 15px;border:1px solid #bfd9c9;border-radius:18px;background:#f5faf6;color:#205744;padding:7px 14px;font:inherit;font-size:12px;cursor:pointer}

/* Fix120: resilient and visually obvious chat shortcut beside notifications. */
#home .hero>.card:first-child{position:relative!important}
#home .hero>.card:first-child #soroChatHeaderEntry.soroChatHeaderEntry{
 left:66px!important;top:12px!important;width:42px!important;height:42px!important;
 min-width:42px!important;min-height:42px!important;
 border:1px solid #b8e4d5!important;border-radius:13px!important;
 display:grid!important;place-items:center!important;background:#f4fff9!important;
 color:#0a6b51!important;box-shadow:0 2px 7px #07513822!important;
 z-index:25!important;padding:8px!important;visibility:visible!important;opacity:1!important;
 pointer-events:auto!important;touch-action:manipulation!important;
}
#home .hero>.card:first-child #soroChatHeaderEntry svg{width:25px!important;height:25px!important;stroke-width:2.15!important}
#home .hero>.card:first-child #soroChatHeaderEntry.soroChatHeaderSolo{left:13px!important}
#app header.top #soroChatHeaderEntry.soroChatTopFallback{display:inline-grid!important;place-items:center!important;
 height:42px!important;width:42px!important;border:1px solid #b8e4d5!important;border-radius:12px!important;
 background:#fff!important;color:#0a6b51!important;visibility:visible!important;opacity:1!important;
 position:relative!important;z-index:25!important;flex:0 0 42px!important;margin-inline:8px!important}
#app header.top #soroChatHeaderEntry.soroChatTopFallback svg{width:25px;height:25px}

/* Fix121 | Messaging is a proper standalone dashboard tile (not part of notifications). */
#home #soroChatHeaderEntry,#app header.top #soroChatHeaderEntry,#soroChatFloatingMember{display:none!important}
#home #modules #soroChatMemberCard.soroChatMemberTile{
 grid-column:1/-1!important;order:10000!important;display:flex!important;
 flex-direction:row!important;align-items:center!important;box-sizing:border-box!important;
 width:100%!important;height:94px!important;min-height:94px!important;max-height:94px!important;
 margin:3px 0 7px!important;padding:11px 14px!important;gap:12px!important;
 border:1.5px solid #badbd1!important;border-radius:22px!important;
 background:linear-gradient(112deg,#ecfaf4 0%,#d8f0e7 100%)!important;
 box-shadow:0 8px 22px #14594219!important;position:relative!important;
 overflow:hidden!important;cursor:pointer!important;touch-action:manipulation!important;
 color:#0f624d!important;text-align:right!important;direction:rtl!important;
 visibility:visible!important;opacity:1!important;
}
#home #modules #soroChatMemberCard[data-chat-role="trainer"]{
 order:-10000!important;background:linear-gradient(110deg,#0c5e50 0%,#197e69 100%)!important;
 border-color:#d6b66e!important;color:#fff8e6!important;
 box-shadow:0 8px 22px #0c463e36!important;
}
#home #modules #soroChatMemberCard .soroChatModuleIcon{
 display:grid!important;place-items:center!important;flex:0 0 74px!important;
 width:74px!important;height:68px!important;background:#d3f3e4!important;
 border-radius:17px!important;box-shadow:inset 0 0 0 1px #a4d9bf!important;overflow:hidden!important;
}
#home #modules #soroChatMemberCard[data-chat-role="trainer"] .soroChatModuleIcon{
 background:#f8e8bd!important;box-shadow:inset 0 0 0 1px #eac681!important;
}
#home #modules #soroChatMemberCard .soroChatModuleIcon img{
 display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;
 border-radius:13px!important;pointer-events:none!important;
}
#home #modules #soroChatMemberCard .soroChatModuleCopy{
 display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
 justify-content:center!important;align-items:flex-start!important;min-width:0!important;gap:5px!important;
}
#home #modules #soroChatMemberCard .soroChatModuleCopy b{
 display:block!important;color:inherit!important;font-size:18px!important;font-weight:950!important;
 text-align:right!important;line-height:1.25!important;
}
#home #modules #soroChatMemberCard .soroChatModuleCopy span{
 display:block!important;color:#416d5a!important;font-size:11.5px!important;
 line-height:1.35!important;text-align:right!important;
}
#home #modules #soroChatMemberCard[data-chat-role="trainer"] .soroChatModuleCopy span{color:#e7eee5!important}
#home #modules #soroChatMemberCard .soroChatModuleChevron{
 display:flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 24px!important;width:24px!important;font-size:28px!important;font-weight:800!important;
 color:inherit!important;opacity:.8!important;
}
#home #modules #soroChatMemberCard:focus-visible{outline:3px solid #2bb78a!important;outline-offset:3px!important}
#home #modules #soroChatMemberCard:active{transform:scale(.99)!important}
/* The home dashboard can be scrolled down to the student's final card; internal games are untouched. */
body.safeR25HomeActive #home.wrap{overflow-y:visible!important;padding-bottom:max(110px,env(safe-area-inset-bottom,0px))!important}
@media(max-width:380px){
 #home #modules #soroChatMemberCard.soroChatMemberTile{height:88px!important;min-height:88px!important;max-height:88px!important;padding:9px 10px!important;gap:9px!important}
 #home #modules #soroChatMemberCard .soroChatModuleIcon{flex-basis:65px!important;width:65px!important;height:62px!important}
 #home #modules #soroChatMemberCard .soroChatModuleCopy b{font-size:16px!important}
 #home #modules #soroChatMemberCard .soroChatModuleCopy span{font-size:10.5px!important}
}

/* Fix122: professional soroban wallpaper with readable message bubbles. */
.soroChatShell{background:#f6f9f5}
.soroChatHead{background:linear-gradient(130deg,#115943,#0c3f54 75%,#176d64);box-shadow:0 2px 15px #0e4b4234}
.soroChatConvTop{background:linear-gradient(90deg,#eaf3ed,#f2f7f3);border-bottom:1px solid #d5e7da}
.soroChatMessages{background-color:#f4f7f1;background-image:linear-gradient(180deg,#f3f8f15c,#f4f7f26e),url('./ui194/soro_chat_wallpaper.png');background-size:cover,360px 640px;background-repeat:no-repeat,repeat;overscroll-behavior:contain}
.soroChatBubble{border:1px solid #dfe8e0;box-shadow:0 3px 12px #143f3520;border-radius:18px;line-height:1.85}
.soroChatBubble.mine{background:#dff5e3;border-color:#c4e4ce;border-bottom-left-radius:5px}
.soroChatBubble.theirs{background:#ffffffed;border-color:#e1e7e0;border-bottom-right-radius:5px}
.soroChatBubble a{color:#1268ae;text-underline-offset:3px}
.soroChatComposer{background:#ffffff;border-top:1px solid #d6e9dc;box-shadow:0 -4px 15px #1d493319}
/* Only messages are non-selectable. Composer, guest form, settings, and links stay usable. */
#soroChatMessages,#soroChatMessages *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important;-webkit-tap-highlight-color:transparent}
#soroChatMessages a{-webkit-user-drag:none;touch-action:manipulation}
#soroChatComposer,#soroChatGuestName,#soroChatGuestPhone,#soroChatLinkInput,.soroChatBroadcast textarea,.soroChatBroadcast select{-webkit-user-select:text!important;user-select:text!important;-webkit-touch-callout:default!important}

.soroChatBubble.soroChatPending{opacity:.78;border-style:dashed}.soroChatBubble.soroChatPending small{color:#536e65;font-style:italic}

/* Fix123: compact voice recording and accessible scrubbable playback */
.soroChatVoicePlayer{display:flex;align-items:center;gap:9px;min-width:min(235px,68vw);padding:4px 0;direction:ltr}
.soroChatVoicePlay{width:37px;height:37px;flex:0 0 37px;border:0;border-radius:50%;background:#16725a;color:#fff;font-size:17px;font-weight:800;cursor:pointer}
.soroChatVoicePlay:disabled{opacity:.65}
.soroChatVoiceSeek{flex:1;min-width:0;width:100%;height:25px;accent-color:#16a17c;touch-action:pan-y;cursor:pointer}
.soroChatVoiceTime{white-space:nowrap;font-size:10px;color:#436658;font-variant-numeric:tabular-nums}
.soroChatVoiceWaiting{font-size:12px;color:#516f5e}
#soroChatRecording.soroChatRecordCard{display:grid;gap:9px;border-radius:17px;background:#eaf9f3;border:1px solid #a5d6c0;padding:12px 14px;color:#164c3d;box-shadow:0 4px 14px #094a2e13}
#soroChatRecording.soroChatRecordCard[hidden]{display:none!important}
.soroChatRecTop{display:flex;align-items:center;gap:8px;font-size:13px}
.soroChatRecTop b{flex:1;font-size:13px;font-weight:750}
.soroChatRecPulse{width:10px;height:10px;background:#ed5364;border-radius:50%;box-shadow:0 0 0 5px #ed536427;animation:soroChatRecPulse 1.3s infinite}
@keyframes soroChatRecPulse{50%{box-shadow:0 0 0 9px #ed536408}}
#soroChatRecTime{font-variant-numeric:tabular-nums;font-weight:750}
.soroChatRecWave{height:17px;display:flex;align-items:center;justify-content:center;gap:4px;opacity:.85;direction:ltr}
.soroChatRecWave i{display:block;width:3px;background:#23a98a;border-radius:3px;height:5px;animation:soroChatWave .85s ease-in-out infinite alternate}
.soroChatRecWave i:nth-child(3n){height:14px;animation-delay:-.3s}.soroChatRecWave i:nth-child(4n){height:9px;animation-delay:-.6s}
@keyframes soroChatWave{to{height:16px}}
.soroChatRecActions{display:flex;gap:10px}.soroChatRecActions button{flex:1;border-radius:12px!important;background:#fff!important;border:1px solid #b8dfcc!important;font-weight:750!important;min-height:42px;color:#15513f!important}
#soroChatRecordStop{background:#0b7559!important;color:#fff!important;border-color:#0b7559!important}
.soroChatBroadcastRefresh{font-size:12px!important;color:#17634f!important;border-style:dashed!important}
.soroChatBroadcastWarning{margin:5px 0;font-size:12px;color:#986a21;background:#fff8e7;border-radius:10px;padding:10px}
.soroChatBroadcastConfirm.soroChatAwaitConfirm{background:#c48024!important}
.soroChatBubble a{color:#076aad;text-decoration:underline;overflow-wrap:anywhere;touch-action:manipulation}

/* Fix125: compact in-chat announcements archive, not a second thread. */
.soroChatAnnouncementButton{border:1px solid #bbd6c5;background:#e9f4ed;color:#16604b;border-radius:9px;padding:6px 9px;white-space:nowrap;font-size:12px;font-weight:800;cursor:pointer}
.soroChatAnnouncementsPanel{position:absolute;inset:59px 0 0;background:#f5f9f4;z-index:6;overflow-y:auto;padding:12px;direction:rtl}
.soroChatConversation{position:relative}
.soroChatAnnouncementsTop{display:flex;justify-content:space-between;align-items:center;padding:8px 5px;margin-bottom:8px}
.soroChatAnnouncementsTop button{background:#19634d;color:white;border:0;border-radius:9px;padding:8px}
.soroChatAnnouncement{padding:14px;margin-bottom:9px;background:#fff;border:1px solid #dce7de;border-radius:13px;line-height:1.9;overflow-wrap:anywhere}
.soroChatAnnouncement small{display:block;color:#637e70;margin-bottom:5px}

/* Fix125 KeyboardStability: message text field is a user-activated native IME target. */
@media(max-width:600px){#soroChatComposer{font-size:16px!important;touch-action:manipulation}}

/* Fix126: keep message composer anchored above the Android keyboard. */
@media(max-width:600px){.soroChatOverlay,.soroChatShell,.soroChatConversation,.soroChatComposer{transition:none!important;animation:none!important}.soroChatConversation{min-height:0}.soroChatMessages{min-height:0;overscroll-behavior:contain}}

/* Fix126 BuildFix02: prevent minimum-height constraints from forcing a layout jump when the Android IME resizes WebView. */
@media (max-width:600px){.soroChatOverlay{height:100%;min-height:0;overflow:hidden}.soroChatShell{min-height:0!important;max-height:100%!important;height:100%!important}.soroChatComposer textarea{font-size:16px!important;line-height:1.45;transform:none!important}.soroChatMessages{contain:layout style;overscroll-behavior:contain}}

/* BuildFix03: keep the composer pinned while Android adjusts its viewport for IME. */
@media(max-width:600px){.soroChatConversation{min-height:0!important;overflow:hidden!important}.soroChatComposer{flex:0 0 auto!important;min-height:0!important;position:relative!important;transform:none!important}.soroChatMessages{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important}}


/* Fix127 / Messenger-style Android IME integration. Visible viewport only. */
@media (max-width:600px){
 .soroChatOverlay:not([hidden]){
  position:fixed!important;inset:auto 0 auto 0!important;
  top:var(--soro-chat-visible-top,0px)!important;
  height:var(--soro-chat-visible-height,100dvh)!important;
  max-height:var(--soro-chat-visible-height,100dvh)!important;
  width:100%!important;padding:0!important;overflow:hidden!important;
  display:flex!important;align-items:stretch!important;
 }
 .soroChatShell{height:100%!important;max-height:100%!important;
  min-height:0!important;overflow:hidden!important;flex:1 1 auto!important}
 .soroChatConversation{height:100%!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
 .soroChatMessages{min-height:0!important;flex:1 1 0!important;overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch;contain:layout style}
 .soroChatHead,.soroChatConvTop,.soroChatComposer,.soroChatNotice{flex-shrink:0!important}
 .soroChatComposer{position:relative!important;z-index:2;transform:none!important;overflow:visible!important;
  padding-bottom:max(8px,env(safe-area-inset-bottom,0px))!important}
 #soroChatComposer{min-height:44px!important;max-height:124px!important;box-sizing:border-box!important;
  font-size:16px!important;line-height:1.4!important;resize:none!important;overflow-y:auto!important}
}

/* Fix133: explicit message refresh without covering the conversation. */
.soroChatRefreshConversation{flex:0 0 auto;border:1px solid #c9dcd5;border-radius:11px;background:#f4faf7;color:#205c48;padding:7px 9px;font-weight:700;font-size:12px;cursor:pointer}.soroChatConvTop{flex-wrap:wrap;gap:7px}.soroChatConvTop #soroChatPeer{flex:1 1 85px;min-width:75px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
