/* ==========================================================================
   DP World ILT20 - Match Center (/match-center)
   Design: Figma "ILT 20 Dev" node 252:8869 and its HTML export (sizes and colours at 1440px)
   Markup: match-center/index.html | Logic: js/match-center.js
   Data: assets/data/match-center.json (+ match-center-sample.json) | Docs: docs/match-center-page.md
   List view re-uses css/matches.css; everything below is the match detail view (prefix mc-).
   ========================================================================== */

/* --------------------------------------------------------------------------
   View switch (class set in <head> before first paint)
   -------------------------------------------------------------------------- */
.mc-detail-view {
  display: none;
}

.mc-has-match .mc-list-view {
  display: none;
}

.mc-has-match .mc-detail-view {
  display: block;
}

.mc-page-body {
  --mc-purple: #38004f;
  --mc-purple-2: #410f65;
  --mc-ink: #2b0040;
  --mc-text: #222222;
  --mc-muted: #757575;
  --mc-line: #eadcf3;
  --mc-bg: #f7effd;
  --mc-yellow: #ffe900;
  --mc-red: #ef3340;
  --mc-shadow: 0 4px 21px rgba(65, 15, 101, 0.1);
  background-color: var(--mc-bg);
}

/* 1280px content column, as in the design */
.mc-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* --------------------------------------------------------------------------
   Header: BACK, result, team banner, date + venue
   -------------------------------------------------------------------------- */
.mc-hero {
  position: relative;
  background: var(--mc-purple-2) url('../assets/match-center/hero-bg.jpg') center top / cover no-repeat;
  padding: 38px 0 40px;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  color: #ffffff;
}

.mc-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-lime-primary);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 30px;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition-smooth);
}

.mc-back:hover {
  color: #ffffff;
  transform: translateX(-2px);
}

.mc-back:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.mc-result {
  min-height: 30px;
  margin: 27px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
  color: var(--color-lime-primary);
  text-align: center;
  text-transform: uppercase;
}

.mc-live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--color-live-red);
  box-shadow: 0 0 0 0 rgba(222, 0, 4, 0.6);
  animation: mcPulse 1.6s infinite;
  vertical-align: middle;
}

.mc-live-label {
  color: #ffffff;
  margin-right: 6px;
}

@keyframes mcPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(222, 0, 4, 0.6);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(222, 0, 4, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(222, 0, 4, 0);
  }
}

/* Two 720 x 150 halves, edge to edge; the 188px logos overhang the top */
.mc-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  height: 150px;
  margin-top: 40px;
}

.mc-banner-side {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding-top: 28px;
  border-radius: 10px;
  background-color: var(--mc-team, var(--mc-purple));
}

/* Team art (config.teams.<code>.banner); mirrored on the right so the art sits by each logo */
.mc-banner-side::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--mc-banner, none) center / 100% 100% no-repeat;
}

.mc-banner-side.is-right::before {
  transform: scaleX(-1);
}

.mc-banner-side.is-left {
  justify-content: flex-end;
  padding-right: 35px;
}

.mc-banner-side.is-right {
  justify-content: flex-start;
  padding-left: 35px;
}

.mc-banner-side.is-left .mc-banner-text {
  align-items: flex-end;
  text-align: right;
}

.mc-banner-text {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mc-banner-name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 23.5px;
  text-transform: uppercase;
  color: #ffffff;
}

.mc-banner-score {
  margin-top: 17px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  line-height: 36px;
  color: var(--mc-yellow);
}

.mc-banner-side.is-light .mc-banner-score {
  color: #ffffff;
}

.mc-banner-score.is-empty {
  font-size: 20px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.85);
}

.mc-banner-overs {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
}

.mc-banner-logo {
  position: absolute;
  top: -34px;
  z-index: 1;
  width: 188px;
  height: 188px;
  object-fit: contain;
}

.mc-banner-side.is-left .mc-banner-logo {
  left: 18.9%;
}

.mc-banner-side.is-right .mc-banner-logo {
  right: 18.9%;
}

.mc-banner-logo.is-text {
  display: grid;
  place-items: center;
  top: 31px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-family: var(--font-display);
  font-size: 30px;
}

.mc-vs {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #160430;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.mc-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 26px 0 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 30px;
  color: #ffffff;
  text-align: center;
}

