html, body {
	height: 100%;
}

body {
	margin: 0;
	background: #ded9cf;
	color: #333;
	font-family: "Microsoft YaHei", SimSun, sans-serif;
	font-size: 13px;
	overflow: hidden;
	user-select: none;
}

input, textarea {
	user-select: text;
}

#topbar {
	height: 40px;
	line-height: 40px;
	background: #f5f1e8;
	border-bottom: 1px solid #b9b2a4;
	padding: 0 10px;
}

#topbar button {
	margin-left: 4px;
}

#logo {
	font-weight: bold;
	margin-right: 12px;
}

#topspace {
	display: inline-block;
	width: 30px;
}

#resCount {
	color: #888;
	margin-left: 8px;
}

#pvDlgWrap {
	margin-left: 10px;
	color: #777;
}

#main {
	display: flex;
	height: calc(100% - 40px);
}

#sidebar {
	width: 240px;
	flex-shrink: 0;
	background: #f5f1e8;
	border-right: 1px solid #b9b2a4;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#meta {
	padding: 8px;
	border-bottom: 1px solid #d8d2c4;
	flex-shrink: 0;
}

.mrow {
	margin-bottom: 4px;
}

.mrow label {
	display: inline-block;
	width: 34px;
	color: #777;
}

.mrow input {
	width: 170px;
}

#nodeList {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 4px;
}

.nitem {
	padding: 4px 6px;
	cursor: pointer;
	border-bottom: 1px dotted #ddd6c8;
}

.nitem:hover {
	background: #ece6d8;
}

.nitem.sel {
	background: #d9c8b2;
}

.ntype {
	display: inline-block;
	width: 42px;
	font-weight: bold;
}

.nsum {
	color: #666;
}

.ncount {
	padding: 6px;
	color: #999;
}

#addbar {
	padding: 6px;
	border-top: 1px solid #d8d2c4;
	flex-shrink: 0;
}

#addbar button {
	margin: 2px 1px;
}

#stageWrap {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #cfc9bc;
	position: relative;
}

#stageWrap:fullscreen {
	background: #000;
}

#fsExit {
	display: none;
	position: absolute;
	right: 8px;
	top: 8px;
	z-index: 5;
}

#stageWrap:fullscreen #fsExit {
	display: block;
}

#stageBox {
	position: relative;
}

#sidepanel {
	width: 250px;
	flex-shrink: 0;
	background: #f5f1e8;
	border-left: 1px solid #b9b2a4;
	overflow-y: auto;
	padding: 8px;
	box-sizing: border-box;
}

#resHead {
	font-weight: bold;
	color: #777;
	margin-bottom: 4px;
}

.resitem {
	padding: 2px 0;
	color: #556;
}

.resitem button {
	margin-left: 6px;
}

#props {
	margin-top: 10px;
	border-top: 1px solid #d8d2c4;
	padding-top: 8px;
}

.phead {
	font-weight: bold;
	margin-bottom: 6px;
}

.pops button {
	margin-right: 4px;
}

.field {
	margin-bottom: 6px;
}

.flabel {
	display: inline-block;
	width: 56px;
	color: #777;
	vertical-align: middle;
}

.rangebox input {
	width: 120px;
	vertical-align: middle;
}

.rangeval {
	margin-left: 4px;
	color: #556;
}

.ckline {
	display: block;
	margin: 6px 0;
}

.xyrow {
	margin-bottom: 6px;
}

.xyrow label {
	margin: 0 4px 0 0;
	color: #777;
}

.xyin {
	width: 50px;
	margin-right: 8px;
}

.xyhint {
	color: #a09884;
}

.siderow label {
	margin-right: 14px;
}

.textin {
	width: 100%;
	height: 90px;
	box-sizing: border-box;
}

.tagwrap {
	margin-bottom: 6px;
}

.tagbox {
	display: inline-block;
}

.tagbox button {
	padding: 1px 5px;
	margin: 0 3px 4px 0;
	font-size: 11px;
}

.optrow {
	margin-bottom: 4px;
}

.optrow input[type="text"] {
	width: 90px;
}

.tip {
	color: #999;
	padding: 10px 0;
}

#props textarea {
	width: 100%;
	height: 70px;
	box-sizing: border-box;
}

button {
	font-family: inherit;
	font-size: 12px;
	padding: 3px 8px;
	background: #fbf8f1;
	border: 1px solid #a89f8c;
	cursor: pointer;
}

button:hover {
	background: #efe8d8;
}

button:disabled {
	color: #aaa;
	cursor: default;
}

input[type="text"], input[type="number"] {
	font-family: inherit;
	font-size: 12px;
	padding: 2px 4px;
	border: 1px solid #a89f8c;
	background: #fff;
}

select {
	font-family: inherit;
	font-size: 12px;
	border: 1px solid #a89f8c;
	max-width: 160px;
}

textarea {
	font-family: inherit;
	font-size: 12px;
	border: 1px solid #a89f8c;
}

/* ---------------- 播放引擎舞台 ---------------- */


.gao-root {
	position: relative;
	width: 800px;
	height: 600px;
	transform-origin: 0 0;
	user-select: none;
}

.gao-canvas {
	display: block;
	width: 800px;
	height: 600px;
	cursor: default;
}

/* ---------------- 手机端 ---------------- */

@media (max-width: 900px) {
	html, body {
		overflow: auto;
		height: auto;
	}

	#topbar {
		height: auto;
		line-height: 28px;
		display: flex;
		flex-wrap: wrap;
		padding: 4px 6px;
	}

	#topbar button {
		margin: 2px;
	}

	#logo {
		width: 100%;
	}

	#main {
		flex-direction: column;
		height: auto;
	}

	#stageWrap {
		order: 0;
		width: 100%;
		height: 58vw;
		max-height: 600px;
		flex: none;
	}

	#sidebar {
		order: 1;
		width: 100%;
		border-right: none;
		border-top: 1px solid #b9b2a4;
	}

	#nodeList {
		max-height: 32vh;
	}

	#sidepanel {
		order: 2;
		width: 100%;
		border-left: none;
		border-top: 1px solid #b9b2a4;
	}

.mrow input {
	width: calc(100% - 44px);
	}
}

.fold {
	display: block;
	width: 100%;
	text-align: left;
	padding: 4px 8px;
	background: #ece6d8;
	border: none;
	border-bottom: 1px solid #d8d2c4;
	font-weight: bold;
	color: #666;
}

.fold::after {
	content: '▾';
	float: right;
}

.fold.closed::after {
	content: '▸';
}

#meta.folded,
#nodeList.folded {
	display: none;
}

#aboutMask {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	z-index: 9;
}

#aboutBox {
	display: none;
	position: fixed;
	left: 50%;
	top: 40%;
	transform: translate(-50%, -50%);
	background: #fbf8f1;
	border: 1px solid #a89f8c;
	padding: 16px 30px;
	text-align: center;
	z-index: 10;
}

#aboutBox button {
	margin-top: 10px;
}
