.stack {
  position: relative;
  width: 100%;
  height: 480px;
}

.card-item {
  position: absolute;
  width: 140px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 0 0 8px #fff,
    inset 0 0 0 9px #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  left: 0;
  top: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* 撲克牌角落數字和花色 */
.card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  line-height: 0.9;
  gap: 1px;
}

.card-corner.top-left {
  top: 10px;
  left: 14px;
}

.card-corner.bottom-right {
  bottom: 10px;
  right: 14px;
  transform: rotate(180deg);
}

.card-value {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  letter-spacing: -1px;
}

.card-suit {
  font-size: 20px;
  margin-top: -2px;
  color: #000;
}

.card-value.red,
.card-suit.red {
  color: #d32f2f;
}

/* 中央花色 */
.card-center {
  font-size: 72px;
  font-weight: normal;
  color: #000;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-center.red {
  color: #d32f2f;
}

.btn-row {
  margin-bottom: 8px;
}
