/* Align scoreboard and scorer columns to the same centre axis. */
body.match-page .fixture-scoreboard,
body.match-page .hero-scorers {
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  column-gap: 20px;
  margin-left: auto;
  margin-right: auto;
}
body.match-page .hero-scorers > div:first-child .scorer-row {
  justify-content: flex-end;
  text-align: right;
}
body.match-page .hero-scorers > div:last-child .scorer-row {
  justify-content: flex-start;
  text-align: left;
  flex-direction: row;
}
body.match-page .hero-scorers > div:last-child {
  align-items: flex-start;
  text-align: left;
}
#matchGrid .match-scores .score-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  line-height: 1;
  transform: translateY(-1px);
  font-family: Arial, sans-serif;
  font-size: 12px;
  padding: 0;
}
/* No empty rail or promotional label inside the player identity. */
#playerProfile .profile-hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 22px 24px;
  min-height: 0;
}
#playerProfile .profile-hero > .entity-file-label {
  display: none;
}
#playerProfile .profile-hero > .player-portrait {
  flex: none;
  width: 88px;
  height: 88px;
  --face-size: 88px;
}
#playerProfile .profile-hero > div:not(.player-portrait) {
  min-width: 0;
}
#playerProfile .profile-hero h3 {
  font-size: 32px;
  line-height: 1.1;
  margin: 6px 0 8px;
  word-break: normal;
}
#playerProfile .profile-hero .profile-eyebrow {
  font-size: 10px;
  letter-spacing: 0.1em;
}
#playerProfile .profile-hero p {
  font-size: 13px;
  margin: 0;
}
#playerProfile .profile-hero .entity-follow {
  margin-left: auto;
  flex: none;
}
#playerProfile .profile-hero .button {
  font-size: 12px;
  white-space: nowrap;
  padding: 10px 14px;
}
#playerProfile .profile-facts > div {
  padding: 14px 16px;
}
#playerProfile .profile-facts {
  margin-top: 12px;
}
#playerProfile .profile-facts small {
  font-size: 11px;
}
#playerProfile .profile-facts strong {
  font-size: 13px;
}
/* One compact strip for secondary competition numbers. */
#tables .overview-metrics {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 0 16px;
  padding: 0;
}
#tables .overview-metrics > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
}
#tables .overview-metrics > div + div {
  border-left: 1px solid var(--border);
}
#tables .overview-metrics strong {
  font:
    600 23px/1 Matchday,
    sans-serif;
}
#tables .overview-metrics span {
  font-size: 11px;
  line-height: 1.3;
  margin: 0;
}
.competition-pulse {
  justify-content: flex-end;
  padding: 8px 0;
  margin-bottom: 12px;
  gap: 10px;
}
.competition-pulse .pulse-label {
  margin-right: 8px;
}
.competition-pulse b {
  font-size: 15px;
}
.competition-pulse .season-track {
  width: 60px;
}
body.match-page .football-pitch .pitch-player {
  gap: 2px;
}
body.match-page .pitch-player .player-marker {
  height: auto;
  gap: 3px;
  display: flex;
  align-items: center;
  flex-direction: column;
}
body.match-page .pitch-player .event-portrait,
body.match-page .pitch-player .event-portrait:has(.portrait-contributions) {
  margin: 0 !important;
  min-height: 0;
}
body.match-page .pitch-player .pitch-name {
  margin: 0;
  line-height: 1.25;
}
.field-player-events {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 80px;
  line-height: 1;
  margin: 0;
}
body.match-page .pitch-player .field-player-events .orbit-badge {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.field-player-events .orbit-badge:before {
  display: none !important;
}
.field-player-events .event-glyph {
  width: 14px;
  height: 14px;
}
.field-player-events .goal-cluster {
  display: inline-flex;
  height: 14px;
}
.field-player-events .goal-cluster > .event-glyph + .event-glyph {
  margin-left: -4px;
}
.career-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
}
.career-heading h3 {
  margin: 0;
  font-size: 20px;
}
.career-heading > span {
  font-size: 11px;
  color: var(--secondary);
}
.career-group {
  margin: 20px 0;
}
.career-group h4 {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--secondary);
  margin: 0 0 8px;
}
.career-rows {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.career-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: 58px;
  box-sizing: border-box;
}
.career-row + .career-row {
  border-top: 1px solid var(--border);
}
.career-row img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.career-row strong {
  font-size: 13px;
}
.career-row small {
  display: block;
  font-size: 11px;
  color: var(--secondary);
  margin-top: 4px;
}
.career-seasons {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--secondary);
  text-align: right;
}
.career-source {
  font-size: 11px;
  color: var(--secondary);
}
@media (max-width: 759px) {
  body.match-page .fixture-scoreboard,
  body.match-page .hero-scorers {
    grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
    column-gap: 8px;
  }
  body.match-page .hero-scorers {
    grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  }
  #matchGrid .match-scores .score-separator {
    display: none;
  }
  #playerProfile .profile-hero {
    gap: 12px;
    padding: 16px;
    flex-wrap: wrap;
  }
  #playerProfile .profile-hero > .player-portrait {
    width: 68px;
    height: 68px;
    --face-size: 68px;
  }
  #playerProfile .profile-hero h3 {
    font-size: 27px;
  }
  #playerProfile .profile-hero > div {
    flex: 1;
  }
  #playerProfile .profile-hero .entity-follow {
    margin-left: 0;
  }
  #playerProfile .profile-hero .button {
    font-size: 11px;
    padding: 8px 12px;
  }
  #tables .overview-metrics > div {
    padding: 10px;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  #tables .overview-metrics strong {
    font-size: 20px;
  }
  #tables .overview-metrics span {
    font-size: 10px;
  }
  .competition-pulse {
    justify-content: flex-start;
    padding: 6px 0;
    gap: 8px;
  }
  .competition-pulse .pulse-label {
    margin-right: auto;
    font-size: 8px;
  }
  .career-row {
    padding: 11px 12px;
    gap: 10px;
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }
  .career-seasons {
    font-size: 10px;
    max-width: 95px;
  }
  .career-row strong {
    font-size: 12px;
  }
  .career-row small {
    font-size: 10px;
  }
  .career-heading > span {
    display: none;
  }
}

