/**
 * Ranking RPG — mesmas disposições do perfil gamificado
 * Título sobreposto · moldura · classe (esq, no lugar do troféu) · nível (dir) · nome
 */

#ranking-podium.rk-section,
#ranking-podium.mek-section {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto 1.5rem;
  padding: 4px 8px 16px;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  font-family: var(--mek-font, Outfit, sans-serif);
  color: var(--mek-text, #f2ead8);
  overflow: visible;
}

.rk-head {
  text-align: center;
  margin: 0 0 12px;
}

.rk-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mek-gold, #e8c547);
  font-family: var(--mek-display, Cinzel, serif);
}

.rk-title {
  margin: 0;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: #f7efd8;
  letter-spacing: 0.03em;
}

.rk-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.45fr 1.15fr 1fr;
  align-items: end;
  gap: clamp(6px, 1.2vw, 14px);
  min-height: 280px;
  padding: 4px 0;
  width: 100%;
}

.rk-empty,
.rk-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--mek-muted, #9a8f7a);
  padding: 36px 12px;
  font-size: 0.92rem;
}

.rk-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
}

.rk-slot.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.rk-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 2px 6px;
  border: none;
  background: transparent;
  box-shadow: none;
  transition: transform 0.18s ease;
}

.rk-card:hover {
  transform: translateY(-3px);
}

/* ===== Stage igual ao perfil ===== */
.rk-avatar-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rk-stage-w, 160px);
  height: auto;
  gap: 0;
  overflow: visible;
}

.rk-title-slot {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: flex-end;
  min-height: 0;
  z-index: 1;
  line-height: 0;
  margin: 0;
}

.rk-title-slot.has-title {
  display: flex;
  margin-bottom: var(--rk-title-overlap, -18px);
}

.rk-title-banner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  aspect-ratio: 520 / 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  line-height: 0;
}

.rk-title-banner img {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.rk-avatar-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  z-index: 2;
}

.rk-avatar-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  z-index: 0;
  pointer-events: none;
}

.rk-avatar-stack {
  --rk-avatar-inset: 26.92%;
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.rk-avatar {
  position: absolute;
  top: var(--rk-avatar-inset);
  left: var(--rk-avatar-inset);
  width: calc(100% - 2 * var(--rk-avatar-inset));
  height: calc(100% - 2 * var(--rk-avatar-inset));
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #1c1a24;
  z-index: 1;
}

.rk-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  pointer-events: none;
  z-index: 2;
}

.rk-frame-fallback {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.55);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 2;
}

/* Classe — só o ícone, sem fundo/borda */
.rk-class-badge {
  position: absolute;
  left: -6px;
  bottom: 6px;
  z-index: 4;
  width: calc(var(--rk-badge, 44px) * 1.35);
  height: calc(var(--rk-badge, 44px) * 1.35);
  border: none;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}

.rk-class-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

/* Nível (canto inferior direito) — igual perfil */
.rk-level-badge {
  position: absolute;
  right: -4px;
  bottom: 10px;
  z-index: 4;
  min-width: var(--rk-badge, 44px);
  height: var(--rk-badge, 44px);
  padding: 0 6px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d4af37, #8a6914 55%, #5c4510);
  border: 3px solid #1a1610;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #1a1408;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(232, 197, 71, 0.25);
  line-height: 1;
}

.rk-level-badge small {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.rk-level-badge strong {
  font-family: var(--mek-display, Cinzel, serif);
  font-size: var(--rk-level-num, 1.1rem);
  font-weight: 900;
  line-height: 1;
}

/* Nome — mesmas regras do perfil gamificado */
.rk-name-fx,
#ranking-podium .pg-name-fx {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 6px 4px;
  overflow: visible;
  text-align: center;
}

.rk-name,
#ranking-podium .pg-profile-name {
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  padding: 0 2px;
  --pg-name-scale: 1;
  --rk-name-scale: 1;
  --rk-name-fit: 1;
  font-family: var(--mek-display, Cinzel, Georgia, serif);
  /* Base do perfil × slot × ajuste automático para caber numa linha */
  font-size: calc(
    clamp(1.15rem, 2.6vw, 1.45rem) * var(--pg-name-scale, var(--rk-name-scale, 1)) *
      var(--rk-slot-name-mul, 1) * var(--rk-name-fit, 1)
  ) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #f7efd8;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 1;
}

