.standings-page {
  --tier-panel-raised: #222326;
  --tier-panel-hover: #29241b;
}

.ranking-grid { width: min(calc(100% - 2rem), 1600px); margin-inline: auto; }

.standings-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: .65rem 1.5rem;
  margin: 1.45rem 0 1rem;
  padding: 0;
  border: 0;
}
.standings-heading h1 { margin: 0; font-size: clamp(1.8rem, 3.2vw, 3rem); }
.ranked-count { margin: .35rem 0 0; color: var(--muted); }
.standings-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
  color: var(--muted);
  font-size: .875rem;
}
.server-address { overflow-wrap: anywhere; }
.server-address code { color: var(--ink); }

.standings-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem 1rem;
  margin-bottom: .8rem;
}
.standings-controls .segments {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}
.standings-controls .segments a { min-width: 3rem; padding: .22rem .75rem; text-align: center; }
.standings-controls .segments a[aria-current] { background: #29241b; color: var(--gold); }
.standings-controls .segments a:hover { color: var(--ink); }
.standings-search { display: flex; flex: 0 1 22rem; gap: .375rem; }
.standings-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .35rem .65rem;
  background: var(--panel);
  color: var(--ink);
}
.standings-search input::placeholder { color: var(--muted); }
.standings-search .button {
  min-height: 36px;
  padding: .3rem .75rem;
  border-color: #555148;
  background: #1d1e21;
  font-size: .9rem;
}
.standings-search .button:hover { background: #313035; }
.standings-wrap .match { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 .6rem; }
.standings-wrap .match a { margin: 0; }

.tier-scroll-hint { display: none; }
.tier-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #746443 var(--bg);
}
.tier-scroll:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.tier-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .5rem;
}
.tier-column {
  --tier-heading: #292a2d;
  --tier-edge: var(--gold);
  --tier-text: var(--ink);
  min-width: 0;
  min-height: 9rem;
  border: 1px solid var(--border);
  border-radius: 6px 6px 4px 4px;
  background: var(--panel);
}
.tier-column:nth-child(1) { --tier-heading: #dcb34f; --tier-edge: #f0cc78; --tier-text: #261b09; }
.tier-column:nth-child(2) { --tier-heading: #afbdce; --tier-edge: #d8e2ef; --tier-text: #192333; }
.tier-column:nth-child(3) { --tier-heading: #ba845d; --tier-edge: #e0aa81; --tier-text: #26180e; }
.tier-column h2 {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  min-height: 51px;
  margin: 0;
  border-top: 2px solid var(--tier-edge);
  border-bottom: 1px solid #0004;
  border-radius: 5px 5px 0 0;
  background: var(--tier-heading);
  color: var(--tier-text);
  font-size: 1.5rem;
  font-weight: 800;
}
.tier-trophy {
  width: 1.15rem;
  height: 1.15rem;
  background: currentColor;
  clip-path: polygon(25% 0, 75% 0, 75% 10%, 100% 10%, 100% 38%, 73% 56%, 58% 61%,
    58% 76%, 72% 84%, 72% 100%, 28% 100%, 28% 84%, 42% 76%, 42% 61%, 27% 56%,
    0 38%, 0 10%, 25% 10%, 25% 21%, 11% 21%, 11% 32%, 26% 43%, 25% 21%,
    25% 10%, 75% 10%, 75% 21%, 74% 43%, 89% 32%, 89% 21%, 75% 21%, 75% 10%);
}
.tier-roster { list-style: none; margin: 0; padding: 0; }
.tier-roster li { border-bottom: 1px solid var(--border); background: var(--panel); }
.tier-roster li:nth-child(even) { background: #222326; }
.tier-empty { margin: 0; padding: .7rem .6rem; color: var(--muted); font-size: .875rem; text-align: center; }
.tier-player {
  display: flex;
  align-items: center;
  gap: .375rem;
  min-width: 0;
  min-height: 46px;
  padding: 3px .5rem 3px .375rem;
  border-left: 2px solid color-mix(in srgb, var(--gold) 58%, var(--panel));
  color: var(--ink);
  text-decoration: none;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.tier-player:hover { color: var(--ink); background: #29241b; }
.tier-player:focus-visible { outline-offset: -2px; }
.tier-player .avatar { flex: none; width: 34px; height: 34px; margin-right: .125rem; border-radius: 3px; }
.player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.player-rank, .player-region { flex: none; font-size: .75rem; line-height: 1.15; }
.player-rank {
  padding: .15rem .3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #121316;
  color: var(--ink);
  font-weight: 800;
}
.player-rank.HT {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--border));
  background: color-mix(in srgb, var(--gold) 20%, var(--panel));
  color: #fff;
}
.player-region { color: var(--muted); font-weight: 600; }
.player-region.NA { color: #ff9393; }
.player-region.EU { color: #8fdda4; }
.profile-icon {
  width: .39rem;
  height: .39rem;
  margin-inline: .08rem .12rem;
  flex: none;
  transform: rotate(-45deg);
  border: solid #9cabc4;
  border-width: 0 1.5px 1.5px 0;
}
.tier-player:hover .profile-icon { border-color: var(--ink); }
.standings-page .footer { margin-top: 1.4rem; font-size: .875rem; }

@media (max-width: 82rem) {
  .tier-scroll-hint { display: block; margin: 0 0 .4rem; color: var(--muted); font-size: .875rem; }
  .tier-columns { width: max-content; grid-template-columns: repeat(5, 16rem); }
  .tier-column h2 { position: static; }
}
@media (max-width: 40rem) {
  .standings-heading { margin-top: 1rem; }
  .standings-search { flex: 1 1 100%; }
}
