.upcoming-match {
  background: #eef1f2;
}

.upcoming-match-board {
  overflow: hidden;
  border: 1px solid rgba(16, 23, 34, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 18px 44px rgba(24, 35, 44, 0.08),
    0 2px 8px rgba(24, 35, 44, 0.04);
}

.upcoming-match-bar,
.upcoming-lineup-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.upcoming-match-bar {
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: #f7f8f7;
  font-size: 11px;
  font-weight: 750;
}

.upcoming-match-bar strong {
  position: relative;
  padding-left: 16px;
  color: #343f47;
  font-size: 11px;
}

.upcoming-match-bar strong::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a84444;
  content: "";
  transform: translateY(-50%);
}

.upcoming-event-name {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.upcoming-event-name span {
  color: #7a858d;
  font-size: 10px;
  font-weight: 700;
}

.upcoming-event-name strong {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.upcoming-matchup {
  display: grid;
  min-height: 220px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.68fr) minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
}

.upcoming-team,
.upcoming-match-center {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.upcoming-team {
  gap: 14px;
  padding: 28px 22px;
}

.upcoming-team-a {
  border-right: 1px solid var(--line);
  background: #fff;
}

.upcoming-team-b {
  border-left: 1px solid var(--line);
  background: #fff;
}

.upcoming-team small {
  color: #68747c;
  font-size: 10px;
  font-weight: 700;
}

.upcoming-team strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 44px;
  font-weight: 850;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.upcoming-match-center {
  gap: 11px;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: #1e2931;
  background: #f4f6f5;
}

.upcoming-match-center > strong {
  color: var(--blue);
  font-family: var(--font-english);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}

.upcoming-match-center time,
.upcoming-match-center span {
  color: #4f5b63;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.upcoming-match-center time {
  display: block;
  min-width: 0;
  color: #4f5b63;
  font-family: var(--font-main);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.upcoming-match-center time > span {
  display: block;
  color: #4f5b63;
  font-family: var(--font-main);
  font-weight: 600;
  white-space: nowrap;
}

.upcoming-match-time-break {
  display: none;
}

.upcoming-match-center span {
  color: var(--muted);
}

.upcoming-lineup {
  border-top: 1px solid var(--line);
  background: #fff;
}

.upcoming-lineup-heading {
  min-height: 58px;
  padding: 0 24px;
  color: #27323a;
  border-bottom: 1px solid var(--line);
  background: #f7f8f7;
  font-size: 11px;
  font-weight: 800;
}

.upcoming-lineup-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.upcoming-lineup-heading > span::before {
  width: 3px;
  height: 18px;
  background: #9aaab0;
  content: "";
}

.upcoming-lineup-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f7;
}

.upcoming-lineup-tabs button {
  min-width: 0;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #4f5b63;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.upcoming-lineup-tabs button:hover {
  color: #1e2931;
  background: #fff;
}

.upcoming-lineup-tabs button.is-active {
  border-bottom-color: #9aaab0;
  color: #1e2931;
  background: #fff;
}

.upcoming-player-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0 24px 24px;
  list-style: none;
}

.upcoming-player-list li {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
}

.upcoming-player-list li:first-child,
.upcoming-player-list li:nth-child(2),
.upcoming-player-list li:nth-child(3),
.upcoming-player-list li:nth-child(4) {
  border-top: 1px solid var(--line);
}

.upcoming-player-list li + li {
  border-left: 0;
}

.upcoming-player-list li > strong {
  min-width: 0;
  color: #202b33;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.upcoming-player-list li > strong.is-placeholder {
  color: #9aa4a9;
  font-weight: 700;
}

@media (max-width: 900px) {
  .upcoming-matchup {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr) minmax(0, 1fr);
  }

  .upcoming-team strong {
    font-size: 34px;
  }

}