/* Shown on ?match=sample (the sample file has "sample": true) */
.mc-sample-note {
  order: 3;
  margin-top: 0;
  padding: 4px 12px;
  border-radius: 3px;
  background: var(--color-pink-primary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Body area
   -------------------------------------------------------------------------- */
.mc-body {
  background: var(--mc-bg) url('../assets/news-background.png') center top / cover no-repeat;
  padding: 55px 0 64px;
  color: var(--mc-ink);
}

.mc-message,
.mc-empty {
  margin: 24px 0;
  padding: 28px 20px;
  border-radius: 8px;
  background: #ffffff;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--mc-purple);
  text-align: center;
}

.mc-message[hidden] {
  display: none;
}

/* Tabs */
.mc-tabs-wrap {
  position: relative;
  margin-bottom: 23px;
}

.mc-tabs-wrap[hidden] {
  display: none;
}

.mc-tabs {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 52px;
  background: var(--mc-purple-2);
  border-radius: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mc-tabs::-webkit-scrollbar {
  display: none;
}

.mc-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 20px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.4s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.3s ease;
}

.mc-tab:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mc-tab svg {
  flex: none;
  width: 25px;
  height: 25px;
}

/* Same size active or not, so the tabs never shift when the pill slides (no 195px active min-width) */
.mc-tab.active {
  background: var(--color-lime-primary);
  color: var(--mc-purple-2);
}

/* Lime pill behind the active tab; js placePill() slides it between tabs (Figma Smart Animate) */
.mc-tab-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  border-radius: 5px;
  background: var(--color-lime-primary);
  pointer-events: none;
}

.mc-tabs.has-pill .mc-tab.active {
  background: transparent;
}

.mc-tab:focus-visible {
  outline: 2px solid var(--color-lime-primary);
  outline-offset: 2px;
}

/* Cards */
.mc-card,
.mc-mini,
.mc-sheet {
  background: #ffffff;
  border-radius: 5px;
  box-shadow: var(--mc-shadow);
}

/* White sheet holding the team toggle and the tab content */
.mc-sheet {
  padding: 16px 12px 28px;
}

.mc-card {
  padding: 0 0 18px;
  margin-top: 23px;
  overflow: hidden;
}

/* Blocks on the sheet are flat (the sheet is the card) */
.mc-sheet .mc-card {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.mc-partnerships {
  margin-top: 53px;
}

/* --------------------------------------------------------------------------
   Tab switch: the old tab (ghost) fades out over the new one, 400ms (TAB_ANIM_MS in js)
   -------------------------------------------------------------------------- */
.mc-panel {
  position: relative;
}

.mc-panel-ghost {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.mc-panel.is-switching> :not(.mc-panel-ghost) {
  animation: mcTabIn 0.24s ease-out both;
}

.mc-panel.is-switching>.mc-panel-ghost {
  animation: mcTabOut 0.4s cubic-bezier(0.33, 1, 0.68, 1) both;
}

@keyframes mcTabIn {
  from {
    opacity: 0;
  }
}

@keyframes mcTabOut {
  to {
    opacity: 0;
  }
}

.mc-panel[hidden],
.mc-mini[hidden] {
  display: none;
}

/* Horizontal-scroll wrapper for wide tables (position relative for the hidden captions) */
.mc-table-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Current batters / bowlers strip */
.mc-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 15px 16px 24px;
  margin-bottom: 36px;
}

.mc-mini-table,
.mc-score-table,
.mc-matchup-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
  color: var(--mc-ink);
  text-align: center;
}

.mc-mini-table thead th {
  height: 46px;
  padding: 0 8px;
  background: var(--mc-bg);
  color: var(--mc-purple-2);
  font-size: 20px;
  font-weight: 500;
}

.mc-mini-table td,
.mc-mini-table tbody th {
  height: 46px;
  padding: 0 8px;
  color: #232323;
  font-size: 17px;
  font-weight: 500;
}

.mc-mini-table tbody th {
  padding-left: 20px;
  color: #0c0c0c;
  font-size: 18px;
}

/* Grey rule after the hand / style tag column */
.mc-mini-table tbody td:nth-child(2) {
  border-right: 1px solid #dddddd;
}

.mc-mini-table thead .mc-th-icon {
  width: 25px;
  height: 25px;
  margin-right: 12px;
  vertical-align: -6px;
}

.mc-col-name {
  text-align: left;
  white-space: nowrap;
}

.mc-mini-table tbody .mc-col-name {
  text-transform: uppercase;
}

.mc-th-icon {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
  color: var(--mc-purple);
}

.mc-star {
  color: var(--color-pink-primary);
  margin-left: 2px;
}

.mc-tag {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 3px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.mc-tag.is-hand {
  background: #d2f9de;
  color: #004c2d;
}

.mc-tag.is-style {
  background: #fad9f3;
  color: #df00af;
}

.mc-tag.is-style.is-left-arm {
  background: #f4e4d9;
  color: #b44b00;
}

/* Team toggle with sliding pill (matching mc-tabs has-pill) */
.mc-team-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 21px;
  position: relative;
}

.mc-team-btn {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--mc-purple-2);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.4s cubic-bezier(0.33, 1, 0.68, 1), background-color 0.3s ease;
}

