/* Scalable competitive rank emblems. Suit symbols inherit tier color; no red/black suit coloring. */
.rank-badge.rank-visual{
  --rank-light:#d7dfe2;
  --rank-color:#9aa6ab;
  --rank-dark:#657075;
  --rank-deep:#283136;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--rank-color);
  box-shadow:none;
  font-weight:900;
  letter-spacing:.035em;
  white-space:nowrap;
}
.rank-badge.rank-visual.rank-unranked{--rank-light:#d5dcdf;--rank-color:#8e999e;--rank-dark:#5c666a;--rank-deep:#242b2e}
.rank-badge.rank-visual[class*="rank-bronze-"]{--rank-light:#efb27f;--rank-color:#c78655;--rank-dark:#8d512e;--rank-deep:#422b1c}
.rank-badge.rank-visual[class*="rank-silver-"]{--rank-light:#f7fafb;--rank-color:#cbd4d9;--rank-dark:#8f9ba1;--rank-deep:#353d42}
.rank-badge.rank-visual[class*="rank-gold-"]{--rank-light:#fff0a1;--rank-color:#e7bd45;--rank-dark:#a87413;--rank-deep:#493b15}
.rank-badge.rank-visual[class*="rank-platinum-"]{--rank-light:#b4f4ea;--rank-color:#70c9bf;--rank-dark:#35897f;--rank-deep:#163f3b}
.rank-badge.rank-visual[class*="rank-diamond-"]{--rank-light:#b9e4ff;--rank-color:#5aaaff;--rank-dark:#2868b4;--rank-deep:#173d64}
.rank-badge.rank-visual.rank-master{--rank-light:#d9baff;--rank-color:#a779e4;--rank-dark:#7149ae;--rank-deep:#35224f}
.rank-badge.rank-visual.rank-grandmaster{--rank-light:#ffaaa2;--rank-color:#ef6256;--rank-dark:#a92f29;--rank-deep:#551d19}

.rank-emblem{
  flex:0 0 auto;
  width:44px;
  height:48px;
  overflow:visible;
  filter:drop-shadow(0 4px 7px #0007);
}
.rank-shield{
  fill:var(--rank-deep);
  stroke:var(--rank-color);
  stroke-width:2.35;
  stroke-linejoin:round;
}
.rank-shield-inner{
  fill:none;
  stroke:var(--rank-dark);
  stroke-width:1.2;
  stroke-linejoin:round;
  opacity:.78;
}
.rank-emblem-symbol,.rank-division-symbol{
  fill:var(--rank-light);
  font-family:Georgia,"Times New Roman",serif;
  font-size:25.5px;
  font-weight:700;
}
.rank-division-symbol{
  font-family:Arial,Helvetica,sans-serif;
  font-size:23px;
  font-weight:900;
  letter-spacing:1px;
}
.rank-emblem-gem,.rank-emblem-crown{
  fill:none;
  stroke:var(--rank-light);
  stroke-width:2.5;
  stroke-linejoin:round;
  stroke-linecap:round;
}
.rank-emblem-gem path:first-child{
  fill:var(--rank-color);
  fill-opacity:.23;
}
.rank-emblem-crown path:first-child{
  fill:var(--rank-color);
  fill-opacity:.16;
}
.rank-emblem-crown-grand path:last-child{
  fill:var(--rank-color);
  stroke-width:1.5;
}
.rank-badge-copy{color:var(--rank-color);line-height:1}

.rank-size-large{gap:10px;font-size:18px}
.rank-size-large .rank-emblem{width:64px;height:70px}
.rank-size-medium{font-size:13px}
.rank-size-medium .rank-emblem{width:44px;height:48px}
.rank-size-small{gap:5px;font-size:10px;letter-spacing:.02em}
.rank-size-small .rank-emblem{width:27px;height:30px}

.queue-modal .rank-badge.rank-visual{margin:5px auto 4px;justify-content:center}
.result-rank.rank-visual{margin:12px auto 5px;justify-content:center}
.mini-rank.rank-visual{padding:0;border:0;background:none}
.competitive-title-row .rank-visual{margin-top:-5px}

.account-competitive-rank{
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.account-competitive-rank .rank-size-small{font-size:13px}
.account-competitive-rank .rank-size-small .rank-emblem{width:32px;height:35px}

@media(max-width:800px){
  .competitive-title-row .rank-size-medium .rank-emblem{width:38px;height:42px}
  .competitive-title-row .rank-size-medium{font-size:11px}
}
@media(max-width:520px){
  .rank-size-small .rank-emblem{width:24px;height:27px}
}
/* Badge polish: keep emblem and label optically centered as a single unit. */
.competitive-title-row .rank-badge.rank-visual{
  align-self:center;
  margin-top:0;
}
.rank-badge.rank-visual .rank-emblem{
  display:block;
}
.rank-badge.rank-visual .rank-badge-copy{
  display:inline-flex;
  align-items:center;
  min-height:1.2em;
}
.rank-badge.rank-visual[class*="rank-gold-"] .rank-badge-copy{
  color:#e7bd45;
  background:linear-gradient(180deg,#fff1a6 0%,#edc958 42%,#c68e1b 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}
.rank-badge.rank-visual[class*="rank-gold-"] .rank-emblem{
  filter:drop-shadow(0 3px 5px #0008) drop-shadow(0 0 5px #e7bd4526);
}


/* In-match player cards */
.player-chip-primary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}
.player-chip-name{
  min-width:0;
}
.player-rank-badge{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  margin-left:auto;
}
.player-card-rank{
  gap:4px;
  font-size:9px;
  letter-spacing:.01em;
}
.player-card-rank .rank-emblem{
  width:25px;
  height:28px;
  filter:drop-shadow(0 2px 4px #0006);
}
.player-card-rank .rank-badge-copy{
  max-width:70px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.player-rank-fallback{
  flex:0 0 auto;
  margin-left:auto;
  font-size:9px;
  font-weight:850;
  letter-spacing:.04em;
  color:#d8b75e;
}
@media(max-width:800px){
  .player-card-rank .rank-emblem{width:22px;height:25px}
  .player-card-rank{font-size:8px}
  .player-card-rank .rank-badge-copy{max-width:58px}
}
@media(max-width:430px){
  .player-card-rank .rank-badge-copy{display:none}
  .player-card-rank .rank-emblem{width:23px;height:26px}
}
