.bm-activation-reward {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 避免全站 dialog 壳层样式给奖励弹窗的全屏容器刷出白色背景。 */
.bm-activation-reward[role="dialog"] {
  background: transparent;
  background-color: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bm-activation-reward[hidden] {
  display: none;
}

.bm-activation-reward__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
}

.bm-activation-reward__fireworks {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(90vw, 500px);
  height: min(78vh, 580px);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.bm-activation-reward__panel {
  position: relative;
  z-index: 3;
  width: min(88vw, 430px);
  max-height: min(86vh, 680px);
  animation: bmActivationRewardEnter 180ms cubic-bezier(.2, .85, .25, 1) both;
  filter: none;
}

.bm-activation-reward__image-button {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.bm-activation-reward__image-button:focus-visible {
  border-radius: 30px;
  outline: 3px solid rgba(34, 197, 94, 0.72);
  outline-offset: 4px;
}

.bm-activation-reward__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(86vh, 680px);
  object-fit: contain;
  user-select: none;
}

.bm-activation-reward__close {
  position: absolute;
  top: 8px;
  right: 4px;
  z-index: 2;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.68);
  color: #ffffff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.bm-activation-reward__close:hover,
.bm-activation-reward__close:focus-visible {
  background: rgba(17, 24, 39, 0.84);
  outline: none;
}

@keyframes bmActivationRewardEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .bm-activation-reward {
    padding: 14px;
  }

  .bm-activation-reward__fireworks {
    width: min(94vw, 410px);
    height: min(76vh, 540px);
  }

  .bm-activation-reward__panel {
    width: min(94vw, 380px);
    max-height: 84vh;
  }

  .bm-activation-reward__image {
    max-height: 84vh;
  }

  .bm-activation-reward__close {
    top: 4px;
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-activation-reward__panel {
    animation: none;
  }

  .bm-activation-reward__fireworks {
    display: none;
  }
}
