* {
  font-size: x-large;
  box-sizing: border-box;
  font-family: 'Brush Script MT', cursive;
  position: relative;
  margin: 0;
  padding: 0;
}

html {
  width: 100dvw;
  height: 100dvh;
  background-color: #f8eded;
}

body {
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
}

#calculator {
  border-radius: 3px;
}

table {
  margin-top: 8rem;
  justify-content: center;
  align-items: center;
  border-spacing: 0.5rem;
  width: 360px;
  height: 580px;
}

tr {
  width: 100%;
  height: 100%;
}

td {
  background-color: #808080;
  box-shadow: 4px 4px 2px #00000080;
  text-align: center;
  border-radius: 3px;
  padding: 0.3rem;
  width: 64px;
  height: 64px;
}

td>* {
  box-shadow: 3px 3px 2px #00000033;
}

td button {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  border-style: none;
}

#display {
  width: 100%;
  height: 160px;
  padding: 0.3rem;
  z-index: 50;
}

/* DISPLAYS */

#display-inner {
  background-color: #9bc3c5;
  display: block;
  position: relative;
  width: 100%;
  height: 64px;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  box-sizing: border-box;
  text-align: right;
  text-wrap-mode: nowrap;
  text-wrap-style: pretty;
  padding: 1rem;
  font-size: 20px;

  box-shadow: 0px 3px 4px #00000033;
  z-index: 100;
  transition: ease-in 0.08s background-color;
}

#display-inner-2ndLine {
  background-color: #a3ccce;
  display: block;
  width: 100%;
  height: 96px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  box-sizing: border-box;
  text-align: right;
  text-wrap-mode: nowrap;
  text-wrap-style: pretty;
  padding: 1rem;
  font-size: 24px;

  z-index: 75;
  transition: ease-in 0.08s background-color;
}

#display-mode {
  background-color: #a3ccce;
  display: block;
  width: 100%;
  border-radius: 3px;
  box-sizing: border-box;
  text-align: center;
  padding: 1rem;
  font-size: 24px;

  z-index: 75;
  transition: ease-in 0.08s background-color;
}

#display-external {
  display: flex;
  position: fixed;
  top: 0;
  background-color: #00000033;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  box-shadow: 0px 3px 4px #00000033;
  justify-content: center;
  flex-direction: column;
  overflow: scroll;
  scroll-behavior:smooth;
  width: 40%;
  height: 20%;
  padding: 1rem;
  gap: 0.3rem;
}

#display-external button {
  background-color: #00000017;
  box-shadow: 0px 3px 4px #00000033;
  border: 0;
  border-radius: 3px;
  text-align: end;
  padding: 0.4rem;
}

/* DEFAULT + SHIFT */

#display-inner.sft {
  background-color: #c59b9b;
}

#display-inner-2ndLine.sft {
  background-color: #cea3a3;
}

#display-mode.sft {
  background-color: #cea3a3;
}

.control #bsc {
  display: block;
}

.control #adv {
  display: none;
}

.control.sft #bsc {
  display: none;
}

.control.sft #adv {
  display: block;
}

/* CONTROL BUTTONS */
.control {
  background-color: #afdadd;
  transition: ease-in 0.08s background-color;
}

.control:hover {
  background-color: #c1e6e9;
  transition: ease-in 0.08s background-color;
}

.control:active {
  background-color: #ffffff;
  transition: ease-in 0.08s background-color;
}

/* DEFAULT + SHIFT */

.control.sft {
  background-color: #ddafaf;
}

.control.sft:hover {
  background-color: #e9c1c1;
}

.control.sft:active {
  background-color: #ffffff;
}

/* NUMBER BUTTONS */

.number {
  background-color: #59b8be;
  transition: ease-in 0.08s background-color;
}

.number:hover {
  background-color: #67c8cf;
  transition: ease-in 0.08s background-color;
}

.number:active {
  background-color: #ffffff;
  transition: ease-in 0.08s background-color;
}

/* DEFAULT + SHIFT */

.number.sft {
  background-color: #be5959;
}

.number.sft:hover {
  background-color: #cf6767;
}

.number.sft:active {
  background-color: #ffffff;
}

#E div {
  transform: rotate(-90deg);
}