.rk-name.is-pixel,
#ranking-podium .pg-profile-name.is-pixel {
  font-size: calc(
    clamp(0.72rem, 1.8vw, 0.92rem) * var(--pg-name-scale, var(--rk-name-scale, 1)) *
      var(--rk-slot-name-mul, 1) * var(--rk-name-fit, 1)
  ) !important;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.rk-name.is-gradient-name,
#ranking-podium .pg-profile-name.is-gradient-name {
  text-shadow: none;
  -webkit-text-fill-color: transparent;
}

.rk-fx-glow .rk-name,
.pg-fx-glow .rk-name,
#ranking-podium .pg-fx-glow .pg-profile-name {
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--pg-name-ink, var(--rk-name-ink, #e8c547)) 70%, transparent));
}

.rk-fx-neon .rk-name,
.pg-fx-neon .rk-name,
#ranking-podium .pg-fx-neon .pg-profile-name {
  text-shadow:
    0 0 4px #fff,
    0 0 10px var(--pg-name-ink, var(--rk-name-ink, #22d3ee)),
    0 0 22px var(--pg-name-ink, var(--rk-name-ink, #22d3ee)),
    0 0 36px var(--pg-name-ink, var(--rk-name-ink, #22d3ee)) !important;
}

.rk-fx-chromatic .rk-name,
.pg-fx-chromatic .rk-name,
#ranking-podium .pg-fx-chromatic .pg-profile-name {
  text-shadow: -2px 0 #ff2d55, 2px 0 #22d3ee, 0 0 12px rgba(255, 255, 255, 0.25) !important;
  animation: rkChromatic 2.8s ease-in-out infinite;
}

.rk-fx-chromatic .is-gradient-name,
.pg-fx-chromatic .is-gradient-name {
  filter: drop-shadow(-2px 0 #ff2d55) drop-shadow(2px 0 #22d3ee);
}

.rk-fx-neon .is-gradient-name,
.pg-fx-neon .is-gradient-name {
  filter: drop-shadow(0 0 8px #67e8f9) drop-shadow(0 0 16px #22d3ee);
}

.rk-fx-glow .is-gradient-name,
.pg-fx-glow .is-gradient-name {
  filter: drop-shadow(0 0 10px rgba(232, 197, 71, 0.7));
}

.rk-fx-fire .is-gradient-name,
.pg-fx-fire .is-gradient-name {
  filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.55)) drop-shadow(0 0 12px rgba(239, 68, 68, 0.35));
}

.rk-fx-electric .is-gradient-name,
.pg-fx-electric .is-gradient-name {
  filter: drop-shadow(0 0 8px #67e8f9) drop-shadow(0 0 14px #0ea5e9);
}

@keyframes rkChromatic {
  0%,
  100% {
    text-shadow: -2px 0 #ff2d55, 2px 0 #22d3ee, 0 0 12px rgba(255, 255, 255, 0.2);
  }
  50% {
    text-shadow: -3px 1px #a855f7, 3px -1px #34d399, 0 0 16px rgba(255, 255, 255, 0.35);
  }
}

.rk-fx-shimmer .rk-name,
.pg-fx-shimmer .rk-name,
#ranking-podium .pg-fx-shimmer .pg-profile-name {
  background-size: 220% auto !important;
  animation: rkShimmer 2.4s linear infinite;
}

.rk-fx-shimmer:not(:has(.is-gradient-name)) .rk-name,
.pg-fx-shimmer:not(:has(.is-gradient-name)) .rk-name,
#ranking-podium .pg-fx-shimmer:not(:has(.is-gradient-name)) .pg-profile-name {
  background-image: linear-gradient(90deg, currentColor 0%, #fff 45%, currentColor 70%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

@keyframes rkShimmer {
  to {
    background-position: 220% center;
  }
}

.rk-fx-sparkle .rk-name,
.pg-fx-sparkle .rk-name,
#ranking-podium .pg-fx-sparkle .pg-profile-name {
  animation: rkStellar 2.8s ease-in-out infinite;
}

.rk-fx-sparkle::before,
.rk-fx-sparkle::after,
.pg-fx-sparkle::before,
.pg-fx-sparkle::after {
  content: '✦';
  position: absolute;
  font-size: 0.55em;
  color: #fde68a;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.85);
  pointer-events: none;
  opacity: 0;
  animation: rkTwinkle 2.8s ease-in-out infinite;
}

.rk-fx-sparkle::before,
.pg-fx-sparkle::before {
  top: 0;
  left: 2%;
}

.rk-fx-sparkle::after,
.pg-fx-sparkle::after {
  content: '✧';
  top: 6%;
  right: 2%;
  animation-delay: 1.2s;
}

@keyframes rkStellar {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(255, 248, 220, 0.35)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(253, 224, 71, 0.55)) brightness(1.06);
  }
}

@keyframes rkTwinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  40%,
  55% {
    opacity: 0.95;
    transform: scale(1);
  }
}

.rk-fx-fire .rk-name,
.pg-fx-fire .rk-name,
#ranking-podium .pg-fx-fire .pg-profile-name {
  text-shadow:
    0 0 4px rgba(255, 247, 237, 0.55),
    0 0 10px rgba(251, 146, 60, 0.55),
    0 0 18px rgba(239, 68, 68, 0.35) !important;
}

