/* 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;
}
/* The match award has its own colour, separate from every numeric rating band. */
.rating-badge.match-highest,
body.match-page .pitch-player .rating-badge.match-highest {
  background: #7928ca;
  color: #fff;
  border: 1px solid #cf9fff;
  box-shadow: 0 0 0 1px #7928ca55;
  font-weight: 800;
}
body.match-page .player-marker:has(.match-highest) .player-portrait {
  outline: 2px solid #b779ef;
  outline-offset: 2px;
}
/* Let crowded formation columns determine pitch height instead of clipping
   the last player's portrait, rating and name at a fixed aspect ratio. */
body.match-page .lineup-card .football-pitch {
  height: auto;
  max-height: none;
  aspect-ratio: auto;
}
body.match-page .lineup-card .football-pitch .pitch-row {
  flex-shrink: 0;
}
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;
  }
}

body.club-page #teamDialog > .dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  gap: 18px;
  padding: 24px 32px;
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(105deg, var(--surface-raised), var(--surface));
}
body.club-page #teamDialog .dialog-head > div {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
body.club-page #teamDialog #teamCrest {
  flex: none;
  width: 76px;
  height: 76px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
body.club-page #teamDialog #teamCrest .crest {
  width: 62px;
  height: 62px;
}
body.club-page #teamDialog #teamTitle {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
body.club-page #teamDialog #teamCompetition {
  margin-top: 7px;
  color: var(--secondary);
  font-size: 12px;
}
body.club-page #teamDialog #closeTeam {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  font-size: 0;
}
body.club-page #teamDialog .club-header-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
body.club-page #teamDialog .club-header-actions > * {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
body.club-page #teamDialog .club-tabs {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
body.club-page #teamDialog .club-tabs::-webkit-scrollbar {
  display: none;
}
body.club-page #teamDialog .follow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
body.club-page #teamDialog .follow-row #followTeam {
  margin-left: auto;
  max-width: 100%;
  white-space: nowrap;
}
body.club-page #teamDialog #teamStatus {
  margin: 0;
  padding: 8px 32px;
  font-size: 11px;
}
body.club-page #teamDialog .club-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface);
}
@media (max-width: 600px) {
  body.club-page #teamDialog > .dialog-head {
    gap: 12px;
    padding: 20px 16px;
  }
  body.club-page #teamDialog .dialog-head > div {
    gap: 12px;
  }
  body.club-page #teamDialog #teamCrest {
    width: 60px;
    height: 60px;
    padding: 4px;
  }
  body.club-page #teamDialog #teamCrest .crest {
    width: 50px;
    height: 50px;
  }
  body.club-page #teamDialog #teamTitle {
    font-size: 22px;
  }
  body.club-page #teamDialog .follow-row {
    gap: 8px;
    padding: 10px 16px;
  }
  body.club-page #teamDialog #teamStatus {
    padding-inline: 16px;
  }
}

/* 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; }

/* Club and player profiles: consistent identity, season context, then detail. */
body.club-page #teamDialog > .dialog-head {
  border-top-width: 3px;
  background: var(--surface);
}
body.club-page #teamDialog .dialog-head > div {
  align-items: center;
}
body.club-page #teamDialog #teamTitle {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 750;
}
body.club-page #teamDialog #teamCompetition {
  font-size: 12px;
  line-height: 1.4;
}
body.club-page #teamDialog .club-header-actions {
  justify-content: flex-start;
  padding-top: 14px;
}
body.club-page #teamDialog .club-header-actions #followTeam {
  margin-left: auto;
}
body.club-page #teamDialog .club-tabs {
  gap: 22px;
  padding-inline: 24px;
}
body.club-page #teamDialog .club-tabs button {
  flex: none;
  min-height: 46px;
  font-size: 13px;
}
#clubOverview .competition-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
#clubOverview .workspace-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
#clubOverview .workspace-card:first-child {
  grid-column: 1 / -1;
}
#clubOverview .workspace-card h3 {
  margin-bottom: 12px;
  font-size: 16px;
}
#clubOverview .club-form-large {
  padding: 8px 0 14px;
}
#clubOverview .club-form-large .form-chip {
  border-radius: 6px;
  width: 34px;
  height: 30px;
  font-size: 14px;
}
#teamDialog #clubSquad .squad-group {
  border-radius: 8px;
  background: var(--surface);
}
#teamDialog #clubSquad .player {
  border-radius: 6px;
}
#playerProfileBody {
  padding: 24px 28px 32px;
}
#playerProfile .profile-hero {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 8px 0 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#playerProfile .profile-hero > .player-portrait {
  width: 96px;
  height: 96px;
  --face-size: 96px;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
