/* R27.25.31 REV2 – compact XI and highlighted player. Kader context bars untouched. */
.fm27-bestxi-rev2{width:100%;min-width:0;color:#eef3f6}
.fm27-bestxi-rev2 *{box-sizing:border-box}
.fm27-bestxi-layout{display:grid;grid-template-columns:minmax(192px,235px) minmax(350px,1fr) minmax(205px,250px);gap:12px;align-items:start;width:100%}
.fm27-bestxi-sidebar,.fm27-bestxi-featured,.fm27-bestxi-main{min-width:0;background:#1a2334;border:1px solid #34415c;border-radius:12px;overflow:hidden}
.fm27-bestxi-sidebar h2,.fm27-bestxi-featured h2{margin:0;padding:13px 15px;font-size:14px;color:#f5f7fa;font-weight:800;border-bottom:1px solid #354359}
.fm27-bestxi-picker{padding:13px;display:grid;gap:12px}
.fm27-bestxi-picker label,.fm27-bestxi-round-jump label{display:grid;gap:5px;color:#afc1d1;font-size:11px;font-weight:700}
.fm27-bestxi-picker select,.fm27-bestxi-round-jump select{background:#24304a;color:#f4f8fa;border:1px solid #485b73;border-radius:7px;padding:9px 24px 9px 9px;min-width:0;width:100%;font-size:12px}
.fm27-bestxi-apply,.fm27-bestxi-go{background:#266f56;color:#fff;border:1px solid #469575;border-radius:7px;padding:9px 12px;font-weight:700;font-size:12px;cursor:pointer}
.fm27-bestxi-viewmodes{display:grid;gap:5px;padding:0 13px 12px}
.fm27-bestxi-mode{display:block;border:1px solid #42536b;border-radius:7px;padding:9px 10px;color:#d7e6e9;text-decoration:none;font-size:12px;font-weight:700}
.fm27-bestxi-mode:hover,.fm27-bestxi-mode.is-active{background:#196548;color:#fff;border-color:#439b75}
.fm27-bestxi-mode.is-disabled{opacity:.45;cursor:default}
.fm27-bestxi-round-jump{display:grid;gap:8px;padding:12px 13px;border-top:1px solid #33415c}
.fm27-bestxi-pager{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:5px;align-items:center;padding:11px 12px;border-top:1px solid #34415c}
.fm27-bestxi-arrow{text-align:center;background:#263a4a;color:#e0efe6;border:1px solid #447062;border-radius:6px;padding:8px 3px;font-size:11px;text-decoration:none}
.fm27-bestxi-arrow:not(.is-disabled):hover{background:#246d50;color:white}
.fm27-bestxi-arrow.is-disabled{opacity:.35}.fm27-bestxi-counter{font-size:11px;color:#cdd9de}
.fm27-bestxi-caption{padding:13px 16px;display:flex;gap:8px;align-items:center;justify-content:space-between;background:#1d2940;border-bottom:1px solid #33415c}
.fm27-bestxi-caption span{font-size:10px;color:#a9bfd2}.fm27-bestxi-caption h2{font-size:15px;margin:3px 0 0;font-weight:800;color:#f3f7fa}
.fm27-bestxi-caption>strong{font-size:11px;border:1px solid #498977;background:#174834;color:#def7e8;border-radius:7px;padding:6px 8px;white-space:nowrap}
.fm27-bestxi-pitch{margin:12px;min-height:510px;position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:space-around;gap:5px;padding:28px 18px;background:#101820;border:2px solid #d6e0e2;border-radius:3px}
.fm27-bestxi-pitch:before{content:"";position:absolute;inset:auto 0 50%;height:2px;background:#b5c3c5;opacity:.7;z-index:-1}
.fm27-bestxi-pitch:after{content:"";position:absolute;top:50%;left:50%;width:118px;height:118px;transform:translate(-50%,-50%);border:2px solid #b5c3c5;border-radius:50%;opacity:.75;z-index:-1}
.fm27-bestxi-line{position:relative;z-index:2;display:flex;justify-content:space-around;align-items:center;gap:3px}
.fm27-bestxi-player{width:min(23%,100px);min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;background:transparent;border:0;padding:0;box-shadow:none}
.fm27-bestxi-line-forwards .fm27-bestxi-player,.fm27-bestxi-line-midfield .fm27-bestxi-player{width:min(30%,100px)}
.fm27-bestxi-portrait{position:relative;width:68px;max-width:95%;height:74px;display:block}
.fm27-bestxi-player-avatar{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:#263441;color:#c6d2dd;border-radius:5px;overflow:hidden;font-size:30px;text-decoration:none}
.fm27-bestxi-player-avatar img{width:100%;height:100%;object-fit:cover;object-position:center 15%}
.fm27-bestxi-portrait-count{position:absolute;z-index:3;top:-7px;right:-9px;display:grid;place-items:center;min-width:23px;height:23px;padding:0 4px;border-radius:50%;background:#fff;color:#c71e2b;border:1px solid #ddd;font-size:12px;font-weight:900;box-shadow:0 2px 5px #0009;pointer-events:none}
.fm27-bestxi-crest{position:absolute;bottom:-4px;right:-10px;z-index:2;width:30px;height:30px;display:grid;place-items:center;filter:drop-shadow(0 1px 2px #000b);text-decoration:none}
.fm27-bestxi-crest img{width:100%;height:100%;object-fit:contain}.fm27-bestxi-crest i{font-size:22px;color:#d8e7eb}
.fm27-bestxi-name{font-size:11px;font-weight:800;color:#fff;text-shadow:0 2px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;text-decoration:none}
.fm27-bestxi-name:hover{color:#93edbb}
.fm27-bestxi-featured{background:#1b2431}
.fm27-bestxi-featured-identity{padding:13px;display:grid;grid-template-columns:minmax(0,1fr) 86px;gap:8px;align-items:start;min-width:0}
.fm27-bestxi-featured-name{color:#fff;display:block;font-size:16px;font-weight:800;text-decoration:none;line-height:1.25;overflow-wrap:anywhere}
.fm27-bestxi-featured-club{display:block;color:#c8d8e2;font-size:12px;font-weight:650;margin-top:6px;text-decoration:none}
.fm27-bestxi-featured-photo{position:relative;display:flex;justify-content:center;align-items:center;height:105px;width:86px;background:#283746;border-radius:8px;overflow:visible;text-decoration:none;color:#deecf1;font-size:32px}
.fm27-bestxi-featured-photo>img:not(.fm27-bestxi-featured-crest){height:100%;width:100%;object-fit:cover;border-radius:8px}
.fm27-bestxi-featured-photo>.fm27-bestxi-featured-crest{position:absolute;width:35px;height:35px;object-fit:contain;bottom:-7px;right:-8px;filter:drop-shadow(0 2px 3px #000a)}
.fm27-bestxi-featured-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 13px 14px;margin:0}
.fm27-bestxi-featured-stats>div{margin:0;border:1px solid #38485b;background:#121d2a;border-radius:8px;padding:9px;min-width:0}
.fm27-bestxi-featured-stats dt{font-size:10px;color:#a9becb;margin:0}.fm27-bestxi-featured-stats dd{font-size:20px;color:#fff;font-weight:800;margin:3px 0 0}
.fm27-bestxi-featured-hint{padding:0 13px 12px;font-size:11px;color:#afc1cb;margin:0}
.fm27-bestxi-empty{background:#1a2634;border:1px solid #35485b;border-radius:10px;color:#c4d1d8;padding:24px;min-height:220px}
.fm27-bestxi-footnote{font-size:11px;color:#b1c6cb;padding:9px 4px}
@media(max-width:1120px){.fm27-bestxi-layout{grid-template-columns:minmax(190px,235px) minmax(0,1fr)}.fm27-bestxi-featured{grid-column:2}.fm27-bestxi-featured-identity{grid-template-columns:1fr 86px}.fm27-bestxi-featured-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.fm27-bestxi-layout{grid-template-columns:minmax(0,1fr)}.fm27-bestxi-sidebar,.fm27-bestxi-featured{grid-column:1}.fm27-bestxi-picker{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}.fm27-bestxi-picker .fm27-bestxi-apply{grid-column:1/-1}.fm27-bestxi-viewmodes{display:flex}.fm27-bestxi-mode{flex:1;text-align:center}.fm27-bestxi-round-jump{grid-template-columns:1fr auto;align-items:end}.fm27-bestxi-round-jump label{grid-column:1}.fm27-bestxi-pitch{min-height:510px}.fm27-bestxi-featured-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:440px){.fm27-bestxi-pitch{min-height:440px;padding:18px 6px;margin:8px}.fm27-bestxi-portrait{width:45px;height:51px}.fm27-bestxi-portrait-count{height:19px;min-width:19px;font-size:10px;top:-6px;right:-5px}.fm27-bestxi-crest{width:21px;height:21px;right:-6px;bottom:-4px}.fm27-bestxi-name{font-size:9px}.fm27-bestxi-featured-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.fm27-bestxi-picker{grid-template-columns:1fr}.fm27-bestxi-picker .fm27-bestxi-apply{grid-column:auto}.fm27-bestxi-caption{padding:10px}.fm27-bestxi-caption h2{font-size:13px}}

/* Legacy inline news article XI card retained */
.fm27-editorial-bestxi{margin-top:18px;padding:16px;border:1px solid #315b4b;border-radius:12px;background:#162c28;color:#e1ece8}.fm27-editorial-bestxi h4{font-size:16px;color:#effff7}.fm27-editorial-bestxi ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px 14px;list-style:none;margin:12px 0;padding:0}.fm27-editorial-bestxi li{font-size:12px}.fm27-editorial-bestxi a{color:#98e4bd}


/* R27.25.31 REV3 – editorial featured-player panel; no gameplay or data changes. */
@media (min-width: 941px) {
  .fm27-bestxi-rev3 .fm27-bestxi-layout {
    grid-template-columns: minmax(185px, 215px) minmax(330px, 1fr) minmax(315px, 390px);
    gap: 12px;
  }
}
.fm27-bestxi-rev3 .fm27-bestxi-pitch {
  min-height: 480px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.fm27-bestxi-rev3 .fm27-bestxi-portrait { width: 62px; height: 68px; }
.fm27-bestxi-rev3 .fm27-bestxi-featured {
  background: linear-gradient(145deg,#222c3d 0%,#192230 54%,#192330 100%);
  border-color: #465772;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured > h2 {
  padding: 15px 18px;
  font-size: 14px;
  letter-spacing: .015em;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-identity {
  display: grid;
  grid-template-columns: minmax(0,1fr) 128px;
  align-items: center;
  gap: 14px;
  padding: 19px 19px 20px;
  min-height: 207px;
  background: radial-gradient(ellipse at 95% 0%,rgba(70,120,112,.18),transparent 62%);
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-name {
  font-size: clamp(17px,1.4vw,21px);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-club {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.35;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-photo {
  width: 128px;
  height: 166px;
  border-radius: 10px;
  background: #334457;
  box-shadow: 0 7px 20px rgba(0,0,0,.3);
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-photo > img:not(.fm27-bestxi-featured-crest) {
  border-radius: 10px;
  object-position: center 15%;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-photo > .fm27-bestxi-featured-crest {
  width: 39px;
  height: 39px;
  right: -8px;
  bottom: -7px;
}
/* An editorial facts list, not a four-tile dashboard. */
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats {
  display: block;
  padding: 0 19px 20px;
  margin: 0;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 2px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(161,185,199,.19);
  border-radius: 0;
  background: transparent;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats > div:first-child {
  border-top: 1px solid rgba(161,185,199,.24);
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats > div:last-child { border-bottom: 0; }
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats dt {
  font-size: 12px;
  font-weight: 600;
  color: #bdced8;
  line-height: 1.5;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats dd {
  font-size: 17px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.4;
  margin: 0;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-stats > div:first-child dd {
  color: #b4f1cb;
  font-size: 24px;
  font-weight: 800;
}
.fm27-bestxi-rev3 .fm27-bestxi-featured-hint {
  padding: 0 19px 15px;
  line-height: 1.45;
}
@media (min-width: 941px) and (max-width: 1120px) {
  .fm27-bestxi-rev3 .fm27-bestxi-featured { grid-column: auto; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-identity {
    grid-template-columns: minmax(0,1fr) 116px;
    gap: 9px;
    padding: 17px 13px 18px;
  }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-photo { width: 116px; height: 153px; }
}
@media (max-width: 940px) and (min-width: 761px) {
  .fm27-bestxi-rev3 .fm27-bestxi-layout { grid-template-columns: minmax(185px,220px) minmax(0,1fr); }
  .fm27-bestxi-rev3 .fm27-bestxi-featured { grid-column: 2; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-identity {
    grid-template-columns: minmax(0,1fr) 128px;
  }
}
@media (max-width: 760px) {
  .fm27-bestxi-rev3 .fm27-bestxi-featured { grid-column: 1; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-identity {
    grid-template-columns: minmax(0,1fr) 128px;
  }
}
@media (max-width: 440px) {
  .fm27-bestxi-rev3 .fm27-bestxi-pitch { min-height: 440px; padding: 18px 6px; }
  .fm27-bestxi-rev3 .fm27-bestxi-portrait { width: 45px; height: 51px; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-identity {
    padding: 13px 14px 17px;
    gap: 10px;
    grid-template-columns: minmax(0,1fr) 114px;
    min-height: 160px;
  }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-photo { width: 114px; height: 145px; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-name { font-size: 17px; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-stats { padding: 0 14px 15px; }
  .fm27-bestxi-rev3 .fm27-bestxi-featured-stats > div { padding: 9px 2px; }
}

/* R27.25.31 REV4 – wider archive/filter sidebar, correspondingly narrower pitch.
   Keep the featured-player card the largest side panel. */
@media (min-width: 1200px) {
  .fm27-bestxi-rev3 .fm27-bestxi-layout {
    grid-template-columns: 275px minmax(330px,1fr) minmax(335px,390px);
  }
}
@media (min-width: 941px) and (max-width: 1199px) {
  .fm27-bestxi-rev3 .fm27-bestxi-layout {
    grid-template-columns: 245px minmax(285px,1fr) minmax(315px,390px);
  }
}
@media (min-width: 761px) and (max-width: 940px) {
  .fm27-bestxi-rev3 .fm27-bestxi-layout {
    grid-template-columns: minmax(230px,255px) minmax(0,1fr);
  }
}
