body {
	background-image: linear-gradient(#FFFB, #FFFB), url("assets/logo_background.png");
	background-size: 100px;
	/* animation: move-background 10s linear infinite; */
	font-family: "Catamaran", "Trebuchet MS", sans-serif;
	line-height: 1.2;
	--icon-scale: 1;
}
@keyframes move-background {
	from {
		background-position: 0 0;
	}
	to {
		background-position: 100px 60px;
	}
}
main {
	margin: auto;
	padding: 20px;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	width: 90vw;
	height: 90vh;
	background: #FFF8;
	/* backdrop-filter: blur(1.5px); */
	border: 5px solid #D7B3D7;
	border-radius: 25px;
	box-sizing: border-box;
	text-align: center;
	overflow: auto;
}
h1 {
	margin: 6px 0;
}
@media (min-width: 1301px) {
	body {
		font-size: 1.125em;
		--icon-scale: 1.6;
	}
}
#responsiveWidthWrapper {
	margin: auto;
	width: 60%;
}
form {
	text-align: left;
}
@media (max-width: 1300px) {
	body {
		--icon-scale: 1.3;
	}
	#responsiveWidthWrapper {
		width: 70%;
	}
}
@media (max-width: 1048px) {
	#responsiveWidthWrapper {
		width: 82.5%;
	}
}
@media (max-width: 748px) {
	body {
		font-size: 0.875em;
	}
	#responsiveWidthWrapper {
		width: 95%;
	}
}
@media (max-width: 450px) {
	body {
		font-size: 0.8em;
		--icon-scale: 1;
	}
	main {
		padding: 2px;
	}
	fieldset {
		padding: 5px;
	}
}
#structureFilesInput:invalid {
	display: none; /* The label will make the button work */
}
#structureFilesInput ~ div {
	margin: 4px auto;
	padding: 10px;
	box-sizing: border-box;
	width: 70%;
	font-weight: 500;
	text-align: center;
	border: 3px solid #D899D8;
	border-radius: 25px;
}
#structureFilesInput ~ div p {
	margin: 0;
}
#structureFilesInput ~ div p:first-child {
	font-size: 1.4em;
}
#structureFilesInput ~ div p:last-child {
	font-size: 0.7em;
}
#structureFilesInput:valid ~ div {
	display: none;
}
form:has(#structureFilesInput:invalid) ~ * {
	display: none;
}
fieldset:has(#structureFilesInput:invalid) ~ * {
	display: none;
}
fieldset.expandable {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.35s;
}
fieldset.expandable:has(input:checked) {
	grid-template-rows: 1fr;
}
fieldset.expandable > *:not(legend) {
	overflow: hidden;
}
fieldset.expandable > legend {
	contain: layout;
}
fieldset.expandable > legend > label {
	padding-left: 1em;
	cursor: pointer;
}
fieldset.expandable > legend > label > input {
	display: none;
}
fieldset.expandable > legend::before {
	content: "";
	margin: auto;
	display: inline-block;
	position: absolute;
	left: 3px;
	top: 3px;
	bottom: 0;
	width: 0.5em;
	height: 0.5em;
	border-right: 1px solid currentColor;
	border-top: 1px solid currentColor;
	transform: rotate(45deg);
	transform-origin: 75% 25%;
	transition: transform 0.35s;
}
fieldset.expandable:has(input:checked) > legend::before {
	transform: rotate(135deg);
}
label {
	display: block;
}
input, select {
	font-family: monospace;
}
details {
	padding: 3px;
	width: fit-content;
	border: 1px solid #AAA;
	border-radius: 5px;
	font-size: 0.825em;
}
summary {
	padding: 0 3px;
	font-weight: 500;
	font-size: 1rem;
}
input, button {
	color: inherit; /* iOS fix */
}
button, input[type="checkbox"], input[type="number"], input[type="text"], textarea, input[type="file"]::file-selector-button, select, .buttonlike {
	padding: 1px 4px;
	border: 2px solid #D899D8;
	accent-color: #D899D8;
	border-radius: 7px;
	background: #EEDEEE;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s;
}
input[type="color"] {
	border: 2px solid #D899D8;
	border-radius: 7px;
	background: #EEDEEE;
	cursor: pointer;
	transition: background 0.15s;
}
input[type="number"], input[type="text"], textarea {
	cursor: text;
	outline-width: thin;
	accent-color: auto;
}
input[type="text"]::placeholder {
	text-overflow: ellipsis;
}
input[type="text"]:invalid {
	border-color: #E24436;
	outline-color: #E24436;
}
button:not(:disabled):not(.packInfoButton):hover, input[type="file"]:not(:disabled):hover::file-selector-button, select:not(:disabled):hover, .buttonlike:hover {
	background: #E8C8E8;
}
button:disabled, input[type="file"]:disabled::file-selector-button, select:disabled, .buttonlike:disabled {
	cursor: not-allowed;
}
input[type="number"]:hover, input[type="text"]:hover, input[type="color"]:hover, textarea:hover {
	background: #EAD5EA;
}
button:not(.packInfoButton):active, input[type="file"]:active::file-selector-button, select:active, .buttonlike:active {
	background: #DABADA;
}
input[type="checkbox"] {
	display: inline-block;
}
.resetButton {
	position: absolute;
	right: 10px;
	top: 0;
}