.rk-fx-electric .rk-name,
.pg-fx-electric .rk-name,
#ranking-podium .pg-fx-electric .pg-profile-name {
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(103, 232, 249, 0.7),
    0 0 18px rgba(34, 211, 238, 0.45) !important;
}

.rk-fx-glitch .rk-name,
.pg-fx-glitch .rk-name,
#ranking-podium .pg-fx-glitch .pg-profile-name {
  animation: rkGlitch 3.2s infinite ease-in-out alternate-reverse;
}

@keyframes rkGlitch {
  0%,
  12% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
  18% {
    clip-path: inset(8% 0 62% 0);
    transform: translate(-1px, 0);
  }
  28%,
  55% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
  62% {
    clip-path: inset(55% 0 12% 0);
    transform: translate(1px, 0);
  }
  72%,
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
}

.rk-fx-rainbow .rk-name,
.pg-fx-rainbow .rk-name,
#ranking-podium .pg-fx-rainbow .pg-profile-name {
  background-size: 300% auto !important;
  animation: rkRainbow 3s linear infinite;
}

@keyframes rkRainbow {
  to {
    background-position: 300% center;
  }
}

.rk-stats {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 9px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background:
    linear-gradient(165deg, rgba(58, 46, 22, 0.72) 0%, rgba(18, 14, 12, 0.88) 55%, rgba(10, 10, 14, 0.92) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 230, 150, 0.12);
  overflow: hidden;
}

.rk-stats::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(232, 197, 71, 0.14), transparent 55%);
}

.rk-stat-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.rk-stat-pill {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: rgba(0, 0, 0, 0.32);
}

.rk-stat-pill i {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--mek-gold, #e8c547);
  filter: drop-shadow(0 0 4px rgba(232, 197, 71, 0.35));
}

.rk-stat-pill strong {
  font-family: var(--mek-display, Cinzel, serif);
  font-size: var(--rk-stat-num, 0.82rem);
  font-weight: 800;
  color: #f7efd8;
  line-height: 1;
}

