/* main page */

/* The "Make it simple" reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.maintainer {  
	/* Positioning and Size */
	position: relative;
	top: 0;
	z-index: 1;

	width: 100%;
	max-width: 640px;
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* Ensure all children span the full width of the maintainer */
.maintainer > * {
	width: 100%;
	box-sizing: border-box;
}

.maintainer > * {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
}

.play-wrap {
	overflow-y: auto;
	/* Hide scrollbars */
	-ms-overflow-style: none;
	scrollbar-width: none;
	margin-bottom:12rem;
	z-index:2004;
	/* padding-top:0.5rem; */
}

.play-wrap::-webkit-scrollbar {
  display: none;
}

.play-wrap.fade {
  	-webkit-mask-image: linear-gradient(
		to bottom,
		transparent 0,
		black 10px,
		black calc(100% - 5px),
		transparent 100%
	);
  	mask-image: linear-gradient(
		to bottom,
		transparent 0,
		black 10px,
		black calc(100% - 5px),
		transparent 100%
	);
}

.source-wrap {
	position:relative;
	z-index:2005;
}




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

.stack {
	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;
} */

/* .full .main,
.full .stack {
	max-width:unset;
} */

.btns {
	position:absolute;
	top:0;
	width:100%;
	max-width:640px;
}
	/* .btns {
		position: fixed;
		top: 0;
		width: 100%;
		max-width: 640px;
		z-index: 1000;
	} */

	.btn.round.archive i.pink {
		background: linear-gradient(130deg, var(--blue) 30%, var(--pink) 60%);
		background-clip: text;
		font-weight: bold;
		color: transparent;
	}

	.btns > div {
		position:absolute;
		top:0.8rem;
		display:flex;
		flex-direction:column;
		gap:0.8rem;
	}

	.btns .east {
		right:0.8rem;
		transition:opacity 0.4s;
	}

	.btns .west {
		left:0.8rem;
	}

	.btn.round.question {
		font-weight: 100;
	}

	.btn.round.question .dotted {
		font-weight: bold;
		background: radial-gradient(circle, #ffffff 30%, transparent 60%);
		background-size: 2px 2px;
		-webkit-background-clip: text;
		background-clip: text;
		font-size: larger;
		color: transparent;
	}

	body:has(.shodal) .east .btn,
	body:has(.shodal) .west .btn {
		opacity:0.3;
	}




.landscape-error {
	display: none;
}

@media screen 
  and (orientation: landscape) 
  and (max-device-width: 1024px) 
  and (max-height: 500px)        
  and (pointer: coarse) {

	.main {
		width:100%;
		max-width:100%;
		flex-direction:row;
		align-items: flex-end;
	}

	.main section.keyboard {
		position:relative;
		/* width:50%; */
	}

	.main .playarea {
		bottom: 0;
	}
	
	.landscape-error:not(.dismissed) {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        color: #fff;
        font-size: 1.2rem;
        z-index: 10000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1rem;
	}
	
	.landscape-error .morphers div {
		display:inline;
	}

	/* .randscape {
		max-width:50%;
	} */

	.rotate_icon {
		font-size:2em;
		transform:rotate(-90deg) rotateX(180deg);
	}

	/* 3. Hide all other page content to force interaction */
	body > :not(.landscape-error) {
		display: none;
	}
}



/* play area */

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

	/* good try? */
    overflow-anchor: none;
	scroll-snap-type: y mandatory;
	/* padding-top:0.25rem; */
	overflow-x:hidden;
	/* overflow-y:visible; */
	/* overflow:hidden; */
}

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


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

.source-wrap,
.play-wrap,
.numerus {
	transition:opacity 0.2s;
}

body:has(.shodal):not(:has(.drawer.appear)) .source-wrap,
body:has(.shodal):not(:has(.drawer.appear)) .play-wrap,
body:has(.shodal):not(:has(.drawer.appear)) .numerus {
	opacity:0;
	transition:opacity 0.2s;
}

