* {
    margin: 0;
    padding: 0;
}
header {
    text-align: center;
}
header > h1 {
    line-height: 1;
    position: absolute;
    top: 20px;
    width: 100%;
}
body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 35px;
    background-color: #F8F0E5;
}
#calculator {
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 18px;
    align-items: stretch;
    justify-content: stretch;
    text-align: center;
    min-height: 60vh;
}
#resultdisplay ~ div, #resultdisplay {
    position: relative;
    background-color: #DAC0A3;
    padding: 10px;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 5px 15px 1px #A08B72;
    height: 100%;
}
#calculator p {
    margin: auto;
}
#reset, #result {
    grid-column: span 2;
}
#reset[id] {
    background-color: #8D7B68;
}
#result[id] {
    background-color: #93BFCF;
}
#del[id] {
    background-color: #B1A192;
}
#resultdisplay[id] {
    background-color: #FAF1E4;
}
#resultdisplay {
    grid-column: span 4;
    display: flex;
    flex-direction: row;
    text-align: right;
    align-items: center;
    justify-content: flex-end;
}
#resultdisplay p {
    margin: 0;
}
nav {
    position: absolute;
    top: 20px;
    width: 70px;
    right: 10px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}
input:checked + .slider {
    background-color: #F1C93B;
}
input:not(:checked) + .slider {
    background-color: #333;
}
input:focus + .slider {
    box-shadow: 0 0 1px #F1C93B;
}
input:checked + .slider:before {
    -webkit-transform: translateX(42px);
    -ms-transform: translateX(42px);
    transform: translateX(42px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}
span {
    font-size: 12px;
}
.label {
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    position: absolute;
    opacity: 0;
}
.label-on {
    left: 10px;
    top: 20%;
    color: #333;
}
.label-off {
    right: 10px;
    top: 20%;
    color: #ffffff;
}
.switch input:checked ~ .label-on,
.switch input:not(:checked) ~ .label-off {
    opacity: 1;
}
@media (max-width: 768px) {
    body {
      font-size: 15px;
    }
    h1 {
        font-size: 25px;
    }
}
nav > div {
    width: 100%;
}
main {
    margin-top: 90px;
}
.container {
    background-color: #EADBC8;
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    box-shadow: 10px 5px 15px 5px #8A8073;
}
footer {
    font-size: 10px;
    text-align: center;
    margin-top: 10px;
}