.rk-stat-pill em {
  font-style: normal;
  font-size: var(--rk-stat-size, 0.58rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #b8ad96;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rk-stat-div {
  flex: 0 0 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(232, 197, 71, 0.55);
  box-shadow: 0 0 6px rgba(232, 197, 71, 0.35);
}

/* Escalas por colocação */
.rk-slot--1 {
  z-index: 5;
}

.rk-slot--1 .rk-card {
  --rk-stage-w: 210px;
  --rk-badge: 54px;
  --rk-level-num: 1.28rem;
  --rk-slot-name-mul: 0.92;
  --rk-stat-num: 0.9rem;
  --rk-stat-size: 0.62rem;
  --rk-title-overlap: -22px;
}

.rk-slot--2,
.rk-slot--3 {
  z-index: 4;
}

.rk-slot--2 .rk-card,
.rk-slot--3 .rk-card {
  --rk-stage-w: 168px;
  --rk-badge: 46px;
  --rk-level-num: 1.12rem;
  --rk-slot-name-mul: 0.78;
  --rk-stat-num: 0.8rem;
  --rk-stat-size: 0.56rem;
  --rk-title-overlap: -18px;
}

.rk-slot--4,
.rk-slot--5 {
  z-index: 3;
}

.rk-slot--4 .rk-card,
.rk-slot--5 .rk-card {
  --rk-stage-w: 138px;
  --rk-badge: 38px;
  --rk-level-num: 0.98rem;
  --rk-slot-name-mul: 0.64;
  --rk-stat-num: 0.72rem;
  --rk-stat-size: 0.52rem;
  --rk-title-overlap: -14px;
}

@keyframes rkFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rk-slot:not(.is-empty) {
  animation: rkFadeUp 0.4s ease both;
}

.rk-slot--1 { animation-delay: 0.06s; }
.rk-slot--2 { animation-delay: 0.12s; }
.rk-slot--3 { animation-delay: 0.16s; }
.rk-slot--4 { animation-delay: 0.22s; }
.rk-slot--5 { animation-delay: 0.26s; }

@media (max-width: 820px) {
  .rk-slot--1 .rk-card { --rk-stage-w: 160px; --rk-badge: 46px; }
  .rk-slot--2 .rk-card,
  .rk-slot--3 .rk-card { --rk-stage-w: 136px; --rk-badge: 40px; }
  .rk-slot--4 .rk-card,
  .rk-slot--5 .rk-card { --rk-stage-w: 114px; --rk-badge: 34px; }

  .rk-stat-pill em {
    max-width: 4.5em;
  }
}

/* ===== Mobile: CTA + modal gamificado (top 5 empilhado) ===== */
@media (max-width: 768px) {
  #ranking-podium.rk-section,
  #ranking-podium.mek-section {
    max-width: 100%;
    margin-bottom: 1rem;
    padding: 4px 12px 14px;
    overflow: visible;
  }

  #ranking-podium .rk-head {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .rk-podium.rk-podium--mobile-cta {
    display: block !important;
    min-height: 0;
    padding: 2px 0 0;
    grid-template-columns: none;
  }

  .rk-open-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(232, 197, 71, 0.45);
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(42, 34, 18, 0.95), rgba(18, 14, 10, 0.98)),
      radial-gradient(120% 80% at 10% 0%, rgba(232, 197, 71, 0.22), transparent 55%);
    color: #f7efd8;
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 236, 170, 0.18);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    animation: rk-open-pulse 2.4s ease-in-out infinite;
  }

  .rk-open-btn:active {
    transform: scale(0.985);
  }

  .rk-open-btn-glow {
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(
      110deg,
      transparent 30%,
      rgba(255, 236, 170, 0.18) 48%,
      transparent 62%
    );
    transform: translateX(-40%);
    animation: rk-open-sheen 3.2s ease-in-out infinite;
    pointer-events: none;
  }

  .rk-open-btn-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f0d36a, #b8861a 55%, #6d4e0d);
    color: #1a1408;
    font-size: 1.15rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 18px rgba(232, 197, 71, 0.28);
  }

  .rk-open-btn-text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .rk-open-btn-text strong {
    font-family: var(--mek-display, Cinzel, serif);
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    font-weight: 800;
  }

  .rk-open-btn-text em {
    font-style: normal;
    font-size: 0.72rem;
    color: rgba(247, 239, 216, 0.72);
  }

  .rk-open-btn-chevron {
    position: relative;
    z-index: 1;
    color: #e8c547;
    opacity: 0.9;
    font-size: 0.95rem;
  }
}

