.p-simulation {
  display: block;
  position: relative;
}

.p-simulation p {
  margin: 0;
}

.p-simulation ul {
  list-style-type: none;
  padding: 0;
}

.p-simulation .l-wrapper {
  border-top: 3px solid #000;
  display: block;
  position: relative;
}
.p-simulation .l-contents {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
  overflow-y: auto;
}

/* canvas */
.p-simulation .l-canvas {
  background-color: #eee;
  display: block;
  /*
  height: calc(100vh - 10vh);
  */
  height: 828px;
  margin-left: auto;
  order: 1;
  position: sticky;
  top: 0;
  width: 1148px;
}

.p-simulation .l-canvas .my_canvas {
  background-color: #fff;
  display: block;
  height: 100%;
  left: 50%;
  position: relative;
  top: 0;
  transform: translate(-50%);
  width: 90%;
}
.my_canvas canvas {
  position: absolute;
  top: 0;
  left: 0;
  /*
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-height: 100%;
  */
}
/* sidemenu */
.p-simulation .l-side {
  background-color: #eee;
  display: block;
  max-height: 828px;
  margin-left: 10px;
  margin-right: auto;
  order: 2;
  padding-bottom: 3px;
  width: 180px;
}

.p-simulation .l-side .side-head {
  background-color: #ddd;
  box-sizing: border-box;
  display: block;
  width: 100%;
}

.p-simulation .l-side .taste-list {
  box-sizing: border-box;
  display: block;
  margin-bottom: 0;
  margin-top: 5px;
  width: 100%;
}

.p-simulation .l-side .taste-list .taste-list__item {
  display: block;
  width: 100%;
}

.p-simulation .l-side .taste-list .taste-list__item .item-frame {
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  padding: 0 3px;
  width: 100%;
}

.p-simulation .l-side .taste-list .taste-list__item .img-box {
  /*
  border: 1px solid #000;
  */
  display: block;
  height: 40px;
  width: 40px;
}
.p-simulation .l-side .taste-list .taste-list__item .img-box.style-box {
  height: 50px;
}
.p-simulation .l-side .taste-list .taste-list__item .img-box .image {
  box-sizing: border-box;
  display: block;
  border: solid 1px;
  height: 100%;
  width: 100%;
}

.p-simulation .l-side .taste-list .taste-list__item .text-box {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-left: 3px;
  width: calc(100% - 42px);
}

.p-simulation .l-side .taste-list .taste-list__item:first-child .text-box {
  display: block
}

.p-simulation .l-side .taste-list .taste-list__item:first-child .text-box .category {
  font-size: 11px;
}

.p-simulation .l-side .taste-list .taste-list__item:first-child .text-box .name {
  font-size: 12px;
  font-weight: bold;
}

.p-simulation .l-side .taste-list .taste-list__item:not(:first-child) .text-box .category {
  color: #495057;
  font-size: 13px;
  text-align: center;
}

.p-simulation .l-side .taste-list .taste-list__item:not(:first-child) {
  border-top: 2px solid #000;
  margin-top: 3px;
  padding-top: 3px;
}
.p-simulation .l-side .taste-list .taste-list__item-sim:last-child {
  border-bottom: 2px solid #000;
  padding-bottom: 3px;
}

.sim-area_nm_p{
  padding-left:5px;
  text-align: left;
  width: 90%;
  font-size: 13px;
  font-weight: bold;
  color: #495057;
}

/* 素材選択画面用 */
.p-simulation .l-side .select-box {
  box-sizing: border-box;
  display: block;
  padding: 3px;
  width: 100%;
}

.p-simulation .l-side .select-box .img-box {
  box-sizing: border-box;
  display: block;
  height: auto;
  margin: 0 auto;
  width: 50%;
}

.p-simulation .l-side .select-box .img-box .image {
  display: block;
  width: 100%;
}

.p-simulation .l-side .select-box .color {
  display: block;
  font-size: 12px;
  margin-top: 3px;
  text-align: center;
}

.p-simulation .l-side .select-item {
  border-top: 2px solid #ddd;
  display: block;
  margin-top: 10px;
  padding: 10px 0;
}

.p-simulation .l-side .taste-list.select {
  display: flex;
    flex-wrap: wrap;
    gap: 2% 5%;
    padding: 0 10px;
    width: 100%;
}

.p-simulation .l-side .taste-list.select .taste-list__item {
  border-top: none;
  display: block;
  padding-top: 0;
  width: 47.5%;
}

/* 1行占有要素用クラス */
.p-simulation .l-side .taste-list.select .taste-list__item.full-width {
  width: 100%;
  flex-basis: 100%;
}
/* 1行占有要素用クラス */
.p-simulation .l-side .taste-list.select .taste-list__item.full-width p {
  font-size: 14px;
}

.p-simulation .l-side .taste-list .taste-list__item .img-box .selected {
  box-sizing: border-box;
  border: 3px solid #e27c1d;
}

