:root {
  --rect-width-pc: 700;
  --rect-height-pc: 408;
  --rect-width-sp: 375;
  --rect-height-sp: 220;
  --image-width-pc: 620;
  --image-height-pc: 348;
  --image-width-sp: 343;
  --image-height-sp: 193;
}

.section-system {
  margin-top: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* movie block */
.system-movie-block {
  margin-top: clamp(40px, min(60px, calc(var(--aspect-base) * 60)), 60px);
  margin-bottom: 0; /* clamp(60px, min(120px, calc(var(--aspect-base) * 120)), 120px); /**/
}

.system-movie-content {
  width: 100%;
  height: min(636px, calc(var(--aspect-base) * 636));
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;

  display: flex;
  justify-content: center;
  align-items: center;
}
.system-movie-background01 {
  background-image: url('/images/system-background01.png');
}
.system-movie-background02 {
  background-image: url('/images/system-background02.png');
}
.system-movie-background03 {
  background-image: url('/images/system-background03.png');
}
.system-movie-content:first-of-type {
  margin-top: 0;
}
.system-movie-content {
  margin-top: 16px;
}

.system-movie-wrapper {
  width: calc(var(--aspect-base) * var(--rect-width-pc)); /*clamp(var(--rect-width-sp), calc(var(--aspect-base) * var(--rect-width-pc)), var(--rect-width-pc)); /**/
  height: calc(var(--aspect-base) * var(--rect-height-pc)); /* clamp(var(--rect-height-sp), calc(var(--aspect-base) * var(--rect-height-pc)), var(--rect-height-pc)); /**/
  max-width: var(--rect-width-pc);
  max-height: var(--rect-height-pc);
  /*
  min-width: var(--rect-width-sp);
  min-height: var(--rect-height-sp);
  */
  background-image: url('/images/system-boxframe.svg');
  background-repeat: no-repeat;
  background-size: contain;  

  display: flex;
  justify-content: center;
  align-items: center;
  /* outline: 1px solid #77ffff; /**/
}

.system-movie-wrap {
  width: calc(var(--aspect-base) * var(--image-width-pc)); /* clamp(var(--image-width-sp), calc(var(--aspect-base) * var(--image-width-pc)), var(--image-width-pc)); /**/
  height: calc(var(--aspect-base) * var(--image-height-pc)); /* clamp(var(--image-height-sp), calc(var(--aspect-base) * var(--image-height-pc)), var(--image-height-pc)); /**/
  max-width: var(--image-width-pc);
  max-height: var(--image-height-pc);
  /*
  min-width: var(--image-width-sp);
  min-height: var(--image-height-sp);
  */
  filter: drop-shadow(0px 4px 40px rgba(255, 255, 255, 0.15));
}

.system-movie-youtube {
  width: calc(var(--aspect-base) * var(--image-width-pc)); /* clamp(var(--image-width-sp), calc(var(--aspect-base) * var(--image-width-pc)), var(--image-width-pc)); /**/
  height: calc(var(--aspect-base) * var(--image-height-pc)); /* clamp(var(--image-height-sp), calc(var(--aspect-base) * var(--image-height-pc)), var(--image-height-pc)); /**/
  max-width: var(--image-width-pc);
  max-height: var(--image-height-pc);
  /*
  min-width: var(--image-width-sp);
  min-height: var(--image-height-sp);
  */
}

.system-overview {
  width: auto;
  max-width: 580px;
}
.wrapper-right {
  margin-left: clamp(16px, min(40px, calc(var(--aspect-base) * 40)), 40px);
}
.wrapper-left {
  margin-right: clamp(16px, min(40px, calc(var(--aspect-base) * 40)), 40px);
}

.system-name {
  font-size: clamp(18px, min(32px, calc(var(--aspect-base) * 32)), 32px);
  line-height: clamp(27px, min(48px, calc(var(--aspect-base) * 48)), 48px);
  font-weight: bold;
}
.system-description {
  margin-top: min(24px, calc(var(--aspect-base) * 24));
  font-size: clamp(14px, min(16px, calc(var(--aspect-base) * 16)), 16px);
  line-height: clamp(21px, min(27px, calc(var(--aspect-base) * 27)), 27px);
}

/* image block */
.system-image-block {
  padding: 80px 0 0 0;
  width: 100%;
  height: auto;
  overflow: hidden;
  position: relative;
}

.system-image-background {
  width: 100%;
  height: auto;
  margin: 0;
  position: absolute;
  top: 0;
  z-index: -1;
}
.system-image-background-wrapper {
  width: 100%;
  height: auto;
  position: relative;
}
.system-image-background01 {
  height: auto;
  width: 100%;
  max-height: 772px;
  margin: 0;
}
.system-image-background02 {
  height: auto;
  width: 100%;
  max-height: 773px;
  margin: 0;
}

.system-image-content {
  width: 100%;
  height: auto;
  margin-bottom: 80px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.system-image-bottom-margin {
  margin-bottom: 240px;
}

@media only screen and (max-width: 960px) {

  .section-system {
    margin-top: 80px;
  }

  .system-content {
    display: inline-block;
  }

  .system-movie-content {
    width: 100%;
    height: auto;
    /*
    min-width: 375px;
    min-height: 400px;
    */
    flex-direction: column;
    background-size: cover;
    padding: 60px 0;
  }
  .system-movie-wrapper {
    flex-direction: column;
    --rect-width: clamp(343px, calc(100% - 32px), 620px);
    width: calc(var(--rect-width) + 32px);
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: auto;
    background-size: cover;
  }
  .system-movie-wrap {
    width: clamp(343px, calc(100% - 32px), 620px);
    aspect-ratio: 16 / 9;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 13px 16px;
  }

  .system-overview {
    margin: 0 16px;
  }
  .system-overview p {
    display: flex;
    justify-content: center;
  }
  .content-left {
    display: flex;
    flex-direction: column-reverse;
  }
  .content-right {
    display: flex;
    flex-direction: column;
  }
  .system-name {
    margin-top: 20px;
  }
  .system-description {
    margin-top: 20px;
  }

  .system-image-background {
    width: 100%;
    height: 100%;
  }
  .system-image-background-wrapper {
    width: 100%;
    height: 100%;
  }

  .system-image-background-wrapper img {
    height: 50%;
    aspect-ratio: 480 / 193;
    width: auto;
  }
  .system-image-background01 {
    position: absolute;
    top: 0;
    left: -560px;
  }
  .system-image-background02 {
    position: absolute;
    bottom: 0;
    right: -196px;
  }

  .system-image-bottom-margin {
    margin-bottom: 120px;
  }
  
}