.mc-team-btn:hover {
  background: var(--mc-bg);
}

.mc-team-btn.active {
  background: var(--mc-purple-2);
  color: #ffffff;
}

/* Purple pill behind the active team button; js placeTeamPill() slides it between buttons */
.mc-team-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  border-radius: 5px;
  background: var(--mc-purple-2);
  pointer-events: none;
}

.mc-team-toggle.has-pill .mc-team-btn.active {
  background: transparent;
}

.mc-team-toggle.has-pill .mc-team-btn.active:hover {
  background: transparent;
}

.mc-team-btn:focus-visible {
  outline: 2px solid var(--color-pink-primary);
  outline-offset: 2px;
}

.mc-team-content {
  display: block;
}

.mc-team-content.is-switching {
  animation: mcTabIn 0.24s ease-out both;
}

/* Team summary bar (logo + score pills + filter) */
.mc-team-bar {
  display: flex;
  gap: 5px;
  margin-top: 23px;
}

.mc-team-bar-main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px 0 37px;
  border-radius: 5px;
  background: var(--mc-purple-2);
}

.mc-team-bar-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.mc-team-bar-pills,
.mc-total-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mc-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 37px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f00080;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.mc-pill b {
  font-weight: 700;
}

.mc-total .mc-pill {
  height: 37px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(240, 0, 128, 0.8);
  font-size: 22px;
}

.mc-filter-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 84px;
  border: 0;
  border-radius: 5px;
  background: var(--mc-purple-2);
  color: var(--color-lime-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mc-filter-toggle:hover,
.mc-filter-toggle.active {
  background: var(--color-lime-primary);
  color: var(--mc-purple);
}

.mc-filter-toggle:focus-visible {
  outline: 2px solid var(--color-pink-primary);
  outline-offset: 2px;
}

.mc-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 13px;
  margin: 16px 0 0;
  padding: 0 0 0 25px;
}

.mc-select {
  position: relative;
  display: block;
}

.mc-select select {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 16px;
  border: 2px solid var(--mc-purple-2);
  border-radius: 5px;
  background: var(--mc-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10' fill='none'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' stroke='%2338004f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--mc-purple-2);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  text-align: start;
  text-transform: uppercase;
  appearance: none;
  cursor: pointer;
}

.mc-select select:focus-visible {
  outline: 2px solid var(--color-pink-primary);
  outline-offset: 1px;
}

/* --------------------------------------------------------------------------
   Full Scorecard
   -------------------------------------------------------------------------- */
.mc-score-table thead th {
  height: 58px;
  padding: 0 10px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-size: 23px;
  font-weight: 500;
  white-space: nowrap;
}

/* separate borders so the header cells can take a radius */
.mc-score-table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Cover the hairline seam between header cells at fractional widths */
.mc-score-table thead th:not(:last-child),
.mc-matchup-table thead th:not(:last-child) {
  box-shadow: 1px 0 0 var(--mc-purple-2);
}

.mc-mini-table thead th:not(:last-child) {
  box-shadow: 1px 0 0 var(--mc-bg);
}

.mc-score-table thead th:first-child {
  border-radius: 7px 0 0 7px;
}

.mc-score-table thead th:last-child {
  border-radius: 0 7px 7px 0;
}

.mc-score-table thead .mc-col-player {
  text-align: left;
}

.mc-score-table thead .mc-th-icon {
  width: 25px;
  height: 25px;
  margin: 0 12px 0 4px;
  vertical-align: -5px;
  color: #ffffff;
}

.mc-score-table td,
.mc-score-table tbody th {
  padding: 10px;
  color: var(--mc-text);
  font-size: 24px;
  font-weight: 500;
}

.mc-score-table tbody tr:first-child>* {
  /* padding-top: 22px; */
}

.mc-score-table .mc-col-player {
  width: 38%;
  text-align: left;
}

.mc-score-table tbody .mc-col-player {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 260px;
  padding-left: 18px;
}

.mc-score-table .mc-col-tags {
  width: 1%;
  white-space: nowrap;
  text-align: left;
}

.mc-strong {
  font-weight: 700 !important;
}

.mc-score-table .mc-tag {
  min-width: 56px;
  height: 28px;
  font-size: 18px;
}

.mc-row-click {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mc-row-click:hover,
.mc-row-click.is-open {
  background: #fbf6fe;
}

.mc-row-click:focus-visible {
  outline: 2px solid var(--color-pink-primary);
  outline-offset: -2px;
}

.mc-avatar {
  flex: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: #ece3f2;
}

.mc-player-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mc-player-text {
  gap: 3px;
}

.mc-player-name {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}

.mc-dismissal {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--mc-muted);
  text-transform: none;
}

.mc-dismissal.is-notout {
  color: #188038;
  font-weight: 600;
}

.mc-chevron {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--mc-purple);
  box-shadow: 0 0 0 1.5px var(--mc-purple);
  color: #fff;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.mc-chevron.is-open {
  transform: rotate(180deg);
}

