/* Focused Utility + Chat mobile refinement */
.detail-avatar{display:block;width:40px;height:40px;flex:0 0 40px;border-radius:13px;object-fit:cover;background:linear-gradient(135deg,#dce8ff,#def8ef);border:1px solid rgba(208,222,239,.9)}
.detail-avatar-fallback{display:grid;place-items:center;color:#2868df;font-size:11px;font-weight:850}
.utility-card-pro{overflow:hidden;border-radius:20px!important}
.utility-top-pro{padding-bottom:14px!important}
.utility-icon-pro{width:44px!important;height:44px!important;border-radius:14px!important}
.utility-share-summary{margin:0 16px 13px;padding:11px 14px;display:grid;grid-template-columns:1fr 1px 1fr;align-items:center;gap:12px;border:1px solid #dce9ee;border-radius:15px;background:linear-gradient(135deg,#edf4ff,#e8faf3)}
.utility-share-summary>div{display:flex;align-items:baseline;gap:5px;min-width:0}.utility-share-summary>div:last-child{justify-content:flex-end}.utility-share-summary span{font-size:10px;color:#73829a}.utility-share-summary b{font-size:12px;white-space:nowrap}.utility-share-summary i{width:1px;height:25px;background:#d7e2eb}
.utility-member-grid{display:grid;gap:7px;padding:0 16px 12px}.utility-member-card{display:grid;grid-template-columns:minmax(0,1fr) auto 36px;grid-template-areas:"copy amount avatar";align-items:center;gap:9px;min-height:58px;padding:9px 11px;border:1px solid #e0e7f0;border-radius:14px;background:#fff;box-shadow:0 3px 10px rgba(31,57,101,.035)}.utility-member-avatar{grid-area:avatar;justify-self:end;align-self:center;width:36px;height:36px;flex-basis:36px;border-radius:11px}.utility-member-copy{grid-area:copy;min-width:0;padding-top:0}.utility-member-copy b,.utility-member-copy span{display:block}.utility-member-copy b{font-size:12px;line-height:1.22;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.utility-member-copy span{font-size:9px;color:#8190a5;margin-top:2px}.utility-member-card strong{grid-area:amount;align-self:center;position:relative;top:3px;font-size:13px;color:#173d8f;white-space:nowrap}.utility-actions{padding:11px 16px!important}
.chat-shell-pro{background:#fff!important;overflow:hidden;border-radius:20px!important}.chat-simple-head{padding:16px 18px 13px;border-bottom:1px solid #e7edf4;background:linear-gradient(135deg,#f7faff,#f0fbf7)}.chat-simple-head h2{margin:2px 0 0;font-size:19px}.chat-messages-pro{height:min(61vh,590px)!important;padding:17px 14px 24px!important;gap:16px!important;background:linear-gradient(180deg,#fbfdff,#f7faff)!important}.chat-row-pro{display:flex!important;align-items:flex-end!important;gap:8px!important;max-width:88%!important}.chat-row-pro.mine{margin-left:auto!important;flex-direction:row-reverse!important}.chat-profile-avatar{width:36px;height:36px;flex-basis:36px;border-radius:12px}.chat-message-wrap{min-width:0;max-width:100%}.chat-message-meta{display:flex;align-items:center;gap:7px;margin:0 4px 4px}.chat-row-pro.mine .chat-message-meta{justify-content:flex-end}.chat-message-meta b{font-size:10.5px;color:#53647e}.chat-message-meta time{font-size:9px;color:#9aa6b8}.chat-bubble-pro{padding:10px 13px!important;border:1px solid #e0e7f0!important;border-radius:17px 17px 17px 5px!important;background:#fff!important;box-shadow:0 4px 13px rgba(31,57,101,.045)}.chat-row-pro.mine .chat-bubble-pro{border-radius:17px 17px 5px 17px!important;background:linear-gradient(135deg,#dce9ff,#e4efff)!important;border-color:#d2e1fb!important}.chat-bubble-pro p{margin:0!important;font-size:13px!important;line-height:1.45!important;overflow-wrap:anywhere}.chat-compose-pro{position:sticky;bottom:0;padding:10px 11px calc(10px + env(safe-area-inset-bottom))!important;gap:7px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 -8px 24px rgba(31,57,101,.045)}.chat-compose-pro textarea{min-height:42px!important;max-height:110px;border-radius:14px!important;padding:10px 12px!important;font-size:12px!important;resize:none}.chat-compose-pro .btn{min-width:62px;border-radius:14px!important;padding:9px 12px!important}

/* Chat is viewport-locked: only the message list scrolls. */
html.mm-chat-page,html.mm-chat-page body{height:100%;overflow:hidden!important;overscroll-behavior:none}
html.mm-chat-page #app,html.mm-chat-page .layout{height:100dvh;min-height:0!important;overflow:hidden!important}
html.mm-chat-page .main{height:100dvh;min-height:0!important;display:flex;flex-direction:column;overflow:hidden!important;padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
html.mm-chat-page .topbar{flex:0 0 auto;margin-bottom:14px!important}
html.mm-chat-page #content{flex:1 1 auto;min-height:0!important;overflow:hidden!important;display:flex}
html.mm-chat-page .chat-shell-pro{flex:1 1 auto;min-height:0!important;height:auto!important;display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;width:100%;box-shadow:0 12px 32px rgba(31,57,101,.08)}
html.mm-chat-page .chat-messages-pro{height:auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding-bottom:18px!important}
html.mm-chat-page .chat-compose-pro{position:relative!important;bottom:auto!important;z-index:3;flex:0 0 auto;padding-bottom:10px!important;border-top:1px solid #e5ebf3!important}

@media(max-width:430px){.utility-card-pro{border-radius:18px!important}.utility-top-pro{padding:14px!important}.utility-share-summary{margin:0 14px 10px;padding:9px 11px;gap:8px}.utility-share-summary span{font-size:9px}.utility-share-summary b{font-size:11px}.utility-member-grid{gap:6px;padding:0 14px 10px}.utility-member-card{grid-template-columns:minmax(0,1fr) auto 34px;min-height:54px;padding:8px 10px;border-radius:13px}.utility-member-avatar{width:34px;height:34px;flex-basis:34px;border-radius:10px}.utility-member-copy b{font-size:11.5px}.utility-member-copy span{margin-top:1px}.utility-member-card strong{font-size:12px;top:3px}.chat-simple-head{padding:13px 14px 11px}.chat-simple-head h2{font-size:17px}.chat-messages-pro{padding:14px 10px 20px!important;gap:14px!important}.chat-row-pro{max-width:91%!important}.chat-profile-avatar{width:33px;height:33px;flex-basis:33px;border-radius:11px}.chat-message-meta b{font-size:10px}.chat-message-meta time{font-size:8.5px}.chat-bubble-pro{padding:9px 11px!important}.chat-bubble-pro p{font-size:12px!important}html.mm-chat-page .main{padding:10px 10px calc(82px + env(safe-area-inset-bottom))!important}html.mm-chat-page .topbar{margin-bottom:10px!important}html.mm-chat-page .chat-shell-pro{border-radius:18px!important}html.mm-chat-page .chat-compose-pro{padding:9px!important}html.mm-chat-page .chat-compose-pro textarea{min-height:44px!important;font-size:13px!important}html.mm-chat-page .chat-compose-pro .btn{min-width:70px!important}}

/* iOS keyboard: the fixed nav must not ride above the keyboard. */
@media(max-width:900px){
  html.mm-chat-page .mobilebar{transition:opacity .14s ease,transform .14s ease,visibility .14s ease}
  html.mm-chat-page:has(.chat-compose-pro textarea:focus) .mobilebar{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(calc(100% + 32px))!important}
  html.mm-chat-page:has(.chat-compose-pro textarea:focus) .main{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
  html.mm-chat-page:has(.chat-compose-pro textarea:focus) .chat-compose-pro{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
}
