/* main page */

.main {
	display: flex;
	flex-direction: column;
	height: 100%;
	align-items: center;
	justify-content: flex-start;
	overflow-y: scroll;
	overflow-x: hidden;
	position: relative;
	width: 100%;
	max-width: 640px;
}

.main .containa {
	min-height: 0;
	text-align: center;
	justify-content: center;
	align-items: center;
	padding-top: 10px;
	position: absolute;
	bottom: 280px;
	top: 0;
	overflow-y: auto;
	width: 100%;
	max-width: 640px;
}


/* play area */

.play_area {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	width:100%;
    top: 0;
    bottom: 17.5rem;
	bottom: 13.125rem;
    justify-content: flex-start;
	z-index:5;
    overflow-y: auto;

	/* good try? */
    overflow-anchor: none;
	scroll-snap-type: y mandatory;
}
body {
	font-size: 1.2rem;
}

.play_area > div:not(.logo, .playfader) {
	transition: opacity 0.2s 0.1s;
}

@media only screen and (min-width: 1025px) {
	/* .play_area {
	 */
	body {
		font-size: 1.7rem;
	}
	/* .modal .htp {
		font-size: 1.7rem;
	} */
}

/* .play_area.undermodal .accepted_word { */
	/* height: 0; */
	/* opacity: 0; */
	/* transition: height 0.2s 0s, opacity 0.2s 0s; */
	/* transition: opacity 2.2s 1s; */
/* } */

/* .play_area.undermodal .source {
	transition: opacity 0.2s;
}

.play_area.undermodal .target {
	transition: opacity 0.2s;
} */

