.tournament { padding-top: 40px; padding-bottom: 56px; scroll-margin-top: 90px; }
.tournament__announcement { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 30px; background: linear-gradient(120deg, #171029f5, #29164be8); border: 1px solid var(--violet); border-radius: 20px; }
.tournament__announcement h2 { font-size: clamp(28px, 4vw, 48px); }
.tournament__date { color: var(--acid); font-size: 18px; font-weight: 800; margin: 10px 0 16px; }
.tournament__prize { flex: 0 0 230px; display: grid; gap: 6px; padding-left: 30px; border-left: 1px solid var(--line); }
.tournament__prize > b { font: 64px var(--display); color: var(--acid); }
.tournament__prize > b small { font-size: 24px; }
.tournament__prize > small { font-size: 11px; color: var(--muted); }
.tournament__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
.tournament__heading > span { font-size: 12px; color: var(--muted); }
.bracket-scroll { position: relative; overflow: hidden; padding: 18px 12px 22px; border: 1px solid var(--line); border-radius: 16px; background: #0b0714d9; }
.tournament-rules { position: relative; z-index: 3; display: block; width: min(560px, 92%); height: auto; margin: 6px auto 14px; border-radius: 10px; border: 1px solid var(--violet); pointer-events: none; }
.bracket { width: 100%; }
.tournament__note { margin: 12px 2px 0; color: var(--muted); font-size: 13px; }
.tournament__note + .tournament__note { margin-top: 4px; }
.tree { position: relative; width: 100%; aspect-ratio: 1112 / 370; color: #d7c8f5; container-type: inline-size; }
.tree-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.bracket-match, .bracket-winner {
  position: absolute; z-index: 1; box-sizing: border-box;
  background: #120b22; border: 2px solid #efe7ff; border-radius: 2px; color: var(--text);
}
.bracket-match { display: flex; flex-direction: column; }
.slot { display: flex; align-items: center; gap: 0.7cqw; min-width: 0; padding: 0 0.7cqw; }
.bracket-match > .slot { flex: 1; }
.bracket-match > .slot + .slot { border-top: 2px solid #efe7ff; }
.slot__ava { flex: none; width: 2.15cqw; height: 2.15cqw; max-width: 26px; max-height: 26px; aspect-ratio: 1; border-radius: 4px; background: #3a2270; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); object-fit: cover; }
.slot__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: clamp(11px, 1.35cqw, 14px); }
.slot__score { flex: none; margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--acid); font-size: clamp(11px, 1.4cqw, 15px); }
.bracket-cup { position: absolute; z-index: 2; left: 59.2%; top: 2.16%; width: 6%; height: 14.05%; object-fit: contain; object-position: left center; pointer-events: none; filter: drop-shadow(0 0 8px rgba(245,193,75,.4)); }
.tree .bracket-match:nth-child(1) { left: 0; top: 29.189%; width: 17.626%; height: 28.108%; }
.tree .bracket-match:nth-child(2) { left: 0; top: 67.027%; width: 17.626%; height: 28.108%; }
.tree .bracket-match:nth-child(3) { left: 20.144%; top: 48.108%; width: 17.626%; height: 28.108%; }
.tree .bracket-winner { left: 42.086%; top: 2.162%; width: 15.827%; height: 14.054%; }
.tree .bracket-match:nth-child(5) { left: 41.007%; top: 18.919%; width: 17.986%; height: 28.108%; }
.tree .bracket-match:nth-child(6) { left: 62.23%; top: 48.108%; width: 17.626%; height: 28.108%; }
.tree .bracket-match:nth-child(7) { left: 82.374%; top: 29.189%; width: 17.626%; height: 28.108%; }
.tree .bracket-match:nth-child(8) { left: 82.374%; top: 67.027%; width: 17.626%; height: 28.108%; }
.tournament__entry { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 26px; margin-top: 20px; border-radius: 16px; background: #171029ee; border: 1px solid var(--line); scroll-margin-top: 90px; }
#tournamentApply[hidden], #tournamentApplyLink[hidden] { display: none !important; }
.tournament__entry p { color: var(--muted); font-size: 13px; }
.tournament-form fieldset { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; min-width: 0; }
.tournament-form label { display: grid; gap: 5px; font-size: 13px; }
.tournament-form input:not([type=checkbox]) { width: 100%; min-width: 0; padding: 10px 12px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.tournament-form input:focus-visible { outline: 2px solid var(--lav); }
.tournament-form__consent { grid-template-columns: auto 1fr; align-items: start; }
.tournament-form__consent input { accent-color: var(--violet); }
.tournament-form fieldset:disabled { opacity: .55; }
.tournament-sent { width: min(520px, 92vw); text-align: center; border: 1px solid var(--violet); background: linear-gradient(120deg, #171029f5, #29164be8); }
.tournament-sent .dlg__body { display: grid; gap: 14px; justify-items: center; }
.tournament-sent__title { color: var(--text); font-family: var(--display); font-size: clamp(22px, 3vw, 34px); line-height: 1.15; }
.tournament-sent p { max-width: 440px; overflow-wrap: anywhere; }
#tournamentMessage { min-height: 1.2em; color: var(--acid); font-weight: 800; }
.tournament .btn { white-space: normal; text-align: center; justify-content: center; }
.tournament [hidden] { display: none !important; }
@media (max-width: 760px) {
  .tournament__announcement { flex-direction: column; align-items: stretch; padding: 20px; gap: 22px; }
  .tournament__prize { flex-basis: auto; border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .tournament__entry { grid-template-columns: 1fr; padding: 18px; gap: 12px; }
  .tournament__heading { display: block; }
  .tournament__heading > span { display: block; margin-top: 8px; }
}
