/* Soccer 411 v0.20.101 — Last Starting XI: better spacing and legibility.
   Only the Last Starting XI formation surface is affected. Formation coordinates,
   clickable player links and Starting XI/Bench functionality are preserved. */
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-viewport {
  width:100%;
  max-width:100%;
  margin:14px auto 0;
  overflow:hidden;
  border-radius:18px;
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch {
  width:min(100%, 1060px);
  max-width:100%;
  aspect-ratio:16 / 10.5;
  margin-inline:auto;
  border-radius:18px;
  background:linear-gradient(90deg,#138c59,#098154) !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.19),0 14px 26px rgba(0,36,24,.15);
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player {
  width:108px;
  min-height:86px;
  gap:3px;
  color:#fff;
  text-decoration:none;
  transition:transform .16s ease;
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo {
  width:56px;
  height:56px;
  border:3px solid #f8fbff;
  border-radius:50%;
  background:#1b2b44;
  box-shadow:0 0 0 3px rgba(12,34,58,.20),0 8px 18px rgba(0,0,0,.34);
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 28%;
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo b {font-size:14px}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > strong {
  max-width:106px;
  margin-top:3px;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(11,25,42,.95);
  border:1px solid rgba(255,255,255,.15);
  color:#fff!important;
  font-size:11px;
  font-weight:850;
  line-height:1.12;
  letter-spacing:.005em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:0 3px 9px rgba(0,0,0,.25);
}
.dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > small {
  margin-top:1px;
  padding:3px 8px;
  border:1px solid rgba(255,255,255,.55);
  border-radius:999px;
  background:#f5f9ff;
  color:#183250!important;
  font-size:9px;
  line-height:1.05;
  font-weight:900;
  box-shadow:0 2px 7px rgba(0,0,0,.16);
}
.dm-football-club-page .dm-squad-last-xi a.dm-squad-pitch-player:focus-visible {
  outline:3px solid #fff;
  outline-offset:4px;
  border-radius:12px;
}
@media(hover:hover) and (pointer:fine){
  .dm-football-club-page .dm-squad-last-xi a.dm-squad-pitch-player:hover {
    z-index:8;
    transform:translate(-50%,-50%) scale(1.09);
  }
}
/* Mid-size screens: protect neighbouring players' labels while retaining bigger portraits. */
@media(min-width:761px) and (max-width:1040px) {
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch {aspect-ratio:16 / 11}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player {width:88px;min-height:78px}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo {width:48px;height:48px}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > strong {max-width:86px;font-size:9.5px;padding:4px 6px}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > small {font-size:8px}
}
/* Mobile retains the established vertically rotated formation and no sideways scroll. */
@media(max-width:760px){
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-viewport {overflow:hidden!important}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch {
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    aspect-ratio:4 / 6!important;
    background:linear-gradient(180deg,#138c59,#098154)!important;
  }
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player {
    left:clamp(11%, var(--dm-y), 89%);
    top:clamp(8%, var(--dm-x), 92%);
    width:74px!important;
    min-height:76px;
    gap:2px;
  }
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo {
    width:44px!important;
    height:44px!important;
    border-width:2.5px!important;
    box-shadow:0 0 0 2px rgba(12,34,58,.20),0 5px 12px rgba(0,0,0,.28);
  }
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > strong {
    max-width:74px!important;
    margin-top:2px;
    padding:3px 5px;
    font-size:9px!important;
    line-height:1.06;
  }
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > small {
    margin-top:0;
    padding:2px 6px;
    font-size:7.5px!important;
  }
}
@media(max-width:390px){
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch {aspect-ratio:4 / 6.4!important}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player {width:67px!important;min-height:70px}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-photo {width:40px!important;height:40px!important}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > strong {max-width:67px!important;font-size:8px!important}
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player > small {font-size:7px!important}
}
@media(prefers-reduced-motion:reduce){
  .dm-football-club-page .dm-squad-last-xi .dm-squad-pitch-player {transition:none}
}
