html {
	height: 100%;
	width: 100%;
	position: fixed;
}

body {
	height: 95%;
	display: block;
	margin: 8px;
	padding-bottom: env(safe-area-inset-bottom);
	background-color: #33342F;
	-webkit-user-select: none;
	user-select:none;
}

.flex-row {
	display: flex;
	flex-direction: row;
	gap: 5px;
	width: 100%;
}

.flex-col {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.grow {
	flex-grow: 1;
}

.top-level {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr auto auto auto;
	gap: 5px;
	height: 100%;
	max-height: 900px;
	padding: 5px;
	max-width: 500px;
	background-color: #33342F;
	border-radius: 10px;
	border: solid 1px #828282;
	-webkit-box-shadow:0px 0px 5px 2px rgba(255,255,255,0.4);
	-moz-box-shadow: 0px 0px 5px 2px rgba(255,255,255,0.4);
	box-shadow: 0px 0px 5px 2px rgba(255,255,255,0.4);
}

pre {
	margin: 0px;
	text-shadow: 1px 1px 15px rgba(66,69,97,0.5);
	overflow: auto;
}


#inputField {
	box-sizing: border-box;
	padding: 5px;
	width: 100%;
	height: 48px;
	white-space: pre;
	background-color: #9FACB2;
	color: #424561;
	font-family: monospace;
	font-size: 2.15em;
	font-weight: bold;
	text-align: right;
	border: solid 1px rgba(0,0,0,0.5);
	border-radius: 5px;
	box-shadow: 5px 5px 3px 0px rgba(0,0,0,0.76) inset;
	text-shadow: 1px 1px 15px rgba(66,69,97,0.2);
	-webkit-appearance: none;
	appearance: none;
}

.screen {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	min-height: 0;
	background-color: #9FACB2;
	color: #424561;
	font-family: monospace;
	font-weight: bold;
	white-space: pre-line;
	box-shadow: 5px 5px 3px 0px rgba(0,0,0,0.76) inset;
	text-shadow: 1px 1px 15px rgba(66,69,97,0.2);
}

.top-row {
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	font-size: 1.5em;
}

.stack-and-messages {
	overflow-y: auto;
}

.stack {
	display: flex;
	flex-direction: column-reverse;
	overflow: auto;
	padding-left: 5px;
	padding-right: 5px;
	font-size: 2.15em;
}

.stack-row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.messages {
	font-size: 1.5em;
	padding-left: 5px;
	padding-right: 5px;
}

.border {
	box-sizing: border-box;
	border: solid 1px rgba(0,0,0,0.5);
	border-radius: 5px;
	width: 100%;
	padding: 5px;
	overflow-x: auto;
}

.keypad-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-gap: 5px 5px;
	touch-action: none;
	-webkit-user-select: none;
	user-select:none;
}

.keypad-6 {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-gap: 5px 5px;
	touch-action: none;
	-webkit-user-select: none;
	user-select:none;
}

.keypad-button {
	background: rgb(75,77,74);
	background: radial-gradient(circle, rgba(75,77,74,1) 0%, rgba(87,89,86,1) 100%);
	color: #EEEEE4;
	border: solid 1px rgba(0,0,0,0.5);
	box-shadow: inset 2px 2px 5px 0px rgba(255,255,255,0.5);
	border-radius: 8px;
	height: 2.5em;
	padding: 0;
	font-variant: small-caps;
	cursor: pointer;
}

.button-main {
	font-size: large;
}

.button-aux {
	font-size: medium;
}

.button-selected {
	border-color: indianred;
}

.span-2 {
	grid-column: span 2;
}
