@media (max-width:767px) {
 html.tgb-room-active, html.tgb-room-active body {margin-top:0!important; overflow:hidden!important; height:100%!important; touch-action:auto!important}
 body.tgb-room-active #masthead, body.tgb-room-active .site-header,
 body.tgb-room-active #wpadminbar, body.tgb-room-active .tgb-mobile-bottom-nav,
 body.tgb-room-active #colophon, body.tgb-room-active .site-footer {display:none!important}
 html.tgb-room-active .tgb-inbox-wrapper {position:fixed!important; top:var(--tgb-room-top,0px)!important; left:0!important; width:100%!important; height:var(--tgb-room-height,100dvh)!important; max-height:none!important; padding:0!important; margin:0!important; z-index:100000; background:#FAF8FF}
 html.tgb-room-active .tgb-inbox-app {border:0!important; border-radius:0!important; height:100%!important; max-height:100%!important; min-height:0!important}
 .tgb-inbox-chatpane, .tgb-chat-stream-box {min-height:0; min-width:0}
 .tgb-chat-stream-box {overflow-x:hidden; overflow-anchor:auto}
 .tgb-chat-stream-box > * {flex-shrink:0}
 .tgb-msg-bubble-wrap > div {min-width:0; max-width:100%}
 .tgb-msg-bubble {overflow-wrap:anywhere}
 .tgb-msg-bubble img {max-width:100%!important}
 .tgb-msg-meta {color:#64748B!important}
 .tgb-inbox-chatpane > :not(.tgb-chat-stream-box) {flex-shrink:0}
 .tgb-mobile-back-bar {gap:8px; padding:4px 10px!important; min-height:52px}
 .tgb-mobile-back-bar > div {flex:1; min-width:0}
 .tgb-mobile-back-bar span {overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
 #tgbMobileBackBtn {width:44px; min-height:44px; flex-shrink:0}
 #tgbMobileBackBtn span {display:none}
 .tgb-room-more {width:44px; height:44px; border:0; border-radius:12px; color:#2b2d7d; background:#F1F5F9; font-size:24px; flex-shrink:0}
 .tgb-room-summary {padding:6px 12px!important; gap:4px!important; flex-wrap:nowrap!important}
 .tgb-room-summary > div:first-child {min-width:0; gap:8px!important; width:100%}
 .tgb-room-summary > div:first-child > div {min-width:0; flex:1}
 .tgb-room-summary > div:first-child > div > div {flex-wrap:nowrap!important; overflow:hidden; white-space:nowrap; font-size:12px!important}
 .tgb-room-summary a {overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
 .tgb-room-summary img {width:36px!important; height:36px!important; border-radius:8px!important}
 .tgb-room-summary .tgb-chat-header-actions {display:none!important}
 .tgb-room-summary.tgb-details-open {flex-wrap:wrap!important}
 .tgb-room-summary.tgb-details-open .tgb-chat-header-actions {display:flex!important; max-height:25dvh; overflow:auto}
 .tgb-chat-deal-banner {padding:4px 12px!important; font-size:12px!important}
 .tgb-chat-deal-banner > * {display:none!important}
 .tgb-chat-deal-banner::before {content:'ขายแล้ว · ดูรายละเอียดเพื่อให้คะแนน'}
 .tgb-inbox-composer {padding:8px 10px max(8px,env(safe-area-inset-bottom))!important}
 body.tgb-chat-keyboard .tgb-inbox-composer {padding-bottom:8px!important}
 .tgb-inbox-textarea {font-size:16px!important; line-height:24px!important; min-height:44px!important; max-height:116px!important; overflow-y:auto!important; resize:none!important; box-sizing:border-box}
 .tgb-inbox-attach-btn, .tgb-inbox-send-btn {min-width:44px!important; min-height:44px!important; flex-shrink:0}
 .tgb-quick-chips-bar {min-width:0; padding:5px 10px!important}
 body.tgb-chat-keyboard .tgb-quick-chips-bar {display:none!important}
 .tgb-new-messages {position:absolute; right:16px; bottom:140px; z-index:12; background:#2b2d7d; color:white; border:0; border-radius:20px; min-height:44px; padding:8px 16px; box-shadow:0 3px 12px #0003}
 body.tgb-chat-keyboard .tgb-new-messages {bottom:130px}
}
.tgb-new-messages[hidden] {display:none}
@media(min-width:768px) {.tgb-room-more {display:none}}
@media(min-width:768px) {
 .tgb-new-messages {position:absolute; right:20px; bottom:150px; z-index:12; background:#2b2d7d; color:#fff; border:0; border-radius:20px; padding:10px 16px; cursor:pointer}
}
/* Explicit foregrounds protect light chat surfaces from global dark-theme text rules. */
@media (max-width:767px) {
 body .tgb-inbox-chatpane .tgb-chat-deal-banner::before {
  color:#854D0E!important;
  -webkit-text-fill-color:#854D0E!important;
 }
 body .tgb-inbox-chatpane .tgb-room-more,
 body .tgb-inbox-chatpane .tgb-room-more:hover,
 body .tgb-inbox-chatpane .tgb-room-more:focus {
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  padding:0!important; margin:0!important; box-sizing:border-box!important;
  width:44px!important; height:44px!important; min-width:44px!important;
  line-height:1!important; font-family:Arial,sans-serif!important;
  color:#2B2D7D!important; -webkit-text-fill-color:#2B2D7D!important;
  background:#F1F5F9!important; border:1px solid #CBD5E1!important;
 }
 body .tgb-inbox-chatpane .tgb-room-more:focus-visible {outline:2px solid #4338CA; outline-offset:2px}
 body .tgb-inbox-chatpane .tgb-msg-bubble-wrap.is-me .tgb-msg-bubble > div:first-child[style*="font-size:11px"] {
  color:#E2E8F0!important; -webkit-text-fill-color:#E2E8F0!important;
 }
 body .tgb-inbox-chatpane .tgb-msg-meta > span:first-child {
  color:#64748B!important; -webkit-text-fill-color:#64748B!important;
 }
 body .tgb-inbox-chatpane .tgb-msg-meta > span + span {
  color:#047857!important; -webkit-text-fill-color:#047857!important;
 }
 body .tgb-inbox-chatpane .tgb-inbox-textarea {
  color:#111827!important; -webkit-text-fill-color:#111827!important; background:#FFF!important;
 }
 body .tgb-inbox-chatpane .tgb-inbox-textarea::placeholder {
  color:#64748B!important; -webkit-text-fill-color:#64748B!important; opacity:1;
 }
 body .tgb-inbox-chatpane .tgb-new-messages {color:#FFF!important; -webkit-text-fill-color:#FFF!important; background:#2B2D7D!important}
}
