.hby-app-popup {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 8, 22, 0.78);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.hby-app-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hby-app-popup__dialog {
  position: relative;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.hby-app-popup.is-open .hby-app-popup__dialog {
  transform: none;
}

.hby-app-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hby-app-popup__close:hover,
.hby-app-popup__close:focus-visible {
  background: rgba(0, 0, 0, 0.78);
  outline: none;
}

.hby-app-popup__media {
  position: relative;
  display: block;
  line-height: 0;
}

.hby-app-popup__media > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 24px);
  object-fit: contain;
  object-position: center bottom;
}

.hby-app-popup__stores {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4.8%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
}

.hby-app-popup__store {
  display: block;
  width: min(48%, 176px);
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
  transition: transform 0.16s ease;
}

.hby-app-popup__store img {
  display: block;
  width: 100%;
  height: auto;
}

.hby-app-popup__store:hover,
.hby-app-popup__store:focus-visible {
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

body.hby-app-popup-open {
  overflow: hidden;
}

@media (max-width: 420px) {
  .hby-app-popup {
    padding: 10px;
  }

  .hby-app-popup__dialog {
    width: min(100%, calc(100vw - 16px));
    border-radius: 18px;
  }

  .hby-app-popup__stores {
    gap: 6px;
    padding: 0 10px;
    bottom: 3.8%;
  }
}
