@charset 'UTF-8';
@font-face {
    font-family: 'GmarketSansMedium';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
	padding: 0;
	margin: 0;
}

* {
	box-sizing: border-box;
	user-select: none;
}

h1 {
	font-family: 'GmarketSansMedium';
    font-weight: 400;
	margin: 0 16px;
	padding: 16px;
	display: inline;
	overflow: hidden;
	color: #37474f;
}

.container {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	width: 960px;
	height: 700px;
	text-align: center;
}

.wrap {
	display: inline-block;
	width: 600px;
	height: 700px;
	text-align: center;
	vertical-align: middle;

	position: absolute;
	top: 0;
	left: 0;
}

ul {
	counter-reset: itemCounter;
	list-style-type: none;
	margin: 0;
	padding: 0px 20px;
	overflow-x: hidden;
	overflow-y: auto;
	width: 400px;

	height: 580px;
	top: 120px;
	left: 600px;
	position: absolute;
}

li {
	counter-increment: itemCounter;
	position: relative;
	width: 320px;
	margin: 5px 0px;
	padding: 10px;
	border-radius: 50px 0 0 50px;
	/*border: 1px solid black;*/
	background: linear-gradient(to right, #eee 11%, rgba(0, 0, 0, 0) 0%);
	box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
	transition: box-shadow 0.2s ease;
}

li:hover {
	/*box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);*/
	box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.6);
}

li>div {
	cursor: pointer;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	text-align: center;
}



#button-tooltip {
	/*display: none;*/
	background: #eff0f1;
	position: fixed;
}
#button-tooltip .command {
	color: #7D2727;
	padding: 5px;
	display: inline-block;
	text-align: right;
	width: 90px;
}
#button-tooltip .number {
	color: #3777CF;
	padding: 5px;
	display: inline-block;
	text-align: left;
	width: 60px;
}

li.item.empty>.item-weight,
li.item.empty>.item-weight-add,
li.item.empty>.item-weight-sub,
li.item.empty>.item-delete {
	display: none !important;
}
li.item.empty::after {
	content: '';
}
li.item.empty>.item-title::after {
	content: '항목 추가';
	color: #aaa;
}
li.item.empty>.item-title:focus::after {
	content: '';
}

li.item>.item-title {
	cursor: text;
	position: relative;
	text-align: left;
	margin-left: 30px;
	margin-right: 150px;
	padding: 2px 15px;
	white-space: nowrap;
	overflow: hidden;

	border-radius: 0px;

	color: black;
	text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
}

li.item>.item-title:focus {
	background: transparent;
}

li.item>.item-weight {
	padding: 10px 0;
	cursor: default;
	width: 45px;
	right: 100px;
	left: auto;
	text-align: right;
	overflow: visible;
}

li.item>.item-weight[data-weight]::before {
	content: 'x' attr(data-weight);
}

li.item>.item-weight-add,
li.item>.item-weight-sub {
	width: 20px;
	height: 20px;
	border-radius: 10px;
	left: 225px;
	/*border: 1px solid transparent;*/
	/*transition: border-color 0.2s ease;*/
	transition: box-shadow 0.2s ease,
				color 0.2s ease;
	box-shadow: 0px 0px 10px transparent;
	color: transparent;
}
li.item>.item-weight-add {
	top: -1px;
}

li.item>.item-weight-sub {
	top: 21px;
}

li.item:hover>.item-weight-add,
li.item:hover>.item-weight-sub {
	color: black;
	box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.3);
}

li.item>.item-weight-add:hover,
li.item>.item-weight-sub:hover {
	/*border: 1px solid black;*/
	box-shadow: 0px 0px 2px black;
}

li.item>.item-delete {
	width: 20px;
	height: 20px;
	top: 10px;
	left: 10px;
	border-radius: 10px;
	color: transparent;
	background: transparent;
	box-shadow: 0px 0px 10px transparent;
	transition: color 0.2s ease,
				background-color 0.2s ease;
}
li.item:hover>.item-delete {
	color: red;
	background: white;
}
li.item>.item-delete:hover {
	color: white;
	background: red;
}