@media (min-width: 721px) {
  .upcoming-lineup-tabs {
    border-bottom: 1px solid var(--line);
  }

  .upcoming-player-list {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .upcoming-match {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .upcoming-match .section-heading {
    margin-bottom: 24px;
  }

  .upcoming-match .section-description {
    display: none;
  }

  .upcoming-match-bar {
    min-height: 48px;
    padding-inline: 14px;
  }

  .upcoming-event-name {
    min-height: 46px;
    padding-inline: 14px;
  }

  .upcoming-event-name strong {
    font-size: 12px;
  }

  .upcoming-matchup {
    min-height: 172px;
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.62fr) minmax(0, 1fr);
  }

  .upcoming-team {
    gap: 8px;
    padding: 22px 8px;
  }

  .upcoming-team strong {
    font-size: 24px;
  }

  .upcoming-match-center {
    gap: 7px;
    padding: 20px 7px;
  }

  .upcoming-match-center > strong {
    font-size: 29px;
  }

  .upcoming-match-center time,
  .upcoming-match-center span {
    font-size: 9px;
  }

  .upcoming-lineup-heading {
    min-height: 50px;
    padding-inline: 14px;
  }

  .upcoming-lineup-tabs {
    padding-inline: 10px;
  }

  .upcoming-lineup-tabs button {
    min-height: 40px;
    padding-inline: 4px;
  }

  .upcoming-player-list {
    grid-auto-rows: 52px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
  }

  .upcoming-player-list li {
    min-height: 52px;
    height: 52px;
    padding: 8px 10px;
    border: 1px solid var(--line);
  }

  .upcoming-player-list li > strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

}

.upcoming-lineup-tabs,
.upcoming-player-list {
  background: #f7f8f7;
}

.upcoming-lineup-tabs button,
.upcoming-lineup-tabs button.is-active,
.upcoming-player-list li {
  background: #ffffff;
}

.upcoming-player-list li {
  border-color: rgba(16, 23, 34, 0.12);
}

@media (max-width: 720px) {
  .upcoming-match-board,
  .upcoming-match-bar,
  .upcoming-matchup,
  .upcoming-team,
  .upcoming-match-center,
  .upcoming-lineup,
  .upcoming-lineup-heading,
  .upcoming-lineup-tabs,
  .upcoming-player-list,
  .upcoming-player-list li {
    background: #ffffff;
  }

  .upcoming-player-list {
    gap: 8px;
    padding: 8px 10px 15px;
  }
}

@media (max-width: 720px) {
  .upcoming-player-list {
    background: #ffffff;
  }

  .upcoming-player-list li {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 1),
      inset 0 -1px 0 rgba(81, 104, 116, 0.12),
      0 1px 0 rgba(255, 255, 255, 0.5),
      0 12px 26px rgba(31, 48, 58, 0.12);
    -webkit-backdrop-filter: blur(28px) saturate(1.42);
    backdrop-filter: blur(28px) saturate(1.42);
    transform: translateZ(0);
  }

  .upcoming-player-list li::before {
    position: absolute;
    inset: 1px;
    z-index: 0;
    border-radius: 7px;
    background: linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.66) 0%,
      rgba(255, 255, 255, 0.06) 42%,
      rgba(255, 255, 255, 0.28) 100%
    );
    content: "";
    pointer-events: none;
  }

  .upcoming-player-list li::after {
    position: absolute;
    top: 0;
    left: 8%;
    z-index: 1;
    width: 84%;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 1) 24%,
      rgba(255, 255, 255, 1) 76%,
      transparent
    );
    content: "";
    pointer-events: none;
  }

  .upcoming-player-list li > strong {
    position: relative;
    z-index: 2;
    color: #17232b;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.56);
  }
}

/* Match the desktop roster member interaction: a slight lift with a glass
   highlight and layered shadow, while leaving the mobile cards unchanged. */
@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .upcoming-lineup {
    background: #f7f8f7;
  }

  .upcoming-lineup-heading {
    min-height: 54px;
    padding: 0 24px;
    border-bottom: 0;
    background: #f7f8f7;
  }

  .upcoming-lineup-tabs {
    gap: 6px;
    padding: 8px 24px 0;
    background: #f7f8f7;
  }

  .upcoming-lineup-tabs button {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 3px 3px 0 0;
    background: transparent;
    transition:
      color 0.18s ease,
      background-color 0.18s ease,
      border-color 0.18s ease,
      box-shadow 0.18s ease;
  }

  .upcoming-lineup-tabs button:hover {
    color: #1e2931;
    border-color: rgba(16, 23, 34, 0.08);
    background: rgba(255, 255, 255, 0.72);
  }

  .upcoming-lineup-tabs button.is-active {
    border-color: rgba(16, 23, 34, 0.12);
    border-bottom-color: #315fae;
    color: #17212a;
    background: #fff;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.9),
      0 4px 12px rgba(25, 39, 50, 0.05);
  }

  .upcoming-player-list {
    gap: 8px;
    padding: 10px 24px 24px;
    background: #f7f8f7;
  }

  .upcoming-player-list li {
    position: relative;
    z-index: 0;
    overflow: hidden;
    min-height: 74px;
    border: 1px solid rgba(16, 23, 34, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.46);
    -webkit-backdrop-filter: blur(0) saturate(1);
    backdrop-filter: blur(0) saturate(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      0 4px 12px rgba(25, 39, 50, 0.045);
    transform: translateY(0);
    transition:
      color 0.22s ease,
      background 0.22s ease,
      border-color 0.22s ease,
      box-shadow 0.22s ease,
      transform 0.22s cubic-bezier(0.2, 0.65, 0.2, 1);
  }

  .upcoming-player-list li + li {
    border-left: 1px solid rgba(16, 23, 34, 0.12);
  }

  .upcoming-player-list li > strong {
    color: #17232b;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.35;
  }

  .upcoming-player-list li::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(
      118deg,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(255, 255, 255, 0.18) 42%,
      rgba(204, 216, 225, 0.2) 100%
    );
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .upcoming-player-list li > * {
    position: relative;
    z-index: 1;
  }

  .upcoming-player-list li:hover {
    z-index: 2;
    border-color: rgba(255, 255, 255, 0.88);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(226, 234, 240, 0.58));
    -webkit-backdrop-filter: blur(20px) saturate(1.35) contrast(1.04);
    backdrop-filter: blur(20px) saturate(1.35) contrast(1.04);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.96),
      inset 1px 0 0 rgba(255, 255, 255, 0.62),
      inset 0 -1px 0 rgba(112, 128, 140, 0.16),
      0 14px 34px rgba(21, 33, 43, 0.17),
      0 3px 10px rgba(21, 33, 43, 0.08);
    transform: translateY(-2px) scale(1.012);
  }

  .upcoming-player-list li:hover::before {
    opacity: 1;
  }

  .upcoming-player-list li:hover > strong {
    color: #111923;
  }

  .upcoming-player-list li:hover > strong.is-placeholder {
    color: #59656e;
  }
}