@keyframes rk-open-pulse {
  0%,
  100% {
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 236, 170, 0.18),
      0 0 0 0 rgba(232, 197, 71, 0);
  }
  50% {
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 236, 170, 0.22),
      0 0 0 6px rgba(232, 197, 71, 0.08);
  }
}

@keyframes rk-open-sheen {
  0%,
  35% {
    transform: translateX(-45%);
  }
  65%,
  100% {
    transform: translateX(45%);
  }
}

/* Modal ranking — só usado no mobile, mas CSS global do overlay */
.rk-ranking-overlay {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.rk-ranking-overlay.is-open {
  display: flex;
}

.rk-ranking-backdrop {
  position: absolute;
  inset: 0;
  background-color: #08080f;
  background-image:
    linear-gradient(180deg, rgba(8, 8, 15, 0.55), rgba(8, 8, 15, 0.72)),
    var(--mek-wallpaper, var(--ol-wallpaper, url('/imagens/papel-de-parede-rpg.png')));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: none;
}

.rk-ranking-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  height: 100%;
  max-height: 100%;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(8, 8, 15, 0.42), rgba(8, 8, 15, 0.62)),
    var(--mek-wallpaper, var(--ol-wallpaper, url('/imagens/papel-de-parede-rpg.png')));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-left: 1px solid rgba(232, 197, 71, 0.22);
  border-right: 1px solid rgba(232, 197, 71, 0.22);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: rk-modal-rise 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.rk-ranking-ornament {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(232, 197, 71, 0.55);
  pointer-events: none;
  z-index: 2;
}

.rk-ranking-ornament--tl {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.rk-ranking-ornament--tr {
  top: 10px;
  right: 10px;
  border-left: 0;
  border-bottom: 0;
}

.rk-ranking-ornament--bl {
  bottom: 10px;
  left: 10px;
  border-right: 0;
  border-top: 0;
}

.rk-ranking-ornament--br {
  bottom: 10px;
  right: 10px;
  border-left: 0;
  border-top: 0;
}

.rk-ranking-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 12px;
  flex: 0 0 auto;
}

.rk-ranking-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e8c547;
  font-family: var(--mek-display, Cinzel, serif);
}

.rk-ranking-title {
  margin: 0;
  font-family: var(--mek-display, Cinzel, serif);
  font-size: 1.35rem;
  color: #f7efd8;
  letter-spacing: 0.03em;
}

.rk-ranking-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(232, 197, 71, 0.4);
  background: rgba(20, 16, 12, 0.85);
  color: #f7efd8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.rk-ranking-body.rk-podium--stacked {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 10px 28px;
  grid-template-columns: none;
  width: 100%;
}

.rk-podium--stacked .rk-slot {
  width: 100%;
  max-width: 300px;
  animation: rk-slot-in 0.42s ease both;
}

.rk-podium--stacked .rk-slot.is-empty {
  display: none;
}

.rk-podium--stacked .rk-slot--1 {
  animation-delay: 0.04s;
}
.rk-podium--stacked .rk-slot--2 {
  animation-delay: 0.1s;
}
.rk-podium--stacked .rk-slot--3 {
  animation-delay: 0.16s;
}
.rk-podium--stacked .rk-slot--4 {
  animation-delay: 0.22s;
}
.rk-podium--stacked .rk-slot--5 {
  animation-delay: 0.28s;
}

/* Mesmo tamanho para todas as colocações */
.rk-podium--stacked .rk-card {
  --rk-stage-w: 228px;
  --rk-badge: 50px;
  --rk-level-num: 1.15rem;
  --rk-slot-name-mul: 1;
  --rk-title-overlap: -18px;
  position: relative;
  width: 100%;
  max-width: var(--rk-stage-w);
}

.rk-podium--stacked .rk-avatar-stage,
.rk-podium--stacked .rk-name-fx,
.rk-podium--stacked .rk-stats {
  width: 100%;
  max-width: var(--rk-stage-w);
}

@keyframes rk-modal-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rk-slot-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 769px) {
  .rk-open-btn,
  .rk-ranking-overlay {
    display: none !important;
  }
}
