.roster-grid.cm-player-roster {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.roster-member-card.cm-roster-player { display: block; min-width: 0; padding: 11px 15px; }
.cm-player-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, .9fr) max-content;
  align-items: center;
  column-gap: 18px;
  min-width: 0;
}
.cm-player-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cm-player-person .participant-number { flex: 0 0 20px; text-align: center; }
.cm-player-name { flex: 1; min-width: 0; }
.cm-player-name > strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.cm-player-name > h1 { font-size: clamp(18px, 2.7vw, 24px); overflow-wrap: anywhere; }
.cm-player-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.cm-player-meta .connected-clan-identity { font-size: inherit; }
.cm-player-meta .connected-crest { width: 17px; height: 19px; }
.cm-player-heading .member-league { gap: 7px; }
.cm-player-heading .member-league > div > span { display: none; }
.cm-player-heading .connected-league-icon { flex: 0 0 24px; width: 24px; height: 24px; }
.cm-player-heading .connected-league-icon img { width: 100%; height: 100%; object-fit: contain; }
.cm-player-heading .member-league .metric-badge { width: 21px; height: 21px; }

.roster-member-card.cm-roster-attention { border: 1px solid var(--gold); }
.cm-player-name > .connected-attention-badge {
  display: block;
  width: fit-content;
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.25;
}

.member-profile-hero.cm-profile-hero { display: block; padding: 15px 18px; }
.cm-profile-hero .cm-player-person > .player-avatar { width: 50px; height: 56px; min-width: 50px; }
.cm-profile-hero .member-tracking { margin-top: 11px; padding-top: 10px; }
.cm-player-tag {
  padding: 1px 3px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: inherit;
  overflow-wrap: anywhere;
}
.cm-player-tag:hover { text-decoration: underline; }
.cm-profile-copy-input { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }

.cm-profile-cwl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 12px 15px;
  background: var(--accent-soft);
}
.cm-profile-cwl h2 { font-size: 14px; }
.cm-profile-cwl p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.cm-profile-cwl .button { min-height: 38px; }
.cm-profile-attention { margin-top: 9px; border-color: var(--gold); }
.cm-profile-attention > summary { color: var(--gold); }
.cm-profile-attention ul { margin-block: 8px 0; padding-inline-start: 18px; }
.cm-profile-attention li + li { margin-top: 5px; }
.cm-profile-attention a { color: var(--accent); text-decoration: underline; }

.cm-profile-navigation.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  overflow: visible;
  margin: 10px 0 0;
  padding: 4px;
}
.cm-profile-navigation.segmented > a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 4px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.cm-profile-navigation.segmented > a.selected { background: var(--card); color: var(--text); }
.cm-profile-seasons.segmented { margin-top: 7px; }
.cm-profile-scope { margin: 10px 0; color: var(--muted); font-size: 11px; }

.cm-profile-metrics > a { display: block; min-width: 0; border-right: 1px solid var(--line); }
.cm-profile-metrics > a:last-child { border-right: 0; }
.cm-profile-metrics > a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cm-profile-metrics > a:hover .member-metric { background: var(--accent-soft); }
.cm-profile-metrics > a > .member-metric { height: 100%; border-right: 0; }
.cm-player-profile .member-detail-card { min-width: 0; scroll-margin-top: 70px; }
.cm-profile-events { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 5px; }
.cm-profile-events > summary,
.cm-profile-event > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
  font-size: 12px;
}
.cm-profile-events > summary { color: var(--accent); }
.cm-profile-events summary::-webkit-details-marker { display: none; }
.cm-profile-events > summary svg { width: 14px; height: 14px; transform: rotate(90deg); }
.cm-profile-events[open] > summary svg { transform: rotate(-90deg); }
.cm-profile-event {
  border-top: 1px solid var(--line);
  scroll-margin-top: 70px;
}
.cm-profile-event > summary strong { flex: none; }
.cm-profile-comparison { overflow: hidden; }
.cm-profile-comparison table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cm-profile-comparison :is(th, td) { border-bottom: 1px solid var(--line); padding: 10px; text-align: right; overflow-wrap: anywhere; }
.cm-profile-comparison th:first-child { width: 44%; text-align: left; }
.cm-profile-comparison thead th { color: var(--muted); font-size: 11px; }
.cm-profile-comparison tbody th { color: var(--muted); font-size: 12px; font-weight: 600; }
.cm-profile-comparison tbody tr:last-child > * { border-bottom: 0; }

@media (max-width: 760px) {
  .roster-member-card.cm-roster-player { padding: 10px; }
  .cm-player-heading { column-gap: 8px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) max-content; }
  .cm-player-person { gap: 5px; }
  .cm-player-person .participant-number { flex-basis: 15px; }
  .cm-player-name > strong { font-size: 13px; }
  .cm-player-meta { font-size: 10px; }
  .cm-player-heading .member-league { gap: 4px; }
  .cm-player-heading .member-league > div > strong { font-size: 10px; line-height: 1.32; }
  .cm-player-heading .connected-league-icon { flex-basis: 19px; width: 19px; height: 21px; }
  .member-profile-hero.cm-profile-hero { padding: 12px 10px; }
  .cm-profile-hero .cm-player-person > .player-avatar { width: 38px; height: 44px; min-width: 38px; }
  .member-overview-card .cm-profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-profile-metrics > a { border-bottom: 1px solid var(--line); }
  .cm-profile-metrics > a:nth-child(even) { border-right: 0; }
  .cm-profile-metrics > a:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 410px) {
  .cm-player-heading { grid-template-columns: minmax(0, 1fr) max-content; row-gap: 5px; }
  .cm-player-heading .member-league { grid-row: 2; grid-column: 1; margin-left: 52px; }
  .cm-profile-hero .member-league { margin-left: 43px; }
  .cm-player-heading .roster-th { grid-row: 1 / span 2; grid-column: 2; }
  .cm-profile-cwl { grid-template-columns: auto minmax(0, 1fr); padding: 10px; }
  .cm-profile-cwl .button { grid-column: 2; justify-self: start; }
  .cm-profile-navigation.segmented > a { font-size: 11px; }
}
