.if-banner-ad {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1035;
  width: min(640px, calc(100vw - 2rem));
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.if-banner-ad__widget {
  position: relative;
  width: 100%;
  pointer-events: auto;
}
.if-banner-ad__frame {
  width: 100%;
  aspect-ratio: 800 / 150;
  background: #e8eef3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}
.if-banner-ad__frame.is-loading {
  background: linear-gradient(90deg, #e8eef3 0%, #f6f8fa 50%, #e8eef3 100%);
  background-size: 200% 100%;
  animation: if-banner-shimmer 1.2s ease-in-out infinite;
}
.if-banner-ad__frame a {
  display: block;
  width: 100%;
  height: 100%;
}
.if-banner-ad__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.if-banner-ad__frame.is-loading img {
  opacity: 0;
}
.if-banner-ad__close {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}
.if-banner-ad__close:hover,
.if-banner-ad__close:focus-visible {
  background: rgba(17, 24, 39, 0.9);
  outline: none;
}
@keyframes if-banner-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (max-width: 575.98px) {
  .if-banner-ad {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    padding: 0 0 env(safe-area-inset-bottom, 0);
  }
  .if-banner-ad__widget {
    max-width: none;
  }
  .if-banner-ad__frame {
    border-radius: 0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.18);
  }
  .if-banner-ad__close {
    top: 6px;
    right: 6px;
  }
}