body:has(.shodal):has(.review.appear) .source-wrap,
body:has(.shodal):has(.review.appear) .play-wrap,
body:has(.shodal):has(.review.appear) .numerus {
	opacity:0.2;
	transition:opacity 0.2s;
}

	.logo {
		position:relative;
        width: 100%;
		max-width: 100%;
		height: 105px;
		height: 5.5rem;
		background-size: contain;
		background-size: 100% auto; /* pre launch */
		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:580px) {
		.logo {
			height: 6.5rem;
		}
	}

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

	/* post-launch */
	.numerus {
		color: var(--blue);
		text-shadow: 1px 0px var(--pink);
		font-size: small;
		position: absolute;
		left: 50%;
		width: 4rem;
		text-align: left;
		transform: translateX(-1rem);
		/* transform: translateX(-50%); */
		bottom: 10px;
		color: #444444;
		text-shadow: unset;
		/* top: unset; */
		/* bottom: 0; */
		font-family: "Expletus Sans", sans-serif;
		white-space: nowrap;
	}

 	/* pre-launch */ /* remove this on launch day! */
	.numerus {
		color: var(--blue);
		text-shadow: 1px 0px var(--pink);
		font-size: small;
		position: absolute;
		left: unset;
		right: 1.5%;
		transform: none;
		bottom: 5%;
		width: auto;
		text-align: right;
		color: #444444;
		text-shadow: unset;
		white-space: nowrap;
		font-family: "Expletus Sans", sans-serif;
	}

	.btns .numerus {
		position: relative;
		text-align: right;
		padding-right: 0.5rem;
	}

	/* .words .inter {
		padding:0 0 1rem 0;
	} */

	/* mark.stem {
		color: rgb(240 240 240);
	}
	mark.stem:nth-child(even) {
		color: rgb(150 150 150);
	} */

	stem {
		color:rgb(150 150 150);
	}

	.worder stem {
		color:rgb(150 150 150);
	}

	stem:nth-child(even),
	.worder stem:nth-child(even) {
		color:rgb(220 220 220);
	}


	/* .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 .playarea.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 */
	}

	.playarea .words {
		width: 100%;
		height: auto;
		display: flex;
		flex-direction: column;
		max-width: 100%;
		position: relative;
		padding-top:0.75rem;
	}

	.accepted.word {
		position: relative;
		text-align: center;
		width: 100%;
		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: 20;
		transition: height 0.3s, opacity 0s 0.3s;
		transition: height 0.3s ease, opacity 0s 0.3s;
	}

	.accepted.word.grow {
		opacity: 1;
		/* transition: height 0.3s 0s, opacity 0s 0s, margin 0.3s !important; */
		transition: height 0.3s 0s ease, opacity 0s 0s !important;
		height: 1.6em;
		/* height: 1.4em; */
	}

	.words.collapsed .accepted.word.grow {
		height:0;
		opacity:0;
		/* display:none; */
	}

	.playarea:has(.target.acquired) .words .accepted.word.grow {
		transition: height 0.3s 0s ease, opacity 0.4s ease-in 0s !important;
	}

	.playarea:has(.target.acquired) .words.collapsed .accepted.word.grow {
		transition: height 0.3s 0s ease, opacity 0.1s 0s !important;
	}

	.collapshare {
		opacity:0;
		position: absolute;
		z-index:2005;
		top:0;
		display: flex;
		align-items: center;
		justify-content: center;
		--target-height: 4rem;
		height:4rem;
		border: 1px solid rgb(42 42 42);
		pointer-events: none;
		/* never in effect? */
		transition:transform 0.3s ease, height 0.3s ease, opacity 0.2s;
	}

	.collapshare.left {
		left: 2rem;
		border-right: none;
	}

	.collapshare.right {
		right:2rem;
		border-left: none;
	}

	.collapshare .btn {
    	background-color: rgb(16 16 16);
		background-color:rgb(28 28 28);
		position:absolute;
	}

	.collapshare .btn.round.collapse {
		transform: translateX(-50%);
		left:0;
	}

	.collapshare .btn.round.share.route {
		transform: translateX(50%);
		right:0;
	}

	.maintainer .collapshare {
		width:2rem;
		top:calc(100% - 1px);
	}

	.maintainer:has(.target.acquired) .collapshare {
		opacity:1;
		pointer-events:auto;
		height: var(--target-height);
		transition:transform 0.3s ease, height 0.3s ease, opacity 0.6s ease-out, border-bottom-color 0s;
	}

	.maintainer .ph-arrows-in-line-vertical {
		display:block;
	}
	.maintainer:has(.words.collapsed) .ph-arrows-in-line-vertical {
		display:none;
	}
	.maintainer .ph-arrows-out-line-vertical {
		display:none;
	}
	.maintainer:has(.words.collapsed) .ph-arrows-out-line-vertical {
		display:block;
	}

	.maintainer:has(.words.collapsed) .collapshare {
		height:0rem;
		border-bottom-color:transparent;
		transition: transform 0.3s ease, height 0.3s ease, opacity 0.6s ease-out, border-bottom-color 0.1s 0.2s;
		/* transition: border-bottom-color 0.1s 0.2s; */
	}


	.logo-wrap {
		/* Set a default, but we will override this with JS */
		--target-gap: 0px; 
		margin-top: 0;
		/* Match your .grow animation exactly: 0.3s linear */
		transition: margin-top 0.3s ease; 
	}

	.logo-wrap.moving {
		margin-top: var(--target-gap);
	}


	/* @media screen and (min-width: 580px) {
		.accepted.word.grow {
			height: 1.4em;
		}
	} */
	

	.inter {
		transition: height 0.3s 0s, opacity 0.2s 0.1s, margin 0.3s, transform 0.2s !important;
		/* transition: height 3.3s 0s, opacity 3s 0s, margin 3.3s !important; */
		height: 1.6em;
		padding:0;
		flex-shrink:0;
		/* max-width: 280px; */
	}

	.inter.slup {
		transform: translateY(-95%);
		transform: translateY(-94%);
	}

	.typebox.slup {
		transform: translateY(-105%);
		transform: translateY(-106%);
		transition: opacity 0.2s 0.1s, transform 0.3s ease !important;
	}

	.inter.slown {
		transform: translateY(95%);
		transform: translateY(94%);
		transition: opacity 0.2s 0.1s, transform 0.3s ease !important;
	}

	.typebox.slown {
		transform: translateY(105%);
		transform: translateY(106%);
		transition: opacity 0.2s 0.1s, transform 0.3s ease !important;
	}

	/* .typebox.slown .boxer {
		background-color:rgb(24 24 24 / 85%);
	} */

	.inter.shrink {
		opacity: 0;
		height: 0;
	}

	/* not in use? */
	/* .accepted.word.grow.instant {
		height: 44px;
		transition: height 0s;
	} */
	
	.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;
	}

	.typebox.beneath {
		z-index: 1;
	}
		.typebox .fauxput {
			width: 100%;
			height: 100%;
			background-color: transparent;
			color:transparent;
			position: absolute;
			top: -0.25rem;
			left: 0;
			border: none;
			outline: none;
			border-radius: inherit;
			font-size: inherit;
		}

			input[type="text"].fauxput {
				border: none;
				background: transparent;
				outline: none;
				box-shadow: none;
				padding: 0;
				margin: 0;
				-webkit-appearance: none; /* Removes Safari/Chrome style */
				appearance:none;
			}

			/* Specifically target Chrome's yellow autofill background if it still appears */
			input[type="text"].fauxput:-webkit-autofill,
			input[type="text"].fauxput:-webkit-autofill:hover,
			input[type="text"].fauxput:-webkit-autofill:focus {
				-webkit-box-shadow: 0 0 0px 1000px white inset; /* Or transparent */
				box-shadow: 0 0 0px 1000px white inset;
				transition: background-color 5000s ease-in-out 0s;
			}

		.typebox .error {
			position: absolute;
			right: calc(100% + 0.7rem);
			margin-top: 0.2rem;
		}

		.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;
			top: -0.15rem;
		}

		@media screen and (min-width: 580px) {
			.boxer {
				top: -0.25rem;
			}
		}

		.synth .boxer {
			/* fix this hack. make the worder and boxer pixel perfect. */
			/* top: -10%; */
			width: 100%;
			border: none;
			background-color: transparent;
			background-color: rgb(22 22 22);
			border:1px solid #080808;
		}

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

		.boxer.yellow,
		.typebox.dict .boxer {
			border: 1px solid var(--yellow);
			background-color: rgb(255 198 66 / 14%);
		}

		.boxer.orange {
			border: 1px solid var(--orange);
   			background-color: rgb(61 36 22);
		}

		.boxer.red,
		.typebox.rules .boxer {
			border: 1px solid var(--red);
			background-color: rgb(255 41 117 / 14%);
		}


		.expander {
			width: fit-content;
			position: relative;
			min-width: 1px;
			contain: paint;
			height:78%;
		}

		.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;
			}
		}

			.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;
    			will-change: opacity; /* Tells the browser to prepare the GPU */
				transform: translateZ(0);
			}

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

			.caret.blink {
				/* animation: blink 1.2s infinite linear; */
				/* animation: blink 1s steps(1) infinite; */
				display:none;
			}

			/* .expander:has(.caret.blink) {
				animation: blinkborder 1s steps(1) infinite;
			} */

			/* .expander.crt.on {
				border-right:1px solid white;
			} */

			/* .expander:has(.hilite) .caret {
				display:none;
			} */

			/* .expander:has(.hilite) {
				border:none !important;
			} */

			/* @keyframes blink {
				0% { opacity: 1; }
				50% { opacity: 0; }
			}

			@keyframes blinkborder {
				0% { border-right:1px solid white;}
				50% { border-right:1px solid transparent}
			} */

			.expander::after {
				content: '';
				position: absolute;
				right: 0;
				top: 0;
				bottom: 0;
				width: 1px;
				/* background-color: transparent; */
    			background-color: white;
				opacity:0;
				will-change: opacity;
    			/* transform: translateZ(0); */
    			/* animation: blink-step 1s steps(1) infinite; */
			}

			/* .expander.paused::after {
				animation-play-state: paused;
				opacity: 0;
			} */

			.expander.crt::after {
    			animation: blink-step 1s steps(1) infinite;
			}

			.expander.crt:has(.hilite)::after {
				animation-play-state: paused;
			}

			@keyframes blink-step {
				0%, 100% { opacity: 1; }
				50% { opacity: 0; }
			}
			


	.target_height_keeper {
		position: relative;
		max-width:640px;
	}

	.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.acquired + .cg_wrap {
			display:none;
		}

		.target.camo {
			color:transparent;
		}

		.cg_wrap {
			position:absolute;
			white-space:nowrap;
			color:rgb(32 32 32);
		}

		.cg_wrap .camogap {
			display:inline-block;
			width:3rem;
			/* animation: camogap 8s ease-in-out infinite; */
		}

		/* @keyframes camogap {
			0% {
				width: 3rem;
			}
			50% {
				width: 7rem;
			}
			100% {
				width: 3rem;
			}
		} */


		/* Container stays a fixed size so it doesn't shake the rest of the page */
		.cg_wrap {
			display: flex;
			justify-content: center;
			width: 10rem; 
		}

		/* Animate the brackets, not the gap */
		.cg_wrap::before {
			content: "[";
			transform: translateX(-2rem);
			animation: moveLeft 8s ease-in-out infinite;
		}
		
		.cg_wrap::after {
			content: "]";
			transform: translateX(2rem);
			animation: moveRight 8s ease-in-out infinite;
		}

		@keyframes moveLeft {
			0%, 100% { transform: translateX(-3rem); }
			50% { transform: translateX(-1.5rem); }
		}

		@keyframes moveRight {
			0%, 100% { transform: translateX(3rem); }
			50% { transform: translateX(1.5rem); }
		}


		.levend {
			position: absolute;
			/* color: rgba(255, 255, 255, 0.6); */
			width: auto;
			height: 80%;
			
			height:1.2rem;
			width:1.5rem;
			font-size:0.9em;

			line-height: inherit;
			text-align: right;
			
			bottom: calc(100% + 0.6rem);
			margin-left:-0.25rem;

			display: none;
			align-items: center;
			justify-content: center;
			transition: opacity 0.4s, left 0.3s, bottom 0.3s;

			border:1px solid rgb(160 160 160);
			/* 10% bracket */
			clip-path:polygon(0% 0%, 10% 0%, 10% 10%, 90% 10%, 90% 0%, 100% 0%, 100% 100%, 90% 100%, 90% 90%, 10% 90%, 10% 100%, 0% 100%);
			border-radius: 4px;
			/* 20% bracket */
			clip-path:polygon(0% 0%, 20% 0%, 20% 10%, 80% 10%, 80% 0%, 100% 0%, 100% 100%, 80% 100%, 80% 90%, 20% 90%, 20% 100%, 0% 100%);
			border-radius: 3px;
			white-space:pre;
		}

		.levend smaller {
			position:relative;
			top:1px;
		}

		.levend.bare {
			border:none;
			clip-path:unset;
		}

		/* controls the speed of .levend.sour on its way UP */
		.levend.sour {
			position:absolute;
			left:80%;
			bottom:0.8rem;
			display:flex;
			align-items:center;
			/* font-size: 0.9em; */
			transition: transform 0.25s 0.04s ease-out, left 0.3s, opacity 0.2s 0.05s;
		}

		/* controls the speed of .levend.sour on its way DOWN */
		.maintainer:has(.accepted:not(.ignore)) .levend.sour {
			transform:translateY(2rem);
			opacity:0;
			transition: transform 0.22s ease-out, left 0.3s, opacity 0.2s 0.1s;
		}

		.maintainer:not(:has(.accepted:not(.ignore))) .levend:not(.sour) {
			opacity:0;
		}

		.playarea:has(.accepted:not(.ignore)) .levend {
			left: calc(100% + 0.5rem);

		}
		.playarea:has(.accepted:not(.ignore)) .levend.side {
			bottom: calc(100% + 0.5rem);
		}

		@media screen and (min-width: 580px) {
			.playarea:has(.accepted:not(.ignore)) .levend.side {
				bottom: calc(100% + 1.5rem);
			}

			.levend.sour {
				bottom:1rem;
			}

			.levend {
				/* font-size:0.7em; */
				height:1.8rem;
				width:2rem;
				margin-left:unset;
				bottom: calc(100% + 1rem);
			}

			.levend smaller {
				position:relative;
				top:2px;
			}
		}

		.levend.exposed {
			display: flex;
			opacity: 0.8;
		}

		.levend.invis {
			opacity:0;
		}

		.levend.eclipse {
			border:none;
			box-shadow:2px -2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			animation: eclipse 10s linear infinite;
		}

		@keyframes eclipse {
			0% {
				box-shadow:2px 2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			}
			25% {
				box-shadow:2px -2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			}
			50% {
				box-shadow:-2px -2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			}
			75% {
				box-shadow:-2px 2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			}
			100% {
				box-shadow:2px 2px 4px white, 0px 2px 2px #ff1bdf, 0px -2px 2px #006bff;
			}
		}

		@keyframes threeclipse {
			0% {
				box-shadow:2px 2px 4px white, -2px -2px 1px #ff1bdf, 2px -2px 1px #15a1ff;
			}
			25% {
				box-shadow:2px -2px 4px white, -2px 2px 1px #ff1bdf, -2px -2px 1px #15a1ff;
			}
			50% {
				box-shadow:-2px -2px 4px white, 2px 2px 1px #ff1bdf, -2px 2px 1px #15a1ff;
			}
			75% {
				box-shadow:-2px 2px 4px white, 2px -2px 1px #ff1bdf, 2px 2px 1px #15a1ff;
			}
			100% {
				box-shadow:2px 2px 4px white, -2px -2px 1px #ff1bdf, 2px -2px 1px #15a1ff;
			}
		}




	.score {
		color: gray;
		text-align: center;
		display: flex;
		justify-content: center;
		padding-bottom: 4em;
		width:100%;
		/* padding-bottom: 4em; */
		/* transition:padding-bottom 0.3s 0s; */
	}

		/* .difficulty-slider, */
		.btn.round.review {
			bottom:16rem;
			opacity:0;
			position: absolute;
			transition: transform 0.2s, border 0.2s, background-color 0.2s, opacity 0.3s;
			z-index:2005;
		}


		@media screen and (min-width:540px) {
			.btn.round.review {
				bottom:18rem;
			}

			.logo-wrap {
				padding-bottom:1rem;
			}
		}

		.choose .btn.round.revdif {
			filter:grayscale(0.6);
		}

		.choose .btn.round.revdif.selected {
			filter:grayscale(0);
		}

		.choose .btn.round.revenj {
			color:gray;
		}

		.choose .btn.round.revenj.selected {
			color:white;
			border:1px solid white;
		}

		.choose .btn.round.selected {
			border:1px solid white;
		}

		.btn.round.enjoy {
			right: 0.8rem;
		}
		
		.btn.round.difficulty {
			left: 0.8rem;
		}

		.ki {
			height:90%;
			width:90%;
			background-image:url(../images/gauge_yellow.png);
			background-size:contain;
			background-repeat:no-repeat;
			filter:grayscale(1);
		}

			.ki.ki-gauge.green {
				background-image:url(../images/gauge_green.png);
				filter:grayscale(0);
			}
			.ki.ki-gauge.yellow {
				background-image:url(../images/gauge_yellow.png);
				filter:grayscale(0);
			}
			.ki.ki-gauge.red {
				background-image:url(../images/gauge_red.png);
				filter:grayscale(0);
			}

		.btn.round.review.hardness {
			left:5rem;
			opacity:1!important;
		}
		
			@property --angle {
				syntax: '<angle>';
				initial-value: 20deg;
				inherits: false;
			}
			.btn.round.review.hardness .layer {
				width:100%;
				height:100%;
			}

			.btn.round.review.hardness .mask {

				-webkit-mask-image: conic-gradient(
					from var(--angle) at center, 
					transparent 180deg,
					black 180deg
				);

				mask-image: conic-gradient(
						from var(--angle) at center, 
						transparent 180deg, 
						black 180deg
					);

				}
			
			.btn.round.review.hardness.sweeping .mask {
				animation: mask-sweep 3s ease-in-out infinite alternate;
			}

			.btn.round.review.hardness .layer.needle {
				top: 0;
    			left: 0;
				transform:translate(0);
			}

			.btn.round.review.hardness.green .layer.needle {
				transform: rotate(-60deg);
			}

			.btn.round.review.hardness.yellow .layer.needle {
				transform: rotate(15deg);
			}

			.btn.round.review.hardness.red .layer.needle {
				transform: rotate(90deg);
			}

			.btn.round.review.hardness.sweeping .layer.needle {
				animation: needle-sweep 3s ease-in-out infinite alternate;
			}

			.btn.round.review.hardness div {
				position:absolute;
				left:50%;
				top:50%;
				transform:translate(-50%, -50%);
			}

			.btn.round.review.hardness .gauge {
				width:54%;
				aspect-ratio:1;
				border-radius:100%;
				background-color:var(--red);
				-webkit-mask-image: radial-gradient(circle, transparent 40%, black 41%), linear-gradient(to bottom, black 50%, transparent 50%);
				mask-image: radial-gradient(circle, transparent 40%, black 41%), linear-gradient(to bottom, black 50%, transparent 50%);
				-webkit-mask-composite: source-in;
				mask-composite: intersect;
			}

			.btn.round.review.hardness.sweeping .mask .gauge {
				animation: gauge-sweep 3s ease-in-out infinite alternate;
			}

			.btn.round.review.hardness .arc {
				width:70%;
				aspect-ratio:1;
				border-radius:100%;
				background-color:transparent;
				border:1px solid var(--red);
				clip-path: inset(0 0 49% 0);
			}

			.btn.round.review.hardness.sweeping .mask .arc {
				animation: arc-sweep 3s ease-in-out infinite alternate;
			}

				.btn.round.review.hardness .neutral .gauge {
					background-color:white;
				}
				.btn.round.review.hardness .neutral .arc {
					border:1px solid white;
				}
			
			.btn.round.review.hardness .arm {
				width:8%;
				height:45%;
				transform:translate(-50%, -90%);
				background-color:gray;
				border:1px solid rgb(30 30 30);
				border-top:none;
				border-bottom:none;
			}
			
			.btn.round.review.hardness .pivot {
				width:10%;
				aspect-ratio:1;
				background-color:gray;
				border-radius:100%;
			}


				@keyframes mask-sweep {
					from { --angle: -60deg; }
					to { --angle: 90deg; }
				}

				@keyframes needle-sweep {
					from { transform: rotate(-60deg);}
					 /* translate(-50%, -50%);} */
					to { transform: rotate(90deg);}
					 /* translate(-50%, -50%); } */
				}

				@keyframes arc-sweep {
					0% {
						border-color:var(--green);
					}
					50% {
						border-color:var(--yellow);
					}
					100% {
						border-color:var(--red);
					}
				}

				@keyframes gauge-sweep {

					0% {
						background-color:var(--green);
					}
					50% {
						background-color:var(--yellow);
					}
					100% {
						background-color:var(--red);
					}
				}
		
		.keyboard .btn.round.thumb {
			top:-6rem;
			z-index:2005;
		}

		.keyboard .btn.round.thumb.down {
			left:0.8rem;
		}

		.keyboard .btn.round.thumb.up {
			right:0.8rem;
		}

		/* .maintainer.compound:has(.target.acquired) .difficulty-slider,
		.maintainer.zygo:has(.target.acquired) .difficulty-slider,
		.maintainer.camo:has(.target.acquired) .difficulty-slider,
		.maintainer.poly:has(.target.acquired) .difficulty-slider, */
		.maintainer:not(.standard):has(.target.acquired) .btn.round.review {
			opacity:1;
			transition: transform 0.2s, border 0.2s, background-color 0.2s, opacity 0.5s 0.5s;
		}

	.compression .score {
		padding-bottom: 2px;
		flex-shrink: 0;
	}

	/* .score:has(.tally.done) {
		padding-bottom: 4rem;
	} */
	
		.tally {
			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;
		}

		.tally.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;
		}

		.tally.undone {
			transform: scale(1);
			opacity: 0.5;
			margin-top: 0;
			padding-bottom:2rem;
			-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;
		}

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

		.tally .letter.count {
			position: absolute;
			left: 100%;
			top: -4px;
			/* font-size: 24px; */
			font-size: 0.9em;
		}

			.step.count.pop {
				animation: stepsPop 0.2s ease-out;
			}

			.step.count.un.pop {
				animation: stepsUnPop 0.3s ease-out;
			}

			.letter.count.pulse {
				animation: lettersPulse 0.2s ease-out;
			}

			.letter.count.un.pulse {
				animation: lettersUnPulse 0.3s ease-out;
			}

			@keyframes stepsPop {
				0% { transform: scale(1); color: unset; }
				50% { transform: scale(1.6); color:rgb(200, 200, 200); }
				100% { transform: scale(1); color:unset; }
			}

			@keyframes stepsUnPop {
				0% { transform: scale(1); color: unset; }
				50% { transform: scale(0.8); color:rgb(110, 110, 110); }
				100% { transform: scale(1); color:unset; }
			}

			@keyframes lettersPulse {
				0% { transform: scale(1); filter: brightness(1) }
				50% { transform: scale(1.4); filter: brightness(1.2) }
				100% { transform: scale(1); filter: brightness(1) }
			}

			@keyframes lettersUnPulse {
				0% { transform: scale(1); filter: brightness(1) }
				50% { transform: scale(0.8); filter: brightness(0.9) }
				100% { transform: scale(1); filter: brightness(1) }
			}

			.tally.blue .count {
				color: var(--blue);
			}
		
			.tally.green .count {
				color: var(--green);
			}

			.tally.yellow .count {
				color: var(--yellow);
			}

			.tally.orange .count {
				color: var(--orange);
			}

			.tally.red .count {
				color: var(--red);
			}



	.wtf_contain {
		position:relative;
		width:3rem;
		width:100%;
		height:3rem;
		display:flex;
		align-items: center;
		justify-content: center;
		z-index:200;
		margin-bottom:1rem;
	}		

	.typebox .wtf_contain {
		position:absolute;
		left:calc(100% + 3rem);
		top:40%;
		transform: translateY(-50%);
		z-index:200;
		margin-bottom:unset;
	}

	.btn.round.wtf {
			/* Initial Shadow */
		/* box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);   */
			/* Animation: name duration timing-function iteration-count */
		/* animation: pulse-glow 1.5s infinite ease-in-out; */
		width:2.4rem;
		height:2.4rem;
		position:relative;
	}

	.wtf_contain .qe {
		position: absolute;
		height: 100%;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		top: 0;
		left: 0;
		font-size:0.7em;
		color:#ccc;
	}

	.wtf_contain .teach {
		position:absolute;
		width:96%;
		left:102%;
	}

	@keyframes pulse-glow {
		0% {
			transform: scale(0.95);
			box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
		}
		70% {
			/* Scale up and expand the glow shadow */
			transform: scale(1);
			box-shadow: 0 0 0 0.9rem rgba(0, 123, 255, 0);
		}
		100% {
			/* Return to original state to loop seamlessly */
			transform: scale(0.95);
			box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
		}
	}

	/* 1. Register the property so CSS knows how to animate it */
	@property --angle {
		syntax: '<angle>';
		initial-value: 0deg;
		inherits: false;
	}

	@property --glow-color {
		syntax: '<color>';
		initial-value: skyblue;
		inherits: false;
	}

	.btn.round.wtf {
		border: 1px solid transparent;

		background: 
			/* 1. Button Center */
			linear-gradient(var(--button-bg), var(--button-bg)) padding-box,
		
			/* 2. Morphing Moving Glow */
			conic-gradient(
				from var(--angle),
				transparent 0%,
				var(--glow-color) 20%, 
				transparent 60%
			) border-box,

			/* 3. Dark Gray Base Border */
			linear-gradient(#444, #444) border-box;

			/* We run two animations at once */
		animation: 
			spin 10s linear infinite,
			morph-color 5s ease-in-out infinite; /* Changes color every 2.5s */
	}

	.btn.round.wtf {
		border:none;
		animation: eclipse 10s linear infinite;
	}

	.btn.round.wtf_not_working::before {
		content: "";
		position: absolute;
		/* Size it larger than the button to create the "sun" bulge */
		top: -10px; left: -10px; bottom: -10px; right: -10px;
		
		/* The "Sun" Glow */
		background: radial-gradient(
			circle at center, 
			var(--glow-color) 0%, 
			transparent 70%
		);
		
		border-radius: 50%;
		z-index: -1; /* Place behind the button */
		filter: blur(8px); /* Soften the glow */
		
		/* Rotate the entire glow element around the center */
		transform: rotate(var(--angle)) translateY(-50%); 
		/* The translateY moves the "sun" to the edge of the planet */
		
		transform-origin: center;
		animation: spin 10s linear infinite;
	}

	.btn.round.wtf.white {
		/* Layout & Shape */
		/* width: 200px;
		height: 200px; */
		/* border-radius: 50%; */
		border: 1px solid transparent;
		
		/* The Gradients */
		background: 
			/* 1. Top Layer: The button's center (Black) */
    		linear-gradient(var(--button-bg), var(--button-bg)) padding-box,
			
			/* 2. Middle Layer: The moving light (White) */
			conic-gradient(
				from var(--angle),
				transparent,
				rgba(255, 255, 255, 0.8) 10%, 
				transparent 20%
			) border-box,

			/* 3. Bottom Layer: The static border color (Dark Gray) */
			linear-gradient(#444, #444) border-box;

		/* 2. The Animation */
		animation: spin 4s linear infinite;
	}

	@keyframes spin {
		from { --angle: 0deg; }
		to { --angle: 360deg; }
	}

	@keyframes morph-color {
		0%, 100% { --glow-color: skyblue; }
		50% { --glow-color: hotpink; }
	}

	.taunt {
		color: #CCC;
		width: 100%;
		text-align: center;
		bottom: calc(100% - 3px);
		font-size: 0.7em;
		font-weight: bold;
		padding-bottom:0.5em;
		padding-top:2em;
		background:linear-gradient(to bottom, transparent 0%, #101010 90%, #101010 100%);
		/* display: flex;
		flex-direction: column;
		justify-content: flex-end; */
		display: flex;
		flex-direction: column;
		justify-content: center;
		/* white-space:nowrap; */
		z-index:2004;
	}

	.keyboard .taunt {
		position:absolute;
		bottom:100%;
	}

	.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" */
	}


.difficulty-slider {
    position: absolute;
	z-index:10000;
    right: 1.75rem;
    bottom: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom:2rem;
	user-select:auto;
}

.difficulty-slider {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* padding: 40px; */
	touch-action: none;
	user-select: none;
}

.track {
	width: 15px;
	height: 6rem;
	border-radius: 10px;
	background: linear-gradient(to top, var(--green), var(--yellow), var(--red));
	position: relative;
	cursor: pointer;
}



/* .thumb {
  width: 200%;
  height: 1rem;
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  bottom: 50%;
  pointer-events: none;
  z-index: 2;

  background: 
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.05)) padding-box,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0.3) 100%) border-box;
  
  border: 1px solid transparent;
  border-radius: 2rem;
  
  backdrop-filter: blur(1px); 
  -webkit-backdrop-filter: blur(1px);

  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
} */

/* .thumb::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 6px;
  right: 6px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 10px;
} */

/* Positioning the value to the left of the pill */
.slider-value {
  position: absolute;
  right: 150%; /* Distance from the pill */
  top: 50%;
  transform: translateY(-50%);
  
  /* font-family: monospace; */
  font-weight: bold;
  font-size: 1em;
  color: white; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  
  width: 50px;
  text-align: right;
  pointer-events: none;
}

/* Full screen overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(4px);    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: all; /* Blocks clicks to the game below */
}

/* The actual spinner */
.loader-circle {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db; 
    border-radius: 50%;
    animation: loadspin 1s linear infinite; /* Renamed here */
}

@keyframes loadspin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sg_loading {
	position:absolute;
	width:100%;
	height:100%;
	z-index:3000;
	background-color:rgb(0 0 0 / 40%);
	display:none;
	align-items:center;
	justify-content:center;
}

.sg_loading.active {
	display:block;
}

.sg_loading.active .sg .loadnote {
	position:absolute;
	top:100%;
	margin-top:1rem;
	font-size:1rem;
	color:white;
	white-space:nowrap;
	text-align:center;
	left: 50%;
    transform: translateX(-50%);
	width:fit-content;
    width: auto;
}

.sg {
	position:absolute;
	left:50%;
	top:50%;
    height:16%;
    aspect-ratio: 1;
	transform:translate(-50%, -50%);
}

.sg_loading .sg > div {
	height:100%;
	width:100%;
	position:absolute;
	top:0;
	left:0;
	background-size:contain;
}

.s_left {
	background-image:url(../images/sg_logo/S_left_sm.png);
	/* animation: spinClockwise 1.2s linear infinite; */
	animation: spinCCW 1.2s ease-in-out infinite;
	transform-origin:61% 50%;
	filter:hue-rotate(100deg);
}

.s_right {
	background-image:url(../images/sg_logo/S_right_sm.png);
	/* animation: spinCounter 1.5s ease-in-out infinite; */
	/* animation: spinClockwise 1.2s linear infinite; */
	animation: spinCCW 1.2s ease-in-out infinite;
	transform-origin:38% 50%;
	filter:hue-rotate(100deg);
}

.g_center {
	background-image:url(../images/sg_logo/G_sm.png);
	filter:hue-rotate(220deg);
	animation: hueRotate 1.2s linear infinite;
}

@keyframes spinCW {
	0% {
		transform: rotate(0deg);
		filter:hue-rotate(100deg);
	}
	50% {
		filter:hue-rotate(220deg);
	}
	90% {
		transform: rotate(360deg);
	}
	100% {
		filter:hue-rotate(100deg);
		transform: rotate(360deg);
	}
}

@keyframes spinCCW {
	0% {
		transform: rotate(0deg);
		filter:hue-rotate(100deg);
	}
	50% {
		filter:hue-rotate(220deg);
	}
	90% {
		transform: rotate(-360deg);
	}
	100% {
		filter:hue-rotate(100deg);
		transform: rotate(-360deg);
	}
}

@keyframes hueRotate {
	0% {
		filter:hue-rotate(220deg);
	}
	50% {
		filter:hue-rotate(100deg);
	}
	100% {
		filter:hue-rotate(220deg);
	}
}

/* .vertical-slider {
	writing-mode: vertical-lr; 
	direction: rtl;	
	-webkit-appearance: none;
	appearance: none;
	height: 300px;
	width: 20px;
	background: transparent;
	outline: none;
}

.vertical-slider::-webkit-slider-runnable-track {
	width: 15px;
	height: 100%;
	border-radius: 10px;
  	background: linear-gradient(to top, var(--green), var(--yellow), var(--red));
}

.vertical-slider::-moz-range-track {
	width: 15px;
	height: 100%;
	border-radius: 10px;
  	background: linear-gradient(to top, var(--green), var(--yellow), var(--red));
}

.vertical-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 40px;
	margin-left:-20px;
	height: 10px;
	background: #333;
	border-radius: 5px;
	cursor: pointer;
}

.vertical-slider::-moz-range-thumb {
	width: 40px;
	height: 10px;
	background: #333;
	border-radius: 5px;
	cursor: pointer;
}

.slider-value {
	margin-top: 10px;
	font-family: sans-serif;
	font-weight: bold;
	width: 50px;          
	text-align: center;   
	display: inline-block;
} */

