  .ylb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
  }

  .ylb.is-open {
    display: block;
  }

  .ylb__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
  }

  .ylb__panel {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .ylb__figure {
    margin: 0;
    width: min(92vw, 900px);
    height: min(82vh, 480px);
    display: grid;
    place-items: center;
  }

  .ylb__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  }

  .ylb__close,
  .ylb__nav {
    position: absolute;
    border: 0;
    border-radius: 999px;
    width: 44px;
    height: 44px;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    display: grid;
    place-items: center;
  }

  .ylb__close {
    top: 18px;
    right: 18px;
  }

  .ylb__nav--prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
  }

  .ylb__nav--next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
  }

  body.lightbox-open {
    overflow: hidden;
  }

  @media (max-width: 340px) {
    .ylb__panel {
      padding: 12px;
    }

    .ylb__figure {
      width: min(100%, 320px);
      height: min(70vh, 195px);
    }

    .ylb__close,
    .ylb__nav {
      width: 40px;
      height: 40px;
      font-size: 26px;
    }

    .ylb__nav--prev {
      left: 8px;
    }

    .ylb__nav--next {
      right: 8px;
    }

    .ylb__close {
      top: 8px;
      right: 8px;
    }
  }