* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: #17202c; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
.calculator { width: 100%; max-width: 500px; margin: 0 auto; padding: 24px 18px 18px; }
.heading { color: #8fa2b7; font-size: 12px; font-weight: bold; letter-spacing: 3px; text-align: center; margin-bottom: 18px; }
.screen { background: #223142; border: 1px solid #35485c; border-radius: 18px; height: 160px; padding: 22px 24px; text-align: right; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0,0,0,.15); }
.expression { height: 35px; color: #9eb0c2; font-size: 18px; white-space: nowrap; overflow: hidden; }
.display { font-size: 64px; line-height: 75px; font-weight: 300; white-space: nowrap; overflow: hidden; }
.display.small { font-size: 45px; }
.display.tiny { font-size: 31px; }
.keys { margin-top: 16px; }
.row { display: -webkit-flex; display: flex; width: 100%; }
button { -webkit-appearance: none; appearance: none; -webkit-flex: 1; flex: 1; min-width: 0; height: 74px; margin: 5px; border: 0; border-radius: 15px; background: #2d3d50; color: #f8fbff; font: 300 30px -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; cursor: pointer; touch-action: manipulation; }
button:active, button.pressed { background: #425a72; }
button.utility { background: #455466; color: #f4f7fa; font-size: 25px; }
button.utility:active { background: #617185; }
button.operator { background: #315b70; color: #aee4e2; }
button.operator:active, button.operator.selected { background: #4b8295; color: #fff; }
button.equals { background: #e9ad59; color: #17202c; font-weight: 500; }
button.equals:active { background: #f5c67e; }
button.wide { -webkit-flex: 2; flex: 2; text-align: left; padding-left: 29px; }
.footer { text-align: center; color: #71879b; font-size: 12px; letter-spacing: 1px; margin-top: 15px; }
@media (max-height: 660px) { .calculator { padding-top: 12px; } .heading { margin-bottom: 10px; } .screen { height: 120px; padding-top: 12px; } .display { line-height: 65px; font-size: 56px; } button { height: 58px; } .footer { margin-top: 6px; } }
@media (min-width: 700px) and (orientation: landscape) { .calculator { max-width: 700px; padding-top: 10px; } .screen { height: 115px; padding-top: 10px; } .display { line-height: 62px; font-size: 54px; } button { height: 52px; } .heading { margin-bottom: 8px; } .keys { margin-top: 8px; } .footer { margin-top: 5px; } }