.p-simulation .l-side .taste-list.select .taste-list__item:not(:first-child) {
  margin-top: auto;
}

.p-simulation .l-side .taste-list.select .taste-list__item:nth-child(n+3) {
  margin-top: 3%;
}

.p-simulation .l-side .taste-list.select .taste-list__item .img-box {
  border: none;
  display: block;
  width: 100%;
}

.p-simulation .l-side .taste-list.select .taste-list__item .img-box {
  display: block;
  height: auto;
  width: 100%;
}

.p-simulation .l-side .select-item .button-box {
  display: block;
  margin: 20px auto 0;
  width: 80%;
}

.p-simulation .l-side .select-item .button-box .button {
  align-items: center;
  background-color: #495057;
  border: 1px solid #495057;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  padding: 5px 0;
  position: relative;
  width: 100%;
}

.p-simulation .l-side .select-item .button-box .button:before {
  border-style: solid;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid #ffffff;
  border-left: 0;
  content: "";
  height: 0;
  left: 25px;
  position: absolute;
  width: 0;
}

.p-simulation .l-side .select-item .button-box .button .text {
  color: #fff;
  display: block;
  font-size: 15px;
  font-weight: 600;
  padding-left: 15px;
  position: relative;
  text-align: center;
}

.p-simulation .l-side .select-item .button-box .button:hover {
  background-color: #fff;
  border: 1px solid #495057;
  box-sizing: border-box;
}

.p-simulation .l-side .select-item .button-box .button:hover:before {
  border-right-color: #495057;
}

.p-simulation .l-side .select-item .button-box .button:hover .text {
  color: #495057;
}

/* モーダルの背景を白に */
.modal-content {
  background-color: white;
  max-width: 900px; /* モーダルの最大幅を900pxに */
  margin: auto; /* 中央揃え */
  padding: 20px;
  border-radius: 8px;
}

/* モーダルボディのスクロールを許可 */
.modal-body {
  max-height: calc(100vh - 60px);
  overflow-y: auto; /* 縦スクロールを許可 */
  overflow-x: hidden; /* 横スクロールバーを非表示 */
}/*
@media (max-width: 768px) {
  .modal-body {
    max-height: 70vh;
  }
} 
  */
/* タイルリストの最大幅を800pxに */
.color-set-container {
  /*
  max-width: 800px;
  */
  max-width: 95%;
  margin: 0 auto; /* 中央揃え */
}

/* タイルリストのレイアウト */
#colorSetContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 30px; /* タイルの間隔を調整 */
  justify-content: center;
}
#styleSetContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 33px;
  justify-content: center;
}

/* タイルの幅を調整し、3列表示 */
.tile-container {
  width: calc(20% - 35px); /* 4列表示 */
}

/* サムネイルのデザイン（四角いまま） */
.color-tile img {
  border-radius: 0; /* 角を四角のまま */
  width: 100%;
}

/* ホバー時 */
.color-tile:hover img {
  /*filter: hue-rotate(190deg);*/
  transform:scale(1) ;
  cursor: pointer;
}

/* カラーセット名称 */
.color-tile span{
  font-size:14px;
}

/* 選ばれたカラーセットのサムネイルをオレンジ色で囲む */
/*.tile-container.selected .color-tile img {*/
/*    border: 3px solid orange;*/
/*    padding: -3px;*/
/*}*/

/* レスポンシブ対応（画面サイズに応じて列数を変更） */
@media (max-width: 768px) {
  .tile-container {
      width: calc(50% - 30px); /* 2列表示 */
  }
}

@media (max-width: 576px) {
  .tile-container {
      width: calc(100% - 10px); /* 1列表示 */
  }
}

/* footer */
.p-simulation .l-footer {
  border-top: 3px solid #000;
  display: block;
  margin-top: 5px;
  order: 3;
  width: 100%;
}

.p-simulation .l-footer .button-box {
  background-color: #495057;
  display: block;
  margin: 5px 0 0;
  width: 100%;
}

.p-simulation .l-footer .button-box .button-list {
  border-right: 1px solid #fff;
  border-left: 1px solid #fff;
  display: flex;
  flex-wrap: wrap;
  /*
  justify-content: space-between;
  */
  margin: 0 auto;
  padding: 0;
  width: 1320px;
}

.p-simulation .l-footer .button-box .button-list .button-list__item {
  box-sizing: border-box;
  display: block;
  width: calc(100% / 4);
}

.p-simulation .l-footer .button-box .button-list .button-list__item:not(:first-child) {
  border-left: 1px solid #fff;
}

.p-simulation .l-footer .button-box .button-list .button-list__item .button {
  align-items: center;
  background-color: #495057;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 600;
  justify-content: center;
  padding: .75rem 1.25rem;
}