/* Keep the lineup open on desktop so it reads as part of the match board,
   rather than a second table nested inside it. */
@media (min-width: 721px) {
  .upcoming-lineup {
    border-top: 1px solid rgba(16, 23, 34, 0.12);
    background: #f7f8f7;
  }

  .upcoming-lineup-heading {
    min-height: 52px;
    padding: 18px 24px 8px;
    background: transparent;
  }

  .upcoming-lineup-heading > span::before {
    width: 2px;
    height: 15px;
    background: #315fae;
  }

  .upcoming-lineup-tabs {
    gap: 4px;
    padding: 6px 24px;
    border-bottom: 0;
    background: #f7f8f7;
  }

  .upcoming-lineup-tabs button {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(16, 23, 34, 0.07);
    border-radius: 5px;
    background: rgba(224, 229, 232, 0.45);
    box-shadow: none;
    font-weight: 700;
  }

  .upcoming-lineup-tabs button:hover {
    border-color: rgba(16, 23, 34, 0.06);
    background: rgba(224, 229, 232, 0.45);
  }

  .upcoming-lineup-tabs button.is-active {
    border-color: rgba(16, 23, 34, 0.08);
    color: #17212a;
    background: rgba(224, 229, 232, 0.45);
    box-shadow: none;
    font-weight: 800;
  }

  .upcoming-player-list {
    gap: 10px;
    padding: 10px 24px 28px;
    background: transparent;
  }

  .upcoming-player-list li,
  .upcoming-player-list li:first-child,
  .upcoming-player-list li:nth-child(2),
  .upcoming-player-list li:nth-child(3),
  .upcoming-player-list li:nth-child(4),
  .upcoming-player-list li + li {
    border: 0;
  }

  .upcoming-player-list li {
    border-radius: 6px;
    background: rgba(248, 250, 250, 0.9);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.88),
      0 5px 16px rgba(25, 39, 50, 0.06);
  }
}

@media (max-width: 720px) {
  .upcoming-lineup,
  .upcoming-player-list {
    background: #f7f8f7;
  }

  .upcoming-lineup {
    border-top: 1px solid rgba(16, 23, 34, 0.12);
  }

  .upcoming-lineup-heading {
    border-bottom: 0;
  }

  .upcoming-lineup-tabs {
    gap: 4px;
    padding: 6px 10px;
    border-bottom: 0;
    background: #f7f8f7;
  }

  .upcoming-lineup-tabs button,
  .upcoming-lineup-tabs button.is-active {
    min-height: 40px;
    padding: 0 4px;
    border: 1px solid rgba(16, 23, 34, 0.07);
    border-radius: 5px;
    color: #59656e;
    background: rgba(224, 229, 232, 0.45);
    box-shadow: none;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
  }

  .upcoming-lineup-tabs button:hover {
    border-color: rgba(16, 23, 34, 0.07);
    color: #59656e;
    background: rgba(224, 229, 232, 0.45);
  }

  .upcoming-lineup-tabs button.is-active {
    border-color: rgba(16, 23, 34, 0.08);
    color: #17212a;
    background: rgba(224, 229, 232, 0.45);
    box-shadow: none;
    font-weight: 800;
  }
}

/* Restore the original lightweight mobile team tabs. */
@media (max-width: 720px) {
  .upcoming-lineup-tabs {
    gap: 0;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
  }

  .upcoming-lineup-tabs button,
  .upcoming-lineup-tabs button.is-active {
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #4f5b63;
    background: transparent;
    box-shadow: none;
    font-weight: 800;
  }

  .upcoming-lineup-tabs button:hover {
    border-color: transparent;
    border-bottom-color: transparent;
    color: #1e2931;
    background: transparent;
  }

  .upcoming-lineup-tabs button.is-active {
    border-bottom-color: #9aaab0;
    color: #1e2931;
    background: #ffffff;
  }

  .upcoming-player-list li {
    border-color: rgba(16, 23, 34, 0.1);
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(31, 48, 58, 0.08);
  }

  .upcoming-player-list li::before,
  .upcoming-player-list li::after {
    display: none;
  }
}
