/* NearNow Web v172 — resolution consistency for chat/profile action surfaces. */
.chat-thread-head{container-type:inline-size;container-name:nn-chat-head}
.chat-head-actions{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:clamp(4px,.72vw,10px)!important;overflow:visible!important}
.chat-action-premium{min-width:0!important;padding-inline:clamp(5px,.8vw,12px)!important;gap:clamp(3px,.52vw,8px)!important;font-size:clamp(8.5px,.82vw,11.5px)!important;line-height:1!important;letter-spacing:-.005em!important}
.chat-action-premium svg{width:clamp(16px,1.35vw,21px)!important;height:clamp(16px,1.35vw,21px)!important}
.chat-action-premium span{min-width:0!important;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important}
@container nn-chat-head (max-width:620px){
  .chat-head-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .chat-action-premium{height:44px!important;padding-inline:7px!important;gap:5px!important;font-size:10.25px!important}
  .chat-action-premium svg{width:18px!important;height:18px!important}
}
@container nn-chat-head (max-width:400px){
  .chat-head-actions{gap:6px!important}
  .chat-action-premium{height:43px!important;padding-inline:5px!important;gap:4px!important;font-size:9.4px!important;border-radius:11px!important}
  .chat-action-premium svg{width:16px!important;height:16px!important}
}
/* Fallback for engines without container queries. */
@supports not (container-type:inline-size){
  @media(max-width:860px){.chat-head-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}.chat-action-premium{font-size:10px!important;padding-inline:6px!important}.chat-action-premium span{overflow:visible!important;text-overflow:clip!important}}
}

.profile-story-shell{container-type:inline-size;container-name:nn-profile-story}
.profile-story-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;max-width:none!important}
.profile-story-actions button{width:100%!important;min-width:0!important;min-height:44px!important;padding:8px clamp(7px,1vw,15px)!important;font-size:clamp(10px,.95vw,14px)!important;line-height:1.15!important;text-align:center!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
.profile-story-actions .primary-action{min-width:0!important}
.profile-story-chip{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important}
@container nn-profile-story (max-width:700px){
  .profile-story-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important}
  .profile-story-actions button{font-size:12px!important;padding-inline:8px!important}
}
@container nn-profile-story (max-width:390px){
  .profile-story-actions{gap:6px!important}
  .profile-story-actions button{font-size:10.8px!important;padding-inline:6px!important;min-height:46px!important}
}
@media(max-width:860px){
  .profile-story-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;scroll-snap-type:none!important}
  .profile-story-actions button{min-width:0!important;white-space:normal!important}
  .profile-story-actions .primary-action{min-width:0!important}
}


/* Current targeted fix: keep mode switch and right-side actions in separate layout space on compact desktop/tablet widths. */
@media (min-width:861px) and (max-width:1220px){
  .topbar{padding-inline:16px!important;gap:10px!important}
  .topbar-left{flex:1 1 auto!important;min-width:0!important;gap:8px!important;overflow:hidden!important}
  .topbar-screen-heading{display:none!important}
  .topbar-left .mode{flex:0 1 auto!important;min-width:0!important;max-width:100%!important}
  .topbar-left .mode button{padding:8px 12px!important}
  .sensual-status{flex:0 0 auto!important;margin:0 2px!important;padding:6px!important}
  .sensual-status #sensualStatusText{display:none!important}
  .top-actions{flex:0 0 auto!important;min-width:0!important;gap:6px!important}
  .top-actions .pill{padding:8px 10px!important;white-space:nowrap!important}
  .top-actions .recommend-friends{max-width:190px!important;overflow:hidden!important;text-overflow:ellipsis!important}
}
@media (min-width:861px) and (max-width:1020px){
  .top-actions .recommend-friends{max-width:150px!important}
  .top-actions .pill{font-size:12px!important}
}
