.home-entry-popup[hidden],
.bottom-promotion-banner[hidden] {
  display: none !important;
}

.home-entry-popup {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px 0;
  background: rgba(4, 12, 24, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.home-entry-popup__panel {
  position: relative;
  width: min(430px, 92vw);
  max-height: 94vh;
  padding-bottom: 52px;
}

.home-entry-popup__link {
  display: block;
  color: #fff;
  text-decoration: none;
}

.home-entry-popup__link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.46));
}

.home-entry-popup__close {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(8, 18, 33, 0.84);
  color: #fff;
  font: 700 30px/1 Arial, sans-serif;
  cursor: pointer;
}

.home-entry-popup__close:focus-visible,
.bottom-promotion-banner__close:focus-visible,
.home-entry-popup__link:focus-visible,
.bottom-promotion-banner__link:focus-visible {
  outline: 3px solid #fff2a8;
  outline-offset: 3px;
}

.home-entry-popup__cta {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 210px;
  min-height: 44px;
  padding: 8px 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #f52f26, #ff762d);
  box-shadow: 0 8px 26px rgba(184, 10, 8, 0.45);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.bottom-promotion-banner {
  position: fixed;
  z-index: 2147482000;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(600px, 100vw);
  margin: 0 auto;
  background: #460307;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

.bottom-promotion-banner__link,
.bottom-promotion-banner__link img {
  display: block;
  width: 100%;
}

.bottom-promotion-banner__link img {
  height: auto;
  aspect-ratio: 7.5 / 1;
  object-fit: cover;
}

.bottom-promotion-banner__close {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 150px;
  height: 40px;
  padding: 0 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 238, 163, 0.88);
  border-radius: 10px 10px 0 0;
  background: linear-gradient(#831018, #510208);
  color: #fff6cd;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

body.refsite-bottom-banner-visible {
  padding-bottom: var(--refsite-bottom-banner-height, 0) !important;
}

@media (max-width: 600px) {
  .home-entry-popup__panel {
    padding-bottom: 52px;
  }

  .bottom-promotion-banner__close {
    top: -36px;
    width: 132px;
    height: 36px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-entry-popup:not([hidden]) .home-entry-popup__panel {
    animation: refsite-popup-in 220ms ease-out both;
  }

  @keyframes refsite-popup-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}
