:root {
	--ink: #12324a;
	--blue: #087faf;
	--deep-blue: #075477;
	--pale-blue: #e5f7fc;
	--gold: #edb421;
	--white: #fff;
	font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
	color: var(--ink);
	background: #f4fbfe;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
}

button {
	font: inherit;
}

[hidden] {
	display: none !important;
}

.skip-link {
	position: fixed;
	z-index: 100;
	top: 8px;
	left: 8px;
	padding: 10px 16px;
	border-radius: 8px;
	color: var(--white);
	background: var(--deep-blue);
	transform: translateY(-150%);
}

.skip-link:focus {
	transform: translateY(0);
}

.water-catch {
	width: min(100%, 980px);
	margin: 0 auto;
	padding: clamp(18px, 4vw, 48px) 14px 64px;
}

.water-catch__hero {
	width: min(100%, 820px);
	margin: 0 auto 28px;
	text-align: center;
}

.water-catch__hero img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 22px;
	box-shadow: 0 18px 48px rgba(18, 50, 74, .2);
}

.water-catch__hero h1 {
	margin: 24px 0 10px;
	font-size: clamp(2rem, 7vw, 3.8rem);
	line-height: 1.15;
}

.water-catch__hero p {
	margin: 0;
	font-size: clamp(1rem, 3vw, 1.2rem);
	line-height: 1.8;
}

.game {
	overflow: hidden;
	width: min(100%, 820px);
	margin: 0 auto;
	border: 2px solid #b8e5f3;
	border-radius: 26px;
	background: var(--white);
	box-shadow: 0 20px 54px rgba(18, 50, 74, .14);
}

.game__start,
.game__result {
	padding: clamp(24px, 6vw, 50px);
	text-align: center;
}

.game__start h2,
.game__result h2 {
	margin-top: 0;
	font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.game__levels {
	display: grid;
	gap: 12px;
	margin: 26px 0;
}

.game__levels button,
.game__controls button,
.game__result-actions button {
	min-height: 56px;
	border: 2px solid var(--blue);
	border-radius: 14px;
	font-weight: 800;
	cursor: pointer;
}

.game__levels button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	color: var(--ink);
	background: #f2fbfe;
}

.game__levels button:hover {
	background: var(--pale-blue);
}

.game__levels button strong {
	font-size: 1.1rem;
}

.game__levels button span {
	color: #4a6577;
	font-size: .85rem;
}

.game__instructions {
	padding: 18px 20px;
	border-radius: 16px;
	background: #f5f7f9;
	text-align: left;
}

.game__instructions h3 {
	margin: 0 0 8px;
}

.game__instructions ul {
	margin: 0;
	padding-left: 1.4em;
	line-height: 1.8;
}

.game__status {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: 14px;
	color: var(--white);
	background: var(--deep-blue);
	text-align: center;
}

.game__status p {
	display: grid;
	gap: 3px;
	margin: 0;
}

.game__status p > span {
	font-size: .75rem;
}

.game__status strong {
	font-size: clamp(1rem, 4vw, 1.35rem);
}

.game__field {
	position: relative;
	overflow: hidden;
	height: min(62vh, 540px);
	min-height: 390px;
	background: linear-gradient(#67c9ed 0%, #dff7ff 63%, #90d280 64%, #60b45a 100%);
	touch-action: none;
}

.game__cloud {
	position: absolute;
	width: 70px;
	height: 27px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .86);
	box-shadow: 38px 5px 0 9px rgba(255, 255, 255, .86), 78px 0 rgba(255, 255, 255, .86);
}

.game__cloud--one {
	top: 42px;
	left: 8%;
}

.game__cloud--two {
	top: 96px;
	right: 26%;
	transform: scale(.72);
}

.game__player {
	position: absolute;
	z-index: 2;
	bottom: -4px;
	left: 50%;
	width: clamp(120px, 26vw, 184px);
	transform: translateX(-50%);
	will-change: left;
}

.game__player img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px 20px 0 0;
}

.game__drop {
	position: absolute;
	z-index: 3;
	top: 0;
	width: 28px;
	height: 36px;
	border: 2px solid rgba(255, 255, 255, .8);
	border-radius: 55% 45% 58% 42% / 62% 50% 50% 38%;
	background: radial-gradient(circle at 35% 25%, #fff 0 8%, #5ad4ff 16%, #078cc8 70%);
	box-shadow: 0 4px 8px rgba(0, 78, 130, .25);
	will-change: transform;
}

.game__controls {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 14px;
	background: #edf9fd;
}

.game__controls button {
	color: var(--white);
	background: var(--blue);
	font-size: 1.05rem;
	touch-action: none;
}

.game__back {
	display: block;
	margin: 0 auto 14px;
	padding: 10px 16px;
	border: 0;
	color: #425d70;
	background: transparent;
	text-decoration: underline;
	cursor: pointer;
}

.game__result img {
	width: min(100%, 360px);
	height: auto;
	border-radius: 20px;
}

.game__result-actions {
	display: grid;
	gap: 10px;
	margin-top: 24px;
}

.game__result-actions button {
	padding: 10px 18px;
	color: var(--white);
	background: var(--blue);
}

.game__result-actions button:last-child {
	color: var(--ink);
	background: var(--white);
}

.water-catch__learning {
	width: min(100%, 820px);
	margin: 42px auto 0;
	padding: 24px;
	border-left: 6px solid var(--gold);
	border-radius: 8px 18px 18px 8px;
	background: #fff8e6;
}

.water-catch__learning h2 {
	margin-top: 0;
}

.water-catch__learning p {
	margin-bottom: 0;
	line-height: 1.8;
}

button:focus-visible,
.game__field:focus-visible,
.skip-link:focus-visible {
	outline: 4px solid var(--gold);
	outline-offset: 3px;
}

@media (min-width: 680px) {
	.game__levels {
		grid-template-columns: repeat(5, 1fr);
	}

	.game__levels button {
		flex-direction: column;
		gap: 4px;
	}

	.game__result-actions {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.game__player,
	.game__drop {
		will-change: auto;
	}
}
