* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, sans-serif;
  background: #1e3a8a;
  color: #eff6ff;
  text-align: center;
}

:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.hud {
  width: 100%;
  padding: 0.75rem;
  background: #172554;
}

.hud h1 {
  margin: 0;
  font-size: 1.25rem;
}

.hud__score {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
}

.cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 42px));
  gap: 4px;
}

.cols__btn {
  padding: 0.25rem 0;
  border: 0;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.cols__btn:hover:not(:disabled) {
  background: #60a5fa;
}

.cols__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 42px));
  grid-template-rows: repeat(6, minmax(34px, 42px));
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: #1d4ed8;
}

.cell {
  border-radius: 50%;
  background: #dbeafe;
}

.cell.r {
  background: #ef4444;
}

.cell.y {
  background: #facc15;
}

.cell.win {
  outline: 3px solid #fff;
}

.status {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.button {
  padding: 0.5rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.button:hover {
  background: #fff;
}

.hint {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.875rem;
}