.p-simulation .l-footer .button-box .button-list .button-list__item .button:hover {
  background-color: #fff;
  color: #495057;
  opacity: 1;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

/* ブラウザ可変 */
@media screen and (min-width: 1190px) and (max-width: 1344px) {
  .p-simulation .l-canvas {
    width: 1000px;
  }

  .p-simulation .l-footer .button-box .button-list {
    width: 1170px;
  }
}

@media screen and (min-width: 575px)  and (max-width: 1189px) {
  .p-simulation .l-contents {
    justify-content: space-between;
  }

  .p-simulation .l-canvas {
    height: 680px;
    width: 80%;
  }

  .p-simulation .l-canvas .my_canvas  {
    aspect-ratio: 1 / 1;
  }

  .p-simulation .l-side {
    width: 18%;
  }

  .p-simulation .l-footer .button-box {
    box-sizing: border-box;
    padding: 0 30px;
  }

  .p-simulation .l-footer .button-box .button-list {
    width: 100%;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item .button {
    font-size: 13px;
    padding: 10px 5px;
  }
}

@media screen and (max-width:700px) {
  .p-simulation .l-side .select-item .button-box .button:before {
    border-style: solid;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 7px solid #ffffff;
    left: 16%;
  }

  .p-simulation .l-side .select-item .button-box .button .text {
    font-size: 14px;
    padding-left: 12px;
  }
}

/* 縦並び： 574pxから下*/
@media screen and (max-width: 574px) {
  .p-simulation
  {
    overflow-y: hidden;
  }
  .p-simulation .l-wrapper {
    border-top: none;
  }

  .p-simulation .l-contents {
    flex-direction: column;
    height: 100vh;
    margin: 0;
    position: relative;
  }

  .p-simulation .l-canvas {
    border-top: 3px solid #000;
    height: 330px;
    margin: 0 auto;
    order: 1;
    position: sticky;
    width: 100%;
  }
  .p-simulation .l-canvas .my_canvas
  {
    width: 100%;
    left: 51.2% !important;
    background-color: unset;
  }

  .p-simulation .l-side {
    height: calc(100vh - 506px);
    order: 3;
    margin: 0;
    overflow-y: scroll;
    /*
    position: fixed;
    top: 406px;
    */
    bottom: 0;
    width: 100%;
    padding-left: 1%;
  }

  .p-simulation .l-side .taste-list .taste-list__item .text-box {
    justify-content: unset;
    width: calc(100% - 52px);
  }

  .p-simulation .l-side .taste-list .taste-list__item:not(:first-child) .text-box .category {
    text-align: left;
  }

  .p-simulation .l-footer {
    /*
    height: 93px;
    */
    order: 2;
    position: sticky;
    z-index: 3;
  }

  .p-simulation .l-footer .button-box {
    background-color: #f7f7f7;
    box-sizing: border-box;
    margin-top: 0;
    padding: 5px;
    width: 100%;
  }

  .p-simulation .l-footer .button-box .button-list {
    justify-content: space-between;
    width: 100%;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item {
    width: calc(100% / 4.2);
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item:not(:first-child) {
    border: none;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item:nth-child(n+3) {
    /*
    margin-top: 5px;
    */
  }

  .p-simulation .l-side .taste-list.select {
    gap: 2% 2%;
  }

  .p-simulation .l-side .select-all {
    /* margin-top: 3em; */
  }

  .p-simulation .l-side .taste-list.select .taste-list__item {
    width: calc(100% / 4 - 2%);
  }

  /* レスポンシブ：1行占有要素用クラス */
  .p-simulation .l-side .taste-list.select .taste-list__item.full-width {
    width: 100%;
    flex-basis: 100%;
  }

  .p-simulation .l-side .taste-list.select .taste-list__item:not(:first-child) {
    margin-top: 0;
  }

  .p-simulation .l-side .select-box .img-box {
    width: 30%;
    display: none;
  }

  .p-simulation .l-side .taste-list.select .taste-list__item:nth-child(n+3) {
    margin-top: 0;
  }

  .p-simulation .l-side .taste-list.select .taste-list__item:nth-child(n+5) {
    margin-top: 3%;
  }

  .p-simulation .l-side .select-item {
    padding-bottom: 20px;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item .button {
    padding: 10px 5px;
  }

  .p-simulation .l-side .select-item .button-box .button {
    padding: 10px 0;
  }

  .p-simulation .l-side .select-item .button-box {
    /*
    margin-top: 50px;
    */
    margin-top: 12%;
    width: 50%;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item .button {
    font-size: 12px;
  }
}

/* 縦並び： 430pxから下*/
@media screen and (max-width: 455px) {
  .p-simulation .l-side .select-item .button-box {
    width: 60%;
  }

  .p-simulation .l-footer .button-box .button-list .button-list__item .button {
    font-size: 9px;
  }
}

.modal-footer {
    justify-content: flex-start !important;
}

@media screen and (max-width: 375px) {
  .p-simulation .l-canvas {
    height: 310px;
  }
  .p-simulation .l-canvas .my_canvas
  {
    left: 52.7% !important;
  }
}