.n9fc-matchday .site-main > article.n9fc-match-layout {
  min-width: 0;
  padding: clamp(.85rem, 3vw, 1.8rem);
}

.n9fc-match-layout .entry-content {
  display: flex;
  flex-direction: column;
  gap: .95rem;
  margin: 0;
}

.n9fc-match-layout .entry-header:has(> .entry-title.screen-reader-text:only-child) {
  margin-block-end: 0;
}

.n9fc-match-layout .entry-content > * {
  min-width: 0;
}

.n9fc-match-layout .entry-content > :empty,
.n9fc-match-layout [hidden] {
  display: none !important;
}

.n9fc-match-layout :is([id^="n9fc-match-"], .n9fc-match-stat-scroll) {
  scroll-margin-block-start: 1rem;
}

.n9fc-match-scorecard {
  padding: clamp(.75rem, 2.8vw, 1.4rem);
  border-block-start: .22rem solid var(--n9fc-red);
  border-radius: .75rem;
  background: #1d1b1e;
  color: #fff;
  text-align: center;
}

.n9fc-match-layout .entry-content .n9fc-match-competition {
  margin: 0 0 .8rem;
  color: var(--n9fc-gold);
  font: 700 .76rem/1.35 var(--n9fc-body);
  overflow-wrap: anywhere;
}

.n9fc-match-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.45rem, 2vw, 1.25rem);
}

.n9fc-match-team {
  display: grid;
  justify-items: center;
  gap: .45rem;
  color: #fff;
  font: 700 clamp(.76rem, 2.5vw, 1.03rem)/1.25 var(--n9fc-body);
  overflow-wrap: anywhere;
}

.n9fc-match-scorecard .n9fc-match-team {
  color: #fff;
}

.n9fc-match-team img {
  box-sizing: border-box;
  display: block;
  width: clamp(2.65rem, 13vw, 4.2rem);
  height: clamp(2.65rem, 13vw, 4.2rem);
  margin: 0;
  padding: .32rem;
  border-radius: .5rem;
  background: #fff;
  object-fit: contain;
}

.n9fc-match-score {
  display: grid;
  justify-items: center;
  gap: .5rem;
  min-width: 0;
}

.n9fc-match-result {
  font: 700 clamp(1.85rem, 7vw, 3.2rem)/1 var(--n9fc-display);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.n9fc-match-kickoff {
  font: 600 clamp(1.25rem, 5vw, 2rem)/1.05 var(--n9fc-display);
  font-variant-numeric: tabular-nums;
}

.n9fc-match-status {
  max-width: 8rem;
  padding: .22rem .42rem;
  border-radius: .25rem;
  background: #403a3d;
  color: #fff;
  font: 700 .65rem/1.2 var(--n9fc-body);
  letter-spacing: .04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.n9fc-match-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .35rem .85rem;
  margin-top: .82rem;
  padding-top: .62rem;
  border-top: 1px solid #595155;
  color: #f0e9e3;
  font: 400 .82rem/1.35 var(--n9fc-body);
}

.n9fc-match-scorecard .n9fc-match-meta a {
  color: #f0e9e3;
  text-decoration: underline;
  text-underline-offset: .16em;
}

.n9fc-match-scorecard .n9fc-match-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 6.25rem;
  margin-top: .72rem;
  padding-inline: .9rem;
  border-radius: .4rem;
  background: var(--n9fc-red);
  color: #fff;
  font: 700 .9rem/1.25 var(--n9fc-body);
}

.n9fc-match-scorecard .n9fc-match-ticket:hover {
  background: #92202c;
  color: #fff;
}

.n9fc-match-panel,
.n9fc-match-layout .sp-template-event-performance {
  box-sizing: border-box;
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .6rem;
  background: var(--n9fc-panel);
}

.n9fc-match-layout .match-header-resume {
  margin: .75rem 0 0;
}

.n9fc-match-layout .match-header-resume.n9fc-match-panel {
  text-align: start;
}

.n9fc-match-layout .n9fc-match-section-title,
.n9fc-match-layout .sp-post-caption {
  margin: 0 0 .6rem;
  color: var(--n9fc-ink);
  font: 600 clamp(1.2rem, 3vw, 1.45rem)/1.25 var(--n9fc-display);
}

.n9fc-match-layout .n9fc-previous-meetings {
  padding: clamp(.75rem, 2.5vw, 1.1rem);
}

.n9fc-match-layout .entry-content .n9fc-previous-meetings-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.n9fc-previous-meetings-list > li {
  margin: 0;
  border-block-start: 1px solid var(--n9fc-line);
}