/* Keep the identity and actions in separate, non-overlapping columns. */
#playerProfile .profile-hero {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
}
#playerProfile .profile-hero .profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#playerProfile .profile-hero .profile-actions .entity-follow {
  margin: 0;
}
#playerProfile .profile-hero .profile-actions .button {
  position: static;
  flex: none;
}
#matchGrid .match-scores .score-separator {
  font-size: 0;
  transform: none;
}
#matchGrid .match-scores .score-separator { width:3px; height:10px; flex:none; position:relative; }
#matchGrid .match-scores .score-separator:before,
#matchGrid .match-scores .score-separator:after { content:""; position:absolute; left:0; width:3px; height:3px; border-radius:50%; background:currentColor; }
#matchGrid .match-scores .score-separator:before { top:0; }
#matchGrid .match-scores .score-separator:after { bottom:0; }
@media(min-width:760px) {
  #matchGrid .match-scores > span { display:flex; align-items:center; justify-content:center; gap:5px; }
}
/* Missing badges must never shift names or scores into an earlier grid column. */
.ticket-team { width:100%; min-width:0; }
.ticket-team > .crest { grid-column:1; grid-row:1; }
.ticket-team > span { grid-column:2; grid-row:1; min-width:0; }
.ticket-team > b { grid-column:3; grid-row:1; width:16px; text-align:center; font-variant-numeric:tabular-nums; }

