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

body {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0;
	padding: 0;
	background-color: #f6f6f6;
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

.content {
	display: flex;
	height: 100%;
	width: 100%;
	justify-content: center;
	align-items: center;
	flex: 1;
}

.calculator {
	flex-shrink: 1;
	display: flex;
	flex-direction: column;
	aspect-ratio: 9 / 16;
	padding: 16px;
	background-color: #aaaaaa;
}

@media (orientation: portrait) {
	.calculator {
		width: 70%;
	}
}

@media (orientation: landscape) {
	.calculator {
		height: 70%;
	}
}

.screen {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	min-height: 20%;
	background-color: #eeeeee;
	padding-left: 16px;
	overflow-x: auto;
}

.input-area {
	font-size: 5vh;
	/* word-break: break-all; can be used to add new line instead of scrolling */
}

.bordered,
button {
	border: 2px solid black;
	border-radius: 1.5vh;
	font-size: 3vh;
}

.function-area {
	display: flex;
	height: 10%;
	flex-shrink: 1;
	gap: 8px;
	margin-top: 12px;
	margin-bottom: 16px;
}

.delete-btn {
	background-color: #aaaaff;
}

.clear-btn {
	background-color: #ffaaaa;
}

.function-area .big-btn {
	flex: 1;
	padding: 8px;
}

.grid {
	flex: 1 1 auto;
	display: grid;
	row-gap: 10px;
	column-gap: 10px;
	grid-template-rows: repeat(4, calc(25% - 7.5px));
	grid-template-columns: repeat(4, calc(25% - 7.5px));
	justify-items: stretch;
	align-items: stretch;
	justify-content: stretch;
	align-content: stretch;
}

button:hover {
	filter: brightness(90%);
}

.grid button:hover {
	font-size: 4vh;
}

button {
	cursor: pointer;
}