#configTabsCont {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-evenly;
}
#configTabsCont input[type="radio"][name="configTabs"] {
	position: absolute; /* stay at top */
	opacity: 0;
}
#configTabsCont > label {
	flex: 1 1 0;
	text-align: center;
	margin: 10px 5px 5px;
}
#configTabsCont > fieldset {
	width: 100%;
	order: 1;
	contain: layout;
}
#configTabsCont input[type="radio"][name="configTabs"]:checked + label {
	background: #E8C8E8;
	font-weight: 500;
}
#configTabsCont input[type="radio"][name="configTabs"]:not(:checked) + label + fieldset {
	display: none;
}

#fileInputLabel {
	font-size: 1.75em;
}
#dropFileNotice {
	padding: 10px;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	box-sizing: border-box;
	background: #0002;
	font-size: 1.75em;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
}
#generatePackButton, .packInfoButton {
	margin: 4px auto;
	padding: 10px;
	box-sizing: border-box;
	width: 70%;
	display: block;
	
	border-width: 3px;
	border-radius: 25px;
	text-align: center;
	font-size: 1.4em;
	font-weight: 500;
}
.packInfoButton {
	--bg-col-1: #E8C8E8;
	--bg-col-2: #D899D8;
	background-image: repeating-linear-gradient(150deg, var(--bg-col-1) 0, var(--bg-col-1) 10px, var(--bg-col-2) 10px, var(--bg-col-2) 20px);
	background-size: 200% !important;
	transition: transform 0.15s;
	min-width: min-content;
}
.packInfoButton.completed {
	animation: moveButtonBackground 1s linear infinite;
}
@keyframes moveButtonBackground {
	from {
		background-position: -40px 0;
	}
}
.packInfoButton.completed:hover {
	transform: scale(1.05);
}
.packInfoButton.completed:active {
	transform: scale(1.02);
}
.packInfoButton:not(.completed) {
	pointer-events: none;
}
#termsOfUseNotice {
	display: block;
	text-align: center;
}
img:not(#languageSelectorButton), canvas {
	display: inline-block;
	width: 400px;
	border: 1px solid black;
	background: url("assets/noise.svg");
	/* color: #4C33CC;
	color: #2C33B3;
	color: #4CF0A0
	color: hsl(300, 24%, 53%);
	color: #D899D8;
	color: #D7B3D7; */
}
.previewCont {
	padding: 5px;
	text-align: center;
}
.previewCont > * {
	width: 40vw;
	height: 40vw;
}
.previewCont canvas {
	touch-action: none;
}
.previewMessage {
	margin: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.5vw;
	border: 1px solid black;
}
@media (max-width: 768px) {
	.previewMessage {
		font-size: 3.5vw;
	}
}
@media (max-width: 450px) {
	.previewMessage {
		font-size: 5vw;
	}
}
.previewMessage.clickToView {
	cursor: pointer;
}
#languageSelectorCont {
	position: absolute;
	top: 10px;
	right: 10px;
}
#languageSelectorButton {
	width: calc(22px * var(--icon-scale));
	height: calc(22px * var(--icon-scale));
	background: black;
	mask: url("assets/translate_icon.svg") no-repeat center;
	-webkit-mask: url("assets/translate_icon.svg") no-repeat center; /* No way Chrome didn't support this until a year ago :0 */
	transition: transform 0.15s;
}
#languageSelectorCont:hover > #languageSelectorButton {
	transform: scale(1.125);
}
#languageSelector {
	opacity: 0;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
}
.hidden {
	display: none !important;
}
/* This magic is taken straight from https://css-loaders.com/bars/#l1 */
.loader {
	margin: 10px auto auto;
	width: 45px;
	aspect-ratio: 1;
	--c: no-repeat linear-gradient(#D899D8 0 0);
	background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
	background-size: 20% 100%;
	animation: l1 1s infinite linear;
}
@keyframes l1 {
	0% {
		background-size: 20% 100%, 20% 100%, 20% 100%;
	}
	33% {
		background-size: 20% 10%, 20% 100%, 20% 100%;
	}
	50% {
		background-size: 20% 100%, 20% 10%, 20% 100%;
	}
	66% {
		background-size: 20% 100%, 20% 100%, 20% 10%;
	}
	100% {
		background-size: 20% 100%, 20% 100%, 20% 100%;
	}
}

fieldset.textureSettings > div {
	display: flex;
	flex-wrap: wrap;
	gap: 15px 0;	
}
fieldset.textureSettings > div > div {
	flex: 1 1 auto;
}
#texturePreviewCont {
	text-align: center;
	min-width: 260px;
}
#texturePreviewCont img {
	margin: 5px;
	display: inline-block;
	border: none;
	width: 40%;
	max-width: 140px;
	image-rendering: pixelated;
}