:root {
	--blue: #1298ee;
	--ink: #343434;
	--orange: #f05a18;
	color-scheme: light;
	font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	background: #FFFFFF;
	color: var(--ink);
	margin: 0;
	padding: 0;
}

button, a {
	-webkit-tap-highlight-color: transparent;
}

.preview-page {
	display: grid;
	min-height: 100vh;
	padding: 0;
	place-items: start center;
}

.game {
	background: #b7f0dd;
	box-shadow: 0 6px 20px rgb(42 78 27 / 18%);
	height: 300px;
	isolation: isolate;
	overflow: hidden;
	position: relative;
	width: 300px;
}

.game__background {
	height: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
	user-select: none;
	width: 100%;
	z-index: -2;
}

.screen, .phase {
	inset: 0;
	position: absolute;
}

.screen {
	display: none;
}

.screen.is-active {
	display: block;
}

.title-logo {
	display: block;
	height: auto;
	margin: 5px auto 0;
	width: 286px;
}

.title-character {
	height: 128px;
	inset: 86px auto auto 86px;
	object-fit: contain;
	position: absolute;
	width: 128px;
}

.start-button {
	background: var(--blue);
	border: 0;
	border-bottom: 5px solid #0675be;
	border-radius: 20px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 29px;
	font-weight: 900;
	inset: auto 24px 23px;
	letter-spacing: .08em;
	min-height: 55px;
	position: absolute;
	text-shadow: 0 2px 0 rgb(0 82 148 / 40%);
	width: 252px;
}

.start-button:active, .retry-button:active {
	transform: translateY(2px);
}

.round-count {
	background: rgb(255 255 255 / 83%);
	border-radius: 10px;
	color: #f15a17;
	font-size: 12px;
	font-weight: 900;
	inset: auto auto 7px 7px;
	padding: 3px 7px;
	position: absolute;
	z-index: 8;
}

.phase-title {
	display: block;
	height: auto;
	object-fit: contain;
	position: absolute;
	z-index: 5;
}

.phase-title--select {
	inset: 8px auto auto 14px;
	width: 272px;
}

.direction-pad {
	inset: 0;
	position: absolute;
}

.direction {
	background: transparent;
	border: 0;
	cursor: pointer;
	display: block;
	padding: 0;
	position: absolute;
}

.direction img {
	display: block;
	filter: drop-shadow(0 2px 1px rgb(64 68 53 / 22%));
	height: 100%;
	width: 100%;
}

.direction:hover, .direction:focus-visible {
	border-radius: 15px;
	outline: 3px solid rgb(255 246 41 / 95%);
	outline-offset: -3px;
}

.direction:disabled {
	cursor: default;
}

.direction--up {
	height: 64px;
	inset: 52px auto auto 108px;
	width: 84px;
}

.direction--left {
	height: 84px;
	inset: 127px auto auto 20px;
	width: 64px;
}

.direction--right {
	height: 84px;
	inset: 127px auto auto 216px;
	width: 64px;
}

.direction--down {
	height: 64px;
	inset: 228px auto auto 108px;
	width: 84px;
}

.play-character {
	filter: drop-shadow(0 3px 1px rgb(53 82 32 / 20%));
	height: 128px;
	inset: 104px auto auto 86px;
	object-fit: contain;
	position: absolute;
	width: 128px;
}

.phase--countdown .phase-title {
	animation: title-pulse .8s ease-in-out infinite alternate;
}

.phase-title--countdown {
	inset: 14px auto auto 46px;
	width: 208px;
}

.countdown-direction, .reveal-direction {
	display: grid;
	place-items: center;
	position: absolute;
}

.countdown-direction {
	z-index: 4;
}

.countdown-direction img, .reveal-direction img {
	display: block;
	height: 100%;
	width: 100%;
}

.countdown-direction[data-direction="up"], .reveal-direction[data-direction="up"] {
	height: 64px;
	inset: 52px auto auto 108px;
	width: 84px;
}

.countdown-direction[data-direction="right"], .reveal-direction[data-direction="right"] {
	height: 84px;
	inset: 119px auto auto 216px;
	width: 64px;
}

.countdown-direction[data-direction="down"], .reveal-direction[data-direction="down"] {
	height: 64px;
	inset: 228px auto auto 108px;
	width: 84px;
}

.countdown-direction[data-direction="left"], .reveal-direction[data-direction="left"] {
	height: 84px;
	inset: 119px auto auto 20px;
	width: 64px;
}

.countdown-character {
	filter: drop-shadow(0 3px 1px rgb(53 82 32 / 20%));
	height: 128px;
	inset: 104px auto auto 86px;
	object-fit: contain;
	position: absolute;
	width: 128px;
	z-index: 2;
}

.effect {
	height: 100%;
	inset: 0;
	object-fit: cover;
	pointer-events: none;
	position: absolute;
	width: 100%;
}

