.embla {
  width: 100%;
  margin: auto;
  margin-bottom: 4rem;
  overflow: hidden;

  --slide-height: 19rem;
  --slide-spacing: 1rem;
  --slide-size: 70%;

  /* index.js getOptions() で設定しているサイズを反映 */
  @media (max-width: 1240px) {
    padding-inline: 20px;
  }

  > .embla__viewport {
    border: 1px solid;

    > .embla__container {
      display: flex;
      touch-action: pan-y pinch-zoom;
      margin-left: calc(var(--slide-spacing) * -1);

      > .embla__slide {
        transform: translate3d(0, 0, 0);
        flex: 0 0 var(--slide-size);
        min-width: 0;
        padding-left: var(--slide-spacing);
        border: 1px solid;
        transition: opacity 0.2s ease-in-out;

        &:not(.is-snapped) {
          opacity: 0.16;
        }

        > .embla__slide__img {
          display: block;
          height: var(--slide-height);
          width: 100%;
          object-fit: cover;
          border-radius: 1.8rem;
        }
      }
    }
  }

  > .embla__controls {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: 1.8rem;

    > .embla__buttons {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.6rem;
      align-items: center;

      > .embla__button {
        touch-action: manipulation;
        cursor: pointer;
        border: 0;
        width: 3.6rem;
        height: 3.6rem;
        z-index: 1;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: rotate(0deg);

        &.embla__button--disabled {
          color: rgb(192, 192, 192);
        }
      }
    }

    .embla__dots {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
      margin-right: calc((2.6rem - 1.4rem) / 2 * -1);

      > .embla__dot {
        cursor: pointer;
        width: 2.6rem;
        height: 2.6rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        position: relative;

        &:before,
        &:after {
          width: 1.4rem;
          height: 1.4rem;
          border-radius: 50%;
          position: absolute;
          display: flex;
          align-items: center;
          content: '';
        }

        &:after {
          border: 0.2rem solid rgb(54, 49, 61);
          opacity: 0;
        }
      }

      > .embla__dot--selected:after {
        opacity: 1;
      }
    }
  }

  &.embla--autoplay > .embla__controls {
    grid-template-columns: auto 1fr auto;

    > .embla__autoplay {
      align-self: center;

      > .embla__autoplay__btn {
        cursor: pointer;
        touch-action: manipulation;
        border: 0.2rem solid currentColor;
        border-radius: 1.8rem;
        padding: 0 1.2rem;
        height: 3.6rem;
        font-size: 0.9rem;
        background-color: transparent;
      }
    }
  }

  .embla__button--hidden {
    display: none;
  }
}
