#fbp-popup {
  position: fixed;
  inset: auto 0 max(0px, env(safe-area-inset-bottom));
  width: min(1149px, calc(100% - 16px));
  margin: 0 auto;
  z-index: 10010;
  padding: 0;
  border: 0;
  background: transparent;
  animation: fbp-rise .48s cubic-bezier(.18,.82,.25,1) both;
}
#fbp-popup[hidden] { display: none !important; }
#fbp-popup .fbp-controls { display: flex; justify-content: flex-end; padding: 5px; }
#fbp-popup .fbp-close {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 24px;
  min-width: 0;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #171321;
  color: #fff;
  cursor: pointer;
  box-shadow: none;
}
#fbp-popup .fbp-close::before,
#fbp-popup .fbp-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
#fbp-popup .fbp-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
#fbp-popup .fbp-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#fbp-popup .fbp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-height: min(45vh, 380px);
  overflow: auto;
}
#fbp-popup .fbp-item,
#fbp-popup .fbp-item a,
#fbp-popup .fbp-item img { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; }
#fbp-popup .fbp-item img { width: 100%; height: auto; aspect-ratio: 383 / 58; object-fit: contain; }
@keyframes fbp-rise {
  from { transform: translateY(calc(100% + 24px)); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (max-width: 700px) {
  #fbp-popup { width: min(440px, calc(100% - 16px)); }
  #fbp-popup .fbp-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #fbp-popup { animation: none; }
}