#playerProfile .profile-hero .profile-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
#playerProfile .profile-hero h3 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 750;
}
#playerProfile .profile-hero p {
  gap: 7px;
  color: var(--secondary);
  font-size: 13px;
}
#playerProfile .profile-hero p .crest {
  width: 22px;
  height: 22px;
}
#playerProfile .profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#playerProfile .profile-actions .entity-follow,
#playerProfile .profile-actions .button {
  min-height: 38px;
  border-radius: 6px;
  margin: 0;
}
#playerProfile .profile-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 10px;
  border-bottom: 1px solid var(--border);
}
#playerProfile .profile-summary > div {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 16px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}
#playerProfile .profile-summary > div + div {
  border-left: 1px solid var(--border);
}
#playerProfile .profile-summary strong {
  font-size: 27px;
  font-weight: 750;
}
#playerProfile .profile-summary span {
  font-size: 11px;
}
#playerProfile .profile-summary-note {
  margin: 0 0 16px;
}
#playerProfile .profile-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
#playerProfile .profile-facts > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
}
#playerProfile .profile-facts small {
  margin-bottom: 5px;
  font-size: 10px;
}
#playerProfile .profile-facts strong {
  font-size: 12px;
  line-height: 1.35;
}
#playerProfile .profile-tabs {
  gap: 22px;
  margin: 18px 0 12px;
}
#playerProfile .profile-tabs button {
  flex: none;
  font-size: 13px;
}
#playerProfile .profile-filters {
  align-items: end;
  padding: 0 0 14px;
}
#playerProfile .profile-filters label {
  gap: 5px;
}
#playerProfile .profile-filters label:last-child {
  width: 180px;
}
#playerProfile .profile-filters select {
  border-radius: 6px;
}
#playerProfile [data-profile-panel] > h3 {
  margin: 14px 0 4px;
  font-size: 17px;
}
#playerProfile .table-scroll {
  border-radius: 8px;
}
#playerProfile .profile-club {
  border-radius: 6px;
}
@media (max-width: 759px) {
  #playerProfileBody {
    padding: 16px;
  }
  #playerProfile .profile-hero {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 4px 0 16px;
  }
  #playerProfile .profile-hero > .player-portrait {
    width: 68px;
    height: 68px;
    --face-size: 68px;
  }
  #playerProfile .profile-hero h3 {
    font-size: 25px;
    overflow-wrap: anywhere;
  }
  #playerProfile .profile-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  #playerProfile .profile-summary > div {
    padding: 13px 6px;
  }
  #playerProfile .profile-summary strong {
    font-size: 23px;
  }
  #playerProfile .profile-summary span {
    font-size: 10px;
  }
  #playerProfile .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #playerProfile .profile-facts > div {
    padding: 10px;
  }
  #playerProfile .profile-facts > div:nth-child(2n) {
    border-right: 0;
  }
  #playerProfile .profile-facts > div:nth-child(n + 5) {
    border-bottom: 0;
  }
  #playerProfile .profile-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 8px;
  }
  #playerProfile .profile-filters label,
  #playerProfile .profile-filters label:last-child {
    width: auto;
    min-width: 0;
  }
  #playerProfile .profile-filters select {
    min-width: 0;
    padding: 8px;
    font-size: 12px;
  }
  #playerProfile .profile-matches tbody tr {
    border-radius: 8px;
    padding: 10px;
  }
  #playerProfile .profile-matches td:nth-child(2) {
    font-size: 12px;
  }
  #teamDialog .dialog-head > div {
    gap: 10px;
  }
  body.club-page #teamDialog #teamTitle {
    font-size: 23px;
  }
  body.club-page #teamDialog .club-header-actions {
    justify-content: flex-start;
    gap: 8px;
  }
  body.club-page #teamDialog .club-header-actions #followTeam {
    margin-left: auto;
  }
  body.club-page #teamDialog .club-tabs {
    padding-inline: 16px;
  }
  #clubOverview .competition-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #clubOverview .workspace-card:first-child {
    grid-column: auto;
  }
  #clubOverview .workspace-card {
    padding: 15px;
  }
}
@media (max-width: 360px) {
  #playerProfile .profile-summary > div {
    padding-inline: 3px;
  }
  #playerProfile .profile-summary span {
    overflow-wrap: anywhere;
  }
  #playerProfile .profile-filters {
    grid-template-columns: minmax(0, 1fr) 105px;
  }
  body.club-page #teamDialog > .dialog-head {
    grid-template-columns: minmax(0, 1fr) 36px;
    padding-inline: 12px;
  }
  body.club-page #teamDialog .club-header-actions {
    justify-content: space-between;
  }
}

