.btn1.next{
	padding:3px 20px;
	margin:0 auto;
	text-align:center;
	text-decoration:none;
	display:inline-block;
	border-radius:5px;
	font-size:14px;
}

/*#reset: hover{
	background: #F00;
	cursor: pointer;
}
*/
#contents{
	height: calc(100vh - 300px);
    width: 100%;
}

#contents .inner{
	width: 100%;
    max-height: 600px;
    position: relative;
    height: 100%;
    padding: 0;
    overflow: scroll;
    transform-origin: top center;
}

.bphotoArea figure{
	width: 100%;
	height: 100%;
}

.bphotoArea figure img{
	/*object-fit: cover;*/
}


#contents .inner.fit{
    overflow:hidden;
}

#contents .inner.fit main{
	width: fit-content !important;
	height: fit-content !important;
}

#contents .inner.fit #hagaki{
	transform: scale(1.0) !important;
}

/*
--------------------------------------*/
main{
	padding:3px 0 0;
    margin: 0 auto;

    /*transform-origin: top center;*/
}

main #hagakiBox{
	width: 100%;
	height: 100%;
}

main #hagaki{
	transform-origin: top left;
}


main.active #background{
	z-index:1;
}

main.active #hagaki .photoArea{
	border:none;
	background:none;
}

main.active #hagaki .bphotoArea{
    pointer-events: none;
}

#hagaki .photoArea{
	overflow: hidden;
}

#hagaki .bphotoArea{
	outline: none;
    position:absolute;
    overflow:hidden;
    cursor:pointer;
}

#hagaki .bphotoArea figure,
#hagaki .photoArea figure{
	margin: 0;
}

#hagaki .bphotoArea img{
    margin:0px;
    resize:none;
    position:static;
    zoom:1;
    display:block;
    cursor:pointer;
}

#hagaki .bphotoArea.b img{
	width:100%;
	height:auto;
}

#hagaki .bphotoArea.v img{
	width:auto;
	height:100%;
}

#hagaki .bphotoArea:hover img{
    outline:1px solid blue;
}



main.active .bphotoArea div img{
    width:100%;
    height:100%;
    display:block;
}

main.active #hagaki .txtArea{
	z-index:2;
}

#hagaki #object{
	width: 100%;
	height: 100%;
}

main.ex{
	position: fixed;
	/*background: #0009;*/
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#closeBig{
	display: none;
}

main.ex #closeBig{
	display: block;
}

/*main.ex #hagakiBox{
	margin:0 auto 0;
	width:360px;
	max-height:calc(100vh - 200px);
	overflow:hidden;
}
*/
main.ex #hagakiBox.over{
	overflow-y:auto;
}

main.ex #hagaki .bphotoArea.active{
	overflow: visible;
}

main.ex #background img{
/*	-webkit-filter: brightness(0.5);
    -moz-filter: brightness(0.5);
    -o-filter: brightness(0.5);
    -ms-filter: brightness(0.5);
*/    filter: brightness(0.5);
    opacity: .8;
}

.close{
	width: 40px;
	height: 40px;
	margin:0 10px 0 auto;
	color: #FFF;
	font-size: 40px;
	cursor: pointer;
}

#hagaki .photoArea.active{
	outline:none;
}


#hagaki #background{
	outline: 5mm solid #F0F0F0;
	outline-offset: -3mm;
	pointer-events:none;
}

#hagaki:hover #background{
	/*outline: 3mm solid #FFF5;*/
}

#photoEditor{
	position: fixed !important;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 0;
	text-align: center;
	z-index: 10000;
	background: #0009;
	transition-duration: .2s;
}

#photoEditor.upload{
	height:100vh;
	display: flex !important;
	flex-flow: column;
	justify-content: space-between;
}

#photoEditor .alert{
	position:absolute;
	top:40px;
	left:0;
	width:100%;
	padding: 0 20px;
	pointer-events: none;
	opacity:0;
	transition-duration:.5s;
}

#photoEditor .alert.active{
	opacity: 1;
}

#photoEditor .alert p{
	text-align: left;
	width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #FFF;
    padding: 10px 20px;
    color:#F00;
    font-size: 14px;
    line-height: 1.75;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 3px 3px 7px #0006;
}