body.match-page .pitch-player .field-player-events .sub-minute {
  position: static;
  transform: none;
  font-size: 8px;
  line-height: 1;
  margin-left: 2px;
}
@media (max-width: 759px) {
  #playerProfile .profile-hero {
    grid-template-columns: 68px minmax(0, 1fr);
  }
  #playerProfile .profile-hero .profile-actions {
    grid-column: 1/-1;
    padding-top: 4px;
  }
}

/* Dedicated event slots outside the face and rating; no free-floating badges. */
body.match-page .football-pitch .pitch-player .event-portrait.portrait-slotted {
  width:48px;height:calc(58px + var(--special-extra,0px));min-height:58px;padding-top:10px;box-sizing:border-box;position:relative;overflow:visible;
}
body.match-page .pitch-player .portrait-slot { position:absolute; display:flex; align-items:center; justify-content:center; gap:2px; width:18px; z-index:2; }
body.match-page .pitch-player .portrait-slot .orbit-badge { position:static!important; inset:auto!important; transform:none!important; margin:0; padding:0; width:auto; min-width:0; height:auto; border:0; background:transparent; display:flex; align-items:center; justify-content:center; }
body.match-page .pitch-player .portrait-slot .orbit-badge:before { display:none!important; }
body.match-page .pitch-player .portrait-slot .event-glyph { width:14px;height:14px;flex:none; }
body.match-page .pitch-player .slot-sub { right:calc(100% + 1px); top:0; width:22px; }
body.match-page .pitch-player .slot-card { left:calc(100% + 1px); top:0; }
body.match-page .pitch-player .slot-assist { right:calc(100% + 1px); top:26px; }
body.match-page .pitch-player .slot-goal { left:calc(100% + 1px); top:22px; }
body.match-page .pitch-player .slot-special { right:calc(100% + 1px); top:64px; flex-direction:column; }
body.match-page .pitch-player .slot-captain { left:calc(100% + 1px); top:60px; }
body.match-page .pitch-player .portrait-slot .goal-cluster { display:flex;flex-direction:column;align-items:center;height:auto; }
body.match-page .pitch-player .portrait-slot .goal-cluster>.event-glyph { margin:0; }
body.match-page .pitch-player .portrait-slot .goal-cluster>.event-glyph+.event-glyph { margin-top:-3px; }
body.match-page .pitch-player .slot-sub .orbit-sub { flex-direction:column;gap:1px; }
body.match-page .pitch-player .portrait-slot .sub-minute { position:static;transform:none;font-size:8px;line-height:9px;white-space:nowrap; }
body.match-page .pitch-player .slot-card .orbit-card { flex-direction:column; }
body.match-page .pitch-player .slot-card .event-glyph+.event-glyph { margin-top:-5px; }

@media(max-width:759px){
  body.match-page .football-pitch .pitch-player .event-portrait.portrait-slotted{width:44px;height:calc(54px + var(--special-extra,0px));min-height:54px;--face-size:44px;}
  body.match-page .pitch-player .portrait-slotted .player-portrait{width:44px;height:44px;--face-size:44px;}
  body.match-page .pitch-player .slot-special,body.match-page .pitch-player .slot-captain{top:60px;}
}
@media(max-width:380px){
  body.match-page .football-pitch .pitch-player .event-portrait.portrait-slotted{width:40px;height:calc(50px + var(--special-extra,0px));min-height:50px;--face-size:40px;}
  body.match-page .pitch-player .portrait-slotted .player-portrait{width:40px;height:40px;--face-size:40px;}
  body.match-page .pitch-player .portrait-slot{width:16px;}
  body.match-page .pitch-player .slot-sub{width:18px;}
  body.match-page .pitch-player .slot-special,body.match-page .pitch-player .slot-captain{top:60px;}
}

@media(max-width:759px){
  body.match-page .pitch-player .slot-special,body.match-page .pitch-player .slot-captain{top:64px;}
  body.match-page .football-pitch .pitch-player .event-portrait.portrait-slotted:has(.slot-special,.slot-captain){height:calc(58px + var(--special-extra,0px));min-height:58px;}
}
