/* FM27 V10.73.2 | 4-zone SI-inspired player identity header. No business logic. */
body.fm27-midnight .fm27-profile-hero-v10732{
  display:grid;grid-template-columns:minmax(365px,2.45fr) minmax(155px,.88fr) minmax(160px,.92fr) minmax(145px,.78fr) 255px;
  gap:0;align-items:stretch;padding:13px 12px;min-width:0;
}
body.fm27-midnight .fm27-profile-hero-person{display:flex;align-items:center;gap:12px;padding:0 12px 0 0;min-width:0}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-portrait{width:98px;min-width:98px;height:121px}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-identity{gap:7px;min-width:0}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-identity h2{font-size:clamp(16px,1.46vw,22px);margin:0}
body.fm27-midnight .fm27-profile-position-long{color:#dce5f3;font-size:11px;line-height:1.4}
body.fm27-midnight .fm27-profile-bio{display:flex;align-items:center;flex-wrap:wrap;gap:5px 13px;color:#e6eaf5;font-size:11px}
body.fm27-midnight .fm27-profile-shortflag{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
body.fm27-midnight .fm27-profile-shortflag .ws-flag{height:15px;width:22px;object-fit:contain}
body.fm27-midnight .fm27-profile-shortflag b{font-size:11px;font-weight:800}
body.fm27-midnight .fm27-profile-age{color:#cfddf0}
body.fm27-midnight .fm27-profile-hero-section{border-left:1px solid #8293b45e;display:flex;justify-content:center;flex-direction:column;padding:10px 15px;min-width:0;gap:6px}
body.fm27-midnight .fm27-profile-hero-club{flex-direction:row;justify-content:flex-start;align-items:center;gap:11px}
body.fm27-midnight .fm27-profile-club-crest{width:61px;min-width:61px;height:70px;display:flex;align-items:center;justify-content:center;text-decoration:none;color:#c5d5ed;font-size:30px}
body.fm27-midnight .fm27-profile-club-crest img{width:100%;height:100%;object-fit:contain}
body.fm27-midnight .fm27-profile-club-lines{display:flex;flex-direction:column;gap:6px;min-width:0}
body.fm27-midnight .fm27-profile-club-lines a,body.fm27-midnight .fm27-profile-club-lines strong{font-size:12px;font-weight:800;color:#fff;text-decoration:none;overflow-wrap:anywhere;line-height:1.25}
body.fm27-midnight .fm27-profile-club-lines a:hover{text-decoration:underline}
body.fm27-midnight .fm27-profile-club-lines span{font-size:10px;line-height:1.25;background:#2b3b58;border:1px solid #42546f;padding:4px 7px;border-radius:5px;color:#ccdaec;align-self:flex-start}
body.fm27-midnight .fm27-profile-nation-name{display:flex;align-items:center;gap:7px;font-size:12px;color:#fff;min-width:0}
body.fm27-midnight .fm27-profile-nation-name img.ws-flag{width:24px;height:17px;object-fit:contain;flex:none}
body.fm27-midnight .fm27-profile-nation-name strong{font-size:12px;overflow-wrap:anywhere}
body.fm27-midnight .fm27-profile-nation-caps{font-size:11px;color:#d6e1f3}
body.fm27-midnight .fm27-profile-nation-status{font-size:10px;color:#aebdd2;line-height:1.3}
body.fm27-midnight .fm27-profile-nation-status.is-current{color:#79dec1}
body.fm27-midnight .fm27-profile-hero-economy>div{display:flex;flex-direction:column;gap:5px}
body.fm27-midnight .fm27-profile-hero-economy>div+div{padding-top:8px;border-top:1px solid #ffffff1a}
body.fm27-midnight .fm27-profile-hero-economy small{font-size:10px;color:#a8bbd2}
body.fm27-midnight .fm27-profile-hero-economy strong{font-size:12px;font-weight:800;color:#fff;overflow-wrap:anywhere}
/* R27.25.6: Football Manager-like compact comparison, CA and PA side by side. */
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;gap:10px;padding:7px 10px;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability.fm27-profile-hero-section{justify-content:center}
body.fm27-midnight .fm27-profile-ability-row{
  min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;text-align:center;
}
body.fm27-midnight .fm27-profile-ability-row small{
  font-size:9.5px;color:#c5d1e7;line-height:1.25;min-height:24px;
  display:flex;align-items:center;justify-content:center;font-weight:700;text-align:center;
}
body.fm27-midnight .fm27-profile-ability-stars{
  display:inline-flex;align-items:center;gap:1px;min-height:24px;
  width:max-content;max-width:100%;padding:3px 4px;
  border-radius:5px;border:1px solid #49566e;background:#111729;
  white-space:nowrap;
}
body.fm27-midnight .fm27-profile-ability-stars .fm27-rating-star{font-size:16px}
body.fm27-midnight .fm27-profile-ability-stars .fm27-rating-star.outline{color:#f4f5fc}
body.fm27-midnight .fm27-profile-ability-unknown{
  display:inline-flex;align-items:center;justify-content:center;margin-left:3px;
  width:16px;height:16px;border-radius:50%;border:1px solid #93a5c3;
  color:#edf2ff;font-size:10px;font-weight:800;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-actions .dropdown-menu:not(.show){display:none}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-actions .dropdown-menu{max-width:min(290px,calc(100vw - 28px))}
@media(max-width:1170px){
 body.fm27-midnight .fm27-profile-hero-v10732{grid-template-columns:minmax(330px,1.8fr) minmax(180px,1fr)}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-section:nth-child(3){border-left:0;border-top:1px solid #ffffff21;margin-top:12px;padding-top:16px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-section:nth-child(4){border-top:1px solid #ffffff21;margin-top:12px;padding-top:16px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability{grid-column:1/-1;border-left:0;border-top:1px solid #ffffff21;margin-top:12px;justify-content:center;grid-template-columns:repeat(2,minmax(0,160px));}
}
@media(max-width:640px){
 body.fm27-midnight .fm27-profile-hero-v10732{grid-template-columns:1fr;padding:12px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-section{border-left:0;border-top:1px solid #ffffff25;margin-top:10px;padding:12px 2px 2px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-portrait{width:92px;min-width:92px;height:110px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-identity h2{font-size:19px}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-club{justify-content:flex-start}
 body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}
}

body.fm27-midnight .fm27-profile-status-badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
body.fm27-midnight .fm27-profile-status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 6px;border-radius:5px;border:1px solid #616ebb;background:#3c356d;color:#f0f3ff;font-size:11px;font-weight:900;letter-spacing:.02em}
body.fm27-midnight .fm27-profile-status-badge.is-loan{background:#1f5461;border-color:#3d93a6}


/* R27.25.8 – enforce a single CA/PA cell (no divider between the two ratings).
   Includes a more-specific reset for older cached/custom section rules. */
body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center;
  justify-items:stretch;
  column-gap:8px;
  row-gap:0;
  padding-inline:12px;
  min-width:0;
  border-left:1px solid #8293b45e; /* outer separator from salary: retained */
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability > .fm27-profile-ability-row,
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability > .fm27-profile-ability-row + .fm27-profile-ability-row{
  box-sizing:border-box;
  border:0 !important;
  border-left:0 !important;
  border-right:0 !important;
  box-shadow:none;
  background:none;
  padding:0 !important;
  margin:0;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:5px;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability .fm27-profile-ability-row::before,
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability .fm27-profile-ability-row::after{
  content:none !important;
  display:none !important;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-ability-row small{
  width:100%;min-height:22px;display:flex;align-items:center;justify-content:center;text-align:center;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-ability-stars{
  margin-inline:auto;justify-content:center;
}
/* Match the existing formation list micro-status markers. Keep them ON the name row. */
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-name-line{
  display:flex;align-items:center;justify-content:flex-start;gap:7px;flex-wrap:wrap;
  width:100%;min-width:0;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-name-line h2{
  flex:0 1 auto;min-width:0;margin:0;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-status-badges{
  display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-status-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:15px;height:16px;padding:0 2px;
  font:800 9px/1 system-ui,sans-serif;letter-spacing:-.02em;
  border:1px solid #7285aa;border-radius:3px;background:#314163;color:#f6f7ff;
  cursor:help;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-status-badge.is-transfer{
  border-color:#a5a0e6;color:#ddd0ff;background:#342c53;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-status-badge.is-loan{
  border-color:#67c3c0;color:#b4f5ec;background:#1c3e49;
}
@media (max-width:1170px){
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section{
    grid-template-columns:repeat(2,minmax(0,150px));justify-content:center;
    border-left:0;border-top:1px solid #ffffff21;
  }
}
@media (max-width:640px){
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section{
    grid-template-columns:repeat(2,minmax(0,1fr));column-gap:6px;
  }
  body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-ability-stars .fm27-rating-star{font-size:clamp(11px,3.5vw,16px)}
}
@media (max-width:420px){
  body.fm27-midnight .fm27-profile-hero-v10732 .fm27-report-portrait{width:70px;min-width:70px;height:92px}
  body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-person{gap:8px}
  body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-name-line h2{font-size:16px}
}

/* R27.25.9: compact, centered CA/PA pair. Reclaimed horizontal room goes to player identity. */
@media (min-width:1171px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    grid-template-columns:max-content max-content;
    column-gap:8px;
    justify-content:center;
    align-content:center;
    padding-inline:7px;
  }
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-potential-rating {
  display:inline-flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:center;
  gap:5px;
  white-space:nowrap;
  max-width:100%;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-potential-rating .fm27-profile-ability-stars {
  flex:0 0 auto;
  margin:0;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-potential-rating .fm27-profile-ability-unknown {
  flex:0 0 16px;
  margin:0;
  width:16px;
  height:16px;
  cursor:help;
  background:transparent;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-ability-unknown:focus-visible {
  outline:2px solid #fff;
  outline-offset:3px;
}
@media (max-width:1170px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    grid-template-columns:max-content max-content;
    column-gap:12px;
    justify-content:center;
    padding-inline:9px;
  }
}
@media (max-width:400px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    column-gap:7px;
    padding-inline:4px;
  }
}


/* R27.25.10 – final SI-inspired alignment: titles start above each own star box;
   the CA/PA pair stays centered as one group and has a little more breathing room. */
@media (min-width:1171px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    grid-template-columns:max-content max-content;
    column-gap:19px;
    justify-content:center;
  }
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability > .fm27-profile-ability-row {
  align-items:flex-start;
  text-align:left;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability .fm27-profile-ability-row > small {
  display:block;
  width:auto;
  min-height:19px;
  align-self:flex-start;
  text-align:left;
  line-height:1.3;
  padding:0;
}
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability .fm27-profile-ability-row > .fm27-profile-ability-stars,
body.fm27-midnight .fm27-profile-hero-v10732 .fm27-profile-hero-ability .fm27-profile-potential-rating {
  margin-left:0;
  margin-right:0;
  align-self:flex-start;
}
@media (max-width:1170px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    grid-template-columns:max-content max-content;
    column-gap:19px;
    justify-content:center;
  }
}
@media (max-width:400px) {
  body.fm27-midnight .fm27-profile-hero-v10732 > .fm27-profile-hero-ability.fm27-profile-hero-section {
    column-gap:12px;
  }
}
