/*基本設定*/
*, *:before, *:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  background-color: #ddffdd;
}

/*リンクの色*/
a:link{color: #ff3333}
a:visited{color: #ff0099}
a:hover{color: #ff3366}
a:active{color: #ff6699}

p {
  color: #004400;
}

b, .b {color: #000099;}

.title_img {
  width: 80%;
  max-width: 480px;
  text-align: center;
}

.cont{
  margin-left: auto;
  margin-right: auto;
}

.wrapper,
.piecewrapper {
  height: 25%;
  margin: 0;
	display: -webkit-flex;
	display: -moz-flex;
	display: -ms-flex;
	display: -o-flex;
	display: flex;
	justify-content: center;
	align-items: center;
}

.clear {
  width: 100%;
  height: 67%;
  position: absolute;
  top: 5;
  right: 0;
  bottom: 5;
  left: 0;
  background-color: rgba(50, 50, 50, 0.7);
  padding: 30px 0;
  display: none;
  z-index: 1000;

  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -o-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
}
.clear p{
  font-size: 70px;
  color: #ffffff;
  margin: 0;
  text-align: center;
}
@media screen and (max-width: 640px) {
  .clear {
    padding: 30% 0;
  }
  .clear p {
    font-size: 50px;
  }
}

/*ボード系*/
div.cream_outer,
div.resetarea {
  width: 320px;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  border-radius: 10px 10px 0 0;
  background: #ffffcc;
  position: relative;
}
div.resetarea {
  padding-top: 0;
  border-radius: 0 0 10px 10px;
}
@media screen and (max-width: 640px) {
  div.cream_outer,
  div.resetarea {
    width: calc(100% - 40px);
  }
}
@media screen and (max-width: 340px) {
  div.cream_outer,
  div.resetarea {
    width: 78%;
  }
}
div.cream_outer::before {
  content:"";
  display: block;
  padding-top: 150%;
}
div.cream_outer > div {
  padding: 10px;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
div.cream_box {
  width: 100%;
  height: 100%;
  margin: 0;
  background: #ffffcc;
  position: relative;
}

table.board {
  position: relative;
  width: 100%;
  height: auto;
  border-collapse: collapse;
}
td.masu {
  position: relative;
  width: 25%;
  height: auto;
  border: solid 0.1rem #000000;
  background: #f6f6ff;
}
@media screen and (max-width: 640px) {
  td.masu {
    border: solid 0.07rem #000000;
  }
}
td.masu::before {
  content:"";
  display: block;
  padding-top: 100%;
}

/*ボタン系*/
div.piece {
  width: 20%;
  cursor: move;
  position: absolute;
  z-index: 99;
  /* border: solid 1px #000000; */
  box-sizing: border-box;
}
div.piece > div {
  position: relative;
  width: 100%;
}
div.piece > div::before {
  content: "";
  display: block;
  padding-top: 100%;
}
div.piece > div > div {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

div.inpiece {
  width: 100%;
  height: 100%;
  background: #aaaaaa;
  border: solid 0.3rem #555555;
  display: flex;
	justify-content: center;
	align-items: center;
}


.drag {
  z-index: 101;
}

div.resetbtn {
  width: 120px;
  margin: 0 auto;
  font-size: 2.4rem;
  font-weight: bold;
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 0.8rem 0 1.0rem;
  background-color: #000000;
  color: #ffffff;
}
@media screen and (max-width: 720px) {
  div.resetbtn {
    width: 80px;
    font-size: 1.6rem;
    padding: 0.2rem;
  }
}
.resetbtn:active {
  -ms-transform: translateY(2px);
  -webkit-transform: translateY(2px);
  transform: translateY(2px);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
  border-bottom: none;
}

#piece00 { top: 51.25%; left: 2.5%;}
#piece01 { top: 51.25%; left: 27.5%;}
#piece02 { top: 51.25%; left: 52.5%;}
#piece03 { top: 51.25%; left: 77.5%;}
#piece10 { top: 63.75%; left: 2.5%;}
#piece11 { top: 63.75%; left: 27.5%;}
#piece12 { top: 63.75%; left: 52.5%;}
#piece13 { top: 63.75%; left: 77.5%;}

img.pieceimg{
  max-width: 100%;
}