/* calculator 페이지 전용 (한글판·영어판 공통) */
.calc-layout { display: grid; gap: 16px; }
@media (min-width: 720px) { .calc-layout { grid-template-columns: minmax(0, 1fr) 240px; align-items: start; } }
.calc { padding: 14px; }
.screen {
  position: relative;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px 10px;
  text-align: right;
  min-height: 108px;
  display: grid;
  align-content: end;
}
.expr { color: var(--muted); font-size: 18px; min-height: 28px; word-break: break-all; font-variant-numeric: tabular-nums; }
.answer { font-size: 40px; font-weight: 700; line-height: 1.2; word-break: break-all; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.answer.dim { color: var(--muted); font-weight: 600; }
.answer.err { color: var(--danger); font-size: 20px; }
.screen-tools { display: flex; justify-content: space-between; margin-top: 8px; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.keys button {
  min-height: 60px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.keys button:active { filter: brightness(0.92); }
.keys .op { color: var(--accent); background: var(--accent-weak); font-weight: 600; }
.keys .fn { color: var(--muted); font-size: 20px; }
.keys .eq { background: var(--accent); color: var(--accent-text); font-weight: 700; }
@media (min-width: 720px) { .keys button { min-height: 56px; } }
.history h2 { font-size: 15px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; }
.history ol { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.history li button {
  width: 100%;
  text-align: right;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 8px 2px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.history li:first-child button { border-top: 0; }
.history li small { display: block; color: var(--muted); font-size: 13px; word-break: break-all; }
.history li strong { font-size: 16px; word-break: break-all; }
