.pcard {
  position: relative;
  border-radius: 3px;
  background: linear-gradient(160deg, #ffffff 0%, #fbfaf4 55%, #efeede 100%);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 2px rgba(0, 0, 0, 0.12);
  user-select: none;
  flex: 0 0 auto;
  overflow: hidden;
  /* 发牌动画：从上方滑入 + 轻微翻转 */
  animation: cardDealIn 0.34s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes cardDealIn {
  0% {
    opacity: 0;
    transform: translateY(-22px) rotate(-9deg) scale(0.82);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pcard {
    animation: none;
  }
}
/* 玻璃高光（左上斜射光） */
.pcard::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.12) 24%,
    transparent 46%
  );
}

/* 尺寸 */
.pcard--xs {
  width: 22px;
  height: 31px;
  border-radius: 3px;
}
.pcard--sm {
  width: 35px;
  height: 49px;
  border-radius: 4px;
}
.pcard--md {
  width: 44px;
  height: 62px;
  border-radius: 6px;
}
.pcard--lg {
  width: 64px;
  height: 90px;
  border-radius: 8px;
}

/* 颜色 */
.pcard--red .pcard__rank,
.pcard--red .pcard__suit,
.pcard--red .pcard__center {
  color: #d4283b;
}
.pcard--black .pcard__rank,
.pcard--black .pcard__suit,
.pcard--black .pcard__center {
  color: #1c1c22;
}
.pcard--joker .pcard__rank,
.pcard--joker .pcard__suit,
.pcard--joker .pcard__center {
  color: #c8961e;
}

.pcard__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
}
.pcard__corner--tl {
  top: 4px;
  left: 4px;
}
.pcard__corner--br {
  bottom: 4px;
  right: 4px;
  transform: rotate(180deg);
}
.pcard--xs .pcard__corner--tl {
  top: 1px;
  left: 2px;
}
.pcard--xs .pcard__corner--br {
  bottom: 1px;
  right: 2px;
}

.pcard--xs .pcard__rank {
  font-size: 9px;
}
.pcard--xs .pcard__suit {
  font-size: 7px;
}
.pcard--sm .pcard__rank {
  font-size: 13px;
}
.pcard--sm .pcard__suit {
  font-size: 10px;
}
.pcard--md .pcard__rank {
  font-size: 15px;
}
.pcard--md .pcard__suit {
  font-size: 12px;
}
.pcard--lg .pcard__rank {
  font-size: 21px;
}
.pcard--lg .pcard__suit {
  font-size: 16px;
}

.pcard__center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  opacity: 0.92;
}
.pcard--xs .pcard__center {
  font-size: 13px;
}
.pcard--sm .pcard__center {
  font-size: 21px;
}
.pcard--md .pcard__center {
  font-size: 26px;
}
.pcard--lg .pcard__center {
  font-size: 38px;
}

/* 牌背：深红底 + 金色菱形纹 + 中央徽章 */
.pcard--back {
  background:
    repeating-linear-gradient(45deg, transparent 0 5px, rgba(255, 215, 130, 0.16) 5px 6px),
    repeating-linear-gradient(-45deg, transparent 0 5px, rgba(255, 215, 130, 0.16) 5px 6px),
    linear-gradient(160deg, #9c1f2b 0%, #7a1722 60%, #5c0f19 100%);
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 226, 160, 0.85),
    inset 0 0 0 3px #7a1722;
}
.pcard--back::before {
  content: '';
  position: absolute;
  inset: 14% 20%;
  border: 1px solid rgba(255, 226, 160, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(255, 226, 160, 0.28), transparent 70%);
}
.pcard--back::after {
  content: '旋';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffe2a0;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0.92;
}
.pcard--xs.pcard--back::after {
  font-size: 9px;
}
.pcard--sm.pcard--back::after {
  font-size: 14px;
}
.pcard--md.pcard--back::after {
  font-size: 20px;
}
.pcard--lg.pcard--back::after {
  font-size: 30px;
}
