.roster-page .nav-links a[aria-current="page"] {
  background: rgba(198, 120, 63, 0.18);
  color: #fff8e6;
}

.roster-page h1 {
  max-width: 680px;
  font-size: clamp(3.1rem, 7vw, 6.1rem);
}

.roster-page .lead {
  max-width: 640px;
}

.roster-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(2.1rem, 4vw, 4rem) 0 clamp(1.7rem, 3vw, 2.6rem);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.roster-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.roster-dashboard-wrap {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.dashboard-tile {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(232, 76, 62, 0.07), rgba(63, 143, 134, 0.04)),
    rgba(255, 255, 255, 0.055);
}

.dashboard-tile span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-tile strong {
  color: #fff7f0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.roster-status {
  position: relative;
  min-width: 64px;
  justify-content: center;
  overflow: hidden;
  padding-inline: 0.62rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.26);
  color: #f3e6d7;
  font-size: 0.78rem;
  font-weight: 850;
  box-shadow:
    inset 3px 0 0 var(--status-accent, rgba(240, 184, 109, 0.72)),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.status-main {
  --status-accent: rgba(63, 143, 134, 0.88);
  border-color: rgba(63, 143, 134, 0.36);
  background: rgba(63, 143, 134, 0.12);
  color: #dffbf5;
}

.status-bench {
  --status-accent: rgba(240, 184, 109, 0.9);
  border-color: rgba(240, 184, 109, 0.38);
  background: rgba(240, 184, 109, 0.12);
  color: #ffe0ad;
}

.status-trial {
  --status-accent: rgba(232, 76, 62, 0.9);
  border-color: rgba(232, 76, 62, 0.42);
  background: rgba(232, 76, 62, 0.13);
  color: #ffd6d1;
}

.roster-controls-section {
  padding: 1.2rem 0;
  border-block: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.team-section {
  scroll-margin-top: calc(var(--header) + 24px);
}

.roster-control-row {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr);
  align-items: center;
  gap: 0.8rem;
}

.roster-search {
  justify-self: stretch;
}

.roster-team-head {
  align-items: start;
}

.team-summary {
  min-width: min(100%, 360px);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.team-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-section.is-hidden {
  display: none;
}

.player-card.is-hidden {
  display: none;
}

.player-card .team-name {
  color: var(--gold-bright);
}

.player-card.class-evoker p {
  color: var(--class);
  font-weight: 800;
}

.player-card header > div {
  min-width: 0;
}

.player-card h3,
.player-card p {
  overflow-wrap: anywhere;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1120px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .roster-hero,
  .roster-control-row {
    grid-template-columns: 1fr;
  }

  .roster-hero {
    padding-top: 2rem;
  }

  .team-summary {
    justify-content: flex-start;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .roster-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roster-page .hero-actions .button {
    width: auto;
    flex: 1 1 calc(50% - 0.65rem);
  }

  .dashboard-tile {
    min-height: 92px;
  }
}
