.leader-podium {
  margin: 24px 0 28px;
  padding: 22px 20px 0;
  border: 1px solid var(--website-line-60-73-48-1, #3c4930);
  border-radius: 16px;
  background:
    radial-gradient(
      ellipse at 50% 55%,
      var(--website-surface-133-151-77-0_10980392156862745, #85974d1c),
      transparent 65%
    ),
    var(--website-surface-24-29-21-1, #181d15);
  isolation: isolate;
}
.podium-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.podium-heading h2 {
  font: 500 25px var(--display);
  letter-spacing: -0.8px;
  margin: 8px 0 0;
}
.podium-caption {
  color: var(--muted);
  font-size: 11px;
}
.podium-stage {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1fr;
  align-items: end;
  gap: 16px;
  max-width: 950px;
  margin: 22px auto 0;
}
.podium-seat {
  min-width: 0;
  text-align: center;
  position: relative;
}
.podium-place-1 {
  order: 2;
}
.podium-place-2 {
  order: 1;
}
.podium-place-3 {
  order: 3;
}
.podium-person {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  width: 100%;
  padding: 0 4px;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  border-radius: 9px;
}
.podium-person:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.podium-person > .avatar-frame {
  --collection-size: 120px;
  flex-shrink: 0;
}
.podium-place-1 .podium-person > .avatar-frame {
  --collection-size: 146px;
}
.podium-person > .avatar-frame:not(.frame-collection) {
  width: 76px;
  height: 76px;
  margin: 22px 0;
}
.podium-person .avatar-frame:not(.frame-collection) > .avatar {
  width: 100%;
  height: 100%;
  font-size: 27px;
}
.podium-name {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
  min-height: 29px;
  font-size: 14px;
  font-weight: 600;
}
.podium-name .styled-name {
  max-width: 100%;
  justify-content: center;
}
.podium-name .nickname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium-name > small {
  font-size: 7px;
  letter-spacing: 1.4px;
  color: var(--website-ink-213-245-153-1, #d5f599);
}
.podium-name .name-badge {
  font-size: 7px;
}
.podium-coin-slot {
  height: 147px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  padding-bottom: 15px;
  gap: 16px;
}
.podium-coin {
  width: 88px;
  height: 88px;
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
}
.podium-place-1 .podium-coin {
  width: 100px;
  height: 100px;
}
.podium-coin > .coin {
  width: 100%;
  height: 100%;
}
.podium-coin > .mint-render,
.podium-coin > .physical-render {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  max-width: none;
  z-index: 1;
}
.podium-coin.physical-in-play > .coin,
body.mint-v2 .podium-coin.mint-surface > .coin {
  opacity: 0;
}
.podium-coin-name {
  font-size: 8px;
  letter-spacing: 1px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--website-ink-163-178-142-1, #a3b28e);
}
.podium-plinth {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--website-line-118-141-69-0_30196078431372547, #768d454d);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(
    150deg,
    var(--website-surface-64-83-42-0_5215686274509804, #40532a85),
    var(--website-surface-34-45-28-0_7607843137254902, #222d1cc2) 60%,
    var(--website-surface-26-34-22-1, #1a2216)
  );
  box-shadow: inset 0 2px 0 var(--website-shade-201-236-141-0_09019607843137255, #c9ec8d17);
}
.podium-place-1 .podium-plinth {
  height: 120px;
  background: linear-gradient(
    145deg,
    var(--website-surface-114-134-72-0_4117647058823529, #72864869),
    var(--website-surface-54-69-38-0_7019607843137254, #364526b3) 55%,
    var(--website-surface-30-41-24-1, #1e2918)
  );
  border-color: var(--website-line-184-210-117-0_4392156862745098, #b8d27570);
}
.podium-place-3 .podium-plinth {
  height: 80px;
  background: linear-gradient(
    145deg,
    #66553d69,
    var(--website-surface-48-43-32-0_6392156862745098, #302b20a3) 55%,
    var(--website-surface-32-34-23-1, #202217)
  );
  border-color: #c19b5c40;
}
.podium-position {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--website-ink-212-221-188-1, #d4ddbc);
  font-size: 12px;
}
.podium-place-1 .podium-position {
  color: var(--website-ink-233-232-173-1, #e9e8ad);
}
.podium-position svg {
  width: 23px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.podium-position > small {
  font-size: 6px;
  letter-spacing: 0.8px;
  opacity: 0.65;
}
.podium-score {
  font: 500 27px var(--display);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: var(--website-ink-229-247-192-1, #e5f7c0);
}
.podium-metric {
  font-size: 7px;
  letter-spacing: 1.3px;
  color: var(--website-ink-178-196-150-1, #b2c496);
}
.podium-footnote {
  font-size: 9px;
  line-height: 1.5;
  color: var(--website-ink-156-170-142-1, #9caa8e);
  padding: 12px 0;
  margin: 0;
  text-align: center;
  border-top: 1px solid var(--website-line-86-104-59-0_2, #56683b33);
}
.podium-stage[data-count='1'] {
  grid-template-columns: minmax(0, 320px);
  justify-content: center;
}
.podium-stage[data-count='2'] {
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
}
.podium-empty {
  color: var(--muted);
  text-align: center;
  padding: 30px 15px;
}
.pvp-board-panel .leader-podium {
  margin-top: 15px;
}
.pvp-board-panel .podium-score {
  font-size: 22px;
}
.podium-you .podium-plinth {
  box-shadow: inset 0 2px 0 var(--website-shade-213-245-153-0_26666666666666666, #d5f59944);
}
@media (max-width: 700px) {
  .leader-podium {
    padding: 16px 7px 0;
    margin: 17px -3px 20px;
    border-radius: 12px;
  }
  .podium-heading {
    padding: 0 7px;
  }
  .podium-heading h2 {
    font-size: 22px;
  }
  .podium-heading .eyebrow {
    font-size: 7px;
    letter-spacing: 1.1px;
  }
  .podium-caption {
    font-size: 9px;
  }
  .podium-stage {
    gap: 5px;
    grid-template-columns: 1fr 1.05fr 1fr;
    margin-top: 16px;
  }
  .podium-person {
    padding: 0;
    gap: 3px;
  }
  .podium-person > .avatar-frame {
    --collection-size: 88px;
  }
  .podium-place-1 .podium-person > .avatar-frame {
    --collection-size: 102px;
  }
  .podium-person > .avatar-frame:not(.frame-collection) {
    width: 52px;
    height: 52px;
    margin: 18px 0;
  }
  .podium-person .avatar-frame:not(.frame-collection) > .avatar {
    font-size: 21px;
  }
  .podium-name {
    font-size: 10px;
    min-height: 24px;
    gap: 2px;
    width: 100%;
    padding: 0 2px;
  }
  .podium-name .styled-name {
    gap: 2px;
    max-width: 100%;
  }
  .podium-name .nickname {
    max-width: 76px;
  }
  .podium-name .name-badge {
    font-size: 5px;
    padding: 2px;
  }
  .podium-coin-slot {
    height: 111px;
    gap: 12px;
    padding-bottom: 11px;
  }
  .podium-coin {
    width: 57px;
    height: 57px;
  }
  .podium-place-1 .podium-coin {
    width: 65px;
    height: 65px;
  }
  .podium-coin-name {
    font-size: 6px;
    letter-spacing: 0.4px;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .podium-plinth {
    height: 78px;
    border-radius: 8px 8px 0 0;
  }
  .podium-place-1 .podium-plinth {
    height: 98px;
  }
  .podium-place-3 .podium-plinth {
    height: 65px;
  }
  .podium-score {
    font-size: 23px;
  }
  .podium-metric {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .podium-position {
    font-size: 10px;
    gap: 3px;
  }
  .podium-position svg {
    width: 17px;
    height: 15px;
  }
  .podium-position > small {
    font-size: 5px;
  }
  .podium-footnote {
    font-size: 8px;
    padding: 10px 7px;
  }
  .pvp-board-panel .podium-score {
    font-size: 15px;
  }
  .podium-stage[data-count='1'] {
    grid-template-columns: minmax(0, 170px);
  }
  .podium-stage[data-count='2'] {
    grid-template-columns: repeat(2, minmax(0, 150px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .leader-podium * {
    scroll-behavior: auto;
  }
}

#view-rankings .section-heading {
  margin-bottom: 20px;
}
.leaderboard-controls + .leader-podium {
  margin-top: 12px;
}
.podium-seat {
  --podium-avatar: 120px;
}
.podium-place-1 {
  --podium-avatar: 146px;
}
.leader-podium .podium-person > .avatar-frame.frame-collection.large-frame {
  --collection-size: var(--podium-avatar);
}
@media (max-width: 700px) {
  .podium-seat {
    --podium-avatar: 88px;
  }
  .podium-place-1 {
    --podium-avatar: 102px;
  }
}

/* Profile and coin share a row; the ornament stays anchored while the coin turns. */
.podium-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2px;
  min-height: 205px;
  padding-bottom: 18px;
}
.podium-coin-slot {
  height: auto;
  min-width: 0;
  min-height: 160px;
  justify-content: center;
  padding: 0;
  gap: 23px;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
}
.podium-coin-slot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.podium-coin {
  display: block;
}
.podium-person {
  position: relative;
  z-index: 2;
}
.podium-coin-slot {
  position: relative;
  z-index: 1;
}
.profile-coin-showcase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 10px;
  padding: 12px 14px;
  min-height: 184px;
  border: 1px solid var(--website-line-97-115-68-0_3333333333333333, #61734455);
  border-radius: 12px;
  background:
    radial-gradient(
      ellipse at 80% 50%,
      var(--website-surface-113-137-72-0_13333333333333333, #71894822),
      transparent 70%
    ),
    var(--website-surface-23-30-21-1, #171e15);
}
.profile-coin-showcase h3 {
  margin: 7px 0;
  font-size: 22px;
}
.profile-coin-showcase p {
  font-size: 10px;
  color: var(--muted);
  max-width: 120px;
  line-height: 1.5;
}
.profile-showcase-coin {
  display: block;
  position: relative;
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  isolation: isolate;
}
.profile-showcase-coin > .coin {
  width: 100%;
  height: 100%;
}
.profile-showcase-coin > .mint-render,
.profile-showcase-coin > .physical-render {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  max-width: none;
  z-index: 1;
}
.profile-showcase-coin.physical-in-play > .coin,
body.mint-v2 .profile-showcase-coin.mint-surface > .coin {
  opacity: 0;
}
@media (max-width: 1100px) and (min-width: 701px) {
  .podium-seat {
    --podium-avatar: 100px;
  }
  .podium-place-1 {
    --podium-avatar: 114px;
  }
  .podium-coin {
    width: 74px;
    height: 74px;
  }
  .podium-place-1 .podium-coin {
    width: 86px;
    height: 86px;
  }
  .podium-name {
    font-size: 11px;
  }
}
@media (max-width: 700px) {
  .podium-stage,
  .podium-stage[data-count='1'],
  .podium-stage[data-count='2'] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    margin-top: 12px;
  }
  .podium-seat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    align-items: center;
    --podium-avatar: 100px;
    border-top: 1px solid var(--website-line-101-116-69-0_18823529411764706, #65744530);
  }
  .podium-place-1 {
    order: 1;
    --podium-avatar: 112px;
    border-top: 0;
  }
  .podium-place-2 {
    order: 2;
  }
  .podium-place-3 {
    order: 3;
  }
  .podium-display {
    min-height: 150px;
    padding: 6px 4px;
    gap: 3px;
  }
  .podium-person {
    gap: 0;
  }
  .podium-name {
    font-size: 11px;
    min-height: 22px;
  }
  .podium-name .nickname {
    max-width: 90px;
  }
  .podium-coin-slot {
    min-height: 120px;
    gap: 20px;
  }
  .podium-coin {
    width: 70px;
    height: 70px;
  }
  .podium-place-1 .podium-coin {
    width: 76px;
    height: 76px;
  }
  .podium-coin-name {
    font-size: 7px;
  }
  .podium-plinth,
  .podium-place-1 .podium-plinth,
  .podium-place-3 .podium-plinth {
    height: 102px;
    border: 1px solid var(--website-line-118-141-69-0_30196078431372547, #768d454d);
    border-radius: 10px;
    margin: 4px;
  }
  .pvp-board-panel .podium-score {
    font-size: 14px;
  }
  .podium-score {
    font-size: 25px;
  }
  .podium-metric {
    font-size: 6px;
    letter-spacing: 0.4px;
  }
  .profile-showcase-coin {
    width: 110px;
    height: 110px;
  }
  .profile-coin-showcase {
    padding: 12px;
    min-height: 168px;
  }
}

@media (min-width: 701px) {
  .podium-name {
    font-size: 12px;
  }
  .podium-name .name-badge {
    font-size: 6px;
  }
  .podium-name .styled-name {
    gap: 3px;
  }
}

/* Shared graphic row and label row keep the two identities precisely parallel. */
.podium-seat {
  --podium-avatar: 136px;
  --podium-media: 174px;
  --podium-coin: 104px;
  --pair-width: 250px;
}
.podium-place-1 {
  --podium-avatar: 160px;
  --podium-media: 190px;
  --podium-coin: 116px;
  --pair-width: 280px;
}
.podium-display {
  width: min(100%, var(--pair-width));
  max-width: 100%;
  margin: 0 auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  padding: 0 0 14px;
}
.podium-display:has(.coin-frame-equipped) {
  --pair-width: 284px;
  --podium-coin: 96px;
}
.podium-place-1 .podium-display:has(.coin-frame-equipped) {
  --pair-width: 316px;
  --podium-coin: 108px;
}
.leader-podium .podium-person,
.leader-podium .podium-coin-slot {
  display: grid;
  grid-template-rows: var(--podium-media) 30px;
  row-gap: 2px;
  align-items: center;
  justify-items: center;
  min-height: 0;
  height: auto;
  padding: 0;
  width: 100%;
  gap: 0;
  align-self: start;
}
.leader-podium .podium-person > .avatar-frame.frame-collection.large-frame {
  --collection-size: var(--podium-avatar);
}
.leader-podium .podium-person > .avatar-frame:not(.frame-collection) {
  width: 84px;
  height: 84px;
  margin: 0;
}
.podium-person > .avatar-frame,
.podium-coin-slot > .podium-coin {
  grid-row: 1;
  align-self: center;
}
.leader-podium .podium-coin {
  width: var(--podium-coin);
  height: var(--podium-coin);
}
.leader-podium .podium-name,
.leader-podium .podium-coin-name {
  grid-row: 2;
  align-self: center;
  justify-self: center;
  min-height: 24px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.leader-podium .podium-name {
  font-size: 11px;
  width: max-content;
  max-width: 160px;
  gap: 2px;
}
.leader-podium .podium-name .styled-name {
  max-width: 160px;
  gap: 2px;
}
.leader-podium .podium-name .nickname {
  max-width: 110px;
}
.leader-podium .podium-coin-name {
  font-size: 9px;
  letter-spacing: 0.6px;
}
.profile-showcase-coin {
  width: 134px;
  height: 134px;
}

/* Match the metal trim to the actual rank, including shared places. */
.leader-podium .podium-seat[data-podium-rank='1'] {
  --medal-top: #e7ca8a;
  --medal-middle: #aa8548;
  --medal-bottom: #695031;
  --medal-recess: #392e21;
  --medal-line: #d9b969;
  --medal-ink: #fff0b5;
  --medal-muted: #ddcea6;
}
.leader-podium .podium-seat[data-podium-rank='2'] {
  --medal-top: #c4d5e1;
  --medal-middle: #8398ab;
  --medal-bottom: #455a6b;
  --medal-recess: #263440;
  --medal-line: #aebfcf;
  --medal-ink: var(--website-ink-239-246-255-1, #eff6ff);
  --medal-muted: #c9d6e2;
}
.leader-podium .podium-seat[data-podium-rank='3'] {
  --medal-top: #d5a083;
  --medal-middle: #a67152;
  --medal-bottom: #694330;
  --medal-recess: #382820;
  --medal-line: #c18e67;
  --medal-ink: #ffe0c5;
  --medal-muted: #dec2aa;
}
.leader-podium .podium-seat:is([data-podium-rank='1'], [data-podium-rank='2'], [data-podium-rank='3']) .podium-plinth {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(
      90deg,
      var(--website-surface-6-7-7-0_28627450980392155, #06070749),
      transparent 12% 89%,
      var(--website-surface-6-7-7-0_30980392156862746, #0607074f)
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 2px,
      var(--website-surface-255-255-255-0_03529411764705882, #ffffff09) 2px 3px,
      var(--website-surface-0-0-0-0_03137254901960784, #00000008) 3px 4px
    ),
    linear-gradient(165deg, var(--medal-top), var(--medal-middle) 46%, var(--medal-bottom));
  border-color: var(--medal-line);
  box-shadow:
    inset 0 1px 0 var(--website-shade-255-255-255-0_16862745098039217, #ffffff2b),
    inset 0 0 18px var(--website-shade-255-255-255-0_0196078431372549, #ffffff05);
}
.leader-podium
  .podium-seat:is([data-podium-rank='1'], [data-podium-rank='2'], [data-podium-rank='3'])
  .podium-plinth::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: clamp(3px, calc(18% - 10px), 15px) clamp(3px, 5%, 11px);
  inset-inline: clamp(3px, calc(12% - 7px), 32px);
  padding: 1px;
  border: 1px solid transparent;
  border-radius: 5px;
  background:
    radial-gradient(ellipse at center, #101317eb, #1316199c 48%, transparent) content-box,
    radial-gradient(circle at 1.5px 1.5px, #ffffff33 0 0.65px, #05070a66 0.75px 1.3px, transparent 1.5px) 0 0 / 5px 5px
      repeat content-box,
    linear-gradient(150deg, color-mix(in srgb, var(--medal-recess) 72%, var(--medal-middle)), #191c21 92%) content-box,
    linear-gradient(172deg, var(--medal-recess), #121519 42%, var(--medal-middle)) padding-box,
    linear-gradient(165deg, #101316 12%, var(--medal-recess) 32%, var(--medal-top) 94%) border-box;
  box-shadow:
    inset 0 3px 6px #0009,
    0 1px 0 #ffffff2b;
  pointer-events: none;
}
.leader-podium
  .podium-seat:is([data-podium-rank='1'], [data-podium-rank='2'], [data-podium-rank='3'])
  :is(.podium-position, .podium-score) {
  color: var(--medal-ink);
}
.leader-podium .podium-seat:is([data-podium-rank='1'], [data-podium-rank='2'], [data-podium-rank='3']) .podium-metric {
  color: var(--medal-muted);
}
.leader-podium .podium-coin-slot > .podium-coin {
  translate: 0 6px;
}
@media (max-width: 1100px) and (min-width: 701px) {
  .podium-seat {
    --podium-avatar: 120px;
    --podium-media: 158px;
    --podium-coin: 94px;
  }
  .podium-place-1 {
    --podium-avatar: 136px;
    --podium-media: 172px;
    --podium-coin: 104px;
  }
  .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 86px;
  }
  .podium-place-1 .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 96px;
  }
}
@media (max-width: 700px) {
  .podium-seat {
    grid-template-columns: minmax(0, 1fr) 76px;
    --podium-avatar: 108px;
    --podium-media: 122px;
    --podium-coin: 80px;
    --pair-width: 244px;
  }
  .podium-place-1 {
    --podium-avatar: 120px;
    --podium-media: 134px;
    --podium-coin: 88px;
  }
  .podium-display {
    padding: 5px 0;
    min-height: 0;
  }
  .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 78px;
    --pair-width: 252px;
  }
  .podium-place-1 .podium-display:has(.coin-frame-equipped) {
    --podium-coin: 84px;
    --pair-width: 268px;
  }
  .leader-podium .podium-person,
  .leader-podium .podium-coin-slot {
    grid-template-rows: var(--podium-media) 26px;
  }
  .leader-podium .podium-person {
    grid-template-rows: var(--podium-media) minmax(38px, auto);
  }
  .leader-podium .podium-person > .avatar-frame:not(.frame-collection) {
    width: 60px;
    height: 60px;
  }
  .leader-podium .podium-name {
    max-width: 132px;
    font-size: 10px;
  }
  .leader-podium .podium-name .styled-name {
    max-width: 132px;
  }
  .leader-podium .podium-name .nickname {
    max-width: 96px;
  }
  .leader-podium .podium-coin-name {
    font-size: 8px;
  }
  .profile-showcase-coin {
    width: 120px;
    height: 120px;
  }
}

/* Leaderboard reading hierarchy: actual shared rank, primary score, identity. */
:is(#view-rankings, #pvp-leaderboard) th {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--website-ink-185-199-169-1, #b9c7a9);
  font-weight: 600;
}
:is(#leaderboard-body, #pvp-board-body) > tr > td {
  font-size: 14px;
  color: var(--website-ink-227-234-219-1, #e3eadb);
  font-variant-numeric: tabular-nums;
}
:is(#leaderboard-body, #pvp-board-body) > tr > td:first-child {
  color: var(--website-ink-182-196-167-1, #b6c4a7);
  font-size: 16px;
  font-weight: 550;
}
.leader-rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  border-radius: 7px;
}
:is(#leaderboard-body, #pvp-board-body) > tr[data-rank='1'] {
  --place-ink: #ebd89d;
  --place-tint: #ead3990b;
  --place-line: #d9c38038;
}
:is(#leaderboard-body, #pvp-board-body) > tr[data-rank='2'] {
  --place-ink: var(--website-ink-213-225-224-1, #d5e1e0);
  --place-tint: #d4e3e609;
  --place-line: #c1d4d530;
}
:is(#leaderboard-body, #pvp-board-body) > tr[data-rank='3'] {
  --place-ink: #d9b89a;
  --place-tint: #d6af8b09;
  --place-line: #c9a68630;
}
:is(#leaderboard-body, #pvp-board-body) > tr:is([data-rank='1'], [data-rank='2'], [data-rank='3']) .leader-rank-number {
  color: var(--place-ink);
  background: var(--place-tint);
  box-shadow: inset 0 0 0 1px var(--place-line);
  font-size: 18px;
  font-weight: 650;
}
:is(#leaderboard-body, #pvp-board-body) > tr > td:nth-child(3) {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 550;
  color: var(--website-ink-230-240-216-1, #e6f0d8);
}
:is(#leaderboard-body, #pvp-board-body) > tr:is([data-rank='1'], [data-rank='2'], [data-rank='3']) > td:nth-child(3) {
  font-size: 23px;
  color: var(--place-ink);
  font-weight: 600;
  text-shadow: 0 0 14px var(--website-shade-225-235-207-0_07058823529411765, #e1ebcf12);
}
:is(#leaderboard-body, #pvp-board-body) .table-name {
  gap: 16px;
  min-height: 92px;
  font-size: 14px;
}
:is(#leaderboard-body, #pvp-board-body) .table-name > .avatar-frame.frame-collection {
  --collection-size: 92px;
}
:is(#leaderboard-body, #pvp-board-body) .table-name > .avatar-frame:not(.frame-collection) > .avatar {
  width: 40px;
  height: 40px;
  font-size: 17px;
}
:is(#leaderboard-body, #pvp-board-body) > tr.you-row > td {
  color: var(--website-ink-220-245-182-1, #dcf5b6);
}
#view-rankings .period-range,
#view-rankings .wide-card > .subtle,
#pvp-board-period,
#pvp-leaderboard > .subtle {
  font-size: 12px;
  line-height: 1.65;
  color: var(--website-ink-182-195-166-1, #b6c3a6);
}
:is(#view-rankings, #pvp-leaderboard) .segmented button {
  color: var(--website-ink-189-201-178-1, #bdc9b2);
}
:is(#view-rankings, #pvp-leaderboard) .segmented button.selected {
  color: var(--website-ink-239-248-229-1, #eff8e5);
}
.leader-podium .podium-caption {
  color: var(--website-ink-179-193-164-1, #b3c1a4);
}
.leader-podium .podium-footnote {
  color: var(--website-ink-175-190-160-1, #afbea0);
  font-size: 10px;
}
.leader-podium .podium-metric {
  color: var(--website-ink-191-206-170-1, #bfceaa);
}
.leader-podium .podium-coin-name {
  color: var(--website-ink-189-203-169-1, #bdcba9);
}
@media (max-width: 700px) {
  :is(#leaderboard-body, #pvp-board-body) .table-name {
    gap: 7px;
    min-height: 82px;
  }
  :is(#leaderboard-body, #pvp-board-body) .table-name > .avatar-frame.frame-collection {
    --collection-size: 82px;
  }
  :is(#leaderboard-body, #pvp-board-body) .table-name > .avatar-frame:not(.frame-collection) > .avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  :is(#view-rankings, #pvp-leaderboard) th {
    font-size: 10px;
    letter-spacing: 0.3px;
  }
  :is(#leaderboard-body, #pvp-board-body) > tr > td {
    font-size: 13px;
  }
  :is(#leaderboard-body, #pvp-board-body) > tr > td:first-child {
    font-size: 15px;
  }
  .leader-rank-number {
    min-width: 29px;
    min-height: 28px;
  }
  :is(#leaderboard-body, #pvp-board-body)
    > tr:is([data-rank='1'], [data-rank='2'], [data-rank='3'])
    .leader-rank-number {
    font-size: 17px;
  }
  :is(#leaderboard-body, #pvp-board-body) > tr > td:nth-child(3) {
    font-size: 20px;
  }
  :is(#leaderboard-body, #pvp-board-body) > tr:is([data-rank='1'], [data-rank='2'], [data-rank='3']) > td:nth-child(3) {
    font-size: 22px;
  }
  .leader-podium .podium-footnote {
    font-size: 9px;
  }
}

@media (min-width: 701px) {
  :is(#leaderboard-body, #pvp-board-body) .table-name > .styled-name {
    font-size: 14px;
  }
}

@media (max-width: 700px) {
  #pvp-board-body .table-name {
    min-height: 48px;
  }
}

/* Aligned Ranked standings and the personal summaries, independent of the table cap. */
#view-rankings table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
#view-rankings :is(th, td) {
  text-align: center;
  vertical-align: middle;
}
#view-rankings :is(th, td):nth-child(2) {
  text-align: left;
  width: 48%;
}
#view-rankings :is(th, td):first-child {
  width: 8%;
}
#view-rankings th {
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: normal;
}
#view-rankings #leaderboard-body .table-name {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: left;
}
#view-rankings #leaderboard-body .table-name > .styled-name {
  min-width: 0;
  flex: 1;
  text-align: left;
}
#view-rankings #leaderboard-body .nickname {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.your-ranking-card {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--website-line-76-92-60-1, #4c5c3c);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--website-surface-43-53-33-1, #2b3521),
    var(--website-surface-27-34-24-1, #1b2218)
  );
  color: var(--website-ink-232-240-222-1, #e8f0de);
  min-width: 0;
}
.your-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.your-ranking-heading h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
}
.your-ranking-heading > span {
  font-size: 11px;
  color: var(--website-ink-190-203-176-1, #becbb0);
  text-align: right;
}
.your-ranking-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.your-ranking-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  flex: 1;
}
.your-ranking-person > .avatar-frame.frame-collection {
  --collection-size: 64px;
  flex-shrink: 0;
}
.your-ranking-person > .styled-name {
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.your-ranking-person .nickname {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.your-ranking-position {
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.your-ranking-position > span {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--website-ink-190-203-176-1, #becbb0);
}
.your-ranking-position > strong {
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.2;
  color: var(--website-ink-213-246-159-1, #d5f69f);
}
.your-ranking-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--website-line-70-85-58-1, #46553a);
  gap: 8px;
  text-align: center;
}
.your-ranking-stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  min-width: 0;
}
.your-ranking-stats dt {
  font-size: 11px;
  color: var(--website-ink-190-203-176-1, #becbb0);
  line-height: 1.3;
}
.your-ranking-stats dd {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  margin: 0;
  line-height: 1.2;
  font-family: var(--display);
}
@media (max-width: 700px) {
  #view-rankings :is(th, td) {
    padding-left: 3px;
    padding-right: 3px;
    text-align: center;
  }
  #view-rankings :is(th, td):first-child {
    width: 32px;
  }
  #view-rankings :is(th, td):nth-child(2) {
    width: auto;
    text-align: left;
  }
  #view-rankings :is(th, td):nth-child(3) {
    width: 58px;
    text-align: center;
  }
  #view-rankings :is(th, td):nth-child(4) {
    width: 48px;
    text-align: center;
  }
  #view-rankings :is(th, td):nth-child(5) {
    display: none;
  }
  #view-rankings th {
    height: 46px;
    font-size: 9px;
    letter-spacing: 0;
    line-height: 13px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #view-rankings #leaderboard-body .table-name {
    gap: 6px;
    min-height: 70px;
    overflow: visible;
  }
  #view-rankings #leaderboard-body .table-name > .avatar-frame.frame-collection {
    --collection-size: 64px;
    flex-shrink: 0;
  }
  #view-rankings #leaderboard-body .table-name > .styled-name {
    font-size: 11px;
    line-height: 14px;
    padding: 4px;
    align-self: center;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  #view-rankings #leaderboard-body .nickname {
    white-space: nowrap;
    overflow-wrap: normal;
    line-height: 14px;
  }
  #view-rankings #leaderboard-body .display-badges {
    justify-content: flex-start;
    max-width: 100%;
  }
  #view-rankings #leaderboard-body .name-badge {
    font-size: 6px;
    letter-spacing: 0;
    padding: 2px 3px;
  }
  #view-rankings #leaderboard-body .leader-rank-number {
    min-width: 25px;
    min-height: 26px;
    font-size: 15px;
  }
  .your-ranking-card {
    padding: 13px;
    margin: 14px 0;
  }
  .your-ranking-heading h3 {
    font-size: 15px;
  }
  .your-ranking-heading > span {
    font-size: 10px;
  }
}

/* Desktop uses the same standings, with a wider compact personal summary. */
@media (min-width: 701px) {
  .your-ranking-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.2fr);
    column-gap: 28px;
    row-gap: 8px;
    padding: 18px 20px;
  }
  .your-ranking-heading {
    grid-column: 1/-1;
    margin: 0 0 3px;
  }
  .your-ranking-heading h3 {
    font-size: 17px;
  }
  .your-ranking-heading > span {
    font-size: 12px;
  }
  .your-ranking-identity {
    min-width: 0;
  }
  .your-ranking-person > .avatar-frame.frame-collection {
    --collection-size: 72px;
  }
  .your-ranking-person > .styled-name {
    font-size: 14px;
  }
  .your-ranking-position > strong {
    font-size: 30px;
  }
  .your-ranking-stats {
    margin: 0;
    padding: 5px 0 5px 24px;
    border-top: 0;
    border-left: 1px solid var(--website-line-70-85-58-1, #46553a);
    align-content: center;
  }
  .your-ranking-stats dd {
    font-size: 28px;
  }
  .your-ranking-stats dt {
    font-size: 12px;
  }
  #view-rankings #leaderboard-body .table-name > .styled-name {
    flex: 0 1 auto;
    max-width: 260px;
    gap: 7px;
  }
  #view-rankings :is(th, td) {
    padding-left: 10px;
    padding-right: 10px;
  }
  #view-rankings th {
    font-size: 11px;
    line-height: 16px;
  }
  #view-rankings #leaderboard-body > tr > td {
    font-size: 15px;
  }
  #view-rankings #leaderboard-body > tr > td:nth-child(3) {
    font-size: 23px;
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .your-ranking-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 16px;
  }
  .your-ranking-stats {
    border-left: 0;
    border-top: 1px solid var(--website-line-70-85-58-1, #46553a);
    padding: 12px 0 0;
  }
}

.leader-podium .podium-position > .podium-period-icon {
  width: 17px;
  height: 17px;
}

@media (min-width: 951px), (min-width: 701px) and (min-height: 501px) {
  #pvp-your-ranking .your-ranking-person {
    flex: 0 1 auto;
    margin-inline-end: auto;
    transform-origin: left center;
    scale: 1.15;
  }
}

/* Mobile podium layout shared by Ranked and PvP. */
.podium-period-actions {
  display: contents;
}
.podium-mobile-rewards:empty {
  display: none;
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 500px) {
  /* Match the detached Rankings filters and use the same inset for both podiums. */
  body.restored-ui-active #view-battles > #pvp-leaderboard {
    background: transparent;
    border: 0;
    padding: 0;
  }
  body.restored-ui-active :is(#view-rankings .leaderboard-controls, #pvp-leaderboard > .pvp-board-controls) {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: stretch;
    gap: 7px;
    margin-block: 14px 18px;
  }
  body.restored-ui-active
    :is(#view-rankings .leaderboard-controls, #pvp-leaderboard > .pvp-board-controls)
    > .segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    padding: 4px;
  }
  body.restored-ui-active :is(#view-rankings .leaderboard-controls, #pvp-leaderboard > .pvp-board-controls) button {
    min-width: 0;
    padding-inline: 2px;
    border-radius: 8px;
  }

  /* Grow the visible art inside the existing nameplate slots. */
  :is(#ranked-podium, #pvp-podium) .nameplate-membership .membership-emblem {
    scale: 1.2;
  }
  body.restored-ui-active :is(#ranked-podium, #pvp-podium).leader-podium {
    width: calc(100% - 12px);
    padding: 12px 8px 8px;
    box-sizing: border-box;
    margin: 14px auto 24px;
  }

  :is(#ranked-podium, #pvp-podium) .podium-heading {
    padding-inline: 3px;
  }

  :is(#ranked-podium, #pvp-podium) .podium-heading h2 {
    font-size: clamp(18px, 7cqi, 25px);
    margin-top: 4px;
  }

  :is(#ranked-podium, #pvp-podium) .podium-heading .podium-caption {
    display: none;
  }

  .podium-period-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
  }

  #view-rankings .podium-period-actions .period-range {
    margin-top: 0;
  }

  .podium-mobile-rewards {
    flex-shrink: 0;
    margin-inline-start: auto;
  }

  .podium-mobile-rewards .podium-rewards-button {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
  }

  #view-battles .pvp-board-footer > [data-social-action='full-pvp-rankings'] {
    flex: 1 1 0;
    width: auto;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage {
    --podium-framed-portrait: 0.436;
    --podium-simple-portrait: calc(var(--podium-framed-portrait) * 1.2);
    --podium-step: clamp(6px, 2.25cqi, 11px);
    --podium-lower-step: clamp(3px, 1.15cqi, 5px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: stretch;
    gap: 4px;
    margin: 4px auto 0;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage > .podium-seat {
    --podium-tier: 1;
    --podium-avatar: calc(clamp(68px, 31cqi, 148px) * 0.964);
    --podium-coin-size: calc(clamp(45px, 19cqi, 94px) * 1.133);
    --podium-media: clamp(63px, 25.5cqi, 126px);
    --podium-coin-row: clamp(62px, 25cqi, 126px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-row: 1 / -1;
    align-items: stretch;
    padding: 0;
    border: 0;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage > .podium-place-1 {
    --podium-tier: 0;
    --podium-avatar: calc(clamp(74px, 34cqi, 164px) * 0.964);
    --podium-coin-size: calc(clamp(48px, 20cqi, 101px) * 1.133);
    grid-column: 2;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage > .podium-place-2 {
    grid-column: 1;
  }
  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage > .podium-place-3 {
    --podium-tier: 2;
    grid-column: 3;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-display {
    --podium-coin: var(--podium-coin-size);
    display: contents;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage :is(.podium-person, .podium-coin-slot) {
    grid-column: 1;
    min-width: 0;
    grid-template-rows: var(--podium-media) auto;
    row-gap: 1px;
    padding: 0;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-person {
    grid-row: 1;
    padding-top: calc(var(--podium-step) * var(--podium-tier));
    translate: 0 calc(var(--podium-lower-step) * var(--podium-tier));
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-coin-slot {
    grid-row: 2;
    grid-template-rows: var(--podium-coin-row);
    align-self: stretch;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-coin-slot > .podium-coin {
    translate: 0
      calc(
        var(--podium-step) * (var(--podium-tier) - 1) + var(--podium-lower-step) * var(--podium-tier) -
          var(--podium-coin-lift, 0px)
      );
  }

  :is(#ranked-podium, #pvp-podium)
    .podium-stage:has(.podium-place-3 .coin-frame-equipped)
    .podium-place-2
    .podium-coin:not(.coin-frame-equipped) {
    --podium-coin-lift: clamp(6px, 2.3cqi, 9px);
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-coin-slot > .coin-frame-equipped {
    --podium-coin: calc(var(--podium-coin-size) * 1.11);
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-place-3 .podium-coin-slot:has(> .coin-frame-equipped) {
    margin-bottom: clamp(0px, calc(5.5cqi - 14px), 8px);
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-coin-name {
    display: none;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-person > .avatar-frame:not(.frame-collection) {
    width: calc(var(--podium-avatar) * var(--podium-simple-portrait));
    height: calc(var(--podium-avatar) * var(--podium-simple-portrait));
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-person > .avatar-frame:not(.frame-collection) > .avatar {
    font-size: calc(var(--podium-avatar) * var(--podium-simple-portrait) * 0.35);
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-person > .frame-gold-halo {
    /* Override the catalog aperture here so the portrait and ring resize together. */
    --frame-avatar: calc(var(--podium-framed-portrait) * 100%) !important;
    --frame-letter: calc(var(--podium-framed-portrait) * 0.35) !important;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .frame-gold-halo > .collection-frame-art {
    scale: 0.75;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-name {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    font-size: clamp(10px, 3.7cqi, 14px);
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-name .styled-name {
    --standing-emblem-size: clamp(9px, 3.1cqi, 14px);
    max-width: 100%;
    padding: 3px 4px;
    flex-wrap: nowrap;
    gap: 2px 3px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-name .nameplate-membership {
    position: static;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-name {
    max-width: 100%;
    justify-items: center;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-title {
    max-width: 100%;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-name .nickname {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-badges {
    width: max-content;
    max-width: 100%;
    margin: 0;
    grid-template-columns: minmax(0, max-content);
    justify-content: center;
    justify-items: center;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-badges > .name-badge ~ .name-badge {
    display: none;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-badges > .name-badge {
    max-width: 100%;
    height: 20px;
    font-size: clamp(7px, 2.8cqi, 10px) !important;
    padding: 1px 4px 1px 2px !important;
    gap: 3px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .trophy-standing-badges .profile-badge-emblem {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-seat .podium-plinth {
    grid-area: 3 / 1;
    align-self: end;
    justify-self: stretch;
    inset: auto;
    translate: none;
    width: auto;
    min-height: 54px;
    height: auto;
    margin: 0;
    padding: 5px 3px;
    gap: 2px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-place-1 .podium-plinth {
    min-height: 76px;
    margin-block-start: -10px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-place-2 .podium-plinth {
    min-height: 68px;
    margin-block-start: -8px;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-score {
    font-size: clamp(13px, 5.4cqi, 22px);
    letter-spacing: -0.02em;
    line-height: 1;
  }

  body.restored-ui-active :is(#ranked-podium, #pvp-podium) .podium-stage .podium-metric {
    font-size: clamp(5px, 2.1cqi, 8px);
    letter-spacing: 0.06em;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-vacancy {
    grid-area: 1 / 1 / 3;
    align-self: center;
    grid-template-rows: auto auto auto;
    padding-inline: 3px;
    font-size: 10px;
  }

  :is(#ranked-podium, #pvp-podium) .podium-stage .podium-vacancy small {
    font-size: 8px;
  }

  :is(#ranked-podium, #pvp-podium) .podium-footnote {
    padding-block: 7px;
  }

  :is(#ranked-podium, #pvp-podium)
    .podium-stage:not(:has(.podium-vacant, .podium-position > small))
    + .podium-footnote {
    display: none;
  }
}
