* {
    margin: 0;
    padding: 0;
    /*border: solid #000 1px;*/
}

body {
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.container {
    display: flex;
    flex: 1;
    align-items: stretch;
    width:100%;
}

.sidebar {
    flex: 1;
    /*background-color: #aaa;*/
}

.col {
    flex-direction: column;
}

.calc-body {
    display: flex;
    flex-direction: column;
    flex: 0 1 400px;
    align-self: center;
    padding: 42px 24px;
    border-radius: 24px;
    box-shadow: 8px 8px 18px 6px #ddd;
    background-color: rgb(229, 229, 229);
}

.calc-body hr {
    background-color: #ddd;
    margin: 24px 32px;
    border: 0;
    height: 3px;
    border-radius: 3px;
}

.calc-keys,
.key-row {
    gap: 12px;
    flex: 1;
    display: flex;
}

.calc-keys {
    flex-direction: column;
}

.key {
    flex: 1 0 50px;
    height: 50px;
    border-radius: 32px;
    box-shadow: 5px 5px 3px #ccc;
    background-color: #999;
    color: #eee;
    font-size: 22px;
    font-weight: 100;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key:hover {
    box-shadow: none;
}

.key:active,
.key.active {
    box-shadow: inset 5px 5px 3px var(--shadow-color, #666);
}

.key span {
    user-select: none;
}

.num {
    background-color: #eee;
    color: #666;
    border: solid #aaa 1px;
}

#keyEQ {
    background-color: lightblue;
    color: #fff;
}

#keyCLR,
#keyBSPACE {
    background-color: #dd544a;
    color: #fff;
}

.aspect-1 {
    aspect-ratio: 1;
}

.empty {
    visibility: hidden;
}

.calc-out {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: inset 0 0 16px #ccc;
    color: #999;
    background-color: #fff;
    border: solid 3px #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    padding: 12px;
}

.result {
    flex:0 0 42px;
    font-size: 32px;
    line-height: 42px;;
    box-sizing: border-box;
    inline-size: 100%;
    text-align: right;
    display: inline-block;
    word-break: break-word;
}

.expression {
    flex: 1 0 24px;
    font-size: 18px;
    line-height: 24px;
    word-break: break-all;
}