.mc-detail-row>td {
  padding: 10px 14px 16px !important;
  background: #fbf6fe;
}

.mc-dnb {
  margin: 15px 0 0;
  padding: 12px 20px;
  background: #f3f3f3;
  font-family: var(--font-display);
  font-size: 18px;
  color: #363636;
}

.mc-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 47px;
  margin: 15px 0 0;
  padding: 8px 20px;
  border-radius: 5px;
  background: #f5f7f9;
  color: var(--mc-text);
  font-family: var(--font-display);
  font-size: 23px;
}

.mc-extras-total {
  min-width: 60px;
  text-align: center;
}

.mc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 65px;
  margin: 15px 0 0;
  padding: 10px 20px;
  border-radius: 5px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-family: var(--font-display);
}

.mc-total-label {
  font-size: 23px;
  font-weight: 500;
}

.mc-fow {
  display: flex;
  align-items: flex-start;
  gap: 31px;
  padding: 15px 32px 0;
}

.mc-fow-label {
  flex: none;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 33px;
  color: var(--mc-purple-2);
}

.mc-fow-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-fow-list li {
  display: inline-flex;
  align-items: center;
  height: 33px;
  padding: 0 12px;
  border-radius: 5px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 17px;
  white-space: nowrap;
}

/* Substitutes + legend */
.mc-subs {
  margin: 15px 0 0;
  padding: 24px 30px;
  background: #f3f3f3;
  font-family: var(--font-display);
  font-size: 18px;
  color: #363636;
}

.mc-subs-list,
.mc-subs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-subs-list {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--mc-purple-2);
}

.mc-subs-legend {
  font-size: 16px;
  color: #5a5a5a;
}

.mc-subs li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.mc-sub-tag {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 2px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.mc-sub-tag.is-impact {
  background: #c00000;
}

.mc-sub-tag.is-replaced {
  background: #70a021;
}

.mc-sub-tag.is-concussion {
  background: #faac68;
}

.mc-sub-tag.is-none {
  background: transparent;
  width: 0;
}

/* Expanded batter / bowler row */
.mc-expand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 464px);
  gap: 18px;
  padding: 20px 18px 28px;
  border: 1px solid var(--mc-purple-2);
  border-radius: 10px;
  background: #fdfbff;
}

.mc-expand-chart {
  min-width: 0;
}

.mc-expand-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.mc-matchup-table {
  border-collapse: separate;
  border-spacing: 0;
}

.mc-matchup-table thead th {
  height: 32px;
  padding: 0 6px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

.mc-matchup-table thead th:first-child {
  border-radius: 3px 0 0 3px;
}

.mc-matchup-table thead th:last-child {
  border-radius: 0 3px 3px 0;
}

.mc-matchup-table td,
.mc-matchup-table tbody th {
  padding: 8px 6px;
  color: #000000;
  font-size: 16px;
  font-weight: 500;
}

.mc-matchup-table tbody th {
  color: #232323;
}

.mc-matchup-table small {
  font-size: 9px;
  color: #4e4e4e;
  margin-left: 1px;
}

/* Partnerships */
.mc-partnerships {
  border-radius: 10px;
}

.mc-card-title {
  margin: 0;
  padding: 15px 28px 16px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 35px;
  text-transform: uppercase;
  border-radius: 8px;
}

.mc-pship-list {
  margin: 0;
  padding: 16px 34px 12px;
  list-style: none;
}

.mc-pship {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 531px) minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  color: var(--mc-text);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

/* 1px purple rule between rows, narrower than the row */
.mc-pship+.mc-pship::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(997px, 83%);
  height: 1px;
  background: var(--mc-purple-2);
  transform: translateX(-50%);
}

.mc-pship-bat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-pship-bat b {
  font-weight: 500;
}

.mc-pship-bat.is-right {
  align-items: flex-end;
  text-align: right;
}

.mc-pship-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.mc-pship-bar {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--mc-line);
}

.mc-pship-bar .is-a {
  background: var(--mc-purple-2);
}

.mc-pship-bar .is-x {
  background: var(--color-lime-primary);
}

.mc-pship-bar .is-b {
  background: #cd037a;
}

/* --------------------------------------------------------------------------
   Commentary
   -------------------------------------------------------------------------- */
.mc-commentary {
  margin-top: 26px;
}

.mc-over+.mc-over {
  margin-top: 20px;
}

.mc-over-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 65px;
  padding: 8px 25px 8px 10px;
  border-radius: 10px;
  background: #f00080;
  color: #ffffff;
  font-family: var(--font-display);
}

