/* 猜数工坊 —— 冷瓷蓝仪表面板 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-top: #eef5fa;
  --bg-bottom: #dbe8f3;
  --panel: #f7fbfe;
  --panel-soft: #edf5fa;
  --line: #c7d9e8;
  --line-strong: #a9c4d8;
  --ink: #16283a;
  --ink-soft: #4f687c;
  --ink-faint: #7d93a4;
  --accent: #1e6e8c;
  --accent-deep: #155066;
  --high: #bc5336;
  --low: #1f7a73;
  --amber: #a07427;
  --font-display: "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC",
    "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Consolas", monospace;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 700px at 8% -12%, #ffffff 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(900px 650px at 108% 112%, #cfe1ef 0%, rgba(207, 225, 239, 0) 62%),
    linear-gradient(158deg, var(--bg-top) 0%, #e4eef7 55%, var(--bg-bottom) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.display input:focus-visible {
  outline: none;
}

/* ---------- 背景质感 ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(73, 109, 137, 0.5) 1px, transparent 1.2px);
  background-size: 24px 24px;
  opacity: 0.12;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 42%, #000 18%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 42%, #000 18%, transparent 78%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: multiply;
}

/* ---------- 版面 ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1080px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(22px, 4vh, 44px) clamp(16px, 4vw, 36px) 22px;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: clamp(15px, 2.4vh, 24px);
  flex-wrap: wrap;
  animation: rise 0.7s var(--ease) both;
}

.brand .kicker {
  margin: 0 0 5px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--accent);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.12em;
}

.meta {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: clamp(12px, 1.6vw, 18px);
  border-left: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat span {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.stat b {
  font-family: var(--font-num);
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--low);
  box-shadow: 0 0 0 4px rgba(31, 122, 115, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.status[data-won="true"] i {
  background: var(--high);
  box-shadow: 0 0 0 4px rgba(188, 83, 54, 0.12);
  animation: none;
}

.new-game {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    transform 0.12s ease;
}

.new-game:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
}

.new-game:active {
  transform: translateY(1px);
}

.new-game:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ---------- 机身 ---------- */

.machine {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f9fcfe 0%, #eff6fb 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 30px 70px -38px rgba(22, 40, 58, 0.5),
    0 8px 24px -16px rgba(22, 40, 58, 0.25);
  animation: rise 0.75s 0.08s var(--ease) both;
}

.side {
  padding: clamp(20px, 3vw, 30px);
}

.side-left {
  display: flex;
  flex-direction: column;
}

.side-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #ecf4fa 0%, #e4eef7 100%);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.range-text {
  font-family: var(--font-num);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.count {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 范围尺 ---------- */

.gauge {
  margin-top: 21px;
}

.gauge-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background-color: #d9e7f2;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(90, 122, 148, 0.28) 0 1px,
    transparent 1px 10%
  );
  box-shadow:
    inset 0 1px 3px rgba(22, 40, 58, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}