body.club-page #teamDialog > .dialog-head {
  padding: 20px 28px;
}
body.club-page #teamDialog .club-header-actions {
  padding-top: 10px;
}
#clubOverview .competition-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}
#clubOverview .workspace-card {
  padding: 18px;
  border-color: var(--border);
  border-radius: 8px;
  background: var(--surface);
}
#clubOverview .workspace-card:first-child {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-content: start;
  column-gap: 24px;
}
#clubOverview .workspace-card:first-child > .workspace-card-head {
  grid-column: 1 / -1;
}
#clubOverview .workspace-card:first-child > .club-form-large {
  grid-column: 1;
  align-self: start;
  flex-wrap: wrap;
}
#clubOverview .workspace-card:first-child > .compact-fixture {
  grid-column: 2;
  padding: 9px 0;
  min-height: 54px;
  border-bottom: 1px solid var(--border);
}
#clubOverview .club-form-large .form-chip {
  width: 34px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
}
#clubOverview .club-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
}
#clubOverview .club-facts > div {
  display: block;
  min-width: 0;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
#clubOverview .club-facts dt {
  font-size: 10px;
}
#clubOverview .club-facts dd {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
#clubOverview .club-facts > div:nth-child(2n) {
  border-left: 1px solid var(--border);
}
#clubOverview .club-facts > div:last-child,
#clubOverview .club-facts > div:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}
#playerProfile .profile-hero {
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 8px 0 18px;
}
#playerProfile .profile-hero > .player-portrait {
  width: 92px;
  height: 92px;
  --face-size: 92px;
}
#playerProfile .profile-hero .profile-eyebrow {
  margin-bottom: 5px;
  color: var(--secondary);
}
#playerProfile .profile-hero h3 {
  font-size: 32px;
  line-height: 1.12;
}
#playerProfile .profile-summary {
  margin: 0 0 10px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--surface);
}
#playerProfile .profile-summary > div {
  min-width: 0;
  padding: 14px 10px;
}
#playerProfile .profile-summary strong {
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
#playerProfile .profile-summary span {
  color: var(--muted);
}
#playerProfile .profile-summary-note {
  margin: 0 0 12px;
  font-size: 10px;
}
#playerProfile .profile-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}
@media (min-width: 760px) {
  #playerProfile .profile-facts > div:nth-child(3n) {
    border-right: 0;
  }
  #playerProfile .profile-facts > div:nth-child(n + 4) {
    border-bottom: 0;
  }
  #playerProfile .profile-facts > div:nth-child(3n + 1):nth-last-child(-n + 3),
  #playerProfile .profile-facts > div:nth-child(3n + 1):nth-last-child(-n + 3) ~ div {
    border-bottom: 0;
  }
}
#playerProfile .profile-tabs {
  gap: 18px;
  margin: 16px 0 10px;
}
#playerProfile .profile-tabs button {
  min-height: 42px;
}
#playerProfile .profile-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
  gap: 10px;
  padding: 0 0 12px;
}
#playerProfile .profile-filters label,
#playerProfile .profile-filters label:first-child,
#playerProfile .profile-filters label:last-child {
  width: auto;
  min-width: 0;
}
#playerProfile .profile-matches td:nth-child(2) {
  min-width: 190px;
}
@media (max-width: 759px) {
  #clubOverview .competition-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #clubOverview .workspace-card:first-child {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  #clubOverview .workspace-card:first-child > .workspace-card-head,
  #clubOverview .workspace-card:first-child > .club-form-large,
  #clubOverview .workspace-card:first-child > .compact-fixture {
    grid-column: 1;
  }
  #clubOverview .workspace-card:first-child > .compact-fixture {
    padding: 9px 0;
  }
  #playerProfile .profile-hero {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 4px 0 14px;
  }
  #playerProfile .profile-hero > .player-portrait {
    width: 68px;
    height: 68px;
    --face-size: 68px;
  }
  #playerProfile .profile-hero h3 {
    font-size: 25px;
  }
  #playerProfile .profile-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  #playerProfile .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #playerProfile .profile-facts > div {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  #playerProfile .profile-facts > div:nth-child(2n) {
    border-right: 0;
  }
  #playerProfile .profile-facts > div:last-child,
  #playerProfile .profile-facts > div:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }
  #playerProfile .profile-facts > div:last-child:nth-child(odd) { border-right: 0; }
  #playerProfile .profile-filters {
    grid-template-columns: minmax(0, 1fr) 120px;
  }
  #playerProfile .profile-matches td:nth-child(2) {
    min-width: 0;
  }
}
@media (max-width: 380px) {
  #playerProfileBody {
    padding-inline: 12px;
  }
  #playerProfile .profile-summary > div {
    padding-inline: 4px;
  }
  #playerProfile .profile-summary span {
    font-size: 9px;
  }
  #playerProfile .profile-filters {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 6px;
  }
  body.club-page #teamDialog > .dialog-head {
    padding-inline: 12px;
  }
  body.club-page #teamDialog .club-header-actions {
    padding-top: 10px;
  }
}
#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; }
}
/* Compact identity/actions without changing the club page's visual language. */
body.club-page #teamDialog > .dialog-head {
  min-height: 0;
  height: auto;
  padding: 20px 24px;
  gap: 12px;
}
body.club-page #teamDialog > .dialog-head > div:first-child { grid-column: 1; grid-row: 1; }
body.club-page #teamDialog #closeTeam { grid-column: 2; grid-row: 1; align-self: start; }
body.club-page #teamDialog .club-header-actions {
  grid-row: 2;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 0 0 94px;
  border: 0;
  box-sizing: border-box;
}
body.club-page #teamDialog .club-header-actions #followTeam { margin-left: 0; }
body.club-page #teamDialog .follow-row:not(:has(button)) { display: none; }

