/* Presentation refinements only. Keep the rank artwork and renderer intact. */
#profile-v2-root .profile-v2-shell .profile-v2-player-badge {
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
}
#profile-v2-root .profile-v2-shell .profile-v2-player-badge::before {
  content:none;
  display:none;
}

/* The rank SVG has its own silhouette; the legacy avatar frame is redundant. */
#ranking-v2-root .ranking-v2-rank-avatar,
#ranking-v2-root .ranking-v2-podium-player .ranking-v2-rank-avatar {
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  clip-path:none;
}

/* Rebalance the original 26u + 26u padding. The measured HOME frame, total
   padding, scrolling height and left/right positions keep their ownership. */
#ranking-v2-root .ranking-v2-shell {
  padding-block-start:calc(var(--ranking-v2-unit) * 14);
  padding-block-end:calc(var(--ranking-v2-unit) * 38);
}

/* Existing public SHOWDOWN spans form two rows:
   position | player | hand      | result
            |        | hand rank |
   Explicit classes also handle rows with absent hand-rank text. */
#handHistoryV2Modal .hhv2-showdown-row {
  grid-template-columns:2.1rem minmax(0,.9fr) minmax(0,1.1fr) minmax(3.25rem,max-content)!important;
  grid-template-rows:auto auto!important;
  column-gap:.34rem!important;
  row-gap:.12rem!important;
}
#handHistoryV2Modal .hhv2-showdown-row>.hhv2-showdown-pos {
  grid-column:1!important;
  grid-row:1 / 3!important;
  align-self:start!important;
}
#handHistoryV2Modal .hhv2-showdown-row>.hhv2-showdown-player {
  grid-column:2!important;
  grid-row:1!important;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#handHistoryV2Modal .hhv2-showdown-row>.hhv2-showdown-cards {
  grid-column:3!important;
  grid-row:1!important;
  justify-self:start;
  align-self:center!important;
}
#handHistoryV2Modal .hhv2-showdown-row>.hhv2-showdown-rank {
  grid-column:3!important;
  grid-row:2!important;
  align-self:start!important;
  min-width:0;
  max-width:100%;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  overflow-wrap:normal;
  word-break:keep-all;
  writing-mode:horizontal-tb;
}
#handHistoryV2Modal .hhv2-showdown-row>.hhv2-delta {
  grid-column:4!important;
  grid-row:1 / 3!important;
  align-self:center!important;
  min-width:3.25rem;
  text-align:right;
  white-space:nowrap;
}

@media (max-width:900px),(max-height:520px),(pointer:coarse) {
  #handHistoryV2Modal .hhv2-showdown-row {
    grid-template-columns:clamp(1.15rem,8cqi,1.45rem) minmax(0,.9fr) minmax(0,1.1fr) minmax(3.05rem,max-content)!important;
    column-gap:clamp(.1rem,1cqi,.2rem)!important;
    row-gap:.08rem!important;
  }
  #handHistoryV2Modal .hhv2-showdown-row>.hhv2-delta {
    min-width:3.05rem;
  }
}