.gauge-window {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #69a3bc 0%, #1e6e8c 100%);
  box-shadow:
    0 2px 8px rgba(30, 110, 140, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: left 0.6s var(--ease), width 0.6s var(--ease), background 0.3s ease;
}

.gauge-window[data-won="true"] {
  background: linear-gradient(180deg, #3f8e7d 0%, #1f7a73 100%);
}

.gauge-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mark {
  position: absolute;
  top: -11px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #f8fbfd;
  border-radius: 50%;
  background: var(--high);
  box-shadow: 0 1px 2px rgba(22, 40, 58, 0.25);
  transform: translateX(-50%);
  opacity: 0.9;
}

.mark[data-tone="low"] {
  background: var(--low);
}

.mark[data-tone="win"] {
  top: -12px;
  width: 9px;
  height: 9px;
  background: var(--accent-deep);
}

.gauge-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ---------- 边界读数 ---------- */

.bounds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}

.bound {
  padding: 11px 15px 12px;
  border-left: 1px solid var(--line);
}

.bound:first-child {
  border-left: 0;
}

.bound span {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.bound b {
  font-family: var(--font-num);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.bound:last-child b {
  color: var(--accent);
}

/* ---------- 记录 ---------- */

.history-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 24px;
}

.history {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  max-height: 168px;
  margin-top: 12px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.history::-webkit-scrollbar {
  width: 6px;
}

.history::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.history .empty {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #e7c9bd;
  border-radius: 999px;
  background: #faece6;
  color: var(--high);
  font-size: 11px;
  letter-spacing: 0.08em;
  animation: chip-in 0.3s var(--ease) both;
}

.chip b {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip i {
  font-style: normal;
}

.chip[data-tone="low"] {
  border-color: #c4e0dc;
  background: #e4f2ef;
  color: var(--low);
}

.chip[data-tone="win"] {
  border-color: #bdd8e4;
  background: #e2f0f6;
  color: var(--accent-deep);
}

.tip {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.tip p {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ---------- 提示 ---------- */

.feedback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 86px;
  padding: 12px 16px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-faint);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.feedback strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.feedback p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.feedback[data-tone="high"] {
  border-color: #eccfc4;
  border-left-color: var(--high);
  background: linear-gradient(180deg, #fbf1ec, #f8e9e2);
}

.feedback[data-tone="high"] strong {
  color: var(--high);
}

.feedback[data-tone="low"] {
  border-color: #c4e0dc;
  border-left-color: var(--low);
  background: linear-gradient(180deg, #ebf6f4, #e2f1ee);
}

.feedback[data-tone="low"] strong {
  color: var(--low);
}

.feedback[data-tone="invalid"] {
  border-color: #e8d9c0;
  border-left-color: var(--amber);
  background: #f8f2e8;
}

.feedback[data-tone="invalid"] strong {
  color: var(--amber);
}

.feedback[data-tone="win"] {
  border-color: #bdd8e4;
  border-left-color: var(--accent);
  background: linear-gradient(180deg, #eaf4fa, #deedf6);
}

.feedback[data-tone="win"] strong {
  color: var(--accent-deep);
}

.feedback.bump {
  animation: bump 0.36s var(--ease);
}

/* ---------- 数字屏 ---------- */

.display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(108px, 14vh, 136px);
  border: 1px solid #b8cddd;
  border-radius: 14px;
  background: linear-gradient(180deg, #dfeaf4 0%, #eaf3fa 100%);
  box-shadow:
    inset 0 4px 12px rgba(30, 60, 85, 0.14),
    inset 0 -2px 0 rgba(255, 255, 255, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.display::before {
  content: "?";
  position: absolute;
  z-index: 0;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: clamp(50px, 6vw, 66px);
  line-height: 1;
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.display:has(input:not(:placeholder-shown))::before {
  opacity: 0;
}

.display::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

.display:focus-within {
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(30, 110, 140, 0.12),
    inset 0 4px 12px rgba(30, 60, 85, 0.12),
    inset 0 -2px 0 rgba(255, 255, 255, 0.9);
}

.display input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0 14px 6px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: clamp(62px, 8.5vw, 94px);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  caret-color: var(--accent);
}

.display input::placeholder {
  color: transparent;
  opacity: 0;
}

.display input:disabled {
  color: var(--accent-deep);
  -webkit-text-fill-color: var(--accent-deep);
  opacity: 0.85;
}

.display.is-busy input {
  opacity: 0.55;
}

.display.pop input {
  animation: digit-pop 0.28s var(--ease);
}

.display.shake input {
  animation: shake 0.4s ease;
}

/* ---------- 键盘 ---------- */

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.keypad button {
  height: clamp(47px, 6.2vh, 58px);
  border: 1px solid #c2d5e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #eef5fb 100%);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 600;
  box-shadow: 0 2px 0 #b9cddd, 0 5px 10px -6px rgba(22, 40, 58, 0.3);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease,
    border-color 0.15s ease, opacity 0.15s ease;
}

.keypad button:hover {
  border-color: #afc8db;
  background: linear-gradient(180deg, #ffffff, #f3f9fd);
}

.keypad button:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #b9cddd, 0 1px 3px rgba(22, 40, 58, 0.2);
}

.keypad button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 0 #c8d8e5;
}

.keypad .key-ghost {
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.keypad .key-primary,
.win-card .key-primary {
  border: 1px solid #164f65;
  background: linear-gradient(180deg, #2a7b99 0%, #1b5c76 100%);
  color: #f6fbfe;
  box-shadow: 0 2px 0 #123f51, 0 6px 14px -6px rgba(21, 80, 102, 0.55);
}

.keypad .key-primary {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.16em;
}

.keypad .key-primary:hover,
.win-card .key-primary:hover {
  background: linear-gradient(180deg, #3189a9 0%, #1f6a86 100%);
  border-color: #164f65;
}

.keypad .key-primary:active,
.win-card .key-primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #123f51, 0 1px 3px rgba(21, 80, 102, 0.4);
}

.keypad .key-primary:disabled {
  opacity: 0.45;
  box-shadow: none;
}

.keyboard-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- 页脚 ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  animation: rise 0.7s 0.16s var(--ease) both;
}

.foot-num {
  font-family: var(--font-num);
  letter-spacing: 0.16em;
}

/* ---------- 胜利弹窗 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(214, 229, 241, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay[hidden] {
  display: none;
}

.overlay.show {
  opacity: 1;
}

.win-card {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  padding: 30px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fcfeff 0%, #eff6fb 100%);
  box-shadow:
    0 1px 0 #ffffff inset,
    0 40px 80px -40px rgba(22, 40, 58, 0.6);
  text-align: center;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.45s var(--ease);
}

.overlay.show .win-card {
  transform: none;
}

.win-card .label {
  color: var(--ink-faint);
}

.win-card h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.win-number {
  margin: 6px 0 4px;
  color: var(--accent-deep);
  font-family: var(--font-num);
  font-size: clamp(72px, 12vw, 96px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.win-stats {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.win-card .key-primary {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.confetti {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -6vh;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.2, 0.55, 0.45, 1);
  animation-fill-mode: forwards;
}

/* ---------- 动效 ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.82);
    opacity: 0.6;
  }
}

@keyframes bump {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes digit-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes confetti-fall {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(var(--spin, 360deg));
    opacity: 0.25;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .stage {
    justify-content: flex-start;
    padding: 24px 16px 20px;
  }

  .masthead {
    align-items: flex-start;
  }

  .machine {
    grid-template-columns: 1fr;
  }

  .side-right {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .display {
    height: 116px;
  }

  .history {
    max-height: 124px;
  }

  .foot {
    flex-wrap: wrap;
    gap: 4px 16px;
  }
}

@media (max-width: 560px) {
  .brand h1 {
    font-size: 30px;
  }

  .meta {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .status {
    display: none;
  }

  .stat b {
    font-size: 20px;
  }

  .bounds {
    grid-template-columns: repeat(3, 1fr);
  }

  .bound {
    padding: 10px 12px;
  }

  .history {
    max-height: 104px;
  }

  .foot {
    flex-direction: column;
  }
}

@media (min-width: 901px) and (max-height: 860px) {
  .stage {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .masthead {
    margin-bottom: 14px;
  }

  .side {
    padding: 22px 26px;
  }

  .display {
    height: 106px;
  }

  .keypad button {
    height: 47px;
  }

  .feedback {
    min-height: 74px;
    padding: 10px 16px;
  }

  .feedback strong {
    font-size: 23px;
  }

  .history {
    max-height: 110px;
  }

  .foot {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
