@font-face{
  font-family: 'mathfont-z';
  src: url('../fonts/mathfont-z.woff2') format('woff2'),
        url('../fonts/mathfont-z.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: fallback;
}
@font-face{
  font-family: 'helvetica-neue';
  src: url('../fonts/HelveticaNeue.ttf') format('ttf');
  font-weight: normal;
  font-style: normal;
  font-display: fallback;
}
#keyboard {
  direction: ltr;
  background: #1f2022;
  touch-action: manipulation;
}

.cell {
  width: auto;
  height: 100%;
  padding: 0 10px;
}

@media screen and (min-width: 1025px) {
  .cell {
    min-width: 988px;
    max-width: 1010px;
    width: calc(100% - 20px);
    margin: 0 auto;
    padding: 0 10px;
  }
}

#keyboard .cell {
  height: 288px;
}

#keyboard .cell {
  width: 1030px;
  padding: 0;
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  #keyboard .cell {
    width: auto;
    padding: 0;
  }
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  #keyboard .cell {
    height: 204px;
  }
}

@media screen and (max-height: 640px) and (min-height: 551px) and (min-width: 1025px) {
  #keyboard .cell {
    height: 204px;
  }
}

.kbContainer {
  padding: 4px 0;
  font-family: mathfont-z;
}

.kbContainer.hidden {
  display: none;
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  .kbContainer {
    padding: 2px 0;
  }
}

.kbContainer .kbRow {
  height: 52px;
  text-align: center;
  padding: 2px 0;
}

.kbContainer .kbRow .kbKeyContainer {
  display: inline-block;
  padding: 0 4px;
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  .kbContainer .kbRow .kbKeyContainer {
    display: inline-block;
    padding: 0 2px;
  }
}

@media screen and (max-height: 550px) and (orientation: landscape) {
  .kbContainer .kbRow .kbKeyContainer {
    display: inline-block;
    padding: 0 2px;
  }
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  .kbContainer .kbRow .kbKeyContainer:first-child .kbDouble {
    margin-left: 0;
  }
}

.kbContainer .kbRow .kbKeyContainer .kbAlt {
  display: none;
  position: absolute;
  height: 68px;
  margin-top: -68px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  -webkit-box-shadow: 0 0 3px 3px #b8b8b8;
  -moz-box-shadow: 0 0 3px 3px #b8b8b8;
  box-shadow: 0 0 3px 3px #b8b8b8;
  z-index: 5000;
}

@media screen and (max-height: 550px) and (orientation: landscape) {
  .kbContainer .kbRow .kbKeyContainer .kbAlt {
    height: 32px;
    margin-top: -32px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
  }
}

.kbContainer .kbRow .kbKeyContainer .kbAlt.default {
  background: #fff;
  color: #333;
}

.kbContainer .kbRow .kbKeyContainer .kbAlt .kbAltKey {
  width: 68px;
  height: 58px;
  display: inline-block;
  cursor: pointer;
  font-size: 40px;
  line-height: 58px;
  margin: 5px;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  border-radius: 8px;
  text-align: center;
}

.kbContainer .kbRow .kbKeyContainer.kbSpan2 .kbAlt .kbAltKey {
  font-size: 30px;
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  .kbContainer .kbRow .kbKeyContainer .kbAlt .kbAltKey {
    width: 32px;
    height: 36px;
    display: inline-block;
    cursor: pointer;
    font-size: 20px;
    line-height: 36px;
    margin: 2px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
  }
}

@media screen and (max-height: 550px) and (orientation: landscape) {
  .kbContainer .kbRow .kbKeyContainer .kbAlt .kbAltKey {
    width: 40px;
    height: 28px;
    font-size: 24px;
    line-height: 28px;
    margin: 2px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
  }
}

.kbContainer .kbRow .kbKeyContainer .kbKey {
  position: relative;
  float: left;
  width: 100%;
  height: 48px;
  border-radius: 8px;
  font-size: 27px;
  line-height: 48px;
  font-weight: normal;
  cursor: pointer;
  box-shadow: 0px 1px 2px #000000;
}

.kbContainer .kbRow .kbKeyContainer.kbSpan2 .kbKey {
  font-size: 16px;
}

.kbContainer .kbRow .kbKeyContainer.selected .kbKey {
  color: #fff;
  background: #6b6b6b;
}

@media screen and (max-height: 550px) and (orientation: landscape) {
  .kbContainer .kbRow .kbKeyContainer .kbKey {
    width: 100%;
    height: 24px;
    border-radius: 4px;
    font-size: 16px;
    line-height: 24px;
    border-bottom: 1px solid #898a8e;
  }
  .kbContainer .kbRow {
    height: 26px;
    padding: 1px 0;
  }
  .kbContainer .kbRow .kbKeyContainer.kbSpan2 .kbKey {
    font-size: 12px;
  }
}

@media screen and (max-width: 550px) and (orientation: portrait) {
  .kbContainer .kbRow .kbKeyContainer .kbKey {
    width: 100%;
    height: 36px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    font-size: 20px;
    line-height: 36px;
  }
  .kbContainer .kbRow {
    height: 38px;
    padding: 1px 0;
  }
  .kbContainer .kbRow .kbKeyContainer.kbSpan2 .kbKey {
    font-size: 12px;
  }
}

.kbContainer .kbRow .kbKeyContainer .kbKey.default {
  background: #6b6b6b;
  color: #ffffff;
}

.dropdown-menu a {
  z-index: 1000;
  position: relative;
}

#process-btn {
  display: none;
}

#clear-btn {
  display: none;
}

.container {
  max-width: 100vw;
}

@media (min-width: 768px) {
  .container {
    max-width: 750px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
}

.expression-body .katex .katex-html .base {
  white-space: normal;
  word-break: break-all;
}