/* Räsypokka — glamour-hahmot (Aapeli-henkinen kasinotunnelma) */

.rp-char-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0;
}

.rp-char {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 8.5rem;
  padding: 0.6rem 0.45rem 0.5rem;
  border-radius: 16px;
  border: 2px solid rgba(255, 200, 120, 0.2);
  background: linear-gradient(165deg, rgba(40, 20, 50, 0.85) 0%, rgba(15, 8, 22, 0.95) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  overflow: hidden;
}

.rp-char.rp-glam {
  border-color: rgba(255, 105, 180, 0.35);
}

.rp-char.rp-handsome {
  border-color: rgba(100, 160, 255, 0.3);
}

.rp-spotlight {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 55%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 220, 160, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.rp-char.active {
  border-color: #f0c040;
  box-shadow:
    0 0 0 2px rgba(240, 192, 64, 0.45),
    0 0 32px rgba(240, 192, 64, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px) scale(1.02);
  animation: rp-active-glow 2.2s ease-in-out infinite;
}

@keyframes rp-active-glow {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.45), 0 0 24px rgba(240, 192, 64, 0.15), 0 12px 32px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 215, 100, 0.65), 0 0 40px rgba(255, 180, 80, 0.25), 0 14px 36px rgba(0, 0, 0, 0.55);
  }
}

.rp-char.eliminated {
  opacity: 0.38;
  filter: grayscale(0.95) brightness(0.75);
}

.rp-char.just-lost {
  animation: rp-shake 0.55s ease;
}

@keyframes rp-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px) rotate(-1.5deg);
  }
  40% {
    transform: translateX(6px) rotate(1.5deg);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.rp-char-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rp-accent), color-mix(in srgb, var(--rp-accent) 60%, #000));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 6;
}

.rp-char.eliminated .rp-char-badge {
  background: #555;
}

.rp-char-name {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 2;
  letter-spacing: 0.02em;
}

.rp-char-style {
  margin: 0.1rem 0 0.2rem;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rp-accent);
  opacity: 0.9;
  z-index: 2;
}

.rp-podium {
  width: 4rem;
  height: 0.4rem;
  margin-bottom: 0.1rem;
  z-index: 2;
}

.rp-podium-top {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 215, 140, 0.45), rgba(80, 50, 20, 0.6));
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* --- Figure base --- */
.rp-figure-wrap {
  position: relative;
  width: 5.75rem;
  height: 9.75rem;
  z-index: 2;
}

.rp-figure {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
}

.rp-gender-f .rp-figure {
  transform: rotate(-2deg);
}

.rp-gender-m.rp-body-broad .rp-figure,
.rp-gender-m.rp-body-athletic .rp-figure {
  transform: rotate(1deg);
}

.rp-body-slim .rp-figure {
  transform: scaleX(0.9);
}
.rp-gender-f.rp-body-slim .rp-figure {
  transform: scaleX(0.9) rotate(-2deg);
}

.rp-body-broad .rp-figure,
.rp-body-athletic .rp-figure {
  transform: scaleX(1.06);
}

.rp-body-curvy .rp-figure {
  transform: scaleX(1.02);
}
.rp-gender-f.rp-body-curvy .rp-figure {
  transform: scaleX(1.02) rotate(-3deg);
}

.rp-shadow {
  position: absolute;
  bottom: 0.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  filter: blur(3px);
  z-index: 0;
}

/* --- Head & face --- */
.rp-neck {
  position: absolute;
  top: 1.65rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.5rem;
  height: 0.5rem;
  background: linear-gradient(180deg, var(--rp-skin), color-mix(in srgb, var(--rp-skin) 85%, #000));
  z-index: 3;
}

.rp-collarbone {
  position: absolute;
  top: 2.05rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.6rem;
  height: 0.2rem;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  z-index: 3;
}

.rp-head {
  position: absolute;
  top: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2.1rem;
  z-index: 5;
}

.rp-gender-f .rp-head {
  width: 1.95rem;
  height: 2.15rem;
  border-radius: 48% 48% 52% 52%;
  background: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.3), transparent 45%), var(--rp-skin);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.06);
}

