/* BT player page mobile fixes v3 (headshot crop measured per photo: cap top + head width, chin = top + 1.75 x head width) (Oct 24, 2026): on screens <=600px, crop the headshot to the face (cap to chin), show the position as a chip after the team line (CSS ::after from a data attribute, so the page's later "(MLB)" text update can't flatten it), zoom the banner background past its logo and tint it. Desktop untouched. */ (function(){var css='@media (max-width:600px){html body .btp-banner-wrap .btp-banner{background-size:240% auto!important;background-position:50% 100%!important;box-shadow:inset 0 0 0 3000px rgba(4,10,22,.45)}'+ '.btpm-face{position:relative;flex:0 0 auto;width:64px;height:90px;overflow:hidden;border-radius:10px;background:#c9ced6;align-self:flex-start}'+ '.btpm-face>img.btp-shot{position:absolute!important;max-width:none!important;height:auto!important;margin:0!important;border-radius:0!important}'+ 'html body .btp-banner .btp-pos{display:none!important}.btp-team[data-btpm-pos]::after{content:attr(data-btpm-pos);display:inline-block;font-weight:800;letter-spacing:.04em;color:#fff;margin-left:6px;padding:1px 6px;border-radius:5px;background:rgba(255,255,255,.12);font-size:.9em;white-space:nowrap}}'; var s=document.getElementById('btpm-css');if(!s){s=document.createElement('style');s.id='btpm-css';document.body.appendChild(s)}s.textContent=css; var CR={};function crop(i){var s=i.currentSrc||i.src;if(!s)return;var ap=function(c){if(!i.parentElement||!i.parentElement.classList.contains('btpm-face'))return;i.style.setProperty('width',c.iw+'px','important');i.style.setProperty('left',c.left+'px','important');i.style.setProperty('top',c.top+'px','important')};var BW=64,BH=90;function calc(m){var ok=m&&m.T>=0&&m.Tm.W*0.45&&m.hw40&&Math.abs(p2[0]-e[0])+Math.abs(p2[1]-e[1])+Math.abs(p2[2]-e[2])>55){if(a<0)a=u;b=u}}return[a,b]};var T=-1;for(var j=0;j=0&&r[1]-r[0]>W*0.08){T=j;break}}var hw=0,hc=W/2;for(var j2=T;j23&&r2[1]hw){hw=r2[1]-r2[0];hc=(r2[0]+r2[1])/2}}m={W:W,H:H,T:T,hw:hw,hc:hc}}catch(e){m={W:im.naturalWidth||240,H:im.naturalHeight||361,T:-1,hw:0}}CR[s]=calc(m);ap(CR[s])};im.src=s} function fx(){var b=document.querySelector('.btp-banner');if(!b)return;var p=b.querySelector('.btp-pos'),i=b.querySelector('.btp-shot'),t=b.querySelector('.btp-team');if(!i)return;var wrap=i.parentElement.classList.contains('btpm-face')?i.parentElement:null; if(t){[].slice.call(t.querySelectorAll('.btpm-pos')).forEach(function(x){x.remove()});var pt=p?p.textContent.trim():'';if(pt){var tx=t.textContent;if(tx.indexOf(pt+' (')>-1&&tx.replace(pt+' (',' (')!==tx&&!/\s$/.test(tx.split(pt+' (')[0]))t.textContent=tx.replace(pt+' (',' (');t.setAttribute('data-btpm-pos',pt)}} if(innerWidth>600){if(wrap){wrap.parentNode.insertBefore(i,wrap);wrap.remove();i.style.removeProperty('width');i.style.removeProperty('left');i.style.removeProperty('top')}return} if(!wrap){wrap=document.createElement('div');wrap.className='btpm-face';i.parentNode.insertBefore(wrap,i);wrap.appendChild(i)}crop(i)} fx();new MutationObserver(function(){var b=document.querySelector('.btp-banner');if(!b)return;var i=b.querySelector('.btp-shot'),t=b.querySelector('.btp-team');if((innerWidth<=600&&i&&!i.parentElement.classList.contains('btpm-face'))||(t&&!t.hasAttribute('data-btpm-pos')))fx()}).observe(document.querySelector('.btp-banner-wrap')||document.body,{childList:true,subtree:true});addEventListener('resize',fx);setTimeout(fx,800);setTimeout(fx,2500);})();