:root {
  --color-scheme-background: #fff;
  --color-scheme-text-color: #111;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color-scheme-background: #272822;
    --color-scheme-text-color: #fdf9f3;
  }
}
html{
  background: var(--color-scheme-background);
  color: var(--color-scheme-text-color);
}
html, body{
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
body{
  font-size: 16px;
  padding: 0;
  margin: 0;
  overflow: auto;
}
* {
  box-sizing: border-box;
}
.calculator{
  max-width: 940px;
  margin: 0 auto;
  box-shadow: 0 0 1rem 0 rgba(0,0,0,.05);
}
.calculator > div{
  position: relative;
  font-family: Menlo, Consolas, source-code-pro, monospace;
  font-size: .875rem;
  line-height: 1.8;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, .3fr);
  grid-column-gap: 0;
  grid-row-gap: 0;
  justify-items: stretch;
  align-items: stretch;
}

.calculator.full{
  width: 300px;
  height: 300px;
  border: none;
}

.calculator .input{
  outline: none;
  padding: .5rem 1rem;
}

.calculator .input > div{
  position: relative;
  min-height: calc(.875rem * 1.8);
}

.calculator .input > div.completed{
  text-decoration: line-through;
}

.calculator .output{
  padding: .5rem;
  text-align: right;
  color: #757575;
  position: relative;
  background: rgba(0, 0, 0, .05);
}

.calculator .output > div{
  position: absolute;
  width: 100%;
  height: 1.5625rem;
}

.calculator .output .result{
  max-width: calc(100% - 2rem);
  position: absolute;
  right: 1rem;
  cursor: pointer;
  border-radius: .3125rem;
  padding: 0 .5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  transition: all .2s;
}

.calculator .output .result.empty{
  visibility: hidden;
}

.calculator .output .result:not(.boom):hover{
  background: #dc7459;
  color: #fff;
}
