/* Scale one reference row inside its existing slot. Never spread or reorder cards. */
@media(min-width:951px){
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header]{
  min-width:0!important;
  width:var(--header-slot-width,auto)!important;
  max-width:var(--header-slot-width,100%)!important;
  flex:0 1 var(--header-slot-width,auto)!important;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  overscroll-behavior-x:contain;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  gap:8px!important;
  width:max-content!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  zoom:var(--header-scale,1);
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .player{
  flex:0 0 260px!important;
  box-sizing:border-box;
  width:260px!important;
  min-width:260px!important;
  max-width:260px!important;
  height:auto!important;
  min-height:136px!important;
  max-height:none!important;
  padding:20px 12px 10px!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr)!important;
  grid-template-rows:40px 26px auto!important;
  gap:0 10px!important;
  align-content:start!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .company-symbol{
  grid-row:1!important;
  width:40px!important;
  height:40px!important;
  max-width:40px!important;
  max-height:40px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .company-title{
  font-size:20px!important;
  line-height:24px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .player>small:not(.player-income){
  grid-column:1/-1!important;
  grid-row:2!important;
  font-size:14px!important;
  line-height:26px!important;
  padding:0!important;
  margin:0!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .player-income{
  grid-column:1/-1!important;
  grid-row:3!important;
  font-size:13px!important;
  line-height:20px!important;
  white-space:normal;
  margin:0!important;
  padding:4px 0!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .online-player-name{
  grid-column:1/-1!important;
  grid-row:4!important;
 }
 /* Reserve the right-hand corner for the original two controls. */
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players .player-mission-chip{
  font-size:13px!important;
  height:26px!important;
  padding:2px 6px!important;
  right:62px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-fit-header] #players :is(.priority-turn-button,.priority-turn-info){
  font-size:13px!important;
  min-height:26px!important;
  right:8px!important;
 }
}

/* Keep every company visible when the reference row reaches its readable limit.
   Only card internals become denser; card order, board and panels stay in place. */
@media(min-width:951px){
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .player{
  flex-basis:var(--header-card-width)!important;width:var(--header-card-width)!important;
  min-width:var(--header-card-width)!important;max-width:var(--header-card-width)!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  grid-template-rows:28px 24px 20px auto auto!important;
  gap:0 5px!important;padding:16px 7px 6px!important;min-height:136px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .company-symbol{
  grid-column:1!important;grid-row:1!important;width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .company-title{
  grid-column:2!important;grid-row:1!important;font-size:16px!important;line-height:22px!important;min-width:0;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .player>small:not(.player-income){
  grid-row:3!important;font-size:12px!important;line-height:20px!important;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .player-income{
  grid-row:4!important;font-size:11px!important;line-height:16px!important;padding:3px 0!important;white-space:normal;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .online-player-name{
  grid-row:5!important;font-size:11px!important;line-height:16px!important;height:20px;min-height:20px;padding-top:3px;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players :is(.player-mission-chip,.priority-turn-button,.priority-turn-info){
  position:static!important;inset:auto!important;grid-column:1/-1!important;grid-row:2!important;
  font-size:11px!important;line-height:18px!important;height:24px!important;min-height:24px!important;padding:2px 3px!important;margin:0!important;align-self:center;
 }
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players .player-mission-chip{justify-self:start}
 html body.desktop-play.faithful-target[data-desktop-view] #desktop-top-players[data-header-density=compact] #players :is(.priority-turn-button,.priority-turn-info){justify-self:end}
}