.rp-gender-m .rp-head {
  width: 2.05rem;
  height: 2rem;
  border-radius: 46% 46% 54% 54%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 50%), var(--rp-skin);
}

.rp-jaw-shadow {
  position: absolute;
  bottom: 0.15rem;
  left: 0.2rem;
  right: 0.2rem;
  height: 0.55rem;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.08));
}

.rp-face {
  position: absolute;
  inset: 0;
}

.rp-brow {
  position: absolute;
  top: 0.68rem;
  width: 0.42rem;
  height: 0.08rem;
  border-radius: 2px;
  background: rgba(30, 18, 10, 0.6);
}
.rp-brow:first-of-type {
  left: 0.35rem;
  transform: rotate(-5deg);
}
.rp-brow:nth-of-type(2) {
  right: 0.35rem;
  transform: rotate(5deg);
}

.rp-glam .rp-brow {
  height: 0.06rem;
  background: rgba(40, 20, 30, 0.7);
}

.rp-eye {
  position: absolute;
  top: 0.82rem;
  width: 0.32rem;
  height: 0.36rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.08);
}
.rp-eye::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  left: 0.09rem;
  width: 0.16rem;
  height: 0.2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4a3728, #1a1008);
}
.rp-eye:nth-child(3) {
  left: 0.4rem;
}
.rp-eye:nth-child(4) {
  right: 0.4rem;
}

.rp-glam .rp-eye {
  height: 0.38rem;
  border-radius: 50% 50% 45% 45%;
}

.rp-lash {
  position: absolute;
  top: 0.76rem;
  width: 0.38rem;
  height: 0.12rem;
  border-top: 2px solid rgba(20, 10, 10, 0.75);
  border-radius: 50% 50% 0 0;
}
.rp-lash:nth-of-type(5) {
  left: 0.36rem;
  transform: rotate(-8deg);
}
.rp-lash:nth-of-type(6) {
  right: 0.36rem;
  transform: rotate(8deg);
}

.rp-blush {
  position: absolute;
  top: 1.15rem;
  left: 0.2rem;
  right: 0.2rem;
  height: 0.45rem;
  background: radial-gradient(ellipse 40% 80% at 18% 50%, rgba(255, 100, 120, 0.35), transparent),
    radial-gradient(ellipse 40% 80% at 82% 50%, rgba(255, 100, 120, 0.35), transparent);
  pointer-events: none;
}

.rp-mouth {
  position: absolute;
  bottom: 0.38rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.42rem;
  height: 0.14rem;
  border-bottom: 2px solid rgba(120, 60, 50, 0.6);
  border-radius: 0 0 50% 50%;
}

.rp-mouth.rp-lips {
  width: 0.52rem;
  height: 0.22rem;
  border: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rp-lip) 80%, #fff), var(--rp-lip));
  border-radius: 0 0 55% 55% / 0 0 100% 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.rp-gender-m .rp-mouth {
  width: 0.48rem;
  border-bottom-width: 2.5px;
}

/* --- Hair --- */
.rp-hair {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: var(--rp-hair);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.rp-hair-waves {
  top: 0.05rem;
  width: 2.35rem;
  height: 1.15rem;
  border-radius: 1rem 1rem 0.3rem 0.3rem;
}
.rp-hair-waves::before,
.rp-hair-waves::after {
  content: "";
  position: absolute;
  bottom: -0.85rem;
  width: 0.65rem;
  height: 1.5rem;
  border-radius: 0.4rem;
  background: inherit;
}
.rp-hair-waves::before {
  left: 0.1rem;
  transform: rotate(-8deg);
}
.rp-hair-waves::after {
  right: 0.1rem;
  transform: rotate(8deg);
}

.rp-hair-slick {
  top: 0.15rem;
  width: 2.1rem;
  height: 0.8rem;
  border-radius: 0.8rem 0.8rem 0.1rem 0.1rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rp-hair) 70%, #333), var(--rp-hair));
}

