* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #f5f5f5;
  color: #222;
}

.app {
  max-width: 760px;
  margin: 24px auto;
  padding: 16px;
}

h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.intro,
.controls,
.pad-wrap {
  margin-bottom: 14px;
}

.controls,
.pad-wrap,
.number-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button {
  padding: 8px 14px;
  border: 1px solid #999;
  background: #fff;
  cursor: pointer;
}

button:hover {
  background: #f0f0f0;
}

.option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.option input {
  margin: 0;
}

.message {
  min-height: 24px;
}

.board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 3px solid #222;
  background: #222;
  gap: 1px;
  margin-bottom: 16px;
}

.cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  text-align: center;
  font-size: 20px;
  background: #fff;
  color: #222;
}

.cell:focus,
.cell.selected {
  outline: 2px solid #1b73e8;
  outline-offset: -2px;
  background: #eef5ff;
}

.cell.fixed {
  background: #e6e6e6;
  font-weight: 700;
}

.cell.error {
  background: #ffd9d9;
}

.pad-btn.active {
  background: #dce9ff;
  border-color: #1b73e8;
}

.secondary-btn {
  background: #fafafa;
}

@media (max-width: 640px) {
  .app {
    padding: 12px;
  }

  .cell,
  .pad-btn,
  .secondary-btn {
    font-size: 16px;
  }
}