.mc-over-score {
  font-size: 27px;
  font-weight: 500;
}

.mc-over-score small {
  margin-left: 10px;
  font-size: 18px;
  font-weight: 500;
}

.mc-over-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mc-over-balls {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mc-ball {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px;
  color: #0d1041;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.mc-ball.is-wicket {
  background: #ffeaf5;
}

.mc-ball-no {
  flex: none;
  min-width: 32px;
}

.mc-ball-text {
  min-width: 0;
  font-family: 'Cutmark-Light', var(--font-body);
  font-weight: 300;
}

/* Ball chips: 40px squares (ball rows and the over strip) */
.mc-chip {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 40px;
  height: 40px;
  padding: 0 4px;
  border: 1px solid #0d1041;
  border-radius: 7px;
  background: #ffffff;
  color: #0d1041;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.mc-over-chips .mc-chip {
  border-color: #8fd220;
  background: var(--mc-purple-2);
  color: #cdff48;
  font-size: 21px;
}

.mc-chip.is-4,
.mc-over-chips .mc-chip.is-4 {
  border-color: #ffe900;
  background: #ffe900;
  box-shadow: inset 0 0 16px rgba(255, 233, 0, 0.5);
  color: #0d1041;
}

.mc-chip.is-6,
.mc-over-chips .mc-chip.is-6 {
  border-color: #8fd220;
  background: #c7fc48;
  box-shadow: inset 0 0 16px rgba(121, 222, 76, 0.5);
  color: #0d1041;
}

.mc-chip.is-w,
.mc-over-chips .mc-chip.is-w {
  border-color: #870608;
  background: #ed4640;
  color: #ffffff;
}

.mc-over-chips .mc-chip.is-w {
  background: #e82d27;
}

.mc-chip.is-extra,
.mc-over-chips .mc-chip.is-extra {
  border-color: #b9a3cb;
  background: #efe6f6;
  color: var(--mc-purple-2);
}

.mc-see-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.mc-see-more {
  min-width: 171px;
  height: 43px;
  padding: 0 26px;
  border: 0;
  border-radius: 9px;
  background: var(--mc-purple-2);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 19px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mc-see-more:hover {
  background: var(--color-pink-primary);
}

.mc-see-more:focus-visible {
  outline: 2px solid var(--color-pink-primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Wagon Wheel
   -------------------------------------------------------------------------- */
.mc-wagon-panel {
  margin-top: 26px;
  padding: 68px 52px 60px 23px;
  border-radius: 13px;
  background: var(--mc-purple-2) url('../assets/match-center/panel-bg.jpg') center / cover no-repeat;
}

.mc-wagon {
  display: grid;
  grid-template-columns: minmax(220px, 455px) minmax(0, 651px);
  justify-content: space-between;
  align-items: start;
  gap: 44px;
}

.mc-wagon.is-compact {
  grid-column: 1 / -1;
  grid-template-columns: minmax(160px, 258px) minmax(0, 353px);
  justify-content: space-around;
  gap: 20px 40px;
}

.mc-expand>.mc-wagon.is-compact {
  grid-column: auto;
}

.mc-field {
  display: block;
  width: 100%;
  height: auto;
}

.mc-field-ring {
  fill: #d4d9e6;
}

.mc-field-outer {
  fill: #047104;
}

.mc-field-inner {
  fill: #0e8d0e;
}

.mc-field-spoke {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.6;
}

.mc-field-pitch {
  fill: #d7c58f;
}

.mc-shot {
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mc-shot.is-0 {
  stroke: #c8ccd4;
}

.mc-shot.is-1 {
  stroke: #f0c419;
}

.mc-shot.is-2 {
  stroke: #ff8a1f;
}

.mc-shot.is-3 {
  stroke: #b4c37a;
}

.mc-shot.is-4 {
  stroke: #2f6bff;
  stroke-width: 2;
}

.mc-shot.is-6 {
  stroke: #ff2bb1;
  stroke-width: 2.2;
}

.mc-shot.is-w {
  stroke: var(--mc-red);
  stroke-width: 2.2;
  stroke-dasharray: 3 2;
}

.mc-wagon-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding-top: 12px;
  color: #ffffff;
}

.mc-side-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 30px 0 14px;
}

.mc-side-toggle button {
  min-height: 50px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mc-side-toggle button.active,
.mc-side-toggle button:hover {
  background: #ffffff;
  color: #19224b;
}

.mc-side-toggle button:focus-visible,
.mc-run-chip:focus-visible {
  outline: 2px solid var(--color-lime-primary);
  outline-offset: 2px;
}

/* 3 x 2 grid of stat cards */
.mc-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.mc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-align: center;
  min-width: 0;
}

.mc-stat dt {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.2;
}

.mc-stat dd {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.mc-run-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
}

.mc-run-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 44px;
  padding: 6px 8px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.mc-run-chip .mc-chip-label,
.mc-run-chip span {
  display: inline-block;
  line-height: 1;
}

.mc-run-chip b,
.mc-run-chip .mc-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--chip-color, #19224b);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.mc-run-chip.is-all {
  --chip-color: #ed4640;
  background: #ed4640;
}

.mc-run-chip.is-0 {
  --chip-color: #2c3e7a;
  background: #2c3e7a;
}

.mc-run-chip.is-1 {
  --chip-color: #c59924;
  background: #c59924;
}

.mc-run-chip.is-2 {
  --chip-color: #ff6c00;
  background: #ff6c00;
}

.mc-run-chip.is-3 {
  --chip-color: #96985c;
  background: #96985c;
}

.mc-run-chip.is-4 {
  --chip-color: #2454f1;
  background: #2454f1;
}

.mc-run-chip.is-6 {
  --chip-color: #ff00ea;
  background: #ff00ea;
}

.mc-run-chip.is-w {
  --chip-color: #ff0000;
  background: #ff0000;
}

.mc-run-chip.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--chip-color, #ffffff), 0 3px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.mc-run-chip:hover {
  filter: brightness(1.08);
}

/* Compact wagon wheel inside a scorecard row */
.mc-wagon.is-compact .mc-wagon-side {
  gap: 15px;
  padding-top: 9px;
  color: #444444;
}

.mc-wagon.is-compact .mc-side-toggle {
  display: none;
}

.mc-expand .mc-stats {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 10px;
}

.mc-expand .mc-stats .mc-stat {
  padding: 10px 8px;
}

.mc-expand .mc-stat dt {
  font-size: 13px;
  color: #64748b;
}

.mc-expand .mc-stat dd {
  font-size: 20px;
  color: #0f172a;
}

.mc-wagon.is-compact .mc-run-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 6px;
}

