.matchup-frame { container-type: size; overflow: hidden; }
.matchup-panel, .matchup-panel * { box-sizing: border-box; }
.matchup-panel {
  position: absolute; inset: 0; overflow: hidden; background: rgb(245 241 232 / var(--matchup-background-alpha, 1)); color: #162421;
  font: 700 2.3cqw/1.15 "OPL Bracket SC", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}
.matchup-header { position: absolute; left: 4.06%; right: 4.06%; top: 16.2%; display: flex; align-items: center; gap: 1.55cqw; }
.matchup-header img { height: 10.5cqh; width: auto; }
.matchup-titles { min-width: 0; display: grid; gap: .7cqh; }
.matchup-title, .matchup-en, .matchup-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.matchup-title { font-size: 3.1cqw; font-weight: 700; }
.matchup-en { font-size: 1.4cqw; color: #52715e; }
.matchup-body { position: absolute; inset: 38.33% 4.06% auto; display: grid; grid-template-columns: minmax(0,1fr) 15% minmax(0,1fr); }
.matchup-team { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .28cqw; }
.matchup-card { min-width: 0; background: #fffdfa; }
.matchup-photo { display: grid; place-items: center; aspect-ratio: 1/.99; background: #dee2dc; color: #778a7c; font-size: 6cqw; }
.matchup-photo img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center 35%; filter: grayscale(1); }
.matchup-sample { background-image: url('/static/matchup-sample.webp'); background-size: 400% 100%; }
.matchup-name, .matchup-position { display: block; padding-inline: 1.15cqw; }
.matchup-name { padding-top: 1.1cqw; }
.matchup-position { padding-block: .7cqw 1.1cqw; font-size: 1cqw; color: #51645c; }
.matchup-versus { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding-block: 4.8cqw 1.5cqw; perspective: 50cqw; }
.matchup-badge { display: grid; width: 5.4cqw; transform-style: preserve-3d; animation: matchup-turn 4s linear infinite; }
.matchup-badge img { grid-area: 1 / 1; width: 100%; height: auto; backface-visibility: hidden; opacity: var(--matchup-badge-alpha, 1); }
.matchup-badge-back { transform: rotateY(180deg); }
.matchup-versus b { font: italic 900 4.6cqw/1 Arial,sans-serif; }
@keyframes matchup-turn { to { transform: rotateY(360deg); } }
.result-panel .matchup-versus { padding-top: 0; }
.result-score { margin: 0; width: 90%; height: 16cqw; padding: 1.4cqw 1.2cqw; background: #eae9df; text-align: center; display: flex; flex-direction: column; gap: .8cqw; }
.result-score figcaption { font: 700 1.05cqw/1.2 Arial, sans-serif; letter-spacing: .12em; color: #52675c; }
.result-sets { margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-auto-rows: 1fr; list-style: none; }
.result-set { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font: 700 min(2.05cqw, calc(10cqw / var(--set-count)))/1 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.result-set i { color: #69776e; font-style: normal; }
@container (max-aspect-ratio: 1/1) {
  .matchup-header { top: 5%; gap: 2.4cqw; }
  .matchup-header img { height: 8cqw; }
  .matchup-title { font-size: 4.1cqw; }
  .matchup-en { font-size: 2.1cqw; }
  .matchup-body { inset: 17% 12% auto; grid-template-columns: 1fr; gap: 2cqh; }
  .matchup-team { gap: .6cqw; }
  .matchup-photo { font-size: 12cqw; }
  .matchup-name { padding-top: 1.3cqw; font-size: 3.8cqw; }
  .matchup-position { font-size: 2cqw; padding-bottom: 1.6cqw; }
  .matchup-versus { flex-direction: row; justify-content: center; gap: 3cqw; padding: 0; }
  .matchup-badge { width: 4.9cqw; }
  .matchup-versus b { font-size: 5.8cqw; }
  .result-score { width: 76%; height: auto; padding: 1.2cqw 2cqw; }
  .result-score figcaption { font-size: 2cqw; }
  .result-sets { display: flex; justify-content: center; flex-wrap: wrap; gap: 1cqw 2cqw; }
  .result-set { font-size: 3.5cqw; gap: .45cqw; }
}
