Improvised weapons are left mainly in the hands of the DM. There is very little we can tell you for sure; Most of these questions will have to ask your DM questions.
Improvised weapon both melee and ranged
A weapon can count as a melee weapon and a remote weapon; Many throwing weapons do that. An improvised weapon could be the same: you can hit someone's head with a brick, or you can throw someone's brick, and both would be attacks with an improvised weapon. On the other hand, while, in the appropriate fantasy scenario, we can imagine that a card thrown can hurt someone, I am struggling to imagine how you could hit someone with one in close combat that would hurt him. (Simply hitting them with the card wrapped around your fist probably doesn't count.) Your DM may or may not allow it, but it will probably be reduced to whether or not you can imagine that it really hurts someone.
Mastery of melee weapons and mastery of ranged weapons with thrown weapons
Anyway, if allowed, yes, the weapons thrown can be both a melee weapon and a ranged weapon, and the wording of the Mastery in melee weapons and the Mastery in ranged weapons is that you get the bonus when you use the right type of weapon, regardless of what type of attack you make. And officially, they stack. Then you could get +4 to attack and damage with a thrown weapon if you take both. However, you should ask your DM about it, since some DM may find it cheesy to get both that way. Personally, considering that you've burned four feats in this, I don't think it's a very strong choice, even if your DM allows it: the weapons approach, the specialization in weapons, the mastery of melee weapons and the mastery of Ranged weapons are quite weak feats.
Improvised Magic Weapons
To become magical, a weapon must first be a master weapon. An improvised weapon is, by definition, something that was not made to be a weapon at all. If you made a card designed to be a weapon and with the quality of a masterpiece, it would no longer be improvised, it would be a real weapon. Whether that is possible or not in your game world depends on your DM.
Ask your DM for elegant, perhaps exotic, weapons that are actually armed cards. Sharp metal edges, maybe. Use the statistics for a dagger, maybe. Then you can get versions of masterpieces and put magic on them and there are no questions. Having Really Improvised weapons are a bad idea, there really is no advantage in using them, I checked.
Also, you probably shouldn't take the weapon approach unless something really good requires it. You probably shouldn't take four fighter levels: one feat per level for the first two levels is fine, one feat every two levels is really weak. And even if you do, you almost certainly shouldn't take the Weapons Specialization. That rejects the feats of mastery of weapons, but they are not so good anyway. Instead, I recommend looking at the master pitcher of Full warrior. Bloodstorm Blade of Battle volume It is also good enough to throw. If you want to be based on strength, Brutal Throw of Full adventurer It is good and the ranger can get feats of double attack or ranged attack without skill. If you want to be based on the skill, Dead Eye of Compendium of dragons it can hurt Dex, and if you treat the cards as if they were daggers, Shadow Blade of Battle volume It will too (stack). Swordsage is useful for getting Shadow Blade, and it can have more useful things that you can also do.