.lineup-compare-page {
  overflow-x: hidden;
}

.lineup-compare-page .site-main {
  box-sizing: border-box;
  width: min(1880px, calc(100% - 48px));
  padding-top: 24px;
  padding-bottom: 36px;
}

.lineup-compare-shell {
  display: grid;
  gap: 14px;
  color: #eef7f5;
}

.lineup-compare-context {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 7px 14px;
  border: 1px solid rgba(142, 181, 200, .18);
  background: rgba(5, 20, 31, .72);
}

.lineup-compare-context > a {
  color: #bed0d8;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.lineup-compare-context > a:hover {
  color: var(--lime);
}

.lineup-compare-context > a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.lineup-compare-context > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.lineup-compare-context > div > span {
  color: var(--lime);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
  white-space: nowrap;
}

.lineup-compare-context h1 {
  margin: 0;
  font-size: clamp(20px, 1.65vw, 28px);
  white-space: nowrap;
}

.lineup-compare-context p {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #9fb3bd;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-compare-context p b {
  color: #dce9ee;
}

.lineup-compare-private-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 28px;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid rgba(244, 192, 81, .35);
  background: rgba(79, 55, 12, .22);
  color: #dce8ec;
  font-size: 11px;
  white-space: nowrap;
}

.lineup-compare-private-note b {
  flex: 0 0 auto;
  color: #ffd97a;
}

.lineup-compare-private-note span {
  overflow: hidden;
  color: #b7c7ce;
  text-overflow: ellipsis;
}

.lineup-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  min-width: 0;
}

.lineup-compare-team-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(142, 181, 200, .22);
  border-top: 3px solid color-mix(in srgb, var(--team-color), #fff 9%);
  background: #061722;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .2);
}

.lineup-compare-team-card > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(142, 181, 200, .17);
  background: linear-gradient(90deg, color-mix(in srgb, var(--team-color), transparent 88%), transparent 48%);
}

.lineup-compare-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lineup-compare-crest {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--team-color), #fff 25%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
}

.lineup-compare-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lineup-compare-team > div {
  min-width: 0;
}

.lineup-compare-team small {
  color: #8fa6b2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.lineup-compare-team h2 {
  overflow: hidden;
  max-width: 16em;
  margin: 2px 0 0;
  font-size: clamp(17px, 1.35vw, 23px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-compare-state {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
  text-align: right;
}

.lineup-compare-state > b {
  padding: 3px 7px;
  border: 1px solid rgba(142, 181, 200, .25);
  border-radius: 999px;
  color: #a9bbc4;
  font-size: 10px;
  white-space: nowrap;
}

.lineup-compare-state > b.is-public {
  border-color: rgba(183, 243, 74, .4);
  background: rgba(183, 243, 74, .08);
  color: #dfff9f;
}

.lineup-compare-state > b.is-private {
  border-color: rgba(244, 192, 81, .4);
  background: rgba(244, 192, 81, .08);
  color: #ffe09a;
}

.lineup-compare-state > span {
  overflow: hidden;
  max-width: 23em;
  color: #90a7b2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-compare-pitch {
  position: relative;
  box-sizing: border-box;
  min-height: clamp(600px, 42vw, 790px);
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .045) 50%, transparent 50%) 0 0 / 12.5% 100%,
    repeating-linear-gradient(0deg, #185d46 0 10%, #1c6d50 10% 20%);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .34);
}

.lineup-compare-pitch::before {
  position: absolute;
  z-index: 0;
  inset: 20px;
  border: 2px solid rgba(255, 255, 255, .42);
  content: "";
  pointer-events: none;
}

.lineup-compare-pitch::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 20px;
  left: 20px;
  border-top: 2px solid rgba(255, 255, 255, .38);
  content: "";
  pointer-events: none;
}

.lineup-compare-pitch-markings i {
  position: absolute;
  z-index: 0;
  display: block;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .38);
  pointer-events: none;
}