.play_area.undermodal > div:not(.logo, .playfader) {
	opacity: 0;
	transition: opacity 0.2s 0s;
}

	.logo {
        width: 100%;
		max-width: 100%;
		height: 105px;
		height: 5.5rem;
		background-size: contain;
		background-position: center;
		background-repeat: no-repeat;
		opacity: 0.5;
		color: rgb(180, 180, 180);
		display: flex;
		justify-content: center;
		align-items: center;
		/* margin-bottom: 20px; */
		/* background-image: url("../images/wfw4.3.png"); */
		
		/* morphrase */
		background-image: url(../images/morphrase_logo.png);
		transition: filter 0.3s;
		opacity: 1;
		
		/* if using text */
		font-family: "Megrim", system-ui;
		font-family: "Expletus Sans", sans-serif;
		font-weight: 400;
		font-style: normal;	
		flex-shrink: 0;
	}

	@media only screen and (min-width:1025px) {
		.logo {
			height: 6.5rem;
		}
	}

	.fixed .logo {
		position:fixed;
		max-width:380px;
	}

	.fixt.logo {
		display:none;
	}

	.fixed .scro.logo {
		display:none
	}

	.fixed .fixt.logo {
		display:block;
		position:fixed;
    	z-index: 30;
	}

	.fixed .scrollfader {
		display:block;
		position:fixed;
		width:100%;
		max-width:380px;
		height:9.375rem;
		background: linear-gradient(0deg, transparent 0%, #101010 50%);
		z-index: 10;
	}

	.fixed.src .scrollfader {
		display:none;
	}

	.fixed.src .playfader {
		height:15rem;
		position:fixed;
		width:100%;
		height:8rem;
		/* background:linear-gradient(0deg, transparent 0%, #101010 15%); */
		background:linear-gradient(0deg, transparent 0%, #101010 10%);
		z-index:2002;
	}

	.fixed.src .source {
		position: fixed;
    	max-width: 640px;
		margin-top: 4.8rem;
	}

	.fixed.src .words {
		padding-top:7.5rem;
	}

	@media only screen and (min-width:1025px) {
		.fixed.src .source {
			margin-top:6.2rem;
		}
		.fixed.src .words {
			padding-top:10rem;
		}
		.fixed.src .playfader {
			height:10.5rem;
		}
	}
	/* .compression .logo { */
		/* margin-bottom: 4px; */
		/* position: absolute; */
		/* top: 0; */
	/* } */

	@media only screen and (min-width: 0px) {
		.logo {
			max-width: 80%;
			width: 60%;
		}
	}
	
	.source,
	.typebox,
	.target {
		position: relative;
		text-align: center;
		width: 100%;
		color: white;
		/* padding: 8px;
		padding: 0.5rem; */
		padding: 0.375em;
	}

	/* .source {
		transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
	} */

	.fixed .source {
		margin-top:6.5rem;
	}

	.synth .source {
		/* position: absolute; */
		/* top: 130px; */
		/* top: 8rem; */
		border-bottom: 1px solid var(--border-color-50);
		border-image: linear-gradient(to right, transparent 0%, transparent 20%, #03c3ff 40%, #bf3ad5 60%, transparent 80%, transparent 100%) 1;
		margin-bottom:0.5rem;
		z-index:2003;
		transition:border-image 1s;
	}

	.synth .play_area.zig .source {
		border-image: linear-gradient(
			to right,
			transparent 0%,
			transparent 20%,
			#03c3ff 30%,     /* Start color */
			transparent 37%,  /* FADE 1 START */
			transparent 39%,  /* FADE 1 END */
			#627fec 43%,     /* Interpolated color (25% point) */
			#627fec 45%,
			transparent 49%,  /* FADE 2 START */
			transparent 51%,  /* FADE 2 END */
			#905ad9 55%,     /* Interpolated color (middle) */
			#905ad9 57%,
			transparent 61%,  /* FADE 3 START */
			transparent 63%,  /* FADE 3 END */
			#bf3ad5 70%,     /* End color */
			transparent 80%,
			transparent 100%
		) 1;
	}

	.source.ballerina,
	.target.ballerina {
		-webkit-transition: transform 1s 0s;
		transition: transform 1s 0s;
		transform: rotateY(360deg);
		/* X is a somersault, Y is a ballerina, Z is a propeller */
	}

	.play_area .words {
		width: auto;
		height: auto;
		display: flex;
		flex-direction: column;
		/* padding-left: 64px;
		padding-right: 64px; */
		max-width: 100%;
		position: relative;
		margin-top: 0.4rem;
	}
	.compression .words {
		max-height: calc(100% - 400px);
		/* margin-top: 178px; */
	}

	.accepted_word {
		position: relative;
		text-align: center;
		width: 100%;
		/*border:4px solid rgb(12 12 12);*/
		border-left: none;
		border-right: none;
		color: rgb(211, 211, 211);
		color: rgb(116 116 116);
		border-radius: 6px;
		height: 0;
		opacity: 0;
		z-index: 2000;
		transition: height 0.3s, opacity 0s 0.3s;
	}

	/* @media only screen and (min-width: 1025px) {
		.accepted_word {
			line-height:unset;
		}
	} */

	.compression .accepted_word {
		flex-shrink: 1;
		min-height: 0;
	}

	.accepted_word.grow {
		/* height: 44px; */
		opacity: 1;
		transition: height 0.3s 0s, opacity 0s 0s, margin 0.3s;
		
		/* 75% */
		/* height: 2.062em; */
		/* smaller still. still works with word submit animation */
		/* height: 1.8em; */
		/* could go even less on mobile */
		height: 1.6em;
	}

	/* not in use? */
	/* .accepted_word.grow.instant {
		height: 44px;
		transition: height 0s;
	} */
	
	.fake.typebox {
		position: relative;
		text-align: center;
		display: flex;
		justify-content: center;
		color: white;
		width: 100%;
		border-radius: 6px;
		padding: 0;
		z-index: 2001;
		flex-shrink: 0;

		height: 2rem;
		height: 1.5em;
		max-width: 10em;
	}

	/* .compression .fake.typebox { */
	/* } */

	.fake.typebox.beneath {
		z-index: 1;
	}

		.typebox .error {
			position:absolute;
			left:calc(100% + 1rem);
		}

		.typebox .error i {
			display:none;
			line-height:inherit;
		}

		.typebox.rules .error.rules i {
			display:inline;
			color: rgb(255 41 117);
		}

		.typebox.dict .error.dict i {
			display:inline;
			color: rgb(255, 198, 66);
		}
		
		.boxer {
			position: absolute;
			/* let's saloosh this */
			top: -5px;
			width: 100%;
			height: 100%;
			border: 1px solid white;
			border-radius: 6px;
			background-color: #ffffff33;
			background-color: #383838;
		}
		.synth .boxer {
			top: -10%;
			width: 100%;
			border: none;
			background-color: transparent;
			background-color: rgb(22 22 22);
		}

		/* @media only screen and (min-width: 1025px) {
			.synth .boxer {
				height: 125%;
				top: -25%;
			}
		} */
		
		.boxer.green {
			border: 1px solid lime;
			background-color: rgba(0 255 0 / 10%);
			border: 1px solid #00ffad;
			background-color: rgb(0 255 173 / 14%);
		}

		.boxer.yellow,
		.typebox.dict .boxer {
			border: 1px solid yellow;
			background-color: rgb(255 255 0 / 10%);
			border: 1px solid rgb(255, 198, 66);
			/* synthwave */
			border: 1px solid rgb(255 234 66);
			/* brighter, yellower */
			background-color: rgb(255 198 66 / 14%);
		}
		.boxer.red,
		.typebox.rules .boxer {
			border: 1px solid rgb(255 100 100);
			background-color: rgba(255 100 100 / 10%);
			border: 1px solid rgb(255 41 117);
			background-color: rgb(255 41 117 / 14%);
		}

			.synth .worder.hilite {
				background-color: rgb(10 83 108);
			}

			.worder {
				width: auto;
				white-space: nowrap;
			}

			.worder.hilite {
				background-color: rgb(15 100 220);
			}

			.worder.delayin {
				animation: delayin 0.3s linear;
			}

			@keyframes delayin {
				0% {
					opacity: 0;
				}

				99% {
					opacity: 0;
				}

				100% {
					opacity: 1;
				}
			}

			.caret {
				position: absolute;
				right: 0;
				width: 1px;
				/* height: 30px; */
				background-color: white;
				/* top: 2px; */
				height: 78%;
    			top: 0;
			}

			/* @media only screen and (min-width: 1025px) {
				.caret {
					height:78%;
				}
			} */

			.caret.blink {
				animation: blink 1.2s infinite linear;
			}

			@keyframes blink {
				0% {
					background-color: white;
				}

				49% {
					background-color: white;
				}

				50% {
					background-color: transparent;
				}

				100% {
					background-color: transparent;
				}
			}
			

		.expander {
			width: fit-content;
			position: relative;
		}

		.expander.temp_hide { /* currently not in use, see javascript */
			animation: temp_hide 2.2s linear;
		}

		@keyframes temp_hide {
			0% {
				opacity: 0;
			}

			90% {
				opacity: 0;
			}

			100% {
				opacity: 1;
			}
		}


	.target_height_keeper {
		position: relative;
	}
	.synth .target_height_keeper {
		position: relative;
		width: 100%;
		margin-top: 0.3rem;
	}

		.target {
			top: 0;
			opacity: 1;
			border-top: 1px solid white;
			border-image: linear-gradient(to right, transparent 0%, transparent 20%, #03c3ff 40%, #bf3ad5 60%, transparent 80%, transparent 100%) 1;
			-webkit-transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
			transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
		}

		.target.acquired {
			top: -52px;
			opacity: 0;
			-webkit-transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
			transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
		}

		.target.unacquired {
			top: 0;
			opacity: 1;
			-webkit-transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
			transition: opacity 0.3s 0s, top 0.3s 0s, transform 1s 0s;
		}

		.target.blinded {
			color:transparent;
		}

		.levend {
			position: absolute;
			right: 0.2em;
			color: rgb(47 47 47);
			font-size: 1.1em;
			height: 100%;
			line-height: inherit;
			text-align: right;
			width: 3em;
			display: none;
		}

		.levend.exposed {
			display:block;
		}


	.goals {
		color: gray;
		text-align: center;
		display: flex;
		justify-content: center;
		padding-bottom: 2em;
	}
	.compression .goals {
		padding-bottom: 2px;
		flex-shrink: 0;
	}
	
		.goals .progress {
			transform: scale(1);
			opacity: 0.5;
			margin-top: 0;
			transition: scale 0.1s 0s, opacity 0.1s 0s, margin-top 0.1s 0s;
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.goals .progress.done {
			transform: scale(2);
			opacity: 0.9;
			margin-top: -12px;
			-webkit-transition: font-size 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
			transition: font-size 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
			transition: transform 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
		}

		.goals .progress.undone {
			transform: scale(1);
			opacity: 0.5;
			margin-top: 0;
			-webkit-transition: font-size 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
			transition: font-size 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
			transition: transform 0.3s 0s, opacity 0.3s 0s, margin-top 0.3s 0s;
		}

		.goals .progress .container {
			width: auto;
			position: relative;
		}

		.goals .progress .step.count {
			font-size: 46px;
			font-size: 1.7em;
		}

		.goals .progress .letter.count {
			position: absolute;
			left: 100%;
			top: -4px;
			/* font-size: 24px; */
			font-size: 0.9em;
		}
		
			.goals.green .step.count,
			.goals.green .letter.count {
				color: lime;
				color: #00ffdc; /* synthwave */
				color: #00ffad; /* brighter */
			}

			.goals.yellow .step.count,
			.goals.yellow .letter.count {
				color: yellow;
				color: rgb(255, 198, 66); /* synthwave */
				color: rgb(255 234 66) /* brighter, yellower */
			}

			.goals.red .step.count,
			.goals.red .letter.count {
				color: rgb(255 100 100); /* synthwave */
				color: rgb(255 41 117); /* redder */
			}

	.results {
		color: #CCC;
		position: absolute;
		width: 100%;
		text-align: center;
		bottom: 100%;
		font-size: 0.6em;
		font-weight: bold;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
		padding-bottom:0.5em;
	}

	.anchor {
		height: 1px;
		margin-top: -1px; /* Keep it invisible and non-disruptive */
		overflow-anchor: auto; /* Force the browser to anchor here */
		scroll-snap-align: end; /* This is the magnetic "bottom" */
	}