.mc-wagon.is-compact .mc-run-chip {
  min-width: 0;
  height: 40px;
  padding: 4px 6px;
  font-size: 14px;
}

.mc-wagon.is-compact .mc-run-chip b,
.mc-wagon.is-compact .mc-run-chip .mc-chip-count {
  min-width: 20px;
  height: 20px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Teams
   -------------------------------------------------------------------------- */
/* 208 x 275 cards, five to a row at full width */
.mc-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 208px));
  justify-content: center;
  gap: 26px;
  margin: 0;
  padding: 40px 0 0;
  list-style: none;
}

.mc-player-card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 208 / 275;
  overflow: hidden;
  border: 1px solid #f9a72a;
  border-radius: 4px;
  background: #3a225c url('../assets/match-center/card-bg.png') center top / cover no-repeat;
}

.mc-player-photo {
  position: relative;
  display: block;
  flex: 1;
  min-height: 0;
}

.mc-player-photo img {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.mc-role-icon {
  position: absolute;
  top: 12px;
  right: 9px;
  z-index: 1;
  width: 31px;
  height: 30px;
}

.mc-role-icon img,
.mc-role-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mc-cap-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 5px;
  border-radius: 3px;
  background: var(--color-lime-primary);
  color: var(--mc-purple);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.mc-cap-tag.is-sub {
  background: var(--color-pink-primary);
  color: #ffffff;
}

.mc-player-card-name {
  display: grid;
  place-items: center;
  flex: none;
  min-height: 51px;
  padding: 6px 8px;
  background: #3a225c;
  box-shadow: inset 0 0 0 1px #c87bff;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1.17px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.mc-subhead {
  margin: 40px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--mc-purple);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Manhattan & Worm
   -------------------------------------------------------------------------- */
.mc-chart-block {
  margin: 26px 6px 0;
  padding: 26px 40px 24px 20px;
  border-radius: 7px;
  background: var(--mc-purple-2);
}

/* Title + legend, then the design's blue gradient rule */
.mc-chart-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 0 0 0 52px;
  margin-bottom: 18px;
}

.mc-chart-head::after {
  content: '';
  position: absolute;
  left: 40px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #242873, #646cfb 43%, #242873);
  opacity: 0.53;
}

.mc-chart-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: #f00080;
  text-transform: uppercase;
}

.mc-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-right: 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-transform: uppercase;
}

.mc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mc-legend-item i {
  width: 11px;
  height: 11px;
}

.mc-legend-item.is-a i {
  background: #f00080;
}

.mc-legend-item.is-b i {
  background: #8fd220;
}

.mc-chart-scroll {
  position: relative;
  overflow-x: auto;
}

.mc-chart {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.mc-chart-light {
  min-width: 0;
}

/* The design has no grid lines; keep a faint one for reading values */
.mc-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
}

