/* BloxStrike Cup — light, content-first tournament page. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
}

:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --text: #14161a;
  --muted: #666c78;
  --muted-2: #717784;
  --line: #e6e6e2;
  --line-strong: #d5d5cf;
  --accent: #d92d20;
  --accent-dark: #b42318;
  --ok: #12805c;
  --warn: #b45309;
  --radius: 10px;
  --max: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --match-h: 46px;
  --match-gap: 10px;
  --pair-gap: 24px;
  --line-gap: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

svg {
  display: block;
}

.shell {
  width: min(var(--max), 100% - 40px);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 300;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--muted-2);
}

.btn--sm {
  height: 34px;
  padding: 0 13px;
  font-size: 12.5px;
}

.btn--lg {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
}

.brand__mark svg {
  width: 15px;
  height: 15px;
}

.brand__text span {
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-active {
  border-color: var(--text);
  color: var(--text);
}

/* ---------- event head ---------- */

.event {
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
  background: #0c0e13;
  color: #fff;
}

.event__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0c0e13 url("../assets/hero-poster.jpg") center / cover no-repeat;
}

.event__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(0.75px) saturate(1.05) brightness(0.72);
  transform: scale(1.03);
}

.event__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.94) 0%, rgba(8, 10, 14, 0.82) 46%, rgba(8, 10, 14, 0.6) 100%),
    linear-gradient(0deg, #0c0e13 0%, rgba(12, 14, 19, 0) 40%);
}

.event__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 56px;
  align-items: stretch;
  padding-bottom: 44px;
}

.event__reg {
  width: 100%;
  max-width: 460px;
  align-self: stretch;
  justify-self: end;
}

.event .eyebrow,
.event .meta,
.event .code-hint,
.event .event__note {
  color: rgba(255, 255, 255, 0.56);
}

.event h1,
.event .lede b,
.event .code-label {
  color: #fff;
}

.event .lede {
  color: rgba(255, 255, 255, 0.7);
}

.event .meta li::before {
  background: rgba(255, 255, 255, 0.3);
}

.event .code-field {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.97);
}

.event .code-field input {
  color: var(--text);
}

.event .code-field input::placeholder {
  color: var(--muted-2);
}

