/* MathNote housing, with the mathematical key positions of fx-580VN X. */
.floating-calculator {
  --calc-ink: #e8f0ed;
  position: fixed;
  left: auto;
  right: 22px;
  top: 122px;
  margin: 0;
  width: 350px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  border: 1px solid #4b6561;
  border-radius: 20px;
  background: #203a38;
  color: var(--calc-ink);
  box-shadow:
    0 18px 50px #163b3840,
    inset 0 1px #ffffff21;
  overflow: auto;
  resize: horizontal;
  min-width: 310px;
}
.floating-calculator form {
  max-height: none;
  display: block;
  overflow: visible;
}
.floating-calculator header {
  height: 46px;
  min-height: 46px;
  background: transparent;
  border: 0;
  padding: 10px 15px;
  cursor: grab;
  touch-action: none;
}
.calculator-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.calculator-brand h2 {
  color: #f4f8f5;
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
  font-weight: 650;
  letter-spacing: 0.1px;
}
.calculator-brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #b5cbc2;
  margin-top: 5px;
}
.floating-calculator header [data-close] {
  color: #b4c9c2;
  background: #ffffff0a;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  padding: 5px;
}
.floating-calculator header [data-close]:hover {
  background: #ffffff21;
}
.floating-calculator .dialog-body {
  padding: 0 14px 7px;
  overflow: visible;
}
.calc-screen {
  position: relative;
  box-sizing: border-box;
  min-height: 154px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 5px solid #122c2a;
  background: #e0e9cf;
  color: #1b3025;
  box-shadow: inset 0 2px 5px #213d3929;
}
.calc-indicators {
  display: flex;
  align-items: center;
  gap: 7px;
  font:
    600 9px/1.3 "Segoe UI",
    sans-serif;
  letter-spacing: 0.4px;
}
.calc-indicators [data-indicator] {
  opacity: 0.18;
}
.calc-indicators [data-indicator].active {
  opacity: 1;
}
.calc-indicators .calc-mode {
  margin-left: auto;
  letter-spacing: 0;
  font-weight: 400;
}
.calc-natural {
  min-height: 48px;
  height: auto;
  overflow: auto hidden;
  margin: 2px 0;
  font:
    23px/1.35 "Cambria Math",
    "Times New Roman",
    serif;
  scrollbar-width: thin;
}
.calc-natural .katex {
  font-size: 1.15em;
}
.floating-calculator .calc-screen input.calculator-input {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  background: transparent !important;
  padding: 0 1px;
  width: 100%;
  font:
    15px/1.5 "Cambria Math",
    Consolas,
    monospace;
  color: #253b2b;
  min-height: 23px;
  height: 23px;
}
.floating-calculator .calc-screen input.calculator-input:focus {
  outline: 0;
  border-bottom: 1px solid #78906e !important;
}
.floating-calculator .calculator-result {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  min-height: 29px;
  text-align: right;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font:
    26px/1.2 "Cambria Math",
    Consolas,
    monospace;
  color: #172b1d;
  overflow: auto hidden;
  white-space: nowrap;
}
.floating-calculator button {
  font-family: inherit;
  touch-action: manipulation;
}
.calc-navigation {
  display: grid;
  grid-template-columns: 40px 40px 1fr 45px 33px;
  gap: 6px;
  align-items: center;
  height: 60px;
}
.calc-navigation > button,
.calc-menu-button button {
  padding: 0;
  border: 1px solid #7e9690;
  border-radius: 50%;
  height: 29px;
  color: #eef5ef;
  background: linear-gradient(135deg, #75918b, #3d5853);
  box-shadow: 0 2px 0 #102d29;
  font-size: 9px;
}
.calc-navigation .calc-shift {
  color: #f6d58a;
  border-color: #b7a16a;
}
.calc-navigation .calc-alpha {
  color: #f5c1d0;
  border-color: #bd8f9b;
}
.calc-navigation button[aria-pressed="true"] {
  background: #e8e5bb;
  color: #203a38;
  box-shadow: 0 0 0 2px #e0c57666;
}
.calc-menu-button {
  position: relative;
}
.calc-menu-button span {
  position: absolute;
  top: -12px;
  left: 4px;
  font-size: 7px;
  color: #e3c587;
}
.calc-menu-button button {
  width: 100%;
  border-radius: 14px;
}
.calc-replay {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 19px 18px 19px;
  border-radius: 50%;
  background: #5a756e;
  border: 1px solid #90a69e;
  box-shadow: 0 3px 0 #102d29;
  padding: 2px;
  width: 83px;
  justify-self: center;
}
.calc-replay button {
  border: 0;
  background: transparent;
  color: #e2ece6;
  font-size: 9px;
  padding: 0;
  min-height: 0;
  border-radius: 5px;
  line-height: 1;
}
.calc-replay button:hover {
  background: #ffffff26;
}
.calc-replay [data-calc-key="up"] {
  grid-column: 2;
  grid-row: 1;
}
.calc-replay [data-calc-key="left-arrow"] {
  grid-column: 1;
  grid-row: 2;
}
.calc-replay span {
  grid-column: 2;
  grid-row: 2;
  font-size: 5px;
  line-height: 18px;
  text-align: center;
  color: #becdc7;
}
.calc-replay [data-calc-key="right-arrow"] {
  grid-column: 3;
  grid-row: 2;
}
.calc-replay [data-calc-key="down"] {
  grid-column: 2;
  grid-row: 3;
}
.calc-top-keys {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}
.calc-top-keys .calc-key-wrap:nth-child(3) {
  grid-column: 5;
}
.calc-scientific {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px 7px;
}
.calc-key-wrap {
  min-width: 0;
}
.calc-legends {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 12px;
  gap: 1px;
  font-size: 8px;
  line-height: 1;
  white-space: nowrap;
  color: #e8ce8d;
  padding: 0 2px;
}
.calc-legends em {
  font-size: 8px;
  color: #e8a7bd;
  font-style: normal;
}
.calc-key-wrap button {
  display: block;
  width: 100%;
  border: 1px solid #68827a;
  border-radius: 6px 6px 9px 9px;
  min-height: 26px;
  padding: 2px 1px;
  background: linear-gradient(#45625b, #334e48);
  color: #f5f7ee;
  font-size: 13px;
  box-shadow: 0 2px 0 #0c2622;
  line-height: 1;
}
.calc-key-wrap button:hover {
  background: #57776d;
  border-color: #a7bdb2;
}
.calc-key-wrap button:active {
  transform: translateY(1px);
  box-shadow: none;
}
.calc-key-wrap button:focus-visible,
.calc-navigation button:focus-visible {
  outline: 2px solid #f4d491;
  outline-offset: 2px;
}
.floating-calculator .calculator-keys {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px 8px;
  margin-top: 8px;
}
.calculator-keys .calc-legends {
  height: 13px;
}
.floating-calculator .calculator-keys button {
  font-size: 20px;
  min-height: 31px;
  color: #1b3932;
  background: linear-gradient(#fafbf6, #dce6dc);
  border-color: #f7fbf1;
}
.floating-calculator .calculator-keys button:hover {
  background: #fff;
}
.floating-calculator .calculator-keys .calc-clear {
  color: #f5f8f1;
  background: linear-gradient(#758eaa, #526e8e);
  border-color: #829db3;
  font-size: 15px;
}
.floating-calculator .calculator-keys .calc-equal {
  background: linear-gradient(#c5dfbd, #a7cfa4);
}
.calc-history-panel {
  margin-top: 12px;
  font-size: 11px;
  color: #a9c0b7;
}
.calc-history-panel summary {
  cursor: pointer;
  padding: 3px 0;
}
.floating-calculator .calc-history {
  display: grid;
  gap: 3px;
  max-height: 140px;
  overflow: auto;
}
.calc-history button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  border: 0;
  background: #ffffff0b;
  color: #edf3e9;
  font-size: 11px;
  text-align: left;
  padding: 6px;
}
.calc-history button small {
  grid-column: 1/3;
  color: #9cb5aa;
  font-size: 8px;
}
.floating-calculator .form-error {
  padding: 0 15px;
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #ffd0bc;
  max-width: 100%;
}
.floating-calculator .form-error:empty {
  display: none;
}
.floating-calculator footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 15px 10px;
  background: transparent;
  border: 0;
  color: #a9bfb5;
  font-size: 9px;
}
.floating-calculator footer > button:not(.primary) {
  border: 0;
  background: none;
  color: #c6d8ce;
  text-decoration: underline;
  font-size: 9px;
  min-height: 0;
  padding: 0;
}
.calc-screen-menu {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e0e9cf;
  border-radius: 4px;
  overflow: auto;
  padding: 8px;
  color: #1c3425;
  scrollbar-width: thin;
}
.calc-screen-menu h3 {
  font-size: 12px;
  margin: 0 0 6px;
}
.calc-screen-menu p {
  font-size: 11px;
  margin: 5px 0 9px;
  line-height: 1.5;
}
.calc-screen-menu button {
  font-size: 11px;
  background: transparent;
  border: 1px solid #bccaaa;
  color: #203626;
  border-radius: 4px;
  padding: 5px;
  min-height: 28px;
}
.calc-screen-menu button:hover {
  background: #bed1aa;
}
.calc-screen-menu button.selected {
  color: #e7f0d8;
  background: #344c34;
  border-color: #344c34;
}
.calc-screen-menu .calc-option-list {
  grid-template-columns: 1fr;
  gap: 0;
}
.calc-screen-menu .calc-option-list button {
  text-align: left;
  min-height: 23px;
  border: 0;
  border-radius: 0;
  padding: 3px 5px;
}
.calc-screen-menu small {
  font-size: 9px;
}
.calc-prompt {
  font:
    11px/1.3 Consolas,
    monospace;
  min-height: 14px;
}
.calc-answer-natural {
  min-height: 29px;
  text-align: right;
  font:
    24px/1.3 "Cambria Math",
    serif;
  white-space: nowrap;
  overflow: auto hidden;
}
.calc-answer-natural .katex {
  font-size: 1em;
}
.calc-natural:focus {
  outline: 0;
}
.calc-caret {
  display: inline-block;
  vertical-align: -0.12em;
  height: 1em;
  width: 1px;
  background: #153b24;
  margin: 0 1px;
}
.calc-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  vertical-align: middle;
  text-align: center;
  font-size: 0.9em;
  margin: 0 3px;
}
.calc-fraction > span:first-child {
  border-bottom: 1px solid currentColor;
  padding: 0 3px 1px;
}
.calc-fraction > span:last-child {
  padding: 1px 3px 0;
}
.calc-math-field {
  display: inline-block;
  min-width: 0.3em;
}
.calc-math-field.empty {
  min-width: 0.55em;
  color: #83916e;
}
.calc-power {
  display: inline-flex;
  align-items: center;
}
.calc-power sup {
  font-size: 0.7em;
  align-self: flex-start;
}
.calc-mixed {
  display: inline-flex;
  align-items: center;
}
.calc-root {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
}
.calc-root > b {
  font-size: 1.4em;
  font-weight: 400;
}
.calc-root > sup {
  font-size: 0.6em;
  align-self: flex-start;
  margin-right: -3px;
}
.calc-radicand {
  border-top: 1px solid currentColor;
  padding: 0 2px;
}
.calc-operator-template {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.calc-limits {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.calc-limits b {
  font-size: 1.5em;
  font-weight: 400;
}
.calc-limits small {
  font-size: 0.55em;
}
.calc-stage-grid {
  max-height: 85px;
  overflow: auto;
  font:
    11px/1.3 Consolas,
    monospace;
}
.calc-stage-grid table {
  border-collapse: collapse;
  width: 100%;
  margin: 0;
}
.calc-stage-grid td,
.calc-stage-grid th {
  border: 1px solid #839276;
  padding: 3px;
  text-align: right;
}
.calc-stage-grid .selected {
  background: #344c34;
  color: #eef5df;
}
.floating-calculator[data-stage="table-results"] .calc-natural,
.floating-calculator[data-stage="matrix-result"] .calc-natural,
.floating-calculator[data-stage="statistics-results"] .calc-natural {
  display: none;
}
.calc-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.calc-mode-grid button {
  padding: 3px 1px;
  min-height: 35px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.calc-mode-grid button > span {
  display: block;
  font:
    16px/1 "Cambria Math",
    serif;
}
.calc-mode-grid small {
  font-size: 8px;
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}
.calc-option-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.floating-calculator [hidden] {
  display: none !important;
}
.floating-calculator[data-menu-open] .calc-history-panel {
  display: none;
}
.floating-calculator[data-menu-open] .calc-screen {
  min-height: 174px;
}
@media (max-height: 740px) {
  .floating-calculator {
    top: 8px;
  }
  .calc-screen {
    min-height: 98px;
    padding: 5px 8px;
  }
  .calc-natural {
    height: 17px;
    font-size: 12px;
  }
  .calc-navigation {
    height: 50px;
  }
  .calc-key-wrap button {
    min-height: 23px;
  }
  .floating-calculator .calculator-keys button {
    min-height: 28px;
  }
  .calc-legends {
    height: 11px;
  }
  .calc-history-panel {
    display: none;
  }
  .floating-calculator header {
    height: 40px;
    min-height: 40px;
    padding: 7px 14px;
  }
  .floating-calculator .calculator-keys {
    gap: 5px 8px;
    margin-top: 5px;
  }
  .floating-calculator footer {
    padding: 5px 15px 7px;
  }
}
.calc-stage-grid td button {
  min-height: 20px;
  min-width: 38px;
  padding: 2px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.calc-stage-grid td button.selected {
  background: #334c3a;
  color: #eef5dc;
}
.calc-recurring {
  text-decoration: overline;
}
.calc-screen-menu .calc-option-list button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
}
.calc-choice-key {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 10px;
  opacity: 0.85;
  flex-shrink: 0;
}
