.bf-modal[hidden] {
  display: none;
}

.bf-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(3 7 14 / 82%);
  backdrop-filter: blur(8px);
  animation: bf-fade-in 180ms ease-out both;
}

.bf-modal__dialog {
  position: relative;
  width: min(100%, 410px);
  max-height: calc(100svh - 40px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgb(214 177 91 / 75%);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(190 145 55 / 17%), transparent 42%),
    #050812;
  box-shadow: 0 24px 90px rgb(0 0 0 / 60%);
}

.bf-modal__close {
  position: absolute;
  z-index: 2;
  top: 20px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 56%);
  border-radius: 50%;
  background: rgb(5 8 18 / 78%);
  color: #fff;
  font: 300 27px/1 sans-serif;
  cursor: pointer;
}

.bf-modal__close:hover,
.bf-modal__close:focus-visible {
  border-color: #e3bd68;
  outline: 2px solid #e3bd68;
  outline-offset: 3px;
}

.bf-modal__art-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.bf-modal__art {
  display: block;
  width: 100%;
  height: min(74svh, 690px);
  object-fit: contain;
  background: #050505;
}

.bf-modal__action {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 16px;
  background: linear-gradient(100deg, #9a6a1c, #f2d47a 48%, #b47b24);
  color: #111015;
  font: 700 11px/1.4 "Manrope", sans-serif;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
}

@keyframes bf-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 520px) {
  .bf-modal {
    padding: 12px;
  }

  .bf-modal__dialog {
    width: min(100%, 390px);
    max-height: calc(100svh - 24px);
    padding: 8px;
  }

  .bf-modal__art {
    height: min(74svh, 620px);
  }

  .bf-modal__close {
    top: 16px;
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-modal {
    animation: none;
  }
}