* {
	font-family: "Barlow", serif;
	box-sizing: border-box;
}

textarea {
	resize: none;
}
.light textarea {
	color: rgb(13, 13, 13);
}
.dark textarea {
	color: rgb(238, 238, 241);
}

body {
	margin: 0;
	padding: 0 0 250px 0;
}

body.light {
	background: rgb(238, 238, 241);
	color: rgb(13, 13, 13);
}
body.dark {
	background: rgb(13, 13, 13);
	color: rgb(238, 238, 241);
}

#input {
	font-family: "Skript", "Barlow", sans-serif;
	display: flex;
	font-size: 20px;
	padding: 14px 20px;
	outline: none;
	border: 0;
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	background: transparent;
}

interactive {
	position: fixed;
	bottom: 0;
	right: 0;
	margin: 20px;
	min-width: 70%;
	background: rgb(228, 228, 231, 80%);
	border-radius: 14px;
}

.light interactive,
.light display {
	background: rgb(228, 228, 231, 80%);
}
.dark interactive,
.dark display {
	background: rgb(33, 33, 33, 80%);
}

keyboard {
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 8px;
	width: 100%;
}

row {
	display: flex;
	gap: 3px;
}

key,
keyboardButton {
	background: rgb(120, 120, 120, 12%);
	margin: 0;
	cursor: pointer;
	flex: 1 1 0;
	border-radius: 7px;
	padding: 14px 7px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

key,
keyboardButton,
key char {
	font-size: 18px;
	text-align: center;
}

.dark key:hover,
.dark keyboardButton:hover {
	filter: brightness(1.6);
}

.light key:hover,
.light keyboardButton:hover {
	background: rgb(145 120 249 / 30%);
}

.keyDelete,
.keyTab,
.keyShift {
	flex-grow: 2;
}

.keySpace {
	flex-grow: 7;
}

#keySpace {
	font-family: Barlow, sans-serif;
	font-size: 12px;
}

.keyDelete,
.keyTab,
.keyShift,
.keyCaps,
.keyControl,
.keyOption,
.keyCommand,
.keyReturn,
.keyDelete,
.keyHide,
.keyScript,
keyboardButton {
	background: rgb(145 120 249 / 20%);
}

key.active {
	background: rgb(145 120 249 / 70%);
}

key.material,
keyboardButton.material {
	font-family: "material symbols outlined";
	font-size: 140%;
}

keyboardButton {
	position: fixed;
	bottom: 0;
	right: 0;
	/*padding: 14px 20px;*/
	margin: 8px;
	display: none;
	z-index: 5;
}

.scriptName {
	font-size: 14px;
}

.hidehelp key help {
	display: none;
}

.showhelp key help {
	font-size: 15px;
}

.showonlyhelp key help {
	font-size: 17px;
}

.showonlyhelp key:has(help) char {
	display: none;
}

pre {
	display: none;
}

key help c {
	color: rgb(145 120 249 / 100%);
	border-bottom: 2px solid rgb(145 120 249 / 100%);
	padding-bottom: 3px;
}

.preloads {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
}

display {
	display: block;
	position: absolute;
	width: calc(100% - 40px);
	overflow-y: auto;
	overflow-x: hidden;
	border-radius: 14px;
	margin: 20px 20px 0 20px;
	padding: 20px;
}

displayButton {
	font-family: "material symbols outlined";
	content: "\e5cd";
	font-size: 20px;
	cursor: pointer;
	display: block;
	position: absolute;
	top: 29px;
	right: 29px;
	border-radius: 11px;
	padding: 4px;
	background: rgb(145 120 249 / 30%);
	z-index: 10;
}

displayButton:hover {
	background: rgb(145 120 249 / 50%);
}

paragraph {
	font-size: 20px;
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	margin-bottom: 14px;
}

.vertical paragraph {
	gap: 0;
}

.horizontal paragraph {
	gap: 8px;
}

character,
punctuation,
digit,
notfound {
	text-orientation: upright;
	margin: 0 0 12px 0;
	padding: 0;
	line-height: 100%;
}

.vertical character,
.vertical punctuation,
.vertical digit {
	writing-mode: vertical-lr;
}

.horizontal character,
.horizontal punctuation,
.horizontal digit {
	writing-mode: horizontal-lr;
}

display,
keyboard {
	user-select: none;
	-drag: none;
	-moz-user-select: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	touch-action: pan-x pan-y;
}

@media only screen and (max-width: 768px) {
	interactive {
		margin: 0;
		width: 100%;
		background: rgb(228, 228, 231, 80%);
		border-radius: 0;
	}

	keyboard {
		gap: 2px;
		padding: 3px;
	}

	row {
		gap: 2px;
	}

	key,
	keyboardButton {
		flex: 1 1 0;
		border-radius: 4px;
		padding: 8px 3px;
		gap: 2px;
	}

	key,
	keyboardButton,
	key char {
		font-size: 13px;
	}

	.showhelp key help {
		font-size: 11px;
	}

	.showonlyhelp key help {
		font-size: 13px;
	}

	key.material,
	keyboardButton.material {
		font-size: 110%;
	}
}

@media print {
	html,
	body {
		background: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	interactive,
	textarea,
	displayButton {
		display: none !important;
	}
	display {
		display: block !important;
		border: none !important;
		color: #000 !important;
		background: none !important;
		caret-color: transparent;
		position: relative;
		top: 0;
		left: 0;
		height: initial !important;
		padding: 0 !important;
		margin: 0 !important;
		border-radius: 0 !important;
	}
}