.n9fc-match-layout .n9fc-previous-meeting {
  display: grid;
  gap: .35rem;
  padding: .58rem .25rem;
  border-radius: .25rem;
  color: var(--n9fc-ink);
  text-decoration: none;
}

.n9fc-match-layout .n9fc-previous-meeting:is(:hover, :focus-visible) {
  background: var(--n9fc-paper);
  color: #851c29;
  text-decoration: none;
}

.n9fc-previous-meeting-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: .6rem;
  color: var(--n9fc-muted);
  font: 700 .75rem/1.35 var(--n9fc-body);
}

.n9fc-previous-meeting-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.42rem, 2vw, .85rem);
  font: 700 clamp(.78rem, 2.45vw, .95rem)/1.3 var(--n9fc-body);
}

.n9fc-previous-meeting-team {
  overflow-wrap: anywhere;
}

.n9fc-previous-meeting-team:first-child {
  text-align: end;
}

.n9fc-previous-meeting-score {
  min-width: 2.6rem;
  padding: .24rem .4rem;
  border-radius: .35rem;
  background: #f7e8e8;
  color: #851c29;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.n9fc-match-layout .entry-content .n9fc-match-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.n9fc-match-layout .entry-content .n9fc-match-timeline-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .6rem;
  padding: .48rem 0;
  border-bottom: 1px solid var(--n9fc-line);
  font-size: .88rem;
  line-height: 1.35;
}

.n9fc-match-event-score {
  min-width: 2.35rem;
  padding: .15rem .32rem;
  border-radius: .3rem;
  background: #f7e8e8;
  color: #851c29;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.n9fc-match-event-team {
  display: block;
  margin-bottom: .14rem;
  color: var(--n9fc-muted);
  font-size: .73rem;
  font-weight: 700;
}

.n9fc-match-layout .entry-content .n9fc-match-referee {
  margin: .55rem 0 0;
  color: var(--n9fc-muted);
  font-size: .78rem;
  line-height: 1.4;
}

.n9fc-match-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.n9fc-match-jumps a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding-inline: .92rem;
  border: 1px solid var(--n9fc-line);
  border-radius: 999px;
  background: #f7f3ed;
  color: #851c29;
  font: 700 .85rem/1.25 var(--n9fc-body);
}

.n9fc-match-layout .sp-section-content-video :is(iframe, video, embed, object) {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.n9fc-match-formation {
  container-type: inline-size;
}

.n9fc-match-formation-overview {
  position: relative;
  aspect-ratio: 710 / 785;
  margin-block-end: .7rem;
  border-radius: .45rem;
  background: #406a46 center / 100% 100% no-repeat;
}

.n9fc-match-formation-marker {
  position: absolute;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 1.6rem;
  min-height: 1.6rem;
  padding-inline: .15rem;
  transform: translate(-50%, -50%);
  border: 1px solid #fff;
  border-radius: .4rem;
  background: #18181b;
  color: #fff;
  font: 750 .82rem/1 var(--n9fc-body);
  font-variant-numeric: tabular-nums;
}

.n9fc-match-layout .entry-content .n9fc-match-formation-hint {
  margin: .55rem 0;
  color: var(--n9fc-muted);
  font-size: .85rem;
}

.n9fc-match-formation-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: .45rem;
}

.n9fc-match-formation-stage {
  min-width: 40rem;
}

@container (min-width: 40rem) {
  .n9fc-match-formation-overview,
  .n9fc-match-formation-view[open] > :is(summary, .n9fc-match-formation-hint) {
    display: none;
  }
}

.n9fc-match-formation-stage .daextsfve-player-container {
  box-shadow: none !important;
}

/* Keep the badge centered at its saved pitch position. */
.n9fc-match-formation-stage .daextsfve-player-number {
  display: grid;
  place-items: center;
  left: 9% !important;
  width: 19% !important;
  border-radius: .3rem;
  background: #18181b;
  color: #fff;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
}

.n9fc-match-formation-stage .daextsfve-player-name {
  display: grid;
  place-items: center;
  left: 30% !important;
  width: 61% !important;
  border-radius: .3rem;
  background: #fff;
  color: #18181b;
  line-height: 1.08 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

.n9fc-match-layout .sp-post-content {
  overflow-wrap: anywhere;
}

.n9fc-match-layout .sp-post-content :is(h2, h3, h4) {
  color: var(--n9fc-ink);
}

.n9fc-match-layout .sp-post-content :is(h2, h3):not(.sp-post-caption) {
  margin-bottom: .45rem;
  font: 600 1.26rem/1.25 var(--n9fc-display);
}

.n9fc-match-layout .n9fc-match-stat-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--n9fc-line);
  border-radius: .48rem;
}

