/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

@-webkit-keyframes rainbow {
	0% {-webkit-filter: hue-rotate(0deg);filter: hue-rotate(0deg)}
	100% {-webkit-filter: hue-rotate(360deg);filter: hue-rotate(360deg)}
}

@keyframes rainbow {
	0% {-webkit-filter: hue-rotate(0deg);filter: hue-rotate(0deg)}
	100% {-webkit-filter: hue-rotate(360deg);filter: hue-rotate(360deg)}
}

:root {
	--width: 1440px;
	--height: 870px;
	--scale: 1;
	--left: 0;
	--top: 0;
}

* {
	-webkit-box-sizing: border-box;
	        box-sizing: border-box;
	user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
	outline: none;
}

html {
	background-color: #000000;
}

body {
	container-type: size;
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;

	background: #778899;
	background: -o-linear-gradient(45deg,#778899 0%, #99AABB 50%, #778899 100%);
	background: linear-gradient(45deg,#778899 0%, #99AABB 50%, #778899 100%);
	font-family: 'Gaegu Regular', sans-serif;
	font-size: 18px;
	line-height: 1;

	h2 {
		font-family: 'Gaegu Bold', sans-serif;
		margin: 16px 0 0 0;
	}

	p {
		margin: 4px 0;
	}

	a {
		color: #478bcf;
	}

	.preload {
		position: absolute;
		opacity: 0;
		pointer-events: none;
		font-size: 0;
	}

	button {
		position: absolute;
		border: 0;
		background-repeat: no-repeat;
		background-color: transparent;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		font-size: 0;
	}

	.container {
		position: absolute;
		width: var(--width);
		height: var(--height);
		top: var(--top);
		left: var(--left);
		-webkit-transform: scale(var(--scale));
		    -ms-transform: scale(var(--scale));
		        transform: scale(var(--scale));
		-webkit-transform-origin: top left;
		    -ms-transform-origin: top left;
		        transform-origin: top left;
		background-image: url('../graphics/device.svg');
		background-position: center;
		background-repeat: no-repeat;

		.screen {
			position: absolute;
			width: 100%;
			height: 100%;
			display: -webkit-box;
			display: -ms-flexbox;
			display: flex;
			-webkit-box-pack: center;
			    -ms-flex-pack: center;
			        justify-content: center;
			-webkit-box-align: center;
			    -ms-flex-align: center;
			        align-items: center;
			padding-bottom: 30px;

			.background {
				position: absolute;
				width: 620px;
				height: 400px;
				background-image: url('../graphics/screen.svg');
				background-position: center;
				background-repeat: no-repeat;
				-webkit-box-shadow: inset 0px 4px 8px 0px #00000099;
				        box-shadow: inset 0px 4px 8px 0px #00000099;
			}
			.ghosts {
				opacity: 0.05;
			}
			.shadows {
				margin-top: 8px;
				-webkit-filter: blur(2px);
				        filter: blur(2px);
				opacity: 0.5;
			}
			canvas {
				position: absolute;
				width: 620px;
				height: 400px;
			}
			.glare {
				position: absolute;
				width: 620px;
				height: 400px;
				background-image: url('../graphics/glare.svg');
				background-position: center;
				background-repeat: no-repeat;
				opacity: 0.4;
				mix-blend-mode: overlay;
			}
		}
		.buttons {
			position: absolute;
			width: 100%;
			height: 100%;
			.panels {
				display: none;
			}
			button.sticker {
				width: 180px;
				height: 162px;
				background-image: url('../graphics/sticker.svg');
			}
			button.sticker:hover,
			button.sticker:active,
			button.sticker.attention {
				-webkit-animation-name: rainbow;
				        animation-name: rainbow;
				-webkit-animation-duration: 1s;
				        animation-duration: 1s;
				-webkit-animation-iteration-count: infinite;
				        animation-iteration-count: infinite;
			}
			button.gray {
				width: 65px;
				height: 38px;
				border-radius: 32px;
				background-color: #A7A5A6;
				-webkit-box-shadow: inset 0px 4px 4px #bbbbbb,
							inset 0px -4px 4px #777777,
							0px 4px 12px #333333;
				        box-shadow: inset 0px 4px 4px #bbbbbb,
							inset 0px -4px 4px #777777,
							0px 4px 12px #333333;
				-webkit-transition: -webkit-box-shadow 0.2s;
				transition: -webkit-box-shadow 0.2s;
				-o-transition: box-shadow 0.2s;
				transition: box-shadow 0.2s;
				transition: box-shadow 0.2s, -webkit-box-shadow 0.2s;
			}
			button.gray:active {
				-webkit-box-shadow: inset 0px 2px 2px #aaaaaa,
							inset 0px -2px 2px #666666,
							0px 2px 2px #333333;
				        box-shadow: inset 0px 2px 2px #aaaaaa,
							inset 0px -2px 2px #666666,
							0px 2px 2px #333333;
			}
			button.red {
				width: 94px;
				height: 94px;
				border-radius: 100%;
				background-color: #B60303;
				-webkit-box-shadow: inset 0px 4px 8px #ff3300,
							inset 0px 4px 32px #880000,
							inset 0px -4px 4px #660000,
							0px 8px 24px #000000;
				        box-shadow: inset 0px 4px 8px #ff3300,
							inset 0px 4px 32px #880000,
							inset 0px -4px 4px #660000,
							0px 8px 24px #000000;
				-webkit-transition: -webkit-box-shadow 0.2s;
				transition: -webkit-box-shadow 0.2s;
				-o-transition: box-shadow 0.2s;
				transition: box-shadow 0.2s;
				transition: box-shadow 0.2s, -webkit-box-shadow 0.2s;
			}
			button.red:active {
				-webkit-box-shadow: inset 0px 1px 4px #ff3300,
							inset 0px 4px 32px #880000,
							inset 0px -4px 4px #660000,
							0px 4px 4px #000000;
				        box-shadow: inset 0px 1px 4px #ff3300,
							inset 0px 4px 32px #880000,
							inset 0px -4px 4px #660000,
							0px 4px 4px #000000;
			}
			button.zoom {
				width: 695px;
				height: 465px;
			}
			button:nth-of-type(1) {
				top: 340px;
				left: 80px;
			}
			button:nth-of-type(2) {
				top: 109px;
				left: 1178px;
			}
			button:nth-of-type(3) {
				top: 177px;
				left: 1178px;
			}
			button:nth-of-type(4) {
				top: 246px;
				left: 1178px;
			}
			button:nth-of-type(5) {
				top: 561px;
				left: 152px;
			}
			button:nth-of-type(6) {
				top: 561px;
				left: 1194px;
			}
			button:nth-of-type(7) {
				top: 364px;
				left: 1194px;
			}
			button:nth-of-type(8) {
				top: 188px;
				left: 371px;
			}
		}
	}
	dialog[open] {
		width: 100%;
		height: 100%;
		max-width: 640px;
		max-height: 480px;
		padding: 16px;
		background-color: transparent;
		border: 0;

		&::-webkit-backdrop {
			-webkit-backdrop-filter: blur(8px);
			        backdrop-filter: blur(8px);
			background-color: #00000066;
		}

		&::backdrop {
			-webkit-backdrop-filter: blur(8px);
			        backdrop-filter: blur(8px);
			background-color: #00000066;
		}
		.content {
			position: relative;
			width: 100%;
			height: 100%;
			background-image: url('../graphics/paper.svg');
			background-size: cover;
			background-position: center;
			border-radius: 2px;
			rotate: 1deg;
			display: -webkit-box;
			display: -ms-flexbox;
			display: flex;
			padding: 16px;
			gap: 32px;
			color: #845946;
			.close {
				top: 8px;
				right: 8px;
				width: 24px;
				height: 24px;
				background-image: url('../graphics/close.svg');
			}
			.page {
				-webkit-box-flex: 1;
				    -ms-flex: 1;
				        flex: 1;
			}
		}
	}
}

body[data-zoom="true"] {
	background: unset;
	.container {
		background-image: unset;
		.screen {
			padding-bottom: 0;
			.background,
			.glare {
				width: 100%;
				height: 100%;
			}
			canvas {
				width: auto;
				height: 100%;
			}
		}
		.buttons {
			.panels {
				display: -webkit-box;
				display: -ms-flexbox;
				display: flex;
				-webkit-box-pack: justify;
				    -ms-flex-pack: justify;
				        justify-content: space-between;
				margin-top: 280px;
				& div {
					width: 128px;
					height: 331px;
					background-color: #CCBFAF;
					border: 8px solid #551612;
					-webkit-box-shadow: 0 0 12px 0 #00000066;
					        box-shadow: 0 0 12px 0 #00000066;
					display: -webkit-box;
					display: -ms-flexbox;
					display: flex;
					-webkit-box-orient: vertical;
					-webkit-box-direction: normal;
					    -ms-flex-direction: column;
					        flex-direction: column;
					-webkit-box-pack: center;
					    -ms-flex-pack: center;
					        justify-content: center;
					-webkit-box-align: center;
					    -ms-flex-align: center;
					        align-items: center;
					gap: 48px;
					font-size: 20px;
					font-family: arial;
					font-weight: bold;
				}
				.left {
					border-radius: 0 64px 64px 0;
					border-left: 0;
				}
				.right {
					border-radius: 64px 0 0 64px;
					border-right: 0;
				}
			}
			button.gray,
			button.sticker {
				display: none;
			}
			button.red {
				-webkit-box-shadow: inset 0 4px 4px 0 #ff0000, inset 0 -4px 4px 0 #990000;
				        box-shadow: inset 0 4px 4px 0 #ff0000, inset 0 -4px 4px 0 #990000;
				border: 8px solid #551612;
			}
			button.red:active {
				-webkit-box-shadow: unset;
				        box-shadow: unset;
			}
			button:nth-of-type(5) {
				top: 497px;
				left: 12px;
			}
			button:nth-of-type(6) {
				top: 497px;
				left: 1334px;
			}
			button:nth-of-type(7) {
				top: 300px;
				left: 1334px;
			}
			button.zoom {
				top: 300px;
				left: 12px;
				width: 94px;
				height: 94px;
				border: 8px solid #551612;
				border-radius: 100%;
				background-color: #999;
				background-image: url('../graphics/close.svg');
				background-size: 48px;
				background-position: center;
				-webkit-box-shadow: inset 0 4px 4px 0 #cccccc, inset 0 -4px 4px 0 #666666;
				        box-shadow: inset 0 4px 4px 0 #cccccc, inset 0 -4px 4px 0 #666666;
			}
		}
	}
}

@container (max-width: 640px) or (max-height: 480px) {
	body {
		dialog[open] {
			.content {
				display: block;
				overflow: auto;
				background-image: none;
				background-color: #eeeedd;
				.close {
					position: sticky;
					top: 0;
					left: 100%;
				}
			}
		}
	}
}