.effect--line {
	animation: effect-spin-in .2s ease-out;
	z-index: 1;
}

.phase-title--hoi {
	animation: pop-in .22s ease-out;
	inset: 8px auto auto 78px;
	width: 144px;
	z-index: 7;
}

.reveal-direction {
	z-index: 5;
}

.reveal-character {
	animation: character-turn .24s ease-out;
	height: 128px;
	inset: 96px auto auto 86px;
	object-fit: contain;
	position: absolute;
	width: 128px;
	z-index: 4;
}

.speech-bubble {
	animation: pop-in .25s .08s both ease-out;
	height: 60px;
	inset: 87px auto auto 180px;
	object-fit: contain;
	position: absolute;
	width: 108px;
	z-index: 6;
}

.speech-bubble[data-direction="down"] {
	inset: 169px auto auto 176px;
}

.speech-bubble[data-direction="left"] {
	inset: 72px auto auto 46px;
}

.effect--win {
	animation: win-flash .55s ease-in-out infinite alternate;
	z-index: 1;
}

.outcome-title {
	animation: win-flash .55s ease-in-out infinite alternate;
	height: auto;
	inset: 8px auto auto 3px;
	object-fit: contain;
	position: absolute;
	width: 294px;
	z-index: 5;
}

.outcome-character {
	height: 128px;
	inset: 96px auto auto 86px;
	object-fit: contain;
	position: absolute;
	width: 128px;
	z-index: 4;
}

.phase--outcome.is-failure .outcome-title {
	animation: none;
	inset: 15px auto auto 54px;
	width: 192px;
}

.phase--outcome.is-failure .outcome-character {
	transform: rotate(-4deg);
}

.screen--result {
	padding: 0;
	text-align: center;
}

.screen--result::before {
	background: linear-gradient(rgb(255 255 255 / 8%), rgb(255 255 255 / 28%));
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.result-message {
	color: #f06a1b;
	font-size: 20px;
	font-weight: 900;
	inset: 17px 0 auto;
	margin: 0;
	position: absolute;
	text-shadow: 0 2px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff;
}

.result-label {
	color: #167fec;
	font-size: 17px;
	font-weight: 900;
	inset: 54px auto auto 26px;
	margin: 0;
	position: absolute;
	text-shadow: 0 1px 0 #fff;
}

.result-count {
	color: #f13e2f;
	font-family: "Arial Rounded MT Bold", "Yu Gothic UI", Meiryo, sans-serif;
	font-weight: 900;
	inset: 72px auto auto 31px;
	line-height: 1;
	margin: 0;
	position: absolute;
	text-shadow: 0 2px 0 #fff;
}

.result-count strong {
	font-size: 50px;
}

.result-count span {
	font-size: 27px;
}

.result-character {
	height: 84px;
	inset: 52px 26px auto auto;
	object-fit: contain;
	position: absolute;
	width: 88px;
}

.article-card {
	background: rgb(62 84 59 / 88%);
	border: 3px solid rgb(255 255 255 / 90%);
	border-radius: 12px;
	box-shadow: 0 4px 12px rgb(39 63 30 / 24%);
	color: #fff;
	display: flex;
	flex-direction: column;
	inset: 151px 17px auto;
	justify-content: center;
	min-height: 102px;
	padding: 10px 12px;
	position: absolute;
	text-align: left;
	text-decoration: none;
	width: 266px;
}

.article-card > span {
	color: #ffef42;
	font-size: 12px;
	font-weight: 900;
}

.article-card strong {
	-webkit-box-orient: vertical;
	display: -webkit-box;
	font-size: 15px;
	-webkit-line-clamp: 2;
	line-height: 1.35;
	margin-top: 3px;
	overflow: hidden;
}

.article-card small {
	font-weight: 900;
	margin-top: 4px;
	text-align: right;
}

.retry-button {
	background: var(--blue);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	font-weight: 900;
	inset: auto 87px 8px;
	min-height: 31px;
	position: absolute;
	width: 126px;
}

@keyframes title-pulse {
	from {
		transform: scale(.97);
	}
	to {
		transform: scale(1.03);
	}
}

@keyframes pop-in {
	from {
		transform: scale(.45);
		opacity: 0;
	}
	75% {
		transform: scale(1.13);
		opacity: 1;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes character-turn {
	from {
		transform: scale(.75) rotate(-6deg);
		opacity: .35;
	}
	to {
		transform: scale(1) rotate(0);
		opacity: 1;
	}
}

@keyframes effect-spin-in {
	from {
		transform: scale(.75) rotate(-5deg);
		opacity: 0;
	}
	to {
		transform: scale(1) rotate(0);
		opacity: 1;
	}
}

@keyframes win-flash {
	from {
		opacity: .55;
		transform: scale(.97);
	}
	to {
		opacity: 1;
		transform: scale(1.03);
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