.n9fc-match-layout .n9fc-match-stat-scroll table {
  margin: 0;
}

.n9fc-match-layout :is(.n9fc-match-stat-scroll, .n9fc-match-formation-scroll):focus-visible {
  outline: 2px solid var(--n9fc-red);
  outline-offset: 2px;
}

.n9fc-match-layout :is(.n9fc-match-stat-comparison, table.sp-event-details, table.sp-event-results, table.sp-event-venue, table.sp-event-performance) {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.n9fc-matchday .n9fc-match-layout .sp-table-caption {
  margin: 0 0 .45rem;
  padding: .45rem 0;
  border: 0;
  border-bottom: 1px solid var(--n9fc-line);
  background: transparent;
  color: var(--n9fc-ink);
  font: 600 1.17rem/1.25 var(--n9fc-display);
  text-align: start;
}

.n9fc-match-layout :is(.n9fc-match-stat-comparison, .sp-event-details, .sp-event-results, .sp-event-venue, .sp-event-performance) :is(th, td) {
  padding: .5rem .36rem !important;
  border: 0;
  border-bottom: 1px solid var(--n9fc-line);
  color: var(--n9fc-ink);
  font-size: .84rem;
  line-height: 1.3;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.n9fc-match-layout :is(.n9fc-match-stat-comparison, .sp-event-details, .sp-event-results) thead th {
  background: #f5f1eb;
  color: var(--n9fc-muted);
  font-size: .76rem;
}

.n9fc-match-layout .n9fc-match-stat-comparison :is(th, td) {
  text-align: center;
}

.n9fc-match-layout .n9fc-match-stat-comparison tr > :first-child {
  width: 46%;
  text-align: start;
}

.n9fc-match-layout .n9fc-match-stat-comparison abbr {
  border: 0;
  text-decoration: none;
}

.n9fc-match-layout table.n9fc-match-stat-comparison thead th:not(:first-child),
.n9fc-match-layout table.n9fc-match-stat-comparison thead th:not(:first-child) :is(a, abbr, span) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.n9fc-match-layout table.n9fc-match-stat-comparison tbody td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

.n9fc-match-stat-bar {
  display: block;
  height: .28rem;
  margin-block-start: .3rem;
  border-radius: 999px;
  background: #e9e4dc;
}

.n9fc-match-stat-bar::before {
  display: block;
  width: var(--n9fc-stat-value);
  height: 100%;
  border-radius: inherit;
  background: var(--n9fc-red);
  content: '';
}

.n9fc-match-stat-comparison tr > :last-child .n9fc-match-stat-bar::before {
  background: var(--n9fc-muted);
}

.n9fc-fixture-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.25rem), 1fr));
  gap: .85rem 1.25rem;
}

.n9fc-match-layout .n9fc-fixture-form-club > h3 {
  margin: 0 0 .45rem;
  font: 700 .9rem/1.25 var(--n9fc-body);
}

@media (max-width: 560px) {
  .n9fc-match-layout .n9fc-match-stat-comparison tr > :first-child {
    width: 42%;
  }
}

.n9fc-match-layout table.sp-event-results thead th,
.n9fc-match-layout table.sp-event-results :is(.data-name, .data-name a) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.n9fc-match-layout table.sp-event-results :is(td, th):first-child {
  width: 36%;
  text-align: start;
}

.n9fc-match-layout table.sp-event-results :is(td, th):not(:first-child) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.n9fc-match-layout table.sp-event-results:has(> thead th:nth-child(3):last-child) th:first-child {
  width: 53%;
}

@media (max-width: 560px) {
  .n9fc-match-layout #n9fc-match-results {
    padding-inline: .375rem;
  }

  .n9fc-match-layout table.sp-event-results :is(th, td) {
    padding-inline: .15rem !important;
  }

  .n9fc-match-layout table.sp-event-results thead th {
    font-size: clamp(.65rem, 2.9vw, .76rem);
  }

  .n9fc-match-layout table.sp-event-results tbody td.data-name {
    font-size: .77rem;
  }

  .n9fc-match-layout table.sp-event-results:has(> thead th.data-outcome:nth-child(5):last-child) th:first-child {
    width: 37.5%;
  }

  .n9fc-match-layout table.sp-event-results:has(> thead th.data-outcome:nth-child(5):last-child) th.data-goals {
    width: 13.5%;
  }

  .n9fc-match-layout table.sp-event-results th.data-outcome:nth-child(5):last-child {
    width: 23%;
  }
}

.n9fc-match-layout .sp-event-performance-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: .7rem;
}