/* One searchable competition picker replaces the sidebar's nested list. */
.all-competitions-trigger { justify-content: space-between; }
.all-competitions-trigger svg { width: 16px; height: 16px; margin-left: auto; }
.all-competitions-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 40px));
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}
.all-competitions-dialog[open] { display: flex; flex-direction: column; gap: 16px; }
.all-competitions-dialog::backdrop { background: #0009; }
.competition-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.competition-picker-head h2 { font-size: 20px; margin: 0; }
.competition-picker-head button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-hover); color: var(--text); cursor: pointer; }
.competition-picker-head svg { width: 18px; height: 18px; }
.all-competitions-dialog .competition-search { display: block; margin: 0; padding: 0; }
.all-competitions-dialog input { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; }
.competition-picker-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.competition-picker-list .league-button { width: 100%; min-height: 44px; }
.competition-picker-list [hidden] { display: none; }
.competition-picker-empty { margin: 0; color: var(--secondary); font-size: 13px; }

/* Keep opponent, team-perspective result/time and venue visible in seven columns. */
#teamFixtureCalendar .team-calendar-match {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; height: auto; min-height: 80px; padding: 5px 2px; border-radius: 6px;
}
#teamFixtureCalendar .team-calendar-match .crest { width: 22px; height: 22px; }
.team-calendar-opponent { font-size: 11px; line-height: 1.2; font-weight: 650; overflow-wrap: anywhere; }
.team-calendar-opponent .opponent-short { display: none; }
#teamFixtureCalendar .team-calendar-score { font-size: 11px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.team-calendar-venue { font-size: 9px; line-height: 1; color: var(--secondary); }