li::before,
ul.lock>li::before {
	content: counter(itemCounter);
	position: absolute;
	top: 10px;
	left: 9px;

	color: white;
	text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
	width: 24px;
	text-align: center;
}
li:hover::before {
	content: '';
}
li.empty::before {
	content: '+';
	color: black;
	text-shadow: none;
}
li.empty {
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.7s ease;
}
ul.lock>li.item.empty {
	opacity: 0;
}
li.empty:hover {
	opacity: 1;
}
li.empty:hover [contenteditable] {
	background: transparent;
	cursor: pointer;
}
li[data-chance]::after {
	content: attr(data-chance) '%';
	position: absolute;
	top: 10px;
	left: 260px;
	width: 40px;
	overflow: visible;
	text-align: center;
}

*[contenteditable] {
	border-radius: 20px;
	white-space: nowrap;
}

*[contenteditable]:hover {
	background: #eff;
}
ul.lock .item-title[contenteditable]:hover {
	background: transparent;
	cursor: default;
}

*[contenteditable]:focus {
	outline: none;
	background: #eee;
}

#roll.button {
	font-family: 'GmarketSansMedium';
    font-weight: 400;
	font-size: 28px;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0 auto;
	width: 300px;
	height: 50px;
	transition: background-color 0.2s ease;
	cursor: pointer;
	padding: 10px;
}

#roll.button::after {
	content: '시작';
}
#roll.button.active::after {
	content: '정지!!';
}

#roll.button {
	background: #607D8B;
	border: 1px solid white;
	color: white;
}
#roll.button:hover {
	background: white;
	border: 1px solid #607D8B;
	color: #607D8B;
}
#roll.button:active {
	background: white;
	border: 1px solid #999;
	color: #999;
}

#roll.button.active {
	background: white;
	border: 1px solid red;
	color: red;
	animation: shake-y 0.2s linear infinite;
}
#roll.button.active:hover {
	background: red;
	border: 1px solid white;
	color: white;
}
#roll.button.active:active {
	background: white;
	border: 1px solid #999;
	color: #999;
}

ul.lock .item-delete,
ul.lock .item-weight-add,
ul.lock .item-weight-sub {
	display: none !important;
}

@keyframes shake-x {
	0%, 50%, 100% {
		transform: translate(0, 0);
	}
	25% {
		transform: translate(-3px, 0);
	}
	75% {
		transform: translate(3px, 0);
	}
}
@keyframes shake-y {
	0%, 50%, 100% {
		transform: translate(0, 0);
	}
	25% {
		transform: translate(0, -3px);
	}
	75% {
		transform: translate(0, 3px);
	}
}

/*scroll bar*/

::-webkit-scrollbar-track
{
	background-color: transparent;
}

::-webkit-scrollbar
{
	width: 10px;
	background-color: transparent;
}

::-webkit-scrollbar-thumb
{
	background-color: #eee;
	/*border: 2px solid #efeef1;*/
	border-radius: 5px;
}

@keyframes FO {
	0% {
		color: transparent;
		opacity: 0;
		transform: translate(0, -10px);
	}
	15%, 80% {
		color: black;
		opacity: 1;
		transform: translate(0, 0);
	}
	100% {
		color: transparent;
		opacity: 0;
		transform: translate(0, -150%);
	}
}

#result {
	width: 100%;
	height: 100px;
	text-align: center;
	display: block;
	margin: auto;
	position: absolute;
	font-size: 36px;
	font-family: 'GmarketSansMedium';
    font-weight: 400;
	line-height: 100px;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: white;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
	color: black;
	opacity: 0;
}
#result.out {
	display: none;
}
#result.play {
	animation: FO 2s ease;
}