@charset "UTF-8";


@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@100..900&display=swap');


html,body{
	margin: 0;
	padding: 0;
	min-width: 320px;
}
body{
	font-size: 1.4rem;
	line-height: 1.7em;
}


/* base */
header{
	margin: 0 auto;
	padding: 30px 5px;
	width: calc(100% - 10px);
	border-bottom: 1px #222 solid;
	text-align: center;
}
	header h1{
		line-height: 1.2em;
		font-size: 3rem;
		font-weight: 200;
		font-family: "M PLUS 1", serif;
		font-style: normal;
	}
	header h1 a{
		color: #222;
		text-decoration: none;
	}
	header p{
		margin-top: 10px;
	}
main{
	margin: 30px auto 0 auto;
	padding: 0 10px;
	max-width: 800px;
}
footer{
	margin: 50px auto 0 auto;
	padding: 20px 5px;
	width: calc(100% - 10px);
	border-top: 1px #222 solid;
	color: #222;
	font-family: "M PLUS 1", serif;
	font-size: 1.5rem;
	text-align: center;
}
	footer a{
		color: #222;
		text-decoration: none;
	}
	footer a:hover{
		color: #cc0000;
	}

h2{
	margin-top: 40px;
	padding-left: 8px;
	border-left: 10px #666 solid;
	font-size: 1.8rem;
	font-weight: bold;
	line-height: 1em;
}

h2+div{
	margin-top: 20px !important;
}


/* form */

/* 入力フォーム */
#form{
	margin: 0 auto;
	width: 100%;
}

/* form */
input[type=submit].form,
input[type=button].form{
	margin:  0;
	padding: 15px 10px;
	border: 0;
	width: 160px;
	background: #ddd;
	border-radius: 2px;
	cursor: pointer;
	line-height: 1em;
	font-size: 1.5rem;
}
input[type=submit].form:hover,
input[type=button].form:hover{
	background: #aaa;
	color: #fff;
}

#fileInput {
	display: none;
}



/* ファイル選択部分 */
#fileselect{
	height: 0;
	overflow: hidden;
}

/* 「ファイル選択」ボタン（非表示にする） */
#upfile {
	display: none;
}

/* 画像ドロップエリア */
#dropzone {
	margin: 20px auto 0 auto;
	padding: 20px 10px;
	width: 100%;
	border: 1px dashed #bbb;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	cursor: pointer;
	font-size: 1.4rem;
	text-align: center;
}
#dropzone:hover {
	border-color: #333;
	background-color: #f0f0f0;
	color: #000;
}
/* 「ファイルをリセット」ボタン */
#reset{
	margin-top: 10px;
}

/* サムネイル表示 */
#upimages {
	text-align: center;
}
#upimages img {
	max-width: 300px;
	max-height: 300px;
	object-fit: contain;
	margin: 5px;
}

/* プロンプト入力 */
#form div.prompt{
	margin-top: 0px;
}
#explanation{
	margin: 0;
	padding: 5px;
	height: 100px;
	width: 100%;
	border: 1px solid #999;
	border-radius: 2px;
	font-size: 1.4rem;
	resize: none;
	display: block;
}

#explanation:hover,
#explanation:focus{
	background: #f1f1f1;
}
#explanation:focus{
	border-color: #666;
}
#charCount{
	margin-top: 2px;
	padding: 0;
	border: 0;
	color: #999;
	line-height: 1em;
	font-size: 1.3rem;
	text-align: right;
}


/* 選択画像サムネイル */
#selectfile{
	margin: 0 auto 10px auto;
	padding: 10px 5px;
	background: #eee;
	border: 1px #bbb solid;
	border-radius: 5px;
	text-align: center;
}
#selectfile img,
#selectfile canvas{
	margin: 0 auto;
	max-height: 400px;
	width: 100%;
	max-width: 800px;
	
	object-fit: contain;
	
	text-align: center;
	vertical-align: top;
}

/* 回答 */
#answer{
	margin: 30px auto 0 auto;
	padding: 0 10px 30px 10px;
	width: 100%;
	background: #eee;
	overflow: hidden;
}
#answer .imgs{
}
#answer .imgs .img{
}
#answer .imgs .img img{
	margin: 0 auto;
	max-height: 400px;
	width: 100%;
	max-width: 800px;
	
	object-fit: contain;
	
	text-align: center;
	vertical-align: top;
}
#answer .text{
	margin: 30px auto 0 auto;
}


#message{
	opacity: 0;
	padding: 30px;
	background: #ffefef;
	color: #cc0000;
	font-size: 1.6rem;
	font-weight: bold;
	text-align: center;
}

#form{
	overflow: hidden; /* 高さが変化するときに中身がはみ出さないようにする */
	transition: height 1.0s ease; /* 高さをスムーズに変更 */
}
#message {
	opacity: 0; /* 初期状態は非表示 */
	transition: opacity 1.0s ease; /* フェードインのトランジション */
}

/* 回答受け取り後の下部「HOMEに戻る」リンク */
.to-home{
	margin: 50px auto 0 auto;
	width: 200px;
	text-align: center;
}
.to-home a{
	margin: 0 auto;
	padding: 15px 10px;
	border: 0;
	width: 100%;
	color: #222;
	display: block;
	text-decoration: none;

	background: #ddd;
	border-radius: 2px;
	cursor: pointer;
	line-height: 1em;
	font-size: 1.5rem;
}
.to-home a:hover{
	background: #aaa;
	color: #fff;
}



.ads {
	margin: 30px auto 0 auto;
	min-height: 280px;
	text-align: center;
}