.lineup-compare-pitch-markings .is-centre {
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.lineup-compare-pitch-markings .is-top,
.lineup-compare-pitch-markings .is-bottom {
  left: 50%;
  width: 45%;
  height: 14%;
  transform: translateX(-50%);
}

.lineup-compare-pitch-markings .is-top {
  top: 20px;
  border-top: 0;
}

.lineup-compare-pitch-markings .is-bottom {
  bottom: 20px;
  border-bottom: 0;
}

.lineup-compare-player {
  position: absolute;
  z-index: 2;
  top: var(--y);
  left: var(--x);
  display: grid;
  justify-items: center;
  width: 96px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.lineup-compare-player-avatar {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
}

.lineup-compare-player-avatar > img,
.lineup-compare-player-avatar > .lineup-compare-silhouette {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.lineup-compare-player-avatar > img {
  object-fit: contain;
  object-position: center bottom;
}

.lineup-compare-player-avatar > .pitch-rating {
  position: absolute;
  z-index: 3;
  top: -4px;
  right: -6px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(7, 23, 34, .72);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .35);
  color: #07111a;
  font-size: 11px;
  font-weight: 950;
}

.lineup-compare-player-avatar > .pitch-position-badge {
  position: absolute;
  z-index: 3;
  bottom: -4px;
  left: 50%;
  display: grid;
  min-width: 30px;
  min-height: 17px;
  padding: 2px 6px;
  place-items: center;
  border: 1px solid rgba(224, 242, 233, .48);
  border-radius: 999px;
  background: #061721;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
  color: #eff8f3;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  transform: translateX(-50%);
}

.lineup-compare-player > strong {
  box-sizing: border-box;
  overflow: hidden;
  max-width: 96px;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(1, 18, 21, .84);
  color: #fff;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-compare-empty-position {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, .62);
  border-radius: 50%;
  background: rgba(3, 35, 34, .55);
  color: #e4f0ec;
  font-size: 11px;
  font-weight: 950;
}

.lineup-compare-bench {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 132px;
  border-top: 1px solid rgba(142, 181, 200, .17);
  background: #05141f;
}

.lineup-compare-bench > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(142, 181, 200, .13);
  color: #d8e7ec;
  font-size: 11px;
}

.lineup-compare-bench > header span {
  font-weight: 950;
  letter-spacing: .07em;
}

.lineup-compare-bench-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 0;
  gap: 1px;
  background: rgba(142, 181, 200, .12);
}

.lineup-compare-bench-row article {
  display: grid;
  min-width: 0;
  min-height: 100px;
  padding: 7px 3px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  overflow: hidden;
  background: #071722;
  text-align: center;
}

.lineup-compare-bench-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
}

.lineup-compare-bench-avatar img,
.lineup-compare-bench-silhouette,
.lineup-compare-bench-empty {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  object-position: center bottom;
}

.lineup-compare-bench-empty {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(142, 181, 200, .45);
  background: rgba(7, 32, 46, .55);
  color: #7e97a3;
  font-size: 8px;
  font-style: normal;
}

.lineup-compare-bench-row strong,
.lineup-compare-bench-row small {
  display: block;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: 0 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-compare-bench-row strong {
  color: #eef7f5;
  font-size: 11px;
}

.lineup-compare-bench-row small {
  color: #8fa5b1;
  font-size: 9px;
}

.lineup-compare-bench-row article.is-empty strong {
  color: #8ca1ab;
}

.lineup-compare-hidden-state {
  display: grid;
  min-height: clamp(600px, 42vw, 790px);
  min-width: 0;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 28px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(41, 77, 91, .22), transparent 46%);
}

.lineup-compare-hidden-state > span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 1px dashed rgba(142, 181, 200, .4);
  border-radius: 50%;
  color: #829ba6;
  font-size: 24px;
  font-weight: 950;
}

.lineup-compare-hidden-state > b {
  font-size: 19px;
}

.lineup-compare-hidden-state > small {
  color: #8fa5b0;
  font-size: 13px;
}

/* A readable, two-team desktop canvas. The browser header takes its natural
   grid row; the comparison then consumes exactly the remaining viewport. */