.n9fc-match-layout .sp-event-performance-tables::after {
  display: none;
}

.n9fc-match-layout .sp-event-performance-tables > .sp-template-event-performance {
  float: none;
  width: auto;
  margin: 0;
}

.n9fc-match-layout .sp-event-performance :is(.data-name, .n9fc-match-lineup-label td) {
  text-align: start;
}

.n9fc-match-layout .sp-template-event-performance-icons table.sp-event-performance {
  /* The first visible row spans both columns, so fixed layout gives them equal width. */
  table-layout: auto;
}

.n9fc-match-layout .sp-event-performance tbody .sp-performance-icons {
  width: 3.25rem;
}

.n9fc-match-layout .sp-event-performance:not(:has(tbody .sp-performance-icons:not(:empty))) tbody .sp-performance-icons {
  width: 0;
  padding-inline: 0 !important;
}

.n9fc-match-layout .sp-event-performance .data-name a {
  color: var(--n9fc-ink);
  font-weight: 700;
}

.n9fc-match-player-identity {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  max-width: 100%;
  vertical-align: baseline;
  overflow-wrap: anywhere;
  white-space: normal;
}

.n9fc-match-player-identity > a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.n9fc-match-shirt-number {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 1.65rem;
  min-height: 1.45rem;
  padding: .14rem .28rem;
  border: 1px solid #e8cbcd;
  border-radius: .28rem;
  background: #f8e9ea;
  color: #851c29;
  font: 700 .78rem/1 var(--n9fc-body);
  font-variant-numeric: tabular-nums;
}

.n9fc-match-layout .sp-event-performance .data-name .n9fc-match-substitution {
  display: inline-block;
  width: auto;
  height: auto;
  margin: .15rem .17rem .05rem;
  padding: .16rem .33rem;
  border: 1px solid #ddd6ce;
  border-radius: .26rem;
  background: #f1eee9;
  color: #554a44;
  font: 700 .7rem/1.2 var(--n9fc-body);
  text-indent: 0;
  white-space: nowrap;
}

.n9fc-match-layout .sp-event-performance .data-name .n9fc-match-substitution.sub-in {
  border-color: #cdded5;
  background: #e9f3ee;
  color: #24563e;
}

.n9fc-match-layout .sp-event-performance .n9fc-match-substitution::before,
.n9fc-match-layout .sp-event-performance .n9fc-match-substitution::after {
  content: none;
}

.n9fc-match-layout .sp-player-position {
  color: var(--n9fc-muted);
}

.n9fc-match-layout .sp-event-performance .n9fc-match-lineup-label td {
  background: #f5f1eb;
  color: #851c29;
  font-size: .77rem;
  font-weight: 700;
}

.n9fc-match-layout .n9fc-match-venue .sp-event-venue :is(th, td) {
  padding-inline: 0 !important;
  border: 0;
  background: transparent;
  text-align: start;
}

.n9fc-match-layout .n9fc-match-venue .sp-template-event-venue {
  margin: 0;
}

:is(.n9fc-match-map, .n9fc-match-formation-view) > summary {
  padding: .6rem .7rem;
  border: 1px solid var(--n9fc-line);
  border-radius: .42rem;
  background: #f5f1eb;
  color: #851c29;
  font-weight: 700;
  cursor: pointer;
}

.n9fc-match-map-content {
  margin-top: .55rem;
  overflow: hidden;
  border-radius: .42rem;
}

.n9fc-match-layout .entry-content .n9fc-match-sources p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
}

.n9fc-matchday.single-sp_event #secondary > .widget:has(> .n9fc-match-sidebar-slot) {
  box-sizing: border-box;
  width: min(100%, 320px);
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 980px) {
  .n9fc-matchday.single-sp_event #secondary > .widget:has(> .n9fc-match-sidebar-slot) {
    width: min(100vw, 320px);
    margin-inline: calc((100% - min(100vw, 320px)) / 2);
  }
}

@media (max-width: 740px) {
  .n9fc-match-layout .sp-event-performance-tables {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 981px) {
  .n9fc-matchday.single-sp_event .content-wrapper:has(> #primary .n9fc-match-layout):has(> #secondary) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(20rem, 29vw, 23.25rem);
    align-items: start;
    gap: clamp(1rem, 2vw, 1.8rem);
  }

  .n9fc-matchday.single-sp_event .content-wrapper:has(> #primary .n9fc-match-layout) > :is(#primary, #secondary) {
    float: none;
    width: auto;
    min-width: 0;
    padding-inline: 0;
  }
}

.n9fc-matchday.single-sp_event:has(.n9fc-match-layout) #secondary .adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