.ask-heading { margin-bottom: 16px; }
#askIntro { padding: 16px 0 12px; }
#askIntro:before { margin-bottom: 12px; }
.ask-suggestions { margin: 12px auto 18px; }
.ask-suggestions button { min-height: 62px; padding: 12px 32px 12px 14px; }
.ask-conversation:empty { margin: 0; }
#askStatus:empty { display: none; }
.ask-composer { padding: 8px 14px; }
#askInput { min-height: 44px; height: 44px; max-height: 180px; padding: 10px 0; line-height: 24px; box-sizing: border-box; }
.match-source a, .status a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 759px) {
  body.club-page #teamDialog > .dialog-head { padding: 16px; gap: 10px; }
  body.club-page #teamDialog .club-header-actions { padding-left: 0; }
  #teamFixtureCalendar .team-calendar-day { padding: 4px 2px; }
  #teamFixtureCalendar .team-calendar-day-matches { width: 100%; }
  #teamFixtureCalendar .team-calendar-match { min-width: 0; }
  #teamFixtureCalendar .team-calendar-today-label { display: none; }
  .team-calendar-opponent .opponent-full { display: none; }
  .team-calendar-opponent .opponent-short { display: inline; }
  #askIntro { padding: 12px 0 10px; }
  #askIntro:before { width: 66px; height: 48px; margin-bottom: 8px; }
}
/* 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 {
  --face-size:48px;width:var(--face-size);height:calc(10px + var(--face-size));min-height:0;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; min-height: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% - 10px); top:0; width:20px; }
body.match-page .pitch-player .slot-card { left:calc(100% - 10px); top:2px; }
body.match-page .pitch-player .slot-assist { right:calc(100% - 10px); top:27px; }
body.match-page .pitch-player .slot-goal { left:calc(100% - 8px); top:calc(var(--face-size) / 2 - 2px); }
body.match-page .pitch-player .slot-special { left:auto; right:calc(100% + 5px); top:calc(var(--face-size) + 6px); flex-direction:row; width:max-content; }
body.match-page .pitch-player .slot-captain { left:calc(50% - 9px); top:-2px; }
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-assist .goal-cluster { flex-direction:column; }
body.match-page .pitch-player .slot-assist { width:max-content; min-width:18px; }
body.match-page .pitch-player .slot-assist .goal-cluster>.event-glyph+.event-glyph { margin-top:-3px; margin-right:0; }
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{--face-size:48px;}
  body.match-page .pitch-player .portrait-slotted .player-portrait{width:48px;height:48px;--face-size:48px;}
  body.match-page .pitch-player .portrait-slot .event-glyph{width:12px;height:12px;}
}
@media(max-width:380px){
  body.match-page .football-pitch .pitch-player .event-portrait.portrait-slotted{--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-assist{top:25px;}
}
/* Icon boxes must not inherit a text baseline from the surrounding typeface. */
body.match-page .pitch-player .portrait-slot .orbit-badge,
body.match-page .pitch-player .portrait-slot .event-glyph {
  line-height: 0;
}
body.match-page .pitch-player .portrait-slot .event-glyph,
body.match-page .pitch-player .portrait-slot .event-glyph svg {
  display: block;
}