@media (min-width: 900px) and (min-height: 720px) {
  body.lineup-compare-page {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .lineup-compare-page .site-main {
    width: min(1880px, calc(100% - 24px));
    height: 100%;
    min-height: 0;
    padding: 10px 12px;
    overflow: hidden;
  }

  .lineup-compare-shell {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    gap: clamp(8px, 1dvh, 10px);
  }

  .lineup-compare-context {
    flex: 0 0 auto;
    height: clamp(44px, 5.4dvh, 58px);
    min-height: 0;
    padding-block: 4px;
  }

  .lineup-compare-private-note {
    flex: 0 0 auto;
  }

  .lineup-compare-shell > .feipu-support.is-banner {
    flex: 0 0 auto;
    height: clamp(56px, 7.5dvh, 66px);
  }

  .lineup-compare-grid {
    flex: 1 1 auto;
    width: 100%;
    max-height: 1500px;
    min-height: 0;
    margin-block: auto;
    gap: clamp(8px, 1vw, 16px);
    overflow: visible;
  }

  .lineup-compare-team-card {
    height: 100%;
  }

  .lineup-compare-team-card > header {
    height: clamp(54px, 7dvh, 68px);
    min-height: 0;
    padding-block: 5px;
  }

  .lineup-compare-crest {
    width: clamp(36px, 5dvh, 44px);
    height: clamp(36px, 5dvh, 44px);
  }

  .lineup-compare-pitch,
  .lineup-compare-hidden-state {
    min-height: 0;
  }

  .lineup-compare-player {
    width: clamp(58px, 6vw, 104px);
  }

  .lineup-compare-player-avatar {
    width: clamp(42px, 5.5dvh, 72px);
    height: clamp(42px, 5.5dvh, 72px);
  }

  .lineup-compare-player-avatar > .pitch-rating {
    width: clamp(22px, 3dvh, 30px);
    height: clamp(22px, 3dvh, 30px);
    font-size: clamp(9px, 1.25dvh, 12px);
  }

  .lineup-compare-player-avatar > .pitch-position-badge {
    min-width: clamp(25px, 3.2dvh, 34px);
    min-height: clamp(15px, 2dvh, 19px);
    padding-inline: 4px;
    font-size: clamp(8px, 1.05dvh, 10px);
  }

  .lineup-compare-player > strong {
    max-width: clamp(58px, 6vw, 104px);
    margin-top: 4px;
    padding: 2px 4px;
    font-size: clamp(10px, 1.35dvh, 13px);
  }

  .lineup-compare-empty-position {
    width: clamp(38px, 5.2dvh, 54px);
    height: clamp(38px, 5.2dvh, 54px);
    font-size: clamp(8px, 1.2dvh, 11px);
  }

  .lineup-compare-bench {
    height: clamp(96px, 12.5dvh, 132px);
    min-height: 0;
  }

  .lineup-compare-bench > header {
    min-height: clamp(24px, 3dvh, 30px);
    padding-block: 3px;
  }

  .lineup-compare-bench-row article {
    min-height: 0;
    padding-block: 3px;
    gap: 2px;
  }

  .lineup-compare-bench-avatar {
    width: clamp(36px, 4.8dvh, 58px);
    height: clamp(36px, 4.8dvh, 58px);
  }

  .lineup-compare-bench-row strong {
    font-size: clamp(9px, 1.25dvh, 12px);
  }

  .lineup-compare-bench-row small {
    font-size: clamp(8px, 1dvh, 10px);
  }
}

@media (max-width: 899px) {
  .lineup-compare-page .site-main {
    width: calc(100% - 22px);
    padding-top: 14px;
  }

  .lineup-compare-context {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px 12px;
  }

  .lineup-compare-context > div {
    justify-self: end;
  }

  .lineup-compare-context p {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .lineup-compare-private-note {
    align-items: flex-start;
    flex-direction: column;
    white-space: normal;
  }

  .lineup-compare-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    overflow: visible;
  }

  .lineup-compare-team-card > header {
    min-height: 64px;
    padding: 9px 11px;
  }

  .lineup-compare-team h2 {
    max-width: 50vw;
    font-size: 17px;
  }

  .lineup-compare-crest {
    width: 39px;
    height: 39px;
  }

  .lineup-compare-state > span {
    max-width: 34vw;
    font-size: 9px;
  }

  .lineup-compare-pitch {
    min-height: 620px;
  }

  .lineup-compare-pitch::before {
    inset: 12px;
  }

  .lineup-compare-pitch::after {
    right: 12px;
    left: 12px;
  }

  .lineup-compare-pitch-markings .is-top {
    top: 12px;
  }

  .lineup-compare-pitch-markings .is-bottom {
    bottom: 12px;
  }

  .lineup-compare-player {
    top: var(--mobile-y);
    left: var(--mobile-x);
    width: 58px;
  }

  .lineup-compare-player-avatar {
    width: 42px;
    height: 42px;
  }

  .lineup-compare-player-avatar > .pitch-rating {
    top: -3px;
    right: -3px;
    width: 21px;
    height: 21px;
    font-size: 9px;
  }

  .lineup-compare-player-avatar > .pitch-position-badge {
    min-width: 24px;
    min-height: 15px;
    padding: 1px 4px;
    font-size: 8px;
  }

  .lineup-compare-player > strong {
    max-width: 58px;
    margin-top: 3px;
    padding: 2px 3px;
    font-size: 9px;
  }

  .lineup-compare-empty-position {
    width: 42px;
    height: 42px;
    font-size: 9px;
  }

  .lineup-compare-bench {
    min-height: 96px;
  }

  .lineup-compare-bench-row article {
    min-height: 68px;
    padding: 5px 2px;
  }

  .lineup-compare-bench-avatar {
    width: 38px;
    height: 38px;
  }

  .lineup-compare-bench-row strong {
    font-size: 9px;
  }

  .lineup-compare-bench-row small {
    font-size: 8px;
  }

  .lineup-compare-hidden-state {
    min-height: 420px;
  }
}

@media (max-width: 480px) {
  .lineup-compare-context > div > span {
    display: none;
  }

  .lineup-compare-context h1 {
    font-size: 18px;
  }

  .lineup-compare-context p {
    justify-content: flex-start;
    font-size: 10px;
  }

  .lineup-compare-team h2 {
    max-width: 42vw;
  }

  .lineup-compare-state > b {
    font-size: 9px;
  }

  .lineup-compare-state > span {
    max-width: 31vw;
  }

  .lineup-compare-pitch {
    min-height: 590px;
  }
}

@media (min-width: 2200px) and (min-height: 1100px) {
  .lineup-compare-page .site-main {
    width: min(2460px, calc(100% - 64px));
  }

  .lineup-compare-player {
    width: 118px;
  }

  .lineup-compare-player-avatar {
    width: 78px;
    height: 78px;
  }

  .lineup-compare-player > strong {
    max-width: 118px;
    font-size: 14px;
  }

  .lineup-compare-bench-avatar {
    width: 60px;
    height: 60px;
  }
}

@media (min-width: 3000px) and (min-height: 1400px) {
  .lineup-compare-page .site-main {
    width: min(3200px, calc(100% - 96px));
  }

  .lineup-compare-grid {
    max-height: 1800px;
    margin-block: 0 auto;
  }

  .lineup-compare-player {
    width: 132px;
  }

  .lineup-compare-player-avatar {
    width: 88px;
    height: 88px;
  }

  .lineup-compare-player-avatar > .pitch-rating {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .lineup-compare-player-avatar > .pitch-position-badge {
    min-width: 38px;
    min-height: 21px;
    font-size: 12px;
  }

  .lineup-compare-player > strong {
    max-width: 132px;
    font-size: 16px;
  }

  .lineup-compare-bench-avatar {
    width: 68px;
    height: 68px;
  }

  .lineup-compare-bench-row strong {
    font-size: 14px;
  }

  .lineup-compare-bench-row small {
    font-size: 11px;
  }
}