.mc-axis-line {
  stroke: #ffffff;
}

.mc-chart-light .mc-axis-line {
  stroke: #c9b1dc;
}

.mc-axis-text {
  fill: #f00080;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}

.mc-axis-title {
  fill: #ffffff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

/* Bowler row chart: 420px viewBox drawn up to 560px, so smaller type keeps it near 14px on screen */
.mc-expand-chart .mc-chart-light {
  max-width: 560px;
}

.mc-chart-light .mc-axis-text {
  fill: var(--mc-ink);
  font-size: 11px;
}

.mc-chart-light .mc-axis-title {
  fill: var(--mc-ink);
  font-size: 12px;
}

.mc-bar.is-a {
  fill: #f00080;
}

.mc-bar.is-b {
  fill: #8fd220;
}

.mc-bar.is-purple {
  fill: var(--mc-purple-2);
}

.mc-dot.is-a {
  fill: #f00080;
}

.mc-dot.is-b {
  fill: #8fd220;
}

.mc-dot.is-wicket {
  fill: var(--mc-red);
}

.mc-worm {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.mc-worm.is-a {
  stroke: #f00080;
}

.mc-worm.is-b {
  stroke: #8fd220;
}

/* --------------------------------------------------------------------------
   Match Info
   -------------------------------------------------------------------------- */
.mc-info,
.mc-sheet .mc-info {
  padding: 10px 52px 60px;
}

.mc-info-title {
  margin: 0 0 45px 24px;
  color: var(--mc-text);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
}

.mc-info-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0;
}

/* Grey rounded rows: label left, value from 40% */
.mc-info-row {
  display: grid;
  grid-template-columns: minmax(160px, 40%) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 12px 24px;
  border: 1px solid #eaeaea;
  border-radius: 9px;
  background: #f3f3f3;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
}

.mc-info-row dt {
  color: #7c7c7c;
}

.mc-info-row dd {
  margin: 0;
  color: #161616;
}

.mc-info-dim {
  margin-left: 20px;
  color: #161616;
}

/* On-field umpires, one per line with a rule between them */
.mc-info-people {
  display: flex;
  flex-direction: column;
}

.mc-info-people>span+span {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #c5c5c5;
}

.mc-flag {
  display: inline-block;
  width: 29px;
  height: 20px;
  margin-right: 16px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: -1px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .mc-banner-name {
    font-size: 26px;
  }

  .mc-banner-logo {
    top: -14px;
    width: 150px;
    height: 150px;
  }

  .mc-banner-side.is-left .mc-banner-logo {
    left: 8%;
  }

  .mc-banner-side.is-right .mc-banner-logo {
    right: 8%;
  }

  .mc-tabs {
    padding: 9px 12px;
  }

  .mc-tab {
    font-size: 17px;
    padding: 8px 12px;
  }

  .mc-score-table thead th,
  .mc-score-table td,
  .mc-score-table tbody th,
  .mc-player-name {
    font-size: 20px;
  }

  .mc-dismissal {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .mc-banner-logo {
    top: 15px;
    width: 120px;
    height: 120px;
  }

  .mc-banner-side.is-left .mc-banner-logo {
    left: 3%;
  }

  .mc-banner-side.is-right .mc-banner-logo {
    right: 3%;
  }

  .mc-banner-name {
    font-size: 22px;
  }

  .mc-banner-score {
    font-size: 30px;
    line-height: 30px;
  }

  .mc-mini {
    grid-template-columns: 1fr;
  }

  .mc-wagon-panel {
    padding: 40px 24px;
  }

  .mc-wagon {
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
    gap: 28px;
  }

  .mc-expand {
    grid-template-columns: 1fr;
  }

  .mc-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .mc-hero {
    padding: 20px 0 24px;
    border-radius: 0 0 12px 12px;
  }

  .mc-back {
    font-size: 18px;
    line-height: 22px;
  }

  .mc-result {
    min-height: 0;
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 22px;
  }

  .mc-banner {
    height: auto;
    margin-top: 18px;
  }

  .mc-banner-side,
  .mc-banner-side.is-left,
  .mc-banner-side.is-right {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    padding: 12px 12px 14px;
    border-radius: 6px;
  }

  .mc-banner-side.is-left .mc-banner-text,
  .mc-banner-side.is-right .mc-banner-text {
    text-align: center;
    align-items: center;
  }

  .mc-banner-side.is-right .mc-banner-logo {
    order: -1;
  }

  .mc-banner-side.is-left .mc-banner-logo,
  .mc-banner-side.is-right .mc-banner-logo {
    position: relative;
    top: 0;
    left: auto;
    right: auto;
    width: 64px;
    height: 64px;
    margin: 0;
  }

  .mc-banner-name {
    font-size: 16px;
    line-height: 1.1;
  }

  .mc-banner-score {
    margin-top: 6px;
    font-size: 26px;
    line-height: 26px;
  }

  .mc-banner-overs {
    font-size: 13px;
  }

  .mc-vs {
    top: 44px;
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .mc-meta {
    margin-top: 16px;
    gap: 4px;
    font-size: 16px;
    line-height: 22px;
  }

  .mc-body {
    padding: 22px 0 48px;
  }

  .mc-tab {
    flex: none;
    min-height: 40px;
    font-size: 15px;
  }

  .mc-tab svg {
    width: 20px;
    height: 20px;
  }

  .mc-sheet {
    padding: 10px 8px 20px;
  }

  .mc-team-toggle {
    gap: 8px;
  }

  .mc-team-btn {
    min-height: 44px;
    font-size: 17px;
  }

  .mc-team-bar-logo {
    width: 44px;
    height: 44px;
  }

  .mc-pill {
    height: 30px;
    font-size: 14px;
  }

  .mc-filter-row {
    padding: 0;
  }

  .mc-team-bar-main {
    flex-wrap: wrap;
    padding: 8px 10px;
  }

  .mc-team-bar-pills {
    justify-content: flex-start;
  }

  .mc-wagon,
  .mc-wagon.is-compact {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mc-wagon-field {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
  }

  .mc-wagon.is-compact .mc-wagon-field {
    max-width: 240px;
  }

  .mc-wagon-panel {
    padding: 22px 14px;
  }

  /* Keep the expanded row panel inside the screen while the table itself scrolls sideways */
  .mc-detail-row .mc-expand {
    position: sticky;
    left: 14px;
    width: calc(100vw - 68px);
  }

  .mc-pship {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .mc-pship-mid {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mc-player-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px 0 0;
  }

  .mc-subhead {
    margin: 22px 14px 0;
  }

  .mc-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 16px;
    font-size: 16px;
  }

  .mc-over-score {
    font-size: 18px;
  }

  .mc-ball {
    align-items: flex-start;
    font-size: 14px;
  }

  .mc-score-table thead th,
  .mc-score-table td,
  .mc-score-table tbody th,
  .mc-player-name,
  .mc-extras,
  .mc-total-label,
  .mc-fow-label {
    font-size: 16px;
  }

  .mc-dismissal {
    font-size: 13px;
  }

  .mc-avatar {
    width: 36px;
    height: 36px;
  }

  .mc-score-table thead th {
    height: 46px;
  }

  .mc-total .mc-pill {
    height: 30px;
    font-size: 15px;
  }

  .mc-fow {
    padding: 15px 0 0;
  }

  .mc-mini-table thead th {
    font-size: 16px;
  }

  .mc-mini-table td,
  .mc-mini-table tbody th {
    font-size: 15px;
  }

  .mc-stat dt {
    font-size: 13px;
  }

  .mc-stat dd {
    font-size: 20px;
  }

  .mc-side-toggle {
    margin: 0;
  }

  .mc-side-toggle button {
    font-size: 16px;
  }

  .mc-over-head {
    padding: 8px 10px;
  }

  .mc-chip {
    min-width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .mc-ball {
    min-height: 48px;
    font-size: 15px;
  }

  .mc-pship-list {
    padding: 8px 14px;
  }

  .mc-pship {
    font-size: 16px;
  }

  .mc-card-title {
    padding: 12px 16px;
    font-size: 22px;
  }

  .mc-chart-block {
    margin: 14px 0 0;
    padding: 14px 12px;
  }

  .mc-chart-head {
    padding-left: 0;
  }

  .mc-chart-head::after {
    left: 0;
  }

  .mc-info,
  .mc-sheet .mc-info {
    padding: 10px 0 20px;
  }

  .mc-info-title {
    margin: 4px 0 20px 8px;
    font-size: 20px;
  }

  .mc-info-list {
    gap: 12px;
  }

  .mc-player-card-name {
    min-height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .mc-container {
    padding: 0 12px;
  }

  .mc-banner-name {
    font-size: 14px;
  }

  .mc-banner-score {
    font-size: 22px;
  }

  .mc-team-toggle {
    gap: 6px;
    padding: 6px;
  }

  .mc-team-btn {
    font-size: 15px;
    padding: 8px;
  }

  .mc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mc-side-toggle button {
    font-size: 14px;
  }

  .mc-fow {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .mc-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mc-tab span {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .mc-live-dot,
  .mc-panel.is-switching>*,
  .mc-team-content.is-switching {
    animation: none;
  }

  .mc-tab,
  .mc-team-btn,
  .mc-back,
  .mc-chevron,
  .mc-row-click,
  .mc-run-chip,
  .mc-see-more {
    transition: none;
  }
}