@font-face {
  font-family: "OPL Bracket SC"; font-weight: 700; font-style: normal; font-display: swap;
  src: local("Noto Sans CJK SC Bold"), url("/static/fonts/bracket-sc-bold.woff2") format("woff2");
}
.bracket-frame { container-type: size; overflow: hidden; }
.bracket-panel, .bracket-panel * { box-sizing: border-box; }
.bracket-panel {
  position: absolute; inset: 12.96% 10.73% 13.43%; overflow: hidden; border-radius: 1cqw;
  transform: scale(var(--bracket-landscape-scale, 1));
  background: rgb(245 241 232 / 76%); color: #162421; font: 700 1cqw/1.12 "OPL Bracket SC", "OPL Noto SC", "Noto Sans CJK SC", sans-serif;
}
.bracket-header {
  position: absolute; inset: 4.8% 3.2% auto; height: 21%; display: flex; align-items: flex-start; gap: .9cqw;
  padding-left: .45cqw; border-bottom: 1px solid #aebdb0;
}
.bracket-header img { height: 69%; width: auto; object-fit: contain; }
.bracket-titles { min-width: 0; height: 69%; display: flex; flex-direction: column; justify-content: center; gap: .35cqh; }
.bracket-zh, .bracket-en { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-zh { font-weight: inherit; font-size: 3.13cqw; letter-spacing: .02em; }
.bracket-en { font-size: 1.33cqw; color: #52715e; }
.bracket-tree { position: absolute; inset: 38.9% 3.2% 2.6%; display: flex; justify-content: space-between; }
.bracket-column { position: relative; width: 25.84%; }
.bracket-heading { position: absolute; bottom: 100%; left: 0; width: 100%; display: grid; gap: 1.4cqh; }
.bracket-caption { display: flex; align-items: center; gap: .6cqw; font-size: 1.2cqw; letter-spacing: .045em; color: #52715e; }
.bracket-caption::before { content: ''; height: .35cqh; width: 1.55cqw; background: #ed6225; }
.bracket-round { font-size: 1.15cqw; }
.bracket-games { height: 100%; display: flex; flex-direction: column; }
.bracket-slot { flex: 1; position: relative; display: grid; align-items: center; min-height: 0; }
.bracket-column:not(:last-child) .bracket-slot::after {
  content: ''; position: absolute; top: 50%; left: 100%; width: 21.75%; height: 50%;
  border-top: max(1px, .08cqw) solid #52715e; border-right: max(1px, .08cqw) solid #52715e;
}
.bracket-column:not(:last-child) .bracket-slot.lower::after { top: 0; border-top: 0; border-bottom: max(1px, .08cqw) solid #52715e; }
.bracket-column:not(:first-child) .bracket-slot::before {
  content: ''; position: absolute; top: 50%; right: 100%; width: 21.9%; border-top: max(1px, .08cqw) solid #52715e;
}
.bracket-card { position: relative; height: 7cqh; display: grid; grid-template-rows: 1fr 1fr;
  background: #fffdfa; border: 1px solid #b9c8ba; border-radius: .3cqw; padding: 0 .62cqw; }
.bracket-row { min-height: 0; position: relative; display: flex; align-items: center; justify-content: space-between; gap: .3cqw; padding: 0 .16cqw; }
.bracket-row + .bracket-row { border-top: 1px solid #c9cec4; }
.bracket-team { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bracket-sets { font-size: 1.12em; }
.bracket-row.winner::before, .bracket-column:last-child .bracket-row::before {
  content: ''; position: absolute; left: -.62cqw; height: 68%; width: .24cqw; background: #52715e; border-radius: .08cqw;
}
.bracket-column:last-child .bracket-card { color: #f5f1e8; background: #23332e; border-color: #23332e; }
.bracket-column:last-child .bracket-row + .bracket-row { border-color: #415149; }
.bracket-column:last-child .bracket-row::before { background: #ed6225; }
@container (orientation: portrait) {
  .bracket-panel { inset: 21% 2%; border-radius: 2cqw; font-size: 1.95cqw; transform: scale(var(--bracket-portrait-scale, 1)); }
  .bracket-header { height: 20%; gap: 1.6cqw; align-items: center; }
  .bracket-header img { max-width: 9%; height: 64%; }
  .bracket-zh { font-size: 4.25cqw; }
  .bracket-en { font-size: 2.2cqw; }
  .bracket-caption { font-size: 1.95cqw; }
  .bracket-round { font-size: 2.4cqw; }
  .bracket-card { height: 4.7cqh; }
  .bracket-team { white-space: normal; overflow-wrap: anywhere; max-height: 2.25em; }
}
#bracket-demo { position: fixed; inset: 0; }

.bracket-row.featured .bracket-team {box-shadow:inset .19em 0 #ea5516; padding-left:.45em}
