.registration-table-wrap {
  width: min(100%, 1120px);
  margin: 2.5rem auto 3.5rem;
  padding: 0 1rem;
}

.registration-table-scroll {
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.registration-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.registration-table-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #e94b5f;
  border-radius: 6px;
  background: #e94b5f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.registration-table-export:hover,
.registration-table-export:focus {
  background: #d83d50;
  border-color: #d83d50;
  color: #fff;
  text-decoration: none;
}

.registration-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
}

.registration-table th,
.registration-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.registration-table th {
  background: #f6f6f6;
  color: #1f1f1f;
  font-weight: 700;
}

.registration-table .registration-table-rank {
  width: 1%;
  text-align: right;
}

.registration-table tbody .registration-table-rank {
  background: inherit;
}

.registration-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 1.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.registration-table-sort-indicator::before {
  content: "↕";
  color: #777;
  font-size: 0.85em;
}

.registration-table-sort[data-sort-direction="asc"] .registration-table-sort-indicator::before {
  content: "↑";
  color: #e94b5f;
}

.registration-table-sort[data-sort-direction="desc"] .registration-table-sort-indicator::before {
  content: "↓";
  color: #e94b5f;
}

.registration-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.registration-table tbody tr:hover {
  background: #fff4f5;
}

.registration-table tbody tr:last-child td,
.registration-table tbody tr:last-child th {
  border-bottom: 0;
}

.registration-table tfoot th,
.registration-table tfoot td {
  border-top: 2px solid #e0e0e0;
  border-bottom: 0;
  background: #f6f6f6;
  font-weight: 700;
}

.registration-table-empty {
  width: min(100%, 1120px);
  margin: 2.5rem auto 3.5rem;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f8f8f8;
}

.registration-team-list {
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.registration-team-list__header,
.registration-team-list__summary {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 8rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}

.registration-team-list__header {
  background: #f6f6f6;
  font-weight: 700;
}

.registration-team-list__item + .registration-team-list__item {
  border-top: 1px solid #e8e8e8;
}

.registration-team-list__summary {
  cursor: pointer;
  list-style: none;
}

.registration-team-list__summary::-webkit-details-marker {
  display: none;
}

.registration-team-list__summary:hover,
.registration-team-list__summary:focus-visible {
  background: #fff4f5;
}

.registration-team-list__summary:focus-visible {
  outline: 2px solid #e94b5f;
  outline-offset: -2px;
}

.registration-team-list__name {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.registration-team-list__name::before {
  content: "▸";
  display: inline-block;
  width: 1.25rem;
  color: #e94b5f;
}

.registration-team-list__item[open] .registration-team-list__name::before {
  content: "▾";
}

.registration-team-list__roster {
  padding: 0 1rem 1rem;
}

.registration-team-roster caption {
  padding: 0.5rem 0;
  text-align: left;
  font-weight: 700;
}

.registration-team-average {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f6f6f6;
}

@media (max-width: 700px) {
  .registration-table-wrap {
    margin-top: 1.5rem;
  }

  .registration-table {
    font-size: 0.95rem;
  }

  .registration-table th,
  .registration-table td {
    padding: 0.75rem 0.8rem;
  }

  .registration-team-list__header,
  .registration-team-list__summary {
    grid-template-columns: 2rem minmax(0, 1fr) 6rem;
    gap: 0.5rem;
    padding: 0.75rem 0.8rem;
  }

  .registration-team-list__roster {
    padding: 0 0.8rem 0.8rem;
  }
}