.event .code-field:focus-within {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.event .event__side {
  border-left-color: rgba(255, 255, 255, 0.16);
}

.event .event__status {
  color: #4ade80;
}

.event .event-facts {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.event .event-facts div {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.event .event-facts dt {
  color: rgba(255, 255, 255, 0.56);
}

.event .event-facts dd {
  color: #fff;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

.lede b {
  color: var(--text);
  font-weight: 600;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.meta li {
  position: relative;
  padding-left: 14px;
}

.meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  transform: translateY(-50%);
}

.meta li:first-child {
  padding-left: 0;
}

.meta li:first-child::before {
  display: none;
}

.code-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 380px;
  max-width: 100%;
  margin-top: 24px;
}

.code-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.code-field {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 5px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.code-field:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.06);
}

.code-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.code-field input::placeholder {
  color: var(--muted-2);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.code-field__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  flex: none;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.code-field__btn:hover {
  background: var(--accent-dark);
}

.code-hint {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.4;
}

.code-form.is-error .code-field {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.08);
}

.code-form.is-error .code-hint {
  color: var(--accent);
}

.code-form.is-busy .code-field__btn {
  opacity: 0.5;
  pointer-events: none;
}


.event__note {
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 12px;
}

/* ---------- event sidebar ---------- */

.event__side {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.event__status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}

.event__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.event-facts {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.event-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.event-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.event-facts dd {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---------- sections ---------- */

.section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

#teams {
  border-top: 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

h2 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13.5px;
}

.section-head__aside {
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

.section-note {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12px;
}

.section-note span {
  color: var(--muted);
}

/* ---------- teams ---------- */

.teams {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.team-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 56px 52px;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.12s;
}

.team-card:last-child {
  border-bottom: 0;
}

.team-card:hover {
  background: var(--surface-2);
}

.team-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

.team-card__id {
  min-width: 0;
}

.team-card__id b {
  display: block;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card__id span {
  color: var(--muted);
  font-size: 11.5px;
}

.crest {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--c1, #333);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.roster {
  display: flex;
  justify-content: flex-end;
  padding-left: 5px;
}

.roster .member {
  display: flex;
  align-items: center;
  margin-left: -5px;
}

.roster .member:first-child {
  margin-left: 0;
}

.roster .avatar {
  width: 26px;
  height: 26px;
  border: 2px solid var(--surface);
  font-size: 8.5px;
}

.member em {
  display: none;
}

.pill {
  justify-self: end;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.team-card__cta {
  justify-self: end;
  color: var(--muted-2);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.team-card:hover .team-card__cta {
  color: var(--text);
}

/* ---------- bracket ---------- */

.bracket-wrap {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scrollbar-width: thin;
}

.bracket {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 44px;
  min-width: 760px;
}

.round {
  min-width: 0;
}

.round__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round__title em {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.round__body {
  display: flex;
  flex-direction: column;
  height: calc(var(--match-h) * 4 + var(--match-gap) * 2 + var(--pair-gap));
}

.round--qf .round__body {
  justify-content: space-between;
}

.round--sf .round__body,
.round--final .round__body {
  justify-content: center;
}

.pair {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--match-gap);
  --vgap: calc(var(--match-h) + var(--match-gap));
}

.pair--sf {
  gap: calc(var(--match-h) + var(--match-gap) + var(--pair-gap));
  --vgap: calc(var(--match-h) * 2 + var(--match-gap) + var(--pair-gap));
}

.pair::before {
  content: "";
  position: absolute;
  left: calc(100% + var(--line-gap));
  top: calc(var(--match-h) / 2);
  width: 1px;
  height: var(--vgap);
  background: var(--line);
}

.pair::after {
  content: "";
  position: absolute;
  left: calc(100% + var(--line-gap));
  top: 50%;
  width: var(--line-gap);
  height: 1px;
  background: var(--line);
}

.match {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: var(--match-h);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.match:hover {
  border-color: var(--line-strong);
}

.round--qf .match::after,
.round--sf .match::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: var(--line-gap);
  height: 1px;
  background: var(--line);
}

.match--featured {
  border-color: #f0b6b1;
  background: #fffafa;
}

.match__row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  font-size: 12px;
}

.match__row + .match__row {
  border-top: 1px solid var(--line);
}

.match__seed {
  width: 13px;
  flex: none;
  color: var(--muted-2);
  font-size: 10px;
}

.match__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match__badge {
  margin-left: auto;
  color: var(--accent);
  font-size: 10px;
}

.match__score {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 11px;
}

.match__row.is-tbd .match__name,
.match__row.is-tbd .match__score {
  color: var(--muted-2);
}

/* ---------- rules ---------- */

.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel--rules {
  padding-top: 4px;
  padding-bottom: 4px;
}

.rule {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rule:last-child {
  border-bottom: 0;
}

.rule h3 {
  margin-bottom: 2px;
  font-size: 13.5px;
  font-weight: 600;
}

.rule p {
  color: var(--muted);
  font-size: 13px;
}

.rules-side {
  display: grid;
  gap: 16px;
}

.panel__title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schedule {
  display: flex;
  flex-direction: column;
}

.schedule li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.schedule li:last-child {
  border-bottom: 0;
}

.schedule__time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.schedule em {
  display: block;
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: normal;
}

.schedule__dot {
  display: none;
}

.prize-list {
  display: flex;
  flex-direction: column;
}

.prize-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.prize-row:last-child {
  border-bottom: 0;
}

.prize-row span {
  color: var(--muted);
}

.prize-row b {
  font-weight: 600;
}

.prize-row i {
  margin-left: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.panel__foot {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 36px 0 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}

.footer__brand p {
  max-width: 300px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
}

.footer__col h4 {
  margin-bottom: 2px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer__col a,
.footer__col span {
  color: var(--muted);
}

.footer__col a:hover {
  color: var(--text);
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.socials a {
  color: var(--muted);
  font-size: 12px;
}

.socials a:hover {
  color: var(--text);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- avatars ---------- */

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--h, 220) 52% 92%);
  color: hsl(var(--h, 220) 38% 30%);
  font-size: 10px;
  font-weight: 600;
}

.avatar span {
  line-height: 1;
}

.avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--empty {
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  color: var(--muted-2);
}

.avatar--you {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent);
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 22, 0.45);
}

.modal__panel {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(16, 18, 22, 0.18);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.modal__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal__close svg {
  width: 16px;
  height: 16px;
}

#modal-content {
  position: relative;
  z-index: 1;
  animation: modal-in 0.2s ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* team modal */

.tm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
  margin-bottom: 16px;
}

.join-head {
  padding-right: 28px;
  margin-bottom: 14px;
}

.tm-head h2,
.join-head h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.tm-head p,
.join-head p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.join-head p b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tm-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.tm-status strong {
  color: var(--text);
  font-weight: 600;
}

.tm-status b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tm-label {
  display: flex;
  justify-content: space-between;
  margin: 15px 0 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tm-label span {
  color: var(--muted-2);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px 0 16px;
}

.roster-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.roster-slot__stack {
  position: relative;
  display: block;
}

.roster-slot__cap {
  position: absolute;
  right: -3px;
  bottom: -1px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--surface);
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.roster-slot .avatar {
  width: 38px;
  height: 38px;
}

.roster-slot b {
  max-width: 100%;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-slot__handle {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.roster-slot:hover b {
  text-decoration: underline;
}

.roster-slot--empty .avatar--empty {
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}

.join-actions {
  margin-top: 2px;
}

.tm-note {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

.tm-help {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 11px;
}

.tm-help a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* login modal */

.roblox-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.roblox-brand h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.roblox-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
}

.roblox-mark svg {
  width: 15px;
  height: 15px;
}

.roblox-sub {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.field > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.field input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.06);
}

.field__wrap {
  position: relative;
}

.field__wrap input {
  padding-right: 38px;
}

.field__toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.field__toggle svg {
  width: 16px;
  height: 16px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #f5d0cc;
  border-radius: 7px;
  background: #fef6f5;
  color: var(--accent-dark);
  font-size: 12px;
}

.alert svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.secure-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 11px;
}

.secure-line svg {
  width: 12px;
  height: 12px;
}

.modal-note {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.45;
}

.step-card {
  padding-top: 4px;
  text-align: center;
}

.step-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
}

.step-icon svg {
  width: 20px;
  height: 20px;
}

.step-card h2 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.step-card p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.otp {
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.4em;
}

.otp:focus {
  border-color: var(--text);
}

.link-btn {
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text);
}

.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* success */

.success {
  text-align: center;
}

.success__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border: 1px solid #c6f0dc;
  border-radius: 50%;
  background: #ecfdf3;
  color: var(--ok);
}

.success__icon svg {
  width: 20px;
  height: 20px;
}

.success h2 {
  margin-bottom: 6px;
  font-size: 19px;
}

.success > p {
  color: var(--muted);
  font-size: 12.5px;
}

.success__roster {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  padding-left: 6px;
}

.success__roster .avatar {
  width: 34px;
  height: 34px;
  margin-left: -6px;
  border: 2px solid var(--surface);
}

.success__roster .avatar:first-child {
  margin-left: 0;
}

.success__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.success__note {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 9px 14px;
  border-radius: 7px;
  background: var(--text);
  color: #fff;
  font-size: 12.5px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .event__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .event__reg {
    max-width: 480px;
    align-self: start;
    justify-self: start;
  }

  .reg-card {
    height: auto;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .rules-side {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 32px);
  }

  .header__inner {
    height: 56px;
  }

  .event {
    padding-top: 36px;
  }

  .event__video {
    filter: blur(1.5px) saturate(1.05) brightness(0.62);
  }

  .event__media::after {
    background:
      linear-gradient(180deg, rgba(8, 10, 14, 0.82) 0%, rgba(8, 10, 14, 0.92) 70%, #0c0e13 100%);
  }

  .section {
    padding: 40px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .section-head__aside {
    white-space: normal;
  }

  .team-card {
    grid-template-columns: 30px minmax(0, 1fr) auto 48px;
    gap: 10px;
    padding: 10px 12px;
  }

  .roster {
    display: none;
  }

  .team-card__cta {
    font-size: 16px;
  }

  .bracket-wrap {
    padding: 14px;
  }

  .rules-side {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 30px;
  }

  .code-form {
    width: 100%;
  }

  .code-field {
    height: 52px;
  }

  .code-field__btn {
    height: 42px;
    padding: 0 18px;
    font-size: 13px;
  }

  .team-card {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .team-card__cta {
    display: none;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal__panel {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
  }

  .roster-slot .avatar {
    width: 34px;
    height: 34px;
  }

  .success__actions .btn {
    height: 44px;
  }

  .field input,
  #login-form .btn,
  .step-card .btn {
    height: 44px;
  }

}

@media (max-width: 400px) {
  .brand__text {
    font-size: 13px;
  }

  .roster-grid {
    gap: 2px;
  }

  .roster-slot .avatar {
    width: 30px;
    height: 30px;
  }

  .roster-slot b {
    font-size: 8.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .event__video {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- registration ---------- */

.reg-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 4px solid var(--accent);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.9);
}

.reg-card.is-flash {
  animation: reg-flash 1.1s ease;
}

@keyframes reg-flash {
  0%, 100% { box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.9); }
  20% { box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.55), 0 28px 60px -28px rgba(0, 0, 0, 0.9); }
}

.reg-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reg-card__head h2 {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.reg-card__head p {
  margin-top: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.reg-deadline {
  flex: none;
  color: var(--muted-2);
  font-size: 12px;
  white-space: nowrap;
}

.reg-deadline b {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.reg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reg-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.reg-step__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.reg-join-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.reg-join {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  transition: background-color 0.15s;
}

.reg-join:hover {
  background: var(--accent-dark);
}

.reg-join:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.reg-join__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
}

.reg-join__icon svg {
  width: 19px;
  height: 19px;
}

.reg-join__text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.reg-join__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  opacity: 0.82;
}

.reg-join__arrow svg {
  width: 17px;
  height: 17px;
}

.reg-caption {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.reg-field {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reg-field:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.07);
}

.reg-at {
  color: var(--muted-2);
  font-size: 14.5px;
}

.reg-field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 14.5px;
}

.reg-field input::placeholder {
  color: var(--muted-2);
}

.reg-check {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.reg-check:hover {
  border-color: var(--muted-2);
  background: var(--surface);
}

.reg-check:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.reg-check:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.reg-hint {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.reg-hint a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.reg-hint a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

.reg-hint a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 2px;
}

.reg-team {
  padding: 7px 9px;
  border-radius: 6px;
  background: #fdf3e3;
  color: var(--warn);
  font-size: 11.5px;
}

.reg-status {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.reg-status:empty {
  display: none;
}

.reg-status[data-tone="ok"] { color: var(--ok); }
.reg-status[data-tone="pending"] { color: var(--warn); }
.reg-status[data-tone="error"] { color: var(--accent); }
.reg-status[data-tone="busy"] { color: var(--muted); }
.reg-status[data-tone="muted"] { color: var(--muted-2); }

.reg-player {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.reg-player__row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.reg-player__id {
  flex: 1;
  min-width: 0;
}

.reg-player__id b {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reg-player__id span {
  display: block;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reg-player__badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reg-player__badge--ok {
  background: #e7f6ef;
  color: var(--ok);
}

.reg-player__badge--pending {
  background: #fdf3e3;
  color: var(--warn);
}

.reg-player__note {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
}

.avatar--pending {
  opacity: 0.82;
}

.roster-slot__pending {
  position: absolute;
  top: -1px;
  right: -3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--surface);
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.section--tight {
  padding: 36px 0;
}

/* ---------- free agents ---------- */

.free-agents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
}

.free-agents__empty {
  color: var(--muted-2);
  font-size: 12.5px;
}

.free-agent {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.12s;
}

.free-agent:hover {
  border-color: var(--line-strong);
}

.free-agent__name {
  flex: 1;
  min-width: 0;
}

.free-agent__name b {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.free-agent__name span {
  display: block;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.free-agent__badge {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(180, 83, 9, 0.1);
  color: var(--warn);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .reg-card {
    width: 100%;
    padding: 22px;
  }

  .event__reg {
    max-width: 100%;
  }

  .free-agents {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 440px) {
  .reg-card {
    padding: 20px;
  }

  .reg-card__head h2 {
    font-size: 26px;
  }

  .reg-join__text {
    font-size: 14px;
  }

  .reg-field {
    padding: 4px 4px 4px 12px;
  }

  .reg-check {
    height: 48px;
  }

  .free-agents {
    grid-template-columns: 1fr;
  }
}
