.site-popup-mask {
  position: fixed;
  inset: 0;
  z-index: 100000;
  opacity: 0;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(2px);
  transition: opacity .18s ease;
}

.site-popup-mask.site-popup-show {
  opacity: 1;
}

.site-popup-mask.site-popup-leave {
  opacity: 0;
}

.site-popup-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75%;
  height: 400px;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #202620;
  background: #fffdf6;
  border: 1px solid #e5bf5c;
  border-radius: 12px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
  transform: translate(-50%, -48%) scale(.96);
  transition: transform .18s ease;
}

.site-popup-show .site-popup-dialog {
  transform: translate(-50%, -50%) scale(1);
}

.site-popup-dialog.site-popup-dragging {
  transition: none;
}

.site-popup-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px 0 16px;
  color: #fff2af;
  background: linear-gradient(180deg, #b91d27, #7d0911);
  border-bottom: 1px solid #e5bf5c;
  cursor: move;
  touch-action: none;
  user-select: none;
}

.site-popup-head strong {
  overflow: hidden;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .48);
}

.site-popup-x {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  font: 300 27px/30px Arial, sans-serif;
}

.site-popup-main {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffefb, #fff8e7);
  -webkit-overflow-scrolling: touch;
  user-select: text;
}

.site-popup-main img {
  max-width: 100%;
  height: auto;
}

.site-popup-main span {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.site-popup-foot {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: #fff;
  border-top: 1px solid #eadcb9;
}

.site-popup-foot button {
  width: 100%;
  min-height: 36px;
  color: #fff8dc;
  background: linear-gradient(180deg, #1d4b3b, #0a2e22);
  border: 1px solid #d5ae50;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 380px) {
  .site-popup-dialog {
    width: 82%;
  }

  .site-popup-main {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-popup-mask,
  .site-popup-dialog {
    transition: none;
  }
}