:root[data-theme="light"] body.match-page .lineup-card .football-pitch {
  background: #00802d;
}

:root[data-theme="light"] body.match-page .lineup-card .pitch-player .pitch-name {
  color: #fff;
  text-shadow: 0 1px 2px #003512;
}

:root[data-theme="light"] body.match-page .lineup-card .pitch-player :is(.pitch-name b, .orbit-sub small) {
  color: #fff;
}

:root[data-theme="light"] body.match-page .lineup-card .pitch-player .player-marker {
  color: #10271a;
}

:root[data-theme="light"] body.match-page .lineup-card .pitch-markings {
  color: rgba(255, 255, 255, 0.68);
}

/* Responsive refinement: retain the existing surfaces, give content usable space. */
#clubOverview .workspace-card:first-child:not(:has(> .compact-fixture)) {
  display: block;
}
#clubOverview .workspace-card:first-child > .club-form-large {
  width: min(100%, 460px);
  margin: 10px 0 0;
  padding: 0;
  flex-wrap: nowrap;
}
#clubOverview .club-form-large .form-result { min-width: 0; padding: 8px 4px; gap: 6px; }
#clubOverview .club-form-large .form-result .crest { width: 24px; height: 24px; }
#playerProfile .profile-facts {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}
.profile-filters select:disabled { color: var(--muted); cursor: default; }
.rail-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  column-gap: 12px;
  align-items: start;
}
.rail-story .story-media {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 76px;
  height: 62px;
  aspect-ratio: auto;
  margin: 0;
  border-radius: 6px;
}
.rail-story h4 { grid-column: 1; grid-row: 1; font-size: 13px; line-height: 1.4; }
.rail-story > small { grid-column: 1; grid-row: 2; }
.rail-story:not(:has(.story-media:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.story-media[hidden] { display: none; }
.news-grid .story-media { width: 100%; max-width: none; }
.news-grid .story-media img { width: 100%; height: 100%; object-fit: cover; }
.news-grid .story:first-child .story-media { height: auto; aspect-ratio: 16 / 9; align-self: start; }
.news-grid .story:not(:has(.story-media:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.match-rail .compact-fixture {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 40px;
  grid-template-rows: repeat(2, minmax(24px, auto));
  column-gap: 8px;
  row-gap: 5px;
  padding: 12px 0;
}
.match-rail .compact-fixture > time { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.match-rail .compact-fixture > b { grid-column: 3; grid-row: 1 / 3; align-self: center; white-space: nowrap; }
.match-rail .compact-fixture > .fixture-side { min-width: 0; width: 100%; grid-column: 2; gap: 7px; justify-content: flex-start; text-align: left; }
.match-rail .compact-fixture > .fixture-side:nth-child(2) { grid-row: 1; flex-direction: row-reverse; justify-content: flex-end; }
.match-rail .compact-fixture > .fixture-side:nth-child(4) { grid-row: 2; }
.match-rail .compact-fixture .fixture-side > span { min-width: 0; overflow-wrap: normal; word-break: normal; line-height: 1.3; }
.match-rail .compact-fixture .crest { flex: 0 0 20px; }
@media (max-width: 759px) {
  .mobile-bottom-nav { background: var(--surface); border-top: 1px solid var(--border); }
  body.match-page .lineup-identity { padding: 14px 16px; }
  body.match-page .football-pitch .pitch-half {
    min-height: calc(var(--formation-rows, 4) * 128px + 32px);
    padding: 16px 8px;
  }
  body.match-page .football-pitch .pitch-row {
    min-height: 128px;
    flex-basis: 128px;
    padding-inline: 2px;
    gap: 2px;
  }
  body.match-page .football-pitch .pitch-player { justify-content: flex-start; padding-top: 8px; }
  body.match-page .lineup-view-controls { padding: 10px 16px; }
  body.match-page .pitch-note { margin: 0; padding: 10px 16px; line-height: 1.5; }
  #playerProfile .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-filters select { min-height: 44px; }
  .header .global-search input, #askInput { font-size: 16px; }
}