.rp-hair-curls {
  top: 0;
  width: 2.4rem;
  height: 1.2rem;
  border-radius: 50% 50% 30% 30%;
  box-shadow:
    -0.25rem 0.2rem 0 -0.08rem var(--rp-hair),
    0.25rem 0.15rem 0 -0.08rem var(--rp-hair),
    0 0.3rem 0 -0.1rem var(--rp-hair);
}

.rp-hair-messy {
  top: 0.1rem;
  width: 2.15rem;
  height: 0.9rem;
  border-radius: 40% 60% 35% 45%;
}

.rp-hair-pony {
  top: 0.15rem;
  width: 2rem;
  height: 0.8rem;
  border-radius: 0.9rem 0.9rem 0.15rem 0.15rem;
}
.rp-hair-pony::after {
  content: "";
  position: absolute;
  top: 0.05rem;
  right: -0.65rem;
  width: 0.55rem;
  height: 1.75rem;
  border-radius: 0.3rem;
  background: inherit;
  transform: rotate(10deg);
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
}

.rp-hair-short {
  top: 0.2rem;
  width: 2.05rem;
  height: 0.75rem;
  border-radius: 0.85rem 0.85rem 0.15rem 0.15rem;
}

/* --- Body shape --- */
.rp-bust {
  position: absolute;
  top: 2.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.85rem;
  height: 0.75rem;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.08), transparent);
  z-index: 2;
  opacity: 0;
}

.rp-gender-f .rp-bust {
  opacity: 1;
}

.rp-gender-f.rp-body-curvy .rp-bust {
  width: 2.05rem;
  height: 0.85rem;
}

.rp-abs {
  position: absolute;
  top: 2.35rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5rem;
  height: 0.55rem;
  opacity: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.04) 40%, rgba(0, 0, 0, 0.04) 45%, transparent 45%, transparent 60%, rgba(0, 0, 0, 0.04) 60%);
}

.rp-gender-m.rp-body-athletic .rp-abs,
.rp-outfit-open .rp-abs {
  opacity: 1;
}

.rp-hips {
  position: absolute;
  bottom: 2.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.1rem;
  height: 0.65rem;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06), transparent);
  z-index: 1;
  opacity: 0;
}

.rp-gender-f.rp-body-curvy .rp-hips {
  opacity: 1;
  width: 2.35rem;
}

.rp-arm {
  position: absolute;
  top: 2.25rem;
  width: 0.48rem;
  height: 2.1rem;
  border-radius: 0.25rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rp-jacket) 90%, #000), var(--rp-jacket));
  z-index: 4;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.rp-arm-left {
  left: 0.35rem;
  transform: rotate(14deg);
}

.rp-arm-right {
  right: 0.35rem;
  transform: rotate(-10deg);
}

.rp-hand {
  position: absolute;
  bottom: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--rp-skin);
}

