:root {
  --bg: #f8f1eb;
  --panel: #ffffff;
  --line: #e8d9cb;
  --text: #221b16;
  --muted: #7a6b5d;
  --accent: #f28c28;
  --accent-strong: #db771d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #000000;
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  padding: 20px;
}

.app-shell {
  width: min(100%, 360px);
}

.calculator {
  background: #000000;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}

.display-panel {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.display {
  min-height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-x: auto;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn {
  border: 1px solid var(--line);
  background: #ff69b4;
  color: #000000;
  border-radius: 10px;
  min-height: 58px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: #ff1493;
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #f5f5f5;
  color: var(--muted);
}

.btn-operator {
  color: #000000;
}

.btn-equals {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-equals:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-zero {
  grid-column: span 2;
}

@media (min-width: 600px) {
  .calculator {
    padding: 24px;
  }

  .button-grid {
    gap: 12px;
  }

  .btn {
    min-height: 62px;
  }
}
