/*基本設定*/
body {
  background-color: #ddffdd;
}
.main {
  padding-top: 1.0rem;
}

/*リンクの色*/
a:link{color: #ff3333}
a:visited{color: #ff0099}
a:hover{color: #ff3366}
a:active{color: #ff6699}

p {
  color: #004400;
}
b, .b, strong .strong {
  color: #000099;
}

.cont {
  margin-left: auto;
  margin-right: auto;
}

.title_img {
  width: 80%;
  max-width: 480px;
  text-align: center;
}

.box {
  width: 700px;
  height: auto;
  margin: auto;
  padding: 10px 20px;
  background-color: #ffffcc;
  border-radius: 15px;
  position: relative;
}
@media screen and (max-width: 720px) {
  .box {
    width: 85%;
    padding: 2%;
    border-radius: 10px;
  }
}

.wrapper{
    margin: 30px 0;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    justify-content: center;
}
.cubewrapper {
  margin: 50px 0;
}
@media screen and (max-width: 720px) {
  .wrapper {
    margin: 1.0rem 0;
  }
  .cubewrapper {
    margin: 40px 0;
  }
}
@media screen and (max-width: 480px) {
  .cubewrapper {
    margin: 30px 0;
  }
}

.clear {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  position: absolute;
}
.clear p {
  margin-top: 15%!important;
  font-size: 140px;
  color: white;
  margin: 0;
}
@media screen and (max-width: 720px) {
  .clear p {
    margin-top: 50%!important;
    font-size: 70px;
  }
}

/*キューブ*/
.cube {
  display:block;
  position:relative;
  margin:0 auto;
  width:132px;
  height:132px;
  transform-style:preserve-3d;
  transform:rotateX(-15deg) rotateY(-15deg); /* ここで四角の角度を調整できる */
  z-index: 10;
}

.surface {
  position:absolute;
  left:0;
  right:0;
  box-sizing:border-box;
  border: 2px solid #999999;
  width:100%;
  height:100%;
}
.surface:nth-child(1) {/*上*/
  transform:translate3d(0, -66px, 0) rotateX(-90deg);
}
.surface:nth-child(2) {/*前*/
  transform:translate3d(0, 0, 66px);
}
.surface:nth-child(3) {/*右*/
  transform:translate3d(66px, 0, 0) rotateY(90deg);
}
.surface:nth-child(4) {/*左*/
  transform:translate3d(-66px, 0, 0) rotateY(-90deg);
}
.surface:nth-child(5) {/*後*/
  transform:translate3d(0, 0, -66px) rotateY(180deg);
}
.surface:nth-child(6) {/*下*/
  transform:translate3d(0, 66px, 0) rotateX(-90deg);
}
@media screen and (max-width: 720px) {
  .cube {width:100px; height:100px;}
  .surface:nth-child(1) {transform:translate3d(0, -50px, 0) rotateX(-90deg);}
  .surface:nth-child(2) {transform:translate3d(0, 0, 50px);}
  .surface:nth-child(3) {transform:translate3d(50px, 0, 0) rotateY(90deg);}
  .surface:nth-child(4) {transform:translate3d(-50px, 0, 0) rotateY(-90deg);}
  .surface:nth-child(5) {transform:translate3d(0, 0, -50px) rotateY(180deg);}
  .surface:nth-child(6) {transform:translate3d(0, 50px, 0) rotateX(-90deg);}
}
@media screen and (max-width: 600px) {
  .cube {width:80px; height:80px;}
  .surface:nth-child(1) {transform:translate3d(0, -40px, 0) rotateX(-90deg);}
  .surface:nth-child(2) {transform:translate3d(0, 0, 40px);}
  .surface:nth-child(3) {transform:translate3d(40px, 0, 0) rotateY(90deg);}
  .surface:nth-child(4) {transform:translate3d(-40px, 0, 0) rotateY(-90deg);}
  .surface:nth-child(5) {transform:translate3d(0, 0, -40px) rotateY(180deg);}
  .surface:nth-child(6) {transform:translate3d(0, 40px, 0) rotateX(-90deg);}
}
@media screen and (max-width: 480px) {
  .cube {width:64px; height:64px;}
  .surface{border:1.5px solid #999999;}
  .surface:nth-child(1) {transform:translate3d(0, -32px, 0) rotateX(-90deg);}
  .surface:nth-child(2) {transform:translate3d(0, 0, 32px);}
  .surface:nth-child(3) {transform:translate3d(32px, 0, 0) rotateY(90deg);}
  .surface:nth-child(4) {transform:translate3d(-32px, 0, 0) rotateY(-90deg);}
  .surface:nth-child(5) {transform:translate3d(0, 0, -32px) rotateY(180deg);}
  .surface:nth-child(6) {transform:translate3d(0, 32px, 0) rotateX(-90deg);}
}
@media screen and (max-width: 400px) {
  .cube {width:60px; height:60px;}
  .surface:nth-child(1) {transform:translate3d(0, -30px, 0) rotateX(-90deg);}
  .surface:nth-child(2) {transform:translate3d(0, 0, 30px);}
  .surface:nth-child(3) {transform:translate3d(30px, 0, 0) rotateY(90deg);}
  .surface:nth-child(4) {transform:translate3d(-30px, 0, 0) rotateY(-90deg);}
  .surface:nth-child(5) {transform:translate3d(0, 0, -30px) rotateY(180deg);}
  .surface:nth-child(6) {transform:translate3d(0, 30px, 0) rotateX(-90deg);}
}
@media screen and (max-width: 360px) {
  .cube {width:48px; height:48px;}
  .surface:nth-child(1) {transform:translate3d(0, -24px, 0) rotateX(-90deg);}
  .surface:nth-child(2) {transform:translate3d(0, 0, 24px);}
  .surface:nth-child(3) {transform:translate3d(24px, 0, 0) rotateY(90deg);}
  .surface:nth-child(4) {transform:translate3d(-24px, 0, 0) rotateY(-90deg);}
  .surface:nth-child(5) {transform:translate3d(0, 0, -24px) rotateY(180deg);}
  .surface:nth-child(6) {transform:translate3d(0, 24px, 0) rotateX(-90deg);}
}
.cube.selected .surface {
  border: 6px solid #ff6600;
}
@media screen and (max-width: 480px) {
  .cube.selected .surface{border:4px solid #ff6600;}
}

.surface.surr{background: #ff88cc;}
.surface.surb{background: #99bbff;}
.surface.surg{background: #77ff77;}
.surface.sury{background: #ffff77;}
/* .surface.surw{background: #ffffff;} */
/* .surface.surk{background: #000000;} */

/*ボタン系*/
.buttonbox {
  width: 100%;
  height: auto;
}
.button {
  width: 20%;
  max-width: 100px;
  height: auto;
  margin: 0.3rem 0.6rem;
  cursor: pointer;
  box-shadow: 0px 5px 7px rgba(0, 0, 0, 0.3);
  border-bottom: solid 6px #666666;
  border-radius: 20%;
  transition: .2s;
}
.button img {
  width: 100%;
}
.button:not(.inactive):active {
  position: relative;
  top: 0.3rem;
  box-shadow: none;
  border-bottom: none;
}
.button.inactive {
  cursor: inherit;
  box-shadow: none;
  border-bottom: none;
  opacity: 0.5;
}

/*ライト系*/
.lightbox {
  width: calc(100% - 1.0rem);
  margin: 0.5rem auto;
  display: flex;  
  align-items: center;
  justify-content: center;
}
.lightbox p {
  font-weight: bold;
  color: #000000;
  font-size: 3.6rem;
  margin: 0;
}
.light {
  background-color: #aaaaaa;
  box-shadow: 0 0 0.3rem 0.3rem #cccccc, 0.3rem 0.3rem 0.5rem 0.3rem #888888 inset; /* 外側のカラー・左上のカラー */
  height: 7.5rem;
  width: 7.5rem;
  border-radius:50%;
  margin: 1.5rem;
  transition: 0.3s;
}
.light.on {
  background-color: #00ff00;
  box-shadow: 0 0 0.3rem 0.3rem #e0ffd3, 0.3rem 0.3rem 0.5rem 0.3rem #c8ff00 inset;
}
@media screen and (max-width: 720px) {
  .lightbox p {
    font-size: 2.8rem;
  }
  .light {
    height: 4.5rem;
    width: 4.5rem;
    margin: 0.75rem;
  }
}