.rp-torso-skin {
  position: absolute;
  top: 2.1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.55rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  background: linear-gradient(180deg, var(--rp-skin), color-mix(in srgb, var(--rp-skin) 92%, #000));
  z-index: 2;
}

.rp-gender-f .rp-torso-skin {
  width: 1.7rem;
  border-radius: 0.35rem 0.35rem 0.5rem 0.5rem;
}

.rp-legs-skin {
  position: absolute;
  bottom: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.55rem;
  height: 2.85rem;
  z-index: 1;
}

.rp-gender-f .rp-legs-skin {
  width: 1.35rem;
}

.rp-legs-skin::before,
.rp-legs-skin::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 0.62rem;
  height: 2.85rem;
  border-radius: 0.28rem;
  background: radial-gradient(ellipse at 25% 15%, rgba(255, 255, 255, 0.14), transparent), var(--rp-skin);
}

.rp-gender-f .rp-legs-skin::before,
.rp-gender-f .rp-legs-skin::after {
  width: 0.55rem;
}

.rp-legs-skin::before {
  left: 0;
}
.rp-legs-skin::after {
  right: 0;
}

/* --- Underwear (shirt/pants off) --- */
.rp-underwear {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
}

.rp-clothes-2 .rp-under-top,
.rp-clothes-1 .rp-under-top {
  opacity: 1;
}

.rp-clothes-1 .rp-under-bottom {
  opacity: 1;
}

.rp-under-top.rp-gender-f {
  top: 2.05rem;
  width: 1.75rem;
  height: 0.95rem;
  border-radius: 0.35rem 0.35rem 0.5rem 0.5rem;
  background: linear-gradient(180deg, var(--rp-under), color-mix(in srgb, var(--rp-under) 70%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.rp-under-top.rp-gender-f::before,
.rp-under-top.rp-gender-f::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  width: 0.7rem;
  height: 0.65rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--rp-under) 85%, var(--rp-accent));
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.rp-under-top.rp-gender-f::before {
  left: 0.1rem;
}
.rp-under-top.rp-gender-f::after {
  right: 0.1rem;
}

.rp-under-top.rp-gender-m {
  top: 2.1rem;
  width: 1.65rem;
  height: 1rem;
  border-radius: 0.25rem;
  background: repeating-linear-gradient(180deg, var(--rp-under) 0, var(--rp-under) 0.18rem, color-mix(in srgb, var(--rp-under) 80%, #000) 0.18rem, color-mix(in srgb, var(--rp-under) 80%, #000) 0.36rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rp-under-bottom.rp-gender-f {
  bottom: 2.55rem;
  width: 1.55rem;
  height: 0.55rem;
  border-radius: 0.2rem;
  background: linear-gradient(180deg, var(--rp-under), color-mix(in srgb, var(--rp-under) 60%, #000));
}

.rp-under-bottom.rp-gender-m {
  bottom: 2.5rem;
  width: 1.7rem;
  height: 0.65rem;
  border-radius: 0.15rem;
  background: var(--rp-under);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

/* --- Clothing layers --- */
.rp-cloth {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: opacity 0.35s, transform 0.5s;
}

/* Hats */
.rp-cloth-hat {
  top: -0.1rem;
  z-index: 7;
}

.rp-hat-fascinator {
  width: 1.6rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--rp-hat);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  top: 0.05rem;
}
.rp-hat-fascinator::after {
  content: "";
  position: absolute;
  top: -0.35rem;
  right: -0.2rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--rp-accent);
  box-shadow: 0 0 6px var(--rp-accent);
}

.rp-hat-fedora {
  width: 2.4rem;
  height: 0.55rem;
  background: var(--rp-hat);
  top: 0.1rem;
  border-radius: 0.15rem;
}
.rp-hat-fedora::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.45rem;
  height: 0.6rem;
  border-radius: 0.3rem 0.3rem 0.05rem 0.05rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rp-hat) 90%, #fff), var(--rp-hat));
}
.rp-hat-fedora::after {
  content: "";
  position: absolute;
  bottom: -0.08rem;
  left: -0.3rem;
  right: -0.3rem;
  height: 0.2rem;
  border-radius: 50%;
  background: var(--rp-hat);
}

.rp-hat-flower {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rp-accent), color-mix(in srgb, var(--rp-accent) 50%, #000));
  top: 0.2rem;
  box-shadow: 0 0 8px rgba(255, 100, 150, 0.5);
}
.rp-hat-flower::before,
.rp-hat-flower::after {
  content: "";
  position: absolute;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--rp-accent);
  opacity: 0.8;
}
.rp-hat-flower::before {
  top: -0.15rem;
  left: -0.1rem;
}
.rp-hat-flower::after {
  top: -0.1rem;
  right: -0.15rem;
}

.rp-hat-cloche {
  width: 2.15rem;
  height: 1rem;
  border-radius: 0.5rem 0.5rem 0.2rem 0.2rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rp-hat) 80%, #fff), var(--rp-hat));
  top: -0.05rem;
}

/* Jacket / outer */
.rp-cloth-jacket {
  top: 1.95rem;
  width: 2.45rem;
  height: 2.65rem;
  border-radius: 0.5rem 0.5rem 0.25rem 0.25rem;
  background: linear-gradient(165deg, color-mix(in srgb, var(--rp-jacket) 85%, #fff) 0%, var(--rp-jacket) 40%, color-mix(in srgb, var(--rp-jacket) 75%, #000) 100%);
  z-index: 5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.rp-outfit-evening .rp-cloth-jacket {
  width: 2.2rem;
  height: 1.35rem;
  top: 1.9rem;
  border-radius: 0.4rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.75));
  border: 1px solid rgba(255, 215, 140, 0.25);
}

.rp-outfit-leather .rp-cloth-jacket {
  background: linear-gradient(165deg, #4a3020, #2a1810 50%, #1a1008);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 3px 8px rgba(0, 0, 0, 0.4);
}

.rp-outfit-open .rp-cloth-jacket {
  width: 2.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
}
.rp-outfit-open .rp-cloth-jacket::before,
.rp-outfit-open .rp-cloth-jacket::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0.85rem;
  height: 2.4rem;
  background: linear-gradient(180deg, var(--rp-jacket), color-mix(in srgb, var(--rp-jacket) 70%, #000));
  border-radius: 0.3rem 0 0 0.2rem;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.1);
}
.rp-outfit-open .rp-cloth-jacket::before {
  left: 0;
  transform: rotate(-6deg);
}
.rp-outfit-open .rp-cloth-jacket::after {
  right: 0;
  left: auto;
  border-radius: 0 0.3rem 0.2rem 0;
  transform: rotate(6deg);
}
.rp-outfit-open .rp-lapel {
  display: none;
}

.rp-lapel {
  position: absolute;
  top: 0.2rem;
  width: 0.5rem;
  height: 0.95rem;
  background: color-mix(in srgb, var(--rp-jacket) 70%, #000);
  border-radius: 0 0 0.2rem 0.2rem;
}
.rp-lapel-left {
  left: 0.38rem;
  transform: skewX(-10deg);
}
.rp-lapel-right {
  right: 0.38rem;
  transform: skewX(10deg);
}

.rp-tie {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0.35rem;
  height: 1.6rem;
  background: linear-gradient(180deg, var(--rp-accent), color-mix(in srgb, var(--rp-accent) 50%, #000));
  border-radius: 0 0 0.15rem 0.15rem;
  z-index: 6;
}
.rp-tie::before {
  content: "";
  position: absolute;
  top: -0.15rem;
  left: 50%;
  transform: translateX(-50%);
  border-left: 0.22rem solid transparent;
  border-right: 0.22rem solid transparent;
  border-top: 0.3rem solid var(--rp-accent);
}

/* Shirt / top */
.rp-cloth-shirt {
  top: 2.15rem;
  width: 1.75rem;
  height: 1.65rem;
  border-radius: 0.3rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rp-shirt) 90%, #fff), var(--rp-shirt));
  z-index: 6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rp-outfit-evening .rp-cloth-shirt {
  width: 1.85rem;
  height: 2.1rem;
  border-radius: 0.4rem 0.4rem 0.6rem 0.6rem;
  background: linear-gradient(180deg, var(--rp-shirt), color-mix(in srgb, var(--rp-shirt) 70%, #000));
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.15), 0 0 12px rgba(255, 50, 100, 0.15);
}

.rp-outfit-retro .rp-cloth-shirt {
  width: 1.9rem;
  height: 1.45rem;
  border-radius: 0.35rem 0.35rem 0.5rem 0.5rem;
  background: linear-gradient(180deg, var(--rp-shirt), color-mix(in srgb, var(--rp-shirt) 60%, #000));
}

.rp-outfit-cocktail .rp-cloth-shirt {
  width: 1.7rem;
  height: 1.35rem;
  background: linear-gradient(135deg, var(--rp-shirt), color-mix(in srgb, var(--rp-shirt) 50%, var(--rp-accent)));
}

.rp-outfit-leather .rp-cloth-shirt {
  height: 1.2rem;
  background: var(--rp-shirt);
}

.rp-outfit-open .rp-cloth-shirt {
  width: 1.65rem;
  height: 1.85rem;
  background: linear-gradient(180deg, var(--rp-shirt), color-mix(in srgb, var(--rp-shirt) 85%, #ccc));
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

/* Pants / skirt */
.rp-cloth-pants {
  bottom: 2.55rem;
  width: 1.85rem;
  height: 2.35rem;
  border-radius: 0.2rem 0.2rem 0.1rem 0.1rem;
  background: linear-gradient(180deg, var(--rp-pants), color-mix(in srgb, var(--rp-pants) 70%, #000));
  z-index: 3;
}

.rp-gender-f .rp-cloth-pants {
  width: 2.05rem;
  height: 2.5rem;
  border-radius: 0.15rem 0.15rem 0.5rem 0.5rem;
}

.rp-outfit-evening .rp-cloth-pants,
.rp-outfit-cocktail .rp-cloth-pants {
  width: 2.15rem;
  height: 2.75rem;
  border-radius: 0.1rem 0.1rem 0.6rem 0.6rem;
  background: linear-gradient(180deg, var(--rp-pants) 0%, color-mix(in srgb, var(--rp-pants) 50%, #000) 100%);
}

.rp-outfit-evening .rp-cloth-pants::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0.8rem;
  height: 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
  border-radius: 0 0 0.3rem 0.3rem;
}

.rp-outfit-retro .rp-cloth-pants {
  width: 1.95rem;
  height: 2.2rem;
  border-radius: 0.1rem 0.1rem 0.35rem 0.35rem;
}

.rp-gender-m .rp-cloth-pants::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 1.7rem;
  background: rgba(0, 0, 0, 0.2);
}

/* Shoes */
.rp-cloth-shoes {
  bottom: 0.4rem;
  width: 1.75rem;
  height: 0.65rem;
  z-index: 5;
}

.rp-shoes-heels::before,
.rp-shoes-heels::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 0.55rem;
  height: 0.35rem;
  border-radius: 0.2rem 0.2rem 0.05rem 0.05rem;
  background: linear-gradient(180deg, var(--rp-shoes), #0a0608);
}

.rp-shoes-heels::before {
  left: 0.15rem;
}
.rp-shoes-heels::after {
  right: 0.15rem;
}

.rp-shoes-heels::before,
.rp-shoes-heels::after {
  height: 0.42rem;
}

.rp-shoes-heels::before {
  box-shadow: -0.08rem 0.35rem 0 -0.05rem var(--rp-accent);
}
.rp-shoes-heels::after {
  box-shadow: 0.08rem 0.35rem 0 -0.05rem var(--rp-accent);
}

.rp-shoes-dress::before,
.rp-shoes-dress::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 0.75rem;
  height: 0.48rem;
  border-radius: 0.2rem 0.2rem 0.3rem 0.3rem;
  background: linear-gradient(180deg, var(--rp-shoes), #0a0806);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.rp-shoes-dress::before {
  left: 0;
}
.rp-shoes-dress::after {
  right: 0;
}

/* Clothing visibility states */
.rp-clothes-4 .rp-cloth-hat,
.rp-clothes-3 .rp-cloth-hat,
.rp-clothes-3 .rp-cloth-jacket,
.rp-clothes-2 .rp-cloth-hat,
.rp-clothes-2 .rp-cloth-jacket,
.rp-clothes-2 .rp-cloth-shirt,
.rp-clothes-1 .rp-cloth-hat,
.rp-clothes-1 .rp-cloth-jacket,
.rp-clothes-1 .rp-cloth-shirt,
.rp-clothes-1 .rp-cloth-pants,
.rp-clothes-0 .rp-cloth {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.5);
}

.rp-clothes-2 .rp-torso-skin,
.rp-clothes-1 .rp-torso-skin {
  opacity: 0;
}

.rp-clothes-3 .rp-arm,
.rp-clothes-2 .rp-arm {
  background: linear-gradient(90deg, var(--rp-skin), color-mix(in srgb, var(--rp-skin) 90%, #000));
}

.rp-clothes-1 .rp-arm {
  background: var(--rp-skin);
}

.rp-cloth.rp-fly-off {
  animation: rp-fly-off 0.8s ease forwards;
}

.rp-char.just-lost .rp-cloth.rp-fly-off {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) scale(1) !important;
}

@keyframes rp-fly-off {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translateX(32px) translateY(-40px) rotate(35deg);
  }
}

.rp-out-badge {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #dc2626, #7f1d1d);
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Wardrobe icons */
.rp-wardrobe {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0.3rem 0.15rem 0;
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  border-top: 1px solid rgba(255, 200, 140, 0.12);
  width: 100%;
  z-index: 2;
}

.rp-wardrobe-item {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.rp-wardrobe-item.on {
  background: rgba(255, 200, 120, 0.15);
  box-shadow: 0 0 0 1px rgba(255, 200, 120, 0.35);
}

.rp-wardrobe-item.off {
  opacity: 0.25;
  filter: grayscale(1);
}

.rp-piece-icon {
  display: block;
  width: 0.68rem;
  height: 0.68rem;
  background: rgba(255, 220, 180, 0.9);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.rp-piece-hat .rp-piece-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C8 6 4 7 4 11h16c0-4-4-5-8-9zm-6 11v2h12v-2H6z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C8 6 4 7 4 11h16c0-4-4-5-8-9zm-6 11v2h12v-2H6z'/%3E%3C/svg%3E");
}

.rp-piece-jacket .rp-piece-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2L2 9v13h7v-7h6v7h7V9L12 2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2L2 9v13h7v-7h6v7h7V9L12 2z'/%3E%3C/svg%3E");
}

.rp-piece-shirt .rp-piece-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 2l4 4v2h-2v12H6V8H4V6l4-4h8zm-4 2H8.8L6 6.2V6h12v.2L15.2 4H12z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 2l4 4v2h-2v12H6V8H4V6l4-4h8zm-4 2H8.8L6 6.2V6h12v.2L15.2 4H12z'/%3E%3C/svg%3E");
}

.rp-piece-pants .rp-piece-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 2h10l2 9-3 11H8L5 11l2-9zm2 2l-1.2 6h8.4L15 4H9z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 2h10l2 9-3 11H8L5 11l2-9zm2 2l-1.2 6h8.4L15 4H9z'/%3E%3C/svg%3E");
}

.rp-piece-shoes .rp-piece-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 18h7v2H3v-2zm9 0h9v2h-9v-2zM5 14h5l1.5 4H3.5L5 14zm8 0h7l1.5 4h-8.5L13 14z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 18h7v2H3v-2zm9 0h9v2h-9v-2zM5 14h5l1.5 4H3.5L5 14zm8 0h7l1.5 4h-8.5L13 14z'/%3E%3C/svg%3E");
}

@media (max-width: 520px) {
  .rp-char {
    width: 7.5rem;
  }
  .rp-figure-wrap {
    width: 5rem;
    height: 8.5rem;
  }
}
