/* Mobile matchcenter repair 2026-11-03. Loaded AFTER both existing stylesheets. */
body.portal-body:has(#matchcenterRoot){background:#292c32!important}
body.portal-body:has(#matchcenterRoot) main,body.portal-body:has(#matchcenterRoot) #app{background:#292c32!important}
#matchcenterRoot{background:#292c32!important;color:#f6f6f7!important}
#matchcenterRoot .mc-title{background:#34373d!important;border-color:#d61936!important;padding:18px!important}
#matchcenterRoot .mc-title p{color:#e1e3e8!important}
#matchcenterRoot .mc-history-head{background:#34373d!important;color:#fff!important}
#matchcenterRoot .mc-history-controls{background:#292c32!important}
#matchcenterRoot .mc-history-controls select{background:#3c4047!important;color:#fff!important;border-color:#757b85!important}
#matchcenterRoot .mc-history-controls label{color:#f0f0f0!important}
#matchcenterRoot .mc-lineup-grid{gap:18px!important}
/* Remove the link icon without removing the actual player-profile links. */
#matchcenterRoot .mc-bench-arrow,#matchcenterRoot .mc-bench-person .mc-bench-arrow{display:none!important;visibility:hidden!important}
#matchcenterRoot .mc-bench-person{padding-right:14px!important}
/* Keep every player card and its name in its own tactical row. */
#matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates){display:flex!important;flex-direction:column!important;justify-content:space-around!important;gap:10px!important;padding:26px 10px!important;min-height:850px!important;height:auto!important;max-height:none!important;overflow:visible!important}
#matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates)>.mc-pitch-row{display:grid!important;grid-template-columns:repeat(var(--mc-count),minmax(0,1fr))!important;align-items:center!important;justify-items:center!important;flex:1 1 auto!important;min-height:145px!important;gap:4px!important;padding:8px 0!important}
#matchcenterRoot .mc-pitch-row>.mc-player{width:100%!important;min-width:0!important;max-width:145px!important;gap:6px!important;padding:4px 0!important;overflow:visible!important}
#matchcenterRoot .mc-pitch-row .mc-player-head{width:clamp(66px,8vw,94px)!important;height:clamp(76px,9vw,106px)!important;max-width:100%!important;flex:0 0 auto!important}
#matchcenterRoot .mc-pitch-row .mc-player strong{font-size:clamp(11px,1.25vw,14px)!important;line-height:1.2!important;max-width:100%!important}
#matchcenterRoot .mc-pitch-row .mc-player small{font-size:11px!important}
#matchcenterRoot .mc-player-head .mc-rating{right:-10px!important;top:-13px!important}
#matchcenterRoot .mc-player-head .mc-change-marker{left:-8px!important;bottom:-8px!important}
@media(max-width:600px){
  #matchcenterRoot .mc-lineup-grid{grid-template-columns:minmax(0,1fr)!important}
  #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates){min-height:900px!important;padding:30px 7px!important;gap:13px!important}
  #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates)>.mc-pitch-row{min-height:155px!important;padding:10px 0!important}
  #matchcenterRoot .mc-pitch-row>.mc-player{max-width:90px!important;gap:7px!important}
  #matchcenterRoot .mc-pitch-row .mc-player-head{width:clamp(56px,17vw,78px)!important;height:clamp(66px,20vw,88px)!important}
  #matchcenterRoot .mc-pitch-row .mc-player strong{font-size:11px!important;line-height:1.22!important}
  #matchcenterRoot .mc-pitch-row .mc-player small{font-size:10px!important}
  #matchcenterRoot .mc-pitch-row .mc-rating{font-size:10px!important}
  #matchcenterRoot .mc-pitch-row .mc-change-marker{font-size:9px!important}
  #matchcenterRoot .mc-bench-person{gap:10px!important}
}

/* Reference-style mobile layout: one team at a time, full-width pitch. */
#matchcenterRoot .mc-lineup-tabs{display:none}
@media(max-width:850px){
 #matchcenterRoot .mc-lineup-tabs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0 0 12px;background:#232427;border:1px solid #53565c;border-radius:10px;overflow:hidden}
 #matchcenterRoot .mc-lineup-tab{border:0;background:#303136;color:#bfc1c7;font:800 clamp(14px,4vw,20px)/1.2 var(--display);padding:17px 8px;cursor:pointer;min-width:0;overflow-wrap:anywhere}
 #matchcenterRoot .mc-lineup-tab.is-active{background:#171819;color:white;box-shadow:inset 0 -4px #cf1730}
 #matchcenterRoot .mc-lineup-grid[data-active-side=home]>.mc-lineup-panel:nth-child(2),
 #matchcenterRoot .mc-lineup-grid[data-active-side=away]>.mc-lineup-panel:nth-child(1){display:none!important}
 #matchcenterRoot .mc-lineup-grid{display:block!important}
 #matchcenterRoot .mc-lineup-panel{width:100%!important;max-width:none!important}
 #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates){min-height:780px!important;gap:8px!important;padding:20px 12px!important}
 #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates)>.mc-pitch-row{min-height:130px!important;padding:4px 0!important}
 #matchcenterRoot .mc-pitch-row .mc-player-head{width:clamp(58px,17vw,88px)!important;height:clamp(70px,20vw,104px)!important}
 #matchcenterRoot .mc-pitch-row>.mc-player{max-width:115px!important}
 #matchcenterRoot .mc-pitch-row .mc-player strong{font-size:clamp(11px,3.1vw,15px)!important}
 #matchcenterRoot .mc-pitch-row .mc-rating{right:-9px!important;top:-10px!important}
 #matchcenterRoot .mc-pitch-row .mc-change-marker{left:-8px!important;bottom:-6px!important}
 #matchcenterRoot .mc-bench-arrow{display:none!important}
}
@media(max-width:420px){
 #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates){min-height:740px!important;padding:16px 6px!important}
 #matchcenterRoot .mc-pitch:not(.mc-pitch-coordinates)>.mc-pitch-row{min-height:122px!important}
 #matchcenterRoot .mc-pitch-row .mc-player-head{width:clamp(51px,17vw,74px)!important;height:clamp(64px,20vw,88px)!important}
 #matchcenterRoot .mc-pitch-row .mc-player strong{font-size:11px!important}
}