#photoEditor.ex #pRotate{
	width: 100%;
	max-width: 440px;
	padding: 0 40px;
	display: flex;
	margin: 0 auto;
	justify-content: space-between;
	color: #FFF;
}


#photoEditor #pRotate.r .reset,
#photoEditor #pRotate .kaiten,
#photoEditor #pRotate .rote{
	padding:5px 0;
	margin: 0;
	display:inline-block;
	width: 50px;
	flex:auto;
	cursor: pointer;
	text-align: center;
}

#photoEditor #pRotate .reset,
#photoEditor #pRotate.r .kaiten{
	display: none;
}

#photoEditor #pRotate span img{
	height: 20px;
}

#photoEditor #pRotate .reset img,
#photoEditor #pRotate .kaiten img{
	margin-top: 5px;
	height: 15px;
}

#photoEditor #pRotate span:hover{
	background: #333;
}


#pSizer{
	color: #FFF;
	display: none;
}

#photoEditor ul{
	padding: 0;
	margin:0 auto;
	list-style: none;
	width: calc(100% - 40px);
	max-width: 360px;
	height:200px;
}

#photoEditor ul li{
	width: 100%;
	display: inline-block;
	flex: 1;
	padding: 0;
	margin: 0;
}

#photoEditor ul li label,
#photoEditor ul li span{
	padding: 0;
	display: inline-block;
	width: 100%;
	cursor: pointer;
}


#photoEditor ul li label{
	line-height: 40px;
	background: #FFF;
	height: 40px;
}


#photoEditor ul li label:hover,
#photoEditor ul li span: hover{
	background: #F00;
	color: #FFF;
}

#photoEditor ul li:hover,
#photoEditor ul li label: hover{
	color: red;
}


#photoEditor.ex{
	padding: 30px 0 10px;
	position: relative;
	height: 140px;
}

#photoEditor.ex #closeEditor{
	position:absolute;
	top:-40px;
	right: 20px;
	height: 40px;
	width: 40px;
	font-size: 30px;
	background: #0009;
	border-radius: 5px 5px 0 0;
}

#photoEditor.ex #Rtext{
	display: inline !important;
}

#photoEditor.ex #ReSelect{
	padding-top: 10px;
}

#photoEditor.select{
	cursor: wait !important;
}

#photoEditor.upload #pUpload,
#photoEditor.upload #ReSelect,
#photoEditor.upload #pSizer,
#photoEditor.upload #pRotate{
	display:none;
}

#photoEditor.upload #pUpload.active{
	display: block;
}

#photoEditor.upload #pSelect{
	display: block;
	margin-bottom: 5px;
}


#photoEditor.ex #ReSelect,
#photoEditor.ex #pSizer{
	display: block;
}

#photoEditor.ex #pUpload,
#photoEditor.ex #pSelect{
	display: none;
}

#photoEditor.ex #pUpload.active{
	display: block;
}

#photoEditor #size,
#photoEditor #angle{
	width: 100%;
	max-width: 260px;
	margin: 0 auto 10px;
}

#photoEditor .measure{
	width: 300px;
	padding: 0;
	margin: 0 auto;
	display:flex;
	justify-content: space-between;
}

#photoEditor .measure span{
	padding-top: 0;
	width: 30px;
}

/*#photoEditor.ex #closeEditor{
	display: none;
}
*/

#file,#cfile{
	display: none;
}


#sizealert{
	position:fixed;
	top:40px;
	left:0;
	width:100%;
	padding: 0 20px;
	pointer-events: none;
	opacity: 0;
	transition-duration:.5s;
	z-index: 10;
}

#sizealert p{
	text-align: left;
	width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #FFF;
    padding: 10px 20px;
    color:#F00;
    font-size: 14px;
    line-height: 1.75;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 3px 3px 7px #0006;
}

#sizealert.active{
	animation-name: ChangeOpacity;
	animation-duration: 5s;
}

@keyframes ChangeOpacity{
  0%{
	opacity:1;
  }
  70%{
	opacity:1;
  }
  100%{
	opacity:0;